diff --git a/Box2D/prebuilt/ohos/libbox2d.a b/Box2D/prebuilt/ohos/libbox2d.a new file mode 100644 index 0000000000..fa2a3700b4 Binary files /dev/null and b/Box2D/prebuilt/ohos/libbox2d.a differ diff --git a/CMakeLists.txt b/CMakeLists.txt index afb8201924..54ae3dbcfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,6 @@ add_subdirectory(bullet) add_subdirectory(jpeg) add_subdirectory(openssl) add_subdirectory(tiff) -add_subdirectory(uv) add_subdirectory(webp) add_subdirectory(websockets) add_subdirectory(tinyxml2) @@ -22,6 +21,10 @@ add_subdirectory(edtaa3func) add_subdirectory(ConvertUTF) add_subdirectory(poly2tri) add_subdirectory(md5) +if(NOT OHOS) + add_subdirectory(uv) + target_link_libraries(external ext_uv) +endif() target_link_libraries(external ext_box2d @@ -29,7 +32,6 @@ target_link_libraries(external ext_freetype ext_recast ext_jpeg - ext_uv ext_webp ext_bullet ext_ssl @@ -89,6 +91,17 @@ if(ANDROID) ) endif() +if(OHOS) + add_subdirectory(ohos-specific/pvmp3dec) + add_subdirectory(ohos-specific/tremolo) + add_subdirectory(sqlite3) + target_link_libraries(external + ext_sqlite3 + ext_pvmp3dec + ext_tremolo + ) +endif() + if(WINDOWS) # sqlite3 prebuilt only existed at windows add_subdirectory(sqlite3) @@ -114,7 +127,7 @@ if(WINDOWS OR MACOSX OR LINUX) ) endif() -if(MACOSX OR ANDROID OR WINDOWS) +if(MACOSX OR ANDROID OR WINDOWS OR OHOS) add_subdirectory(zlib) target_link_libraries(external ext_zlib diff --git a/bullet/prebuilt/ohos/libBulletCollision.a b/bullet/prebuilt/ohos/libBulletCollision.a new file mode 100644 index 0000000000..e50b65883c Binary files /dev/null and b/bullet/prebuilt/ohos/libBulletCollision.a differ diff --git a/bullet/prebuilt/ohos/libBulletDynamics.a b/bullet/prebuilt/ohos/libBulletDynamics.a new file mode 100644 index 0000000000..4b3fb51059 Binary files /dev/null and b/bullet/prebuilt/ohos/libBulletDynamics.a differ diff --git a/bullet/prebuilt/ohos/libBulletMultiThreaded.a b/bullet/prebuilt/ohos/libBulletMultiThreaded.a new file mode 100644 index 0000000000..cb48ba3e0a Binary files /dev/null and b/bullet/prebuilt/ohos/libBulletMultiThreaded.a differ diff --git a/bullet/prebuilt/ohos/libLinearMath.a b/bullet/prebuilt/ohos/libLinearMath.a new file mode 100644 index 0000000000..9090660ac8 Binary files /dev/null and b/bullet/prebuilt/ohos/libLinearMath.a differ diff --git a/bullet/prebuilt/ohos/libMiniCL.a b/bullet/prebuilt/ohos/libMiniCL.a new file mode 100644 index 0000000000..69ef3ce53a Binary files /dev/null and b/bullet/prebuilt/ohos/libMiniCL.a differ diff --git a/chipmunk/prebuilt/ohos/libchipmunk.a b/chipmunk/prebuilt/ohos/libchipmunk.a new file mode 100644 index 0000000000..883bac4848 Binary files /dev/null and b/chipmunk/prebuilt/ohos/libchipmunk.a differ diff --git a/cmake/CocosExternalConfig.cmake b/cmake/CocosExternalConfig.cmake index d6510273f7..998fccd4fd 100644 --- a/cmake/CocosExternalConfig.cmake +++ b/cmake/CocosExternalConfig.cmake @@ -31,6 +31,9 @@ if(IOS) elseif(ANDROID) set(platform_name android) set(platform_spec_path android/${ANDROID_ABI}) +elseif(OHOS) + set(platform_name ohos) + set(platform_spec_path ohos) elseif(WINDOWS) set(platform_name win32) set(platform_spec_path win32) diff --git a/curl/include/ohos/curl/curl.h b/curl/include/ohos/curl/curl.h new file mode 100644 index 0000000000..5b4ae469ee --- /dev/null +++ b/curl/include/ohos/curl/curl.h @@ -0,0 +1,2528 @@ +#ifndef __CURL_CURL_H +#define __CURL_CURL_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* + * If you have libcurl problems, all docs and details are found here: + * https://curl.haxx.se/libcurl/ + * + * curl-library mailing list subscription and unsubscription web interface: + * https://cool.haxx.se/mailman/listinfo/curl-library/ + */ + +#ifdef CURL_NO_OLDIES +#define CURL_STRICTER +#endif + +#include "curlver.h" /* libcurl version defines */ +#include "curlbuild.h" /* libcurl build definitions */ +#include "curlrules.h" /* libcurl rules enforcement */ + +/* + * Define WIN32 when build target is Win32 API + */ + +#if (defined(_WIN32) || defined(__WIN32__)) && \ + !defined(WIN32) && !defined(__SYMBIAN32__) +#define WIN32 +#endif + +#include +#include + +#if defined(__FreeBSD__) && (__FreeBSD__ >= 2) +/* Needed for __FreeBSD_version symbol definition */ +#include +#endif + +/* The include stuff here below is mainly for time_t! */ +#include +#include + +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \ + defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)) +/* The check above prevents the winsock2 inclusion if winsock.h already was + included, since they can't co-exist without problems */ +#include +#include +#endif +#endif + +/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish + libc5-based Linux systems. Only include it on systems that are known to + require it! */ +#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ + defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ + (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) +#include +#endif + +#if !defined(WIN32) && !defined(_WIN32_WCE) +#include +#endif + +#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) +#include +#endif + +#ifdef __BEOS__ +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) +typedef struct Curl_easy CURL; +typedef struct Curl_share CURLSH; +#else +typedef void CURL; +typedef void CURLSH; +#endif + +/* + * libcurl external API function linkage decorations. + */ + +#ifdef CURL_STATICLIB +# define CURL_EXTERN +#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) +# if defined(BUILDING_LIBCURL) +# define CURL_EXTERN __declspec(dllexport) +# else +# define CURL_EXTERN __declspec(dllimport) +# endif +#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) +# define CURL_EXTERN CURL_EXTERN_SYMBOL +#else +# define CURL_EXTERN +#endif + +#ifndef curl_socket_typedef +/* socket typedef */ +#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H) +typedef SOCKET curl_socket_t; +#define CURL_SOCKET_BAD INVALID_SOCKET +#else +typedef int curl_socket_t; +#define CURL_SOCKET_BAD -1 +#endif +#define curl_socket_typedef +#endif /* curl_socket_typedef */ + +struct curl_httppost { + struct curl_httppost *next; /* next entry in the list */ + char *name; /* pointer to allocated name */ + long namelength; /* length of name length */ + char *contents; /* pointer to allocated data contents */ + long contentslength; /* length of contents field, see also + CURL_HTTPPOST_LARGE */ + char *buffer; /* pointer to allocated buffer contents */ + long bufferlength; /* length of buffer field */ + char *contenttype; /* Content-Type */ + struct curl_slist *contentheader; /* list of extra headers for this form */ + struct curl_httppost *more; /* if one field name has more than one + file, this link should link to following + files */ + long flags; /* as defined below */ + +/* specified content is a file name */ +#define CURL_HTTPPOST_FILENAME (1<<0) +/* specified content is a file name */ +#define CURL_HTTPPOST_READFILE (1<<1) +/* name is only stored pointer do not free in formfree */ +#define CURL_HTTPPOST_PTRNAME (1<<2) +/* contents is only stored pointer do not free in formfree */ +#define CURL_HTTPPOST_PTRCONTENTS (1<<3) +/* upload file from buffer */ +#define CURL_HTTPPOST_BUFFER (1<<4) +/* upload file from pointer contents */ +#define CURL_HTTPPOST_PTRBUFFER (1<<5) +/* upload file contents by using the regular read callback to get the data and + pass the given pointer as custom pointer */ +#define CURL_HTTPPOST_CALLBACK (1<<6) +/* use size in 'contentlen', added in 7.46.0 */ +#define CURL_HTTPPOST_LARGE (1<<7) + + char *showfilename; /* The file name to show. If not set, the + actual file name will be used (if this + is a file part) */ + void *userp; /* custom pointer used for + HTTPPOST_CALLBACK posts */ + curl_off_t contentlen; /* alternative length of contents + field. Used if CURL_HTTPPOST_LARGE is + set. Added in 7.46.0 */ +}; + +/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered + deprecated but was the only choice up until 7.31.0 */ +typedef int (*curl_progress_callback)(void *clientp, + double dltotal, + double dlnow, + double ultotal, + double ulnow); + +/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in + 7.32.0, it avoids floating point and provides more detailed information. */ +typedef int (*curl_xferinfo_callback)(void *clientp, + curl_off_t dltotal, + curl_off_t dlnow, + curl_off_t ultotal, + curl_off_t ulnow); + +#ifndef CURL_MAX_WRITE_SIZE + /* Tests have proven that 20K is a very bad buffer size for uploads on + Windows, while 16K for some odd reason performed a lot better. + We do the ifndef check to allow this value to easier be changed at build + time for those who feel adventurous. The practical minimum is about + 400 bytes since libcurl uses a buffer of this size as a scratch area + (unrelated to network send operations). */ +#define CURL_MAX_WRITE_SIZE 16384 +#endif + +#ifndef CURL_MAX_HTTP_HEADER +/* The only reason to have a max limit for this is to avoid the risk of a bad + server feeding libcurl with a never-ending header that will cause reallocs + infinitely */ +#define CURL_MAX_HTTP_HEADER (100*1024) +#endif + +/* This is a magic return code for the write callback that, when returned, + will signal libcurl to pause receiving on the current transfer. */ +#define CURL_WRITEFUNC_PAUSE 0x10000001 + +typedef size_t (*curl_write_callback)(char *buffer, + size_t size, + size_t nitems, + void *outstream); + + + +/* enumeration of file types */ +typedef enum { + CURLFILETYPE_FILE = 0, + CURLFILETYPE_DIRECTORY, + CURLFILETYPE_SYMLINK, + CURLFILETYPE_DEVICE_BLOCK, + CURLFILETYPE_DEVICE_CHAR, + CURLFILETYPE_NAMEDPIPE, + CURLFILETYPE_SOCKET, + CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */ + + CURLFILETYPE_UNKNOWN /* should never occur */ +} curlfiletype; + +#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0) +#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1) +#define CURLFINFOFLAG_KNOWN_TIME (1<<2) +#define CURLFINFOFLAG_KNOWN_PERM (1<<3) +#define CURLFINFOFLAG_KNOWN_UID (1<<4) +#define CURLFINFOFLAG_KNOWN_GID (1<<5) +#define CURLFINFOFLAG_KNOWN_SIZE (1<<6) +#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7) + +/* Content of this structure depends on information which is known and is + achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man + page for callbacks returning this structure -- some fields are mandatory, + some others are optional. The FLAG field has special meaning. */ +struct curl_fileinfo { + char *filename; + curlfiletype filetype; + time_t time; + unsigned int perm; + int uid; + int gid; + curl_off_t size; + long int hardlinks; + + struct { + /* If some of these fields is not NULL, it is a pointer to b_data. */ + char *time; + char *perm; + char *user; + char *group; + char *target; /* pointer to the target filename of a symlink */ + } strings; + + unsigned int flags; + + /* used internally */ + char *b_data; + size_t b_size; + size_t b_used; +}; + +/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */ +#define CURL_CHUNK_BGN_FUNC_OK 0 +#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */ +#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */ + +/* if splitting of data transfer is enabled, this callback is called before + download of an individual chunk started. Note that parameter "remains" works + only for FTP wildcard downloading (for now), otherwise is not used */ +typedef long (*curl_chunk_bgn_callback)(const void *transfer_info, + void *ptr, + int remains); + +/* return codes for CURLOPT_CHUNK_END_FUNCTION */ +#define CURL_CHUNK_END_FUNC_OK 0 +#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */ + +/* If splitting of data transfer is enabled this callback is called after + download of an individual chunk finished. + Note! After this callback was set then it have to be called FOR ALL chunks. + Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. + This is the reason why we don't need "transfer_info" parameter in this + callback and we are not interested in "remains" parameter too. */ +typedef long (*curl_chunk_end_callback)(void *ptr); + +/* return codes for FNMATCHFUNCTION */ +#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */ +#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */ +#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */ + +/* callback type for wildcard downloading pattern matching. If the + string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */ +typedef int (*curl_fnmatch_callback)(void *ptr, + const char *pattern, + const char *string); + +/* These are the return codes for the seek callbacks */ +#define CURL_SEEKFUNC_OK 0 +#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ +#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so + libcurl might try other means instead */ +typedef int (*curl_seek_callback)(void *instream, + curl_off_t offset, + int origin); /* 'whence' */ + +/* This is a return code for the read callback that, when returned, will + signal libcurl to immediately abort the current transfer. */ +#define CURL_READFUNC_ABORT 0x10000000 +/* This is a return code for the read callback that, when returned, will + signal libcurl to pause sending data on the current transfer. */ +#define CURL_READFUNC_PAUSE 0x10000001 + +typedef size_t (*curl_read_callback)(char *buffer, + size_t size, + size_t nitems, + void *instream); + +typedef enum { + CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ + CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ + CURLSOCKTYPE_LAST /* never use */ +} curlsocktype; + +/* The return code from the sockopt_callback can signal information back + to libcurl: */ +#define CURL_SOCKOPT_OK 0 +#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return + CURLE_ABORTED_BY_CALLBACK */ +#define CURL_SOCKOPT_ALREADY_CONNECTED 2 + +typedef int (*curl_sockopt_callback)(void *clientp, + curl_socket_t curlfd, + curlsocktype purpose); + +struct curl_sockaddr { + int family; + int socktype; + int protocol; + unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it + turned really ugly and painful on the systems that + lack this type */ + struct sockaddr addr; +}; + +typedef curl_socket_t +(*curl_opensocket_callback)(void *clientp, + curlsocktype purpose, + struct curl_sockaddr *address); + +typedef int +(*curl_closesocket_callback)(void *clientp, curl_socket_t item); + +typedef enum { + CURLIOE_OK, /* I/O operation successful */ + CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ + CURLIOE_FAILRESTART, /* failed to restart the read */ + CURLIOE_LAST /* never use */ +} curlioerr; + +typedef enum { + CURLIOCMD_NOP, /* no operation */ + CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ + CURLIOCMD_LAST /* never use */ +} curliocmd; + +typedef curlioerr (*curl_ioctl_callback)(CURL *handle, + int cmd, + void *clientp); + +#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS +/* + * The following typedef's are signatures of malloc, free, realloc, strdup and + * calloc respectively. Function pointers of these types can be passed to the + * curl_global_init_mem() function to set user defined memory management + * callback routines. + */ +typedef void *(*curl_malloc_callback)(size_t size); +typedef void (*curl_free_callback)(void *ptr); +typedef void *(*curl_realloc_callback)(void *ptr, size_t size); +typedef char *(*curl_strdup_callback)(const char *str); +typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); + +#define CURL_DID_MEMORY_FUNC_TYPEDEFS +#endif + +/* the kind of data that is passed to information_callback*/ +typedef enum { + CURLINFO_TEXT = 0, + CURLINFO_HEADER_IN, /* 1 */ + CURLINFO_HEADER_OUT, /* 2 */ + CURLINFO_DATA_IN, /* 3 */ + CURLINFO_DATA_OUT, /* 4 */ + CURLINFO_SSL_DATA_IN, /* 5 */ + CURLINFO_SSL_DATA_OUT, /* 6 */ + CURLINFO_END +} curl_infotype; + +typedef int (*curl_debug_callback) + (CURL *handle, /* the handle/transfer this concerns */ + curl_infotype type, /* what kind of data */ + char *data, /* points to the data */ + size_t size, /* size of the data pointed to */ + void *userptr); /* whatever the user please */ + +/* All possible error codes from all sorts of curl functions. Future versions + may return other values, stay prepared. + + Always add new return codes last. Never *EVER* remove any. The return + codes must remain the same! + */ + +typedef enum { + CURLE_OK = 0, + CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ + CURLE_FAILED_INIT, /* 2 */ + CURLE_URL_MALFORMAT, /* 3 */ + CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for + 7.17.0, reused in April 2011 for 7.21.5] */ + CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ + CURLE_COULDNT_RESOLVE_HOST, /* 6 */ + CURLE_COULDNT_CONNECT, /* 7 */ + CURLE_WEIRD_SERVER_REPLY, /* 8 */ + CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server + due to lack of access - when login fails + this is not returned. */ + CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for + 7.15.4, reused in Dec 2011 for 7.24.0]*/ + CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ + CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server + [was obsoleted in August 2007 for 7.17.0, + reused in Dec 2011 for 7.24.0]*/ + CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ + CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ + CURLE_FTP_CANT_GET_HOST, /* 15 */ + CURLE_HTTP2, /* 16 - A problem in the http2 framing layer. + [was obsoleted in August 2007 for 7.17.0, + reused in July 2014 for 7.38.0] */ + CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ + CURLE_PARTIAL_FILE, /* 18 */ + CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ + CURLE_OBSOLETE20, /* 20 - NOT USED */ + CURLE_QUOTE_ERROR, /* 21 - quote command failure */ + CURLE_HTTP_RETURNED_ERROR, /* 22 */ + CURLE_WRITE_ERROR, /* 23 */ + CURLE_OBSOLETE24, /* 24 - NOT USED */ + CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ + CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ + CURLE_OUT_OF_MEMORY, /* 27 */ + /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error + instead of a memory allocation error if CURL_DOES_CONVERSIONS + is defined + */ + CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ + CURLE_OBSOLETE29, /* 29 - NOT USED */ + CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ + CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ + CURLE_OBSOLETE32, /* 32 - NOT USED */ + CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ + CURLE_HTTP_POST_ERROR, /* 34 */ + CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ + CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ + CURLE_FILE_COULDNT_READ_FILE, /* 37 */ + CURLE_LDAP_CANNOT_BIND, /* 38 */ + CURLE_LDAP_SEARCH_FAILED, /* 39 */ + CURLE_OBSOLETE40, /* 40 - NOT USED */ + CURLE_FUNCTION_NOT_FOUND, /* 41 */ + CURLE_ABORTED_BY_CALLBACK, /* 42 */ + CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ + CURLE_OBSOLETE44, /* 44 - NOT USED */ + CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ + CURLE_OBSOLETE46, /* 46 - NOT USED */ + CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */ + CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */ + CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */ + CURLE_OBSOLETE50, /* 50 - NOT USED */ + CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint + wasn't verified fine */ + CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ + CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ + CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as + default */ + CURLE_SEND_ERROR, /* 55 - failed sending network data */ + CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ + CURLE_OBSOLETE57, /* 57 - NOT IN USE */ + CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ + CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ + CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ + CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */ + CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ + CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ + CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ + CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind + that failed */ + CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ + CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not + accepted and we failed to login */ + CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ + CURLE_TFTP_PERM, /* 69 - permission problem on server */ + CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ + CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ + CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ + CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ + CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ + CURLE_CONV_FAILED, /* 75 - conversion failed */ + CURLE_CONV_REQD, /* 76 - caller must register conversion + callbacks using curl_easy_setopt options + CURLOPT_CONV_FROM_NETWORK_FUNCTION, + CURLOPT_CONV_TO_NETWORK_FUNCTION, and + CURLOPT_CONV_FROM_UTF8_FUNCTION */ + CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing + or wrong format */ + CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ + CURLE_SSH, /* 79 - error from the SSH layer, somewhat + generic so the error message will be of + interest when this has happened */ + + CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL + connection */ + CURLE_AGAIN, /* 81 - socket is not ready for send/recv, + wait till it's ready and try again (Added + in 7.18.2) */ + CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or + wrong format (Added in 7.19.0) */ + CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in + 7.19.0) */ + CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ + CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ + CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ + CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ + CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ + CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the + session will be queued */ + CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not + match */ + CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */ + CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer + */ + CURL_LAST /* never use! */ +} CURLcode; + +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Previously obsolete error code re-used in 7.38.0 */ +#define CURLE_OBSOLETE16 CURLE_HTTP2 + +/* Previously obsolete error codes re-used in 7.24.0 */ +#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED +#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT + +/* compatibility with older names */ +#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING +#define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY + +/* The following were added in 7.21.5, April 2011 */ +#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION + +/* The following were added in 7.17.1 */ +/* These are scheduled to disappear by 2009 */ +#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION + +/* The following were added in 7.17.0 */ +/* These are scheduled to disappear by 2009 */ +#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */ +#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 +#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 +#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 +#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 +#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 +#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 +#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 +#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 +#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 +#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 +#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 +#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN + +#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED +#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE +#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR +#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL +#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS +#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR +#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED + +/* The following were added earlier */ + +#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT + +#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR +#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED +#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED + +#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE +#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME + +/* This was the error code 50 in 7.7.3 and a few earlier versions, this + is no longer used by libcurl but is instead #defined here only to not + make programs break */ +#define CURLE_ALREADY_COMPLETE 99999 + +/* Provide defines for really old option names */ +#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */ +#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */ +#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA + +/* Since long deprecated options with no code in the lib that does anything + with them. */ +#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40 +#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72 + +#endif /*!CURL_NO_OLDIES*/ + +/* This prototype applies to all conversion callbacks */ +typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); + +typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ + void *ssl_ctx, /* actually an + OpenSSL SSL_CTX */ + void *userptr); + +typedef enum { + CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use + CONNECT HTTP/1.1 */ + CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT + HTTP/1.0 */ + CURLPROXY_HTTPS = 2, /* added in 7.52.0 */ + CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already + in 7.10 */ + CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ + CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ + CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the + host name rather than the IP address. added + in 7.18.0 */ +} curl_proxytype; /* this enum was added in 7.10 */ + +/* + * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options: + * + * CURLAUTH_NONE - No HTTP authentication + * CURLAUTH_BASIC - HTTP Basic authentication (default) + * CURLAUTH_DIGEST - HTTP Digest authentication + * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication + * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated) + * CURLAUTH_NTLM - HTTP NTLM authentication + * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour + * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper + * CURLAUTH_ONLY - Use together with a single other type to force no + * authentication or just that single type + * CURLAUTH_ANY - All fine types set + * CURLAUTH_ANYSAFE - All fine types except Basic + */ + +#define CURLAUTH_NONE ((unsigned long)0) +#define CURLAUTH_BASIC (((unsigned long)1)<<0) +#define CURLAUTH_DIGEST (((unsigned long)1)<<1) +#define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2) +/* Deprecated since the advent of CURLAUTH_NEGOTIATE */ +#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE +#define CURLAUTH_NTLM (((unsigned long)1)<<3) +#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) +#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) +#define CURLAUTH_ONLY (((unsigned long)1)<<31) +#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) +#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) + +#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ +#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ +#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ +#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ +#define CURLSSH_AUTH_HOST (1<<2) /* host key files */ +#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ +#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */ +#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY + +#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ +#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */ +#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */ + +#define CURL_ERROR_SIZE 256 + +enum curl_khtype { + CURLKHTYPE_UNKNOWN, + CURLKHTYPE_RSA1, + CURLKHTYPE_RSA, + CURLKHTYPE_DSS +}; + +struct curl_khkey { + const char *key; /* points to a zero-terminated string encoded with base64 + if len is zero, otherwise to the "raw" data */ + size_t len; + enum curl_khtype keytype; +}; + +/* this is the set of return values expected from the curl_sshkeycallback + callback */ +enum curl_khstat { + CURLKHSTAT_FINE_ADD_TO_FILE, + CURLKHSTAT_FINE, + CURLKHSTAT_REJECT, /* reject the connection, return an error */ + CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so + this causes a CURLE_DEFER error but otherwise the + connection will be left intact etc */ + CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ +}; + +/* this is the set of status codes pass in to the callback */ +enum curl_khmatch { + CURLKHMATCH_OK, /* match */ + CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ + CURLKHMATCH_MISSING, /* no matching host/key found */ + CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ +}; + +typedef int + (*curl_sshkeycallback) (CURL *easy, /* easy handle */ + const struct curl_khkey *knownkey, /* known */ + const struct curl_khkey *foundkey, /* found */ + enum curl_khmatch, /* libcurl's view on the keys */ + void *clientp); /* custom pointer passed from app */ + +/* parameter for the CURLOPT_USE_SSL option */ +typedef enum { + CURLUSESSL_NONE, /* do not attempt to use SSL */ + CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ + CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ + CURLUSESSL_ALL, /* SSL for all communication or fail */ + CURLUSESSL_LAST /* not an option, never use */ +} curl_usessl; + +/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */ + +/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the + name of improving interoperability with older servers. Some SSL libraries + have introduced work-arounds for this flaw but those work-arounds sometimes + make the SSL communication fail. To regain functionality with those broken + servers, a user can this way allow the vulnerability back. */ +#define CURLSSLOPT_ALLOW_BEAST (1<<0) + +/* - NO_REVOKE tells libcurl to disable certificate revocation checks for those + SSL backends where such behavior is present. */ +#define CURLSSLOPT_NO_REVOKE (1<<1) + +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2009 */ + +#define CURLFTPSSL_NONE CURLUSESSL_NONE +#define CURLFTPSSL_TRY CURLUSESSL_TRY +#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL +#define CURLFTPSSL_ALL CURLUSESSL_ALL +#define CURLFTPSSL_LAST CURLUSESSL_LAST +#define curl_ftpssl curl_usessl +#endif /*!CURL_NO_OLDIES*/ + +/* parameter for the CURLOPT_FTP_SSL_CCC option */ +typedef enum { + CURLFTPSSL_CCC_NONE, /* do not send CCC */ + CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ + CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ + CURLFTPSSL_CCC_LAST /* not an option, never use */ +} curl_ftpccc; + +/* parameter for the CURLOPT_FTPSSLAUTH option */ +typedef enum { + CURLFTPAUTH_DEFAULT, /* let libcurl decide */ + CURLFTPAUTH_SSL, /* use "AUTH SSL" */ + CURLFTPAUTH_TLS, /* use "AUTH TLS" */ + CURLFTPAUTH_LAST /* not an option, never use */ +} curl_ftpauth; + +/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ +typedef enum { + CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ + CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD + again if MKD succeeded, for SFTP this does + similar magic */ + CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD + again even if MKD failed! */ + CURLFTP_CREATE_DIR_LAST /* not an option, never use */ +} curl_ftpcreatedir; + +/* parameter for the CURLOPT_FTP_FILEMETHOD option */ +typedef enum { + CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ + CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */ + CURLFTPMETHOD_NOCWD, /* no CWD at all */ + CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */ + CURLFTPMETHOD_LAST /* not an option, never use */ +} curl_ftpmethod; + +/* bitmask defines for CURLOPT_HEADEROPT */ +#define CURLHEADER_UNIFIED 0 +#define CURLHEADER_SEPARATE (1<<0) + +/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ +#define CURLPROTO_HTTP (1<<0) +#define CURLPROTO_HTTPS (1<<1) +#define CURLPROTO_FTP (1<<2) +#define CURLPROTO_FTPS (1<<3) +#define CURLPROTO_SCP (1<<4) +#define CURLPROTO_SFTP (1<<5) +#define CURLPROTO_TELNET (1<<6) +#define CURLPROTO_LDAP (1<<7) +#define CURLPROTO_LDAPS (1<<8) +#define CURLPROTO_DICT (1<<9) +#define CURLPROTO_FILE (1<<10) +#define CURLPROTO_TFTP (1<<11) +#define CURLPROTO_IMAP (1<<12) +#define CURLPROTO_IMAPS (1<<13) +#define CURLPROTO_POP3 (1<<14) +#define CURLPROTO_POP3S (1<<15) +#define CURLPROTO_SMTP (1<<16) +#define CURLPROTO_SMTPS (1<<17) +#define CURLPROTO_RTSP (1<<18) +#define CURLPROTO_RTMP (1<<19) +#define CURLPROTO_RTMPT (1<<20) +#define CURLPROTO_RTMPE (1<<21) +#define CURLPROTO_RTMPTE (1<<22) +#define CURLPROTO_RTMPS (1<<23) +#define CURLPROTO_RTMPTS (1<<24) +#define CURLPROTO_GOPHER (1<<25) +#define CURLPROTO_SMB (1<<26) +#define CURLPROTO_SMBS (1<<27) +#define CURLPROTO_ALL (~0) /* enable everything */ + +/* long may be 32 or 64 bits, but we should never depend on anything else + but 32 */ +#define CURLOPTTYPE_LONG 0 +#define CURLOPTTYPE_OBJECTPOINT 10000 +#define CURLOPTTYPE_STRINGPOINT 10000 +#define CURLOPTTYPE_FUNCTIONPOINT 20000 +#define CURLOPTTYPE_OFF_T 30000 + +/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the + string options from the header file */ + +/* name is uppercase CURLOPT_, + type is one of the defined CURLOPTTYPE_ + number is unique identifier */ +#ifdef CINIT +#undef CINIT +#endif + +#ifdef CURL_ISOCPP +#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define LONG CURLOPTTYPE_LONG +#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT +#define STRINGPOINT CURLOPTTYPE_OBJECTPOINT +#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT +#define OFF_T CURLOPTTYPE_OFF_T +#define CINIT(name,type,number) CURLOPT_/**/name = type + number +#endif + +/* + * This macro-mania below setups the CURLOPT_[what] enum, to be used with + * curl_easy_setopt(). The first argument in the CINIT() macro is the [what] + * word. + */ + +typedef enum { + /* This is the FILE * or void * the regular output should be written to. */ + CINIT(WRITEDATA, OBJECTPOINT, 1), + + /* The full URL to get/put */ + CINIT(URL, STRINGPOINT, 2), + + /* Port number to connect to, if other than default. */ + CINIT(PORT, LONG, 3), + + /* Name of proxy to use. */ + CINIT(PROXY, STRINGPOINT, 4), + + /* "user:password;options" to use when fetching. */ + CINIT(USERPWD, STRINGPOINT, 5), + + /* "user:password" to use with proxy. */ + CINIT(PROXYUSERPWD, STRINGPOINT, 6), + + /* Range to get, specified as an ASCII string. */ + CINIT(RANGE, STRINGPOINT, 7), + + /* not used */ + + /* Specified file stream to upload from (use as input): */ + CINIT(READDATA, OBJECTPOINT, 9), + + /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE + * bytes big. If this is not used, error messages go to stderr instead: */ + CINIT(ERRORBUFFER, OBJECTPOINT, 10), + + /* Function that will be called to store the output (instead of fwrite). The + * parameters will use fwrite() syntax, make sure to follow them. */ + CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11), + + /* Function that will be called to read the input (instead of fread). The + * parameters will use fread() syntax, make sure to follow them. */ + CINIT(READFUNCTION, FUNCTIONPOINT, 12), + + /* Time-out the read operation after this amount of seconds */ + CINIT(TIMEOUT, LONG, 13), + + /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about + * how large the file being sent really is. That allows better error + * checking and better verifies that the upload was successful. -1 means + * unknown size. + * + * For large file support, there is also a _LARGE version of the key + * which takes an off_t type, allowing platforms with larger off_t + * sizes to handle larger files. See below for INFILESIZE_LARGE. + */ + CINIT(INFILESIZE, LONG, 14), + + /* POST static input fields. */ + CINIT(POSTFIELDS, OBJECTPOINT, 15), + + /* Set the referrer page (needed by some CGIs) */ + CINIT(REFERER, STRINGPOINT, 16), + + /* Set the FTP PORT string (interface name, named or numerical IP address) + Use i.e '-' to use default address. */ + CINIT(FTPPORT, STRINGPOINT, 17), + + /* Set the User-Agent string (examined by some CGIs) */ + CINIT(USERAGENT, STRINGPOINT, 18), + + /* If the download receives less than "low speed limit" bytes/second + * during "low speed time" seconds, the operations is aborted. + * You could i.e if you have a pretty high speed connection, abort if + * it is less than 2000 bytes/sec during 20 seconds. + */ + + /* Set the "low speed limit" */ + CINIT(LOW_SPEED_LIMIT, LONG, 19), + + /* Set the "low speed time" */ + CINIT(LOW_SPEED_TIME, LONG, 20), + + /* Set the continuation offset. + * + * Note there is also a _LARGE version of this key which uses + * off_t types, allowing for large file offsets on platforms which + * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. + */ + CINIT(RESUME_FROM, LONG, 21), + + /* Set cookie in request: */ + CINIT(COOKIE, STRINGPOINT, 22), + + /* This points to a linked list of headers, struct curl_slist kind. This + list is also used for RTSP (in spite of its name) */ + CINIT(HTTPHEADER, OBJECTPOINT, 23), + + /* This points to a linked list of post entries, struct curl_httppost */ + CINIT(HTTPPOST, OBJECTPOINT, 24), + + /* name of the file keeping your private SSL-certificate */ + CINIT(SSLCERT, STRINGPOINT, 25), + + /* password for the SSL or SSH private key */ + CINIT(KEYPASSWD, STRINGPOINT, 26), + + /* send TYPE parameter? */ + CINIT(CRLF, LONG, 27), + + /* send linked-list of QUOTE commands */ + CINIT(QUOTE, OBJECTPOINT, 28), + + /* send FILE * or void * to store headers to, if you use a callback it + is simply passed to the callback unmodified */ + CINIT(HEADERDATA, OBJECTPOINT, 29), + + /* point to a file to read the initial cookies from, also enables + "cookie awareness" */ + CINIT(COOKIEFILE, STRINGPOINT, 31), + + /* What version to specifically try to use. + See CURL_SSLVERSION defines below. */ + CINIT(SSLVERSION, LONG, 32), + + /* What kind of HTTP time condition to use, see defines */ + CINIT(TIMECONDITION, LONG, 33), + + /* Time to use with the above condition. Specified in number of seconds + since 1 Jan 1970 */ + CINIT(TIMEVALUE, LONG, 34), + + /* 35 = OBSOLETE */ + + /* Custom request, for customizing the get command like + HTTP: DELETE, TRACE and others + FTP: to use a different list command + */ + CINIT(CUSTOMREQUEST, STRINGPOINT, 36), + + /* FILE handle to use instead of stderr */ + CINIT(STDERR, OBJECTPOINT, 37), + + /* 38 is not used */ + + /* send linked-list of post-transfer QUOTE commands */ + CINIT(POSTQUOTE, OBJECTPOINT, 39), + + CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */ + + CINIT(VERBOSE, LONG, 41), /* talk a lot */ + CINIT(HEADER, LONG, 42), /* throw the header out too */ + CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ + CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ + CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 400 */ + CINIT(UPLOAD, LONG, 46), /* this is an upload */ + CINIT(POST, LONG, 47), /* HTTP POST method */ + CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */ + + CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ + + /* Specify whether to read the user+password from the .netrc or the URL. + * This must be one of the CURL_NETRC_* enums below. */ + CINIT(NETRC, LONG, 51), + + CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ + + CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ + CINIT(PUT, LONG, 54), /* HTTP PUT */ + + /* 55 = OBSOLETE */ + + /* DEPRECATED + * Function that will be called instead of the internal progress display + * function. This function should be defined as the curl_progress_callback + * prototype defines. */ + CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), + + /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION + callbacks */ + CINIT(PROGRESSDATA, OBJECTPOINT, 57), +#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA + + /* We want the referrer field set automatically when following locations */ + CINIT(AUTOREFERER, LONG, 58), + + /* Port of the proxy, can be set in the proxy string as well with: + "[host]:[port]" */ + CINIT(PROXYPORT, LONG, 59), + + /* size of the POST input data, if strlen() is not good to use */ + CINIT(POSTFIELDSIZE, LONG, 60), + + /* tunnel non-http operations through a HTTP proxy */ + CINIT(HTTPPROXYTUNNEL, LONG, 61), + + /* Set the interface string to use as outgoing network interface */ + CINIT(INTERFACE, STRINGPOINT, 62), + + /* Set the krb4/5 security level, this also enables krb4/5 awareness. This + * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string + * is set but doesn't match one of these, 'private' will be used. */ + CINIT(KRBLEVEL, STRINGPOINT, 63), + + /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ + CINIT(SSL_VERIFYPEER, LONG, 64), + + /* The CApath or CAfile used to validate the peer certificate + this option is used only if SSL_VERIFYPEER is true */ + CINIT(CAINFO, STRINGPOINT, 65), + + /* 66 = OBSOLETE */ + /* 67 = OBSOLETE */ + + /* Maximum number of http redirects to follow */ + CINIT(MAXREDIRS, LONG, 68), + + /* Pass a long set to 1 to get the date of the requested document (if + possible)! Pass a zero to shut it off. */ + CINIT(FILETIME, LONG, 69), + + /* This points to a linked list of telnet options */ + CINIT(TELNETOPTIONS, OBJECTPOINT, 70), + + /* Max amount of cached alive connections */ + CINIT(MAXCONNECTS, LONG, 71), + + CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */ + + /* 73 = OBSOLETE */ + + /* Set to explicitly use a new connection for the upcoming transfer. + Do not use this unless you're absolutely sure of this, as it makes the + operation slower and is less friendly for the network. */ + CINIT(FRESH_CONNECT, LONG, 74), + + /* Set to explicitly forbid the upcoming transfer's connection to be re-used + when done. Do not use this unless you're absolutely sure of this, as it + makes the operation slower and is less friendly for the network. */ + CINIT(FORBID_REUSE, LONG, 75), + + /* Set to a file name that contains random data for libcurl to use to + seed the random engine when doing SSL connects. */ + CINIT(RANDOM_FILE, STRINGPOINT, 76), + + /* Set to the Entropy Gathering Daemon socket pathname */ + CINIT(EGDSOCKET, STRINGPOINT, 77), + + /* Time-out connect operations after this amount of seconds, if connects are + OK within this time, then fine... This only aborts the connect phase. */ + CINIT(CONNECTTIMEOUT, LONG, 78), + + /* Function that will be called to store headers (instead of fwrite). The + * parameters will use fwrite() syntax, make sure to follow them. */ + CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), + + /* Set this to force the HTTP request to get back to GET. Only really usable + if POST, PUT or a custom request have been used first. + */ + CINIT(HTTPGET, LONG, 80), + + /* Set if we should verify the Common name from the peer certificate in ssl + * handshake, set 1 to check existence, 2 to ensure that it matches the + * provided hostname. */ + CINIT(SSL_VERIFYHOST, LONG, 81), + + /* Specify which file name to write all known cookies in after completed + operation. Set file name to "-" (dash) to make it go to stdout. */ + CINIT(COOKIEJAR, STRINGPOINT, 82), + + /* Specify which SSL ciphers to use */ + CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83), + + /* Specify which HTTP version to use! This must be set to one of the + CURL_HTTP_VERSION* enums set below. */ + CINIT(HTTP_VERSION, LONG, 84), + + /* Specifically switch on or off the FTP engine's use of the EPSV command. By + default, that one will always be attempted before the more traditional + PASV command. */ + CINIT(FTP_USE_EPSV, LONG, 85), + + /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ + CINIT(SSLCERTTYPE, STRINGPOINT, 86), + + /* name of the file keeping your private SSL-key */ + CINIT(SSLKEY, STRINGPOINT, 87), + + /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ + CINIT(SSLKEYTYPE, STRINGPOINT, 88), + + /* crypto engine for the SSL-sub system */ + CINIT(SSLENGINE, STRINGPOINT, 89), + + /* set the crypto engine for the SSL-sub system as default + the param has no meaning... + */ + CINIT(SSLENGINE_DEFAULT, LONG, 90), + + /* Non-zero value means to use the global dns cache */ + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */ + + /* DNS cache timeout */ + CINIT(DNS_CACHE_TIMEOUT, LONG, 92), + + /* send linked-list of pre-transfer QUOTE commands */ + CINIT(PREQUOTE, OBJECTPOINT, 93), + + /* set the debug function */ + CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94), + + /* set the data for the debug function */ + CINIT(DEBUGDATA, OBJECTPOINT, 95), + + /* mark this as start of a cookie session */ + CINIT(COOKIESESSION, LONG, 96), + + /* The CApath directory used to validate the peer certificate + this option is used only if SSL_VERIFYPEER is true */ + CINIT(CAPATH, STRINGPOINT, 97), + + /* Instruct libcurl to use a smaller receive buffer */ + CINIT(BUFFERSIZE, LONG, 98), + + /* Instruct libcurl to not use any signal/alarm handlers, even when using + timeouts. This option is useful for multi-threaded applications. + See libcurl-the-guide for more background information. */ + CINIT(NOSIGNAL, LONG, 99), + + /* Provide a CURLShare for mutexing non-ts data */ + CINIT(SHARE, OBJECTPOINT, 100), + + /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), + CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and + CURLPROXY_SOCKS5. */ + CINIT(PROXYTYPE, LONG, 101), + + /* Set the Accept-Encoding string. Use this to tell a server you would like + the response to be compressed. Before 7.21.6, this was known as + CURLOPT_ENCODING */ + CINIT(ACCEPT_ENCODING, STRINGPOINT, 102), + + /* Set pointer to private data */ + CINIT(PRIVATE, OBJECTPOINT, 103), + + /* Set aliases for HTTP 200 in the HTTP Response header */ + CINIT(HTTP200ALIASES, OBJECTPOINT, 104), + + /* Continue to send authentication (user+password) when following locations, + even when hostname changed. This can potentially send off the name + and password to whatever host the server decides. */ + CINIT(UNRESTRICTED_AUTH, LONG, 105), + + /* Specifically switch on or off the FTP engine's use of the EPRT command ( + it also disables the LPRT attempt). By default, those ones will always be + attempted before the good old traditional PORT command. */ + CINIT(FTP_USE_EPRT, LONG, 106), + + /* Set this to a bitmask value to enable the particular authentications + methods you like. Use this in combination with CURLOPT_USERPWD. + Note that setting multiple bits may cause extra network round-trips. */ + CINIT(HTTPAUTH, LONG, 107), + + /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx + in second argument. The function must be matching the + curl_ssl_ctx_callback proto. */ + CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108), + + /* Set the userdata for the ssl context callback function's third + argument */ + CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), + + /* FTP Option that causes missing dirs to be created on the remote server. + In 7.19.4 we introduced the convenience enums for this option using the + CURLFTP_CREATE_DIR prefix. + */ + CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), + + /* Set this to a bitmask value to enable the particular authentications + methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. + Note that setting multiple bits may cause extra network round-trips. */ + CINIT(PROXYAUTH, LONG, 111), + + /* FTP option that changes the timeout, in seconds, associated with + getting a response. This is different from transfer timeout time and + essentially places a demand on the FTP server to acknowledge commands + in a timely manner. */ + CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), +#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT + + /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to + tell libcurl to resolve names to those IP versions only. This only has + affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ + CINIT(IPRESOLVE, LONG, 113), + + /* Set this option to limit the size of a file that will be downloaded from + an HTTP or FTP server. + + Note there is also _LARGE version which adds large file support for + platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ + CINIT(MAXFILESIZE, LONG, 114), + + /* See the comment for INFILESIZE above, but in short, specifies + * the size of the file being uploaded. -1 means unknown. + */ + CINIT(INFILESIZE_LARGE, OFF_T, 115), + + /* Sets the continuation offset. There is also a LONG version of this; + * look above for RESUME_FROM. + */ + CINIT(RESUME_FROM_LARGE, OFF_T, 116), + + /* Sets the maximum size of data that will be downloaded from + * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. + */ + CINIT(MAXFILESIZE_LARGE, OFF_T, 117), + + /* Set this option to the file name of your .netrc file you want libcurl + to parse (using the CURLOPT_NETRC option). If not set, libcurl will do + a poor attempt to find the user's home directory and check for a .netrc + file in there. */ + CINIT(NETRC_FILE, STRINGPOINT, 118), + + /* Enable SSL/TLS for FTP, pick one of: + CURLUSESSL_TRY - try using SSL, proceed anyway otherwise + CURLUSESSL_CONTROL - SSL for the control connection or fail + CURLUSESSL_ALL - SSL for all communication or fail + */ + CINIT(USE_SSL, LONG, 119), + + /* The _LARGE version of the standard POSTFIELDSIZE option */ + CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), + + /* Enable/disable the TCP Nagle algorithm */ + CINIT(TCP_NODELAY, LONG, 121), + + /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 123 OBSOLETE. Gone in 7.16.0 */ + /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 127 OBSOLETE. Gone in 7.16.0 */ + /* 128 OBSOLETE. Gone in 7.16.0 */ + + /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option + can be used to change libcurl's default action which is to first try + "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK + response has been received. + + Available parameters are: + CURLFTPAUTH_DEFAULT - let libcurl decide + CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS + CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL + */ + CINIT(FTPSSLAUTH, LONG, 129), + + CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), + CINIT(IOCTLDATA, OBJECTPOINT, 131), + + /* 132 OBSOLETE. Gone in 7.16.0 */ + /* 133 OBSOLETE. Gone in 7.16.0 */ + + /* zero terminated string for pass on to the FTP server when asked for + "account" info */ + CINIT(FTP_ACCOUNT, STRINGPOINT, 134), + + /* feed cookie into cookie engine */ + CINIT(COOKIELIST, STRINGPOINT, 135), + + /* ignore Content-Length */ + CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), + + /* Set to non-zero to skip the IP address received in a 227 PASV FTP server + response. Typically used for FTP-SSL purposes but is not restricted to + that. libcurl will then instead use the same IP address it used for the + control connection. */ + CINIT(FTP_SKIP_PASV_IP, LONG, 137), + + /* Select "file method" to use when doing FTP, see the curl_ftpmethod + above. */ + CINIT(FTP_FILEMETHOD, LONG, 138), + + /* Local port number to bind the socket to */ + CINIT(LOCALPORT, LONG, 139), + + /* Number of ports to try, including the first one set with LOCALPORT. + Thus, setting it to 1 will make no additional attempts but the first. + */ + CINIT(LOCALPORTRANGE, LONG, 140), + + /* no transfer, set up connection and let application use the socket by + extracting it with CURLINFO_LASTSOCKET */ + CINIT(CONNECT_ONLY, LONG, 141), + + /* Function that will be called to convert from the + network encoding (instead of using the iconv calls in libcurl) */ + CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142), + + /* Function that will be called to convert to the + network encoding (instead of using the iconv calls in libcurl) */ + CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143), + + /* Function that will be called to convert from UTF8 + (instead of using the iconv calls in libcurl) + Note that this is used only for SSL certificate processing */ + CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), + + /* if the connection proceeds too quickly then need to slow it down */ + /* limit-rate: maximum number of bytes per second to send or receive */ + CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), + CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), + + /* Pointer to command string to send if USER/PASS fails. */ + CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147), + + /* callback function for setting socket options */ + CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), + CINIT(SOCKOPTDATA, OBJECTPOINT, 149), + + /* set to 0 to disable session ID re-use for this transfer, default is + enabled (== 1) */ + CINIT(SSL_SESSIONID_CACHE, LONG, 150), + + /* allowed SSH authentication methods */ + CINIT(SSH_AUTH_TYPES, LONG, 151), + + /* Used by scp/sftp to do public/private key authentication */ + CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152), + CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153), + + /* Send CCC (Clear Command Channel) after authentication */ + CINIT(FTP_SSL_CCC, LONG, 154), + + /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ + CINIT(TIMEOUT_MS, LONG, 155), + CINIT(CONNECTTIMEOUT_MS, LONG, 156), + + /* set to zero to disable the libcurl's decoding and thus pass the raw body + data to the application even when it is encoded/compressed */ + CINIT(HTTP_TRANSFER_DECODING, LONG, 157), + CINIT(HTTP_CONTENT_DECODING, LONG, 158), + + /* Permission used when creating new files and directories on the remote + server for protocols that support it, SFTP/SCP/FILE */ + CINIT(NEW_FILE_PERMS, LONG, 159), + CINIT(NEW_DIRECTORY_PERMS, LONG, 160), + + /* Set the behaviour of POST when redirecting. Values must be set to one + of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ + CINIT(POSTREDIR, LONG, 161), + + /* used by scp/sftp to verify the host's public key */ + CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162), + + /* Callback function for opening socket (instead of socket(2)). Optionally, + callback is able change the address or refuse to connect returning + CURL_SOCKET_BAD. The callback should have type + curl_opensocket_callback */ + CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), + CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), + + /* POST volatile input fields. */ + CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), + + /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ + CINIT(PROXY_TRANSFER_MODE, LONG, 166), + + /* Callback function for seeking in the input stream */ + CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), + CINIT(SEEKDATA, OBJECTPOINT, 168), + + /* CRL file */ + CINIT(CRLFILE, STRINGPOINT, 169), + + /* Issuer certificate */ + CINIT(ISSUERCERT, STRINGPOINT, 170), + + /* (IPv6) Address scope */ + CINIT(ADDRESS_SCOPE, LONG, 171), + + /* Collect certificate chain info and allow it to get retrievable with + CURLINFO_CERTINFO after the transfer is complete. */ + CINIT(CERTINFO, LONG, 172), + + /* "name" and "pwd" to use when fetching. */ + CINIT(USERNAME, STRINGPOINT, 173), + CINIT(PASSWORD, STRINGPOINT, 174), + + /* "name" and "pwd" to use with Proxy when fetching. */ + CINIT(PROXYUSERNAME, STRINGPOINT, 175), + CINIT(PROXYPASSWORD, STRINGPOINT, 176), + + /* Comma separated list of hostnames defining no-proxy zones. These should + match both hostnames directly, and hostnames within a domain. For + example, local.com will match local.com and www.local.com, but NOT + notlocal.com or www.notlocal.com. For compatibility with other + implementations of this, .local.com will be considered to be the same as + local.com. A single * is the only valid wildcard, and effectively + disables the use of proxy. */ + CINIT(NOPROXY, STRINGPOINT, 177), + + /* block size for TFTP transfers */ + CINIT(TFTP_BLKSIZE, LONG, 178), + + /* Socks Service */ + CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */ + + /* Socks Service */ + CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), + + /* set the bitmask for the protocols that are allowed to be used for the + transfer, which thus helps the app which takes URLs from users or other + external inputs and want to restrict what protocol(s) to deal + with. Defaults to CURLPROTO_ALL. */ + CINIT(PROTOCOLS, LONG, 181), + + /* set the bitmask for the protocols that libcurl is allowed to follow to, + as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs + to be set in both bitmasks to be allowed to get redirected to. Defaults + to all protocols except FILE and SCP. */ + CINIT(REDIR_PROTOCOLS, LONG, 182), + + /* set the SSH knownhost file name to use */ + CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183), + + /* set the SSH host key callback, must point to a curl_sshkeycallback + function */ + CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), + + /* set the SSH host key callback custom pointer */ + CINIT(SSH_KEYDATA, OBJECTPOINT, 185), + + /* set the SMTP mail originator */ + CINIT(MAIL_FROM, STRINGPOINT, 186), + + /* set the list of SMTP mail receiver(s) */ + CINIT(MAIL_RCPT, OBJECTPOINT, 187), + + /* FTP: send PRET before PASV */ + CINIT(FTP_USE_PRET, LONG, 188), + + /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */ + CINIT(RTSP_REQUEST, LONG, 189), + + /* The RTSP session identifier */ + CINIT(RTSP_SESSION_ID, STRINGPOINT, 190), + + /* The RTSP stream URI */ + CINIT(RTSP_STREAM_URI, STRINGPOINT, 191), + + /* The Transport: header to use in RTSP requests */ + CINIT(RTSP_TRANSPORT, STRINGPOINT, 192), + + /* Manually initialize the client RTSP CSeq for this handle */ + CINIT(RTSP_CLIENT_CSEQ, LONG, 193), + + /* Manually initialize the server RTSP CSeq for this handle */ + CINIT(RTSP_SERVER_CSEQ, LONG, 194), + + /* The stream to pass to INTERLEAVEFUNCTION. */ + CINIT(INTERLEAVEDATA, OBJECTPOINT, 195), + + /* Let the application define a custom write method for RTP data */ + CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196), + + /* Turn on wildcard matching */ + CINIT(WILDCARDMATCH, LONG, 197), + + /* Directory matching callback called before downloading of an + individual file (chunk) started */ + CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198), + + /* Directory matching callback called after the file (chunk) + was downloaded, or skipped */ + CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199), + + /* Change match (fnmatch-like) callback for wildcard matching */ + CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200), + + /* Let the application define custom chunk data pointer */ + CINIT(CHUNK_DATA, OBJECTPOINT, 201), + + /* FNMATCH_FUNCTION user pointer */ + CINIT(FNMATCH_DATA, OBJECTPOINT, 202), + + /* send linked-list of name:port:address sets */ + CINIT(RESOLVE, OBJECTPOINT, 203), + + /* Set a username for authenticated TLS */ + CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204), + + /* Set a password for authenticated TLS */ + CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205), + + /* Set authentication type for authenticated TLS */ + CINIT(TLSAUTH_TYPE, STRINGPOINT, 206), + + /* Set to 1 to enable the "TE:" header in HTTP requests to ask for + compressed transfer-encoded responses. Set to 0 to disable the use of TE: + in outgoing requests. The current default is 0, but it might change in a + future libcurl release. + + libcurl will ask for the compressed methods it knows of, and if that + isn't any, it will not ask for transfer-encoding at all even if this + option is set to 1. + + */ + CINIT(TRANSFER_ENCODING, LONG, 207), + + /* Callback function for closing socket (instead of close(2)). The callback + should have type curl_closesocket_callback */ + CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208), + CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209), + + /* allow GSSAPI credential delegation */ + CINIT(GSSAPI_DELEGATION, LONG, 210), + + /* Set the name servers to use for DNS resolution */ + CINIT(DNS_SERVERS, STRINGPOINT, 211), + + /* Time-out accept operations (currently for FTP only) after this amount + of miliseconds. */ + CINIT(ACCEPTTIMEOUT_MS, LONG, 212), + + /* Set TCP keepalive */ + CINIT(TCP_KEEPALIVE, LONG, 213), + + /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */ + CINIT(TCP_KEEPIDLE, LONG, 214), + CINIT(TCP_KEEPINTVL, LONG, 215), + + /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */ + CINIT(SSL_OPTIONS, LONG, 216), + + /* Set the SMTP auth originator */ + CINIT(MAIL_AUTH, STRINGPOINT, 217), + + /* Enable/disable SASL initial response */ + CINIT(SASL_IR, LONG, 218), + + /* Function that will be called instead of the internal progress display + * function. This function should be defined as the curl_xferinfo_callback + * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */ + CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219), + + /* The XOAUTH2 bearer token */ + CINIT(XOAUTH2_BEARER, STRINGPOINT, 220), + + /* Set the interface string to use as outgoing network + * interface for DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_INTERFACE, STRINGPOINT, 221), + + /* Set the local IPv4 address to use for outgoing DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222), + + /* Set the local IPv4 address to use for outgoing DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223), + + /* Set authentication options directly */ + CINIT(LOGIN_OPTIONS, STRINGPOINT, 224), + + /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */ + CINIT(SSL_ENABLE_NPN, LONG, 225), + + /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */ + CINIT(SSL_ENABLE_ALPN, LONG, 226), + + /* Time to wait for a response to a HTTP request containing an + * Expect: 100-continue header before sending the data anyway. */ + CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227), + + /* This points to a linked list of headers used for proxy requests only, + struct curl_slist kind */ + CINIT(PROXYHEADER, OBJECTPOINT, 228), + + /* Pass in a bitmask of "header options" */ + CINIT(HEADEROPT, LONG, 229), + + /* The public key in DER form used to validate the peer public key + this option is used only if SSL_VERIFYPEER is true */ + CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230), + + /* Path to Unix domain socket */ + CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231), + + /* Set if we should verify the certificate status. */ + CINIT(SSL_VERIFYSTATUS, LONG, 232), + + /* Set if we should enable TLS false start. */ + CINIT(SSL_FALSESTART, LONG, 233), + + /* Do not squash dot-dot sequences */ + CINIT(PATH_AS_IS, LONG, 234), + + /* Proxy Service Name */ + CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235), + + /* Service Name */ + CINIT(SERVICE_NAME, STRINGPOINT, 236), + + /* Wait/don't wait for pipe/mutex to clarify */ + CINIT(PIPEWAIT, LONG, 237), + + /* Set the protocol used when curl is given a URL without a protocol */ + CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238), + + /* Set stream weight, 1 - 256 (default is 16) */ + CINIT(STREAM_WEIGHT, LONG, 239), + + /* Set stream dependency on another CURL handle */ + CINIT(STREAM_DEPENDS, OBJECTPOINT, 240), + + /* Set E-xclusive stream dependency on another CURL handle */ + CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241), + + /* Do not send any tftp option requests to the server */ + CINIT(TFTP_NO_OPTIONS, LONG, 242), + + /* Linked-list of host:port:connect-to-host:connect-to-port, + overrides the URL's host:port (only for the network layer) */ + CINIT(CONNECT_TO, OBJECTPOINT, 243), + + /* Set TCP Fast Open */ + CINIT(TCP_FASTOPEN, LONG, 244), + + /* Continue to send data if the server responds early with an + * HTTP status code >= 300 */ + CINIT(KEEP_SENDING_ON_ERROR, LONG, 245), + + /* The CApath or CAfile used to validate the proxy certificate + this option is used only if PROXY_SSL_VERIFYPEER is true */ + CINIT(PROXY_CAINFO, STRINGPOINT, 246), + + /* The CApath directory used to validate the proxy certificate + this option is used only if PROXY_SSL_VERIFYPEER is true */ + CINIT(PROXY_CAPATH, STRINGPOINT, 247), + + /* Set if we should verify the proxy in ssl handshake, + set 1 to verify. */ + CINIT(PROXY_SSL_VERIFYPEER, LONG, 248), + + /* Set if we should verify the Common name from the proxy certificate in ssl + * handshake, set 1 to check existence, 2 to ensure that it matches + * the provided hostname. */ + CINIT(PROXY_SSL_VERIFYHOST, LONG, 249), + + /* What version to specifically try to use for proxy. + See CURL_SSLVERSION defines below. */ + CINIT(PROXY_SSLVERSION, LONG, 250), + + /* Set a username for authenticated TLS for proxy */ + CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251), + + /* Set a password for authenticated TLS for proxy */ + CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252), + + /* Set authentication type for authenticated TLS for proxy */ + CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253), + + /* name of the file keeping your private SSL-certificate for proxy */ + CINIT(PROXY_SSLCERT, STRINGPOINT, 254), + + /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for + proxy */ + CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255), + + /* name of the file keeping your private SSL-key for proxy */ + CINIT(PROXY_SSLKEY, STRINGPOINT, 256), + + /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for + proxy */ + CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257), + + /* password for the SSL private key for proxy */ + CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258), + + /* Specify which SSL ciphers to use for proxy */ + CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259), + + /* CRL file for proxy */ + CINIT(PROXY_CRLFILE, STRINGPOINT, 260), + + /* Enable/disable specific SSL features with a bitmask for proxy, see + CURLSSLOPT_* */ + CINIT(PROXY_SSL_OPTIONS, LONG, 261), + + /* Name of pre proxy to use. */ + CINIT(PRE_PROXY, STRINGPOINT, 262), + + /* The public key in DER form used to validate the proxy public key + this option is used only if PROXY_SSL_VERIFYPEER is true */ + CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263), + + CURLOPT_LASTENTRY /* the last unused */ +} CURLoption; + +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2011 */ + +/* This was added in version 7.19.1 */ +#define CURLOPT_POST301 CURLOPT_POSTREDIR + +/* These are scheduled to disappear by 2009 */ + +/* The following were added in 7.17.0 */ +#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD +#define CURLOPT_FTPAPPEND CURLOPT_APPEND +#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY +#define CURLOPT_FTP_SSL CURLOPT_USE_SSL + +/* The following were added earlier */ + +#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD +#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL + +#else +/* This is set if CURL_NO_OLDIES is defined at compile-time */ +#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ +#endif + + + /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host + name resolves addresses using more than one IP protocol version, this + option might be handy to force libcurl to use a specific IP version. */ +#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP + versions that your system allows */ +#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */ +#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */ + + /* three convenient "aliases" that follow the name scheme better */ +#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER + + /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ +enum { + CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd + like the library to choose the best possible + for us! */ + CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ + CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ + CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */ + CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */ + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1 + Upgrade */ + + CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ +}; + +/* Convenience definition simple because the name of the version is HTTP/2 and + not 2.0. The 2_0 version of the enum name was set while the version was + still planned to be 2.0 and we stick to it for compatibility. */ +#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0 + +/* + * Public API enums for RTSP requests + */ +enum { + CURL_RTSPREQ_NONE, /* first in list */ + CURL_RTSPREQ_OPTIONS, + CURL_RTSPREQ_DESCRIBE, + CURL_RTSPREQ_ANNOUNCE, + CURL_RTSPREQ_SETUP, + CURL_RTSPREQ_PLAY, + CURL_RTSPREQ_PAUSE, + CURL_RTSPREQ_TEARDOWN, + CURL_RTSPREQ_GET_PARAMETER, + CURL_RTSPREQ_SET_PARAMETER, + CURL_RTSPREQ_RECORD, + CURL_RTSPREQ_RECEIVE, + CURL_RTSPREQ_LAST /* last in list */ +}; + + /* These enums are for use with the CURLOPT_NETRC option. */ +enum CURL_NETRC_OPTION { + CURL_NETRC_IGNORED, /* The .netrc will never be read. + * This is the default. */ + CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred + * to one in the .netrc. */ + CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored. + * Unless one is set programmatically, the .netrc + * will be queried. */ + CURL_NETRC_LAST +}; + +enum { + CURL_SSLVERSION_DEFAULT, + CURL_SSLVERSION_TLSv1, /* TLS 1.x */ + CURL_SSLVERSION_SSLv2, + CURL_SSLVERSION_SSLv3, + CURL_SSLVERSION_TLSv1_0, + CURL_SSLVERSION_TLSv1_1, + CURL_SSLVERSION_TLSv1_2, + CURL_SSLVERSION_TLSv1_3, + + CURL_SSLVERSION_LAST /* never use, keep last */ +}; + +enum CURL_TLSAUTH { + CURL_TLSAUTH_NONE, + CURL_TLSAUTH_SRP, + CURL_TLSAUTH_LAST /* never use, keep last */ +}; + +/* symbols to use with CURLOPT_POSTREDIR. + CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303 + can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 + | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */ + +#define CURL_REDIR_GET_ALL 0 +#define CURL_REDIR_POST_301 1 +#define CURL_REDIR_POST_302 2 +#define CURL_REDIR_POST_303 4 +#define CURL_REDIR_POST_ALL \ + (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) + +typedef enum { + CURL_TIMECOND_NONE, + + CURL_TIMECOND_IFMODSINCE, + CURL_TIMECOND_IFUNMODSINCE, + CURL_TIMECOND_LASTMOD, + + CURL_TIMECOND_LAST +} curl_TimeCond; + + +/* curl_strequal() and curl_strnequal() are subject for removal in a future + libcurl, see lib/README.curlx for details + + !checksrc! disable SPACEBEFOREPAREN 2 +*/ +CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); +CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); + +/* name is uppercase CURLFORM_ */ +#ifdef CFINIT +#undef CFINIT +#endif + +#ifdef CURL_ISOCPP +#define CFINIT(name) CURLFORM_ ## name +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define CFINIT(name) CURLFORM_/**/name +#endif + +typedef enum { + CFINIT(NOTHING), /********* the first one is unused ************/ + + /* */ + CFINIT(COPYNAME), + CFINIT(PTRNAME), + CFINIT(NAMELENGTH), + CFINIT(COPYCONTENTS), + CFINIT(PTRCONTENTS), + CFINIT(CONTENTSLENGTH), + CFINIT(FILECONTENT), + CFINIT(ARRAY), + CFINIT(OBSOLETE), + CFINIT(FILE), + + CFINIT(BUFFER), + CFINIT(BUFFERPTR), + CFINIT(BUFFERLENGTH), + + CFINIT(CONTENTTYPE), + CFINIT(CONTENTHEADER), + CFINIT(FILENAME), + CFINIT(END), + CFINIT(OBSOLETE2), + + CFINIT(STREAM), + CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */ + + CURLFORM_LASTENTRY /* the last unused */ +} CURLformoption; + +#undef CFINIT /* done */ + +/* structure to be used as parameter for CURLFORM_ARRAY */ +struct curl_forms { + CURLformoption option; + const char *value; +}; + +/* use this for multipart formpost building */ +/* Returns code for curl_formadd() + * + * Returns: + * CURL_FORMADD_OK on success + * CURL_FORMADD_MEMORY if the FormInfo allocation fails + * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form + * CURL_FORMADD_NULL if a null pointer was given for a char + * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed + * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used + * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) + * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated + * CURL_FORMADD_MEMORY if some allocation for string copying failed. + * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array + * + ***************************************************************************/ +typedef enum { + CURL_FORMADD_OK, /* first, no error */ + + CURL_FORMADD_MEMORY, + CURL_FORMADD_OPTION_TWICE, + CURL_FORMADD_NULL, + CURL_FORMADD_UNKNOWN_OPTION, + CURL_FORMADD_INCOMPLETE, + CURL_FORMADD_ILLEGAL_ARRAY, + CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ + + CURL_FORMADD_LAST /* last */ +} CURLFORMcode; + +/* + * NAME curl_formadd() + * + * DESCRIPTION + * + * Pretty advanced function for building multi-part formposts. Each invoke + * adds one part that together construct a full post. Then use + * CURLOPT_HTTPPOST to send it off to libcurl. + */ +CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, + struct curl_httppost **last_post, + ...); + +/* + * callback function for curl_formget() + * The void *arg pointer will be the one passed as second argument to + * curl_formget(). + * The character buffer passed to it must not be freed. + * Should return the buffer length passed to it as the argument "len" on + * success. + */ +typedef size_t (*curl_formget_callback)(void *arg, const char *buf, + size_t len); + +/* + * NAME curl_formget() + * + * DESCRIPTION + * + * Serialize a curl_httppost struct built with curl_formadd(). + * Accepts a void pointer as second argument which will be passed to + * the curl_formget_callback function. + * Returns 0 on success. + */ +CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, + curl_formget_callback append); +/* + * NAME curl_formfree() + * + * DESCRIPTION + * + * Free a multipart formpost previously built with curl_formadd(). + */ +CURL_EXTERN void curl_formfree(struct curl_httppost *form); + +/* + * NAME curl_getenv() + * + * DESCRIPTION + * + * Returns a malloc()'ed string that MUST be curl_free()ed after usage is + * complete. DEPRECATED - see lib/README.curlx + */ +CURL_EXTERN char *curl_getenv(const char *variable); + +/* + * NAME curl_version() + * + * DESCRIPTION + * + * Returns a static ascii string of the libcurl version. + */ +CURL_EXTERN char *curl_version(void); + +/* + * NAME curl_easy_escape() + * + * DESCRIPTION + * + * Escapes URL strings (converts all letters consider illegal in URLs to their + * %XX versions). This function returns a new allocated string or NULL if an + * error occurred. + */ +CURL_EXTERN char *curl_easy_escape(CURL *handle, + const char *string, + int length); + +/* the previous version: */ +CURL_EXTERN char *curl_escape(const char *string, + int length); + + +/* + * NAME curl_easy_unescape() + * + * DESCRIPTION + * + * Unescapes URL encoding in strings (converts all %XX codes to their 8bit + * versions). This function returns a new allocated string or NULL if an error + * occurred. + * Conversion Note: On non-ASCII platforms the ASCII %XX codes are + * converted into the host encoding. + */ +CURL_EXTERN char *curl_easy_unescape(CURL *handle, + const char *string, + int length, + int *outlength); + +/* the previous version */ +CURL_EXTERN char *curl_unescape(const char *string, + int length); + +/* + * NAME curl_free() + * + * DESCRIPTION + * + * Provided for de-allocation in the same translation unit that did the + * allocation. Added in libcurl 7.10 + */ +CURL_EXTERN void curl_free(void *p); + +/* + * NAME curl_global_init() + * + * DESCRIPTION + * + * curl_global_init() should be invoked exactly once for each application that + * uses libcurl and before any call of other libcurl functions. + * + * This function is not thread-safe! + */ +CURL_EXTERN CURLcode curl_global_init(long flags); + +/* + * NAME curl_global_init_mem() + * + * DESCRIPTION + * + * curl_global_init() or curl_global_init_mem() should be invoked exactly once + * for each application that uses libcurl. This function can be used to + * initialize libcurl and set user defined memory management callback + * functions. Users can implement memory management routines to check for + * memory leaks, check for mis-use of the curl library etc. User registered + * callback routines with be invoked by this library instead of the system + * memory management routines like malloc, free etc. + */ +CURL_EXTERN CURLcode curl_global_init_mem(long flags, + curl_malloc_callback m, + curl_free_callback f, + curl_realloc_callback r, + curl_strdup_callback s, + curl_calloc_callback c); + +/* + * NAME curl_global_cleanup() + * + * DESCRIPTION + * + * curl_global_cleanup() should be invoked exactly once for each application + * that uses libcurl + */ +CURL_EXTERN void curl_global_cleanup(void); + +/* linked-list structure for the CURLOPT_QUOTE option (and other) */ +struct curl_slist { + char *data; + struct curl_slist *next; +}; + +/* + * NAME curl_slist_append() + * + * DESCRIPTION + * + * Appends a string to a linked list. If no list exists, it will be created + * first. Returns the new list, after appending. + */ +CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, + const char *); + +/* + * NAME curl_slist_free_all() + * + * DESCRIPTION + * + * free a previously built curl_slist. + */ +CURL_EXTERN void curl_slist_free_all(struct curl_slist *); + +/* + * NAME curl_getdate() + * + * DESCRIPTION + * + * Returns the time, in seconds since 1 Jan 1970 of the time string given in + * the first argument. The time argument in the second parameter is unused + * and should be set to NULL. + */ +CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); + +/* info about the certificate chain, only for OpenSSL builds. Asked + for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ +struct curl_certinfo { + int num_of_certs; /* number of certificates with information */ + struct curl_slist **certinfo; /* for each index in this array, there's a + linked list with textual information in the + format "name: value" */ +}; + +/* enum for the different supported SSL backends */ +typedef enum { + CURLSSLBACKEND_NONE = 0, + CURLSSLBACKEND_OPENSSL = 1, + CURLSSLBACKEND_GNUTLS = 2, + CURLSSLBACKEND_NSS = 3, + CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ + CURLSSLBACKEND_GSKIT = 5, + CURLSSLBACKEND_POLARSSL = 6, + CURLSSLBACKEND_CYASSL = 7, + CURLSSLBACKEND_SCHANNEL = 8, + CURLSSLBACKEND_DARWINSSL = 9, + CURLSSLBACKEND_AXTLS = 10, + CURLSSLBACKEND_MBEDTLS = 11 +} curl_sslbackend; + +/* aliases for library clones and renames */ +#define CURLSSLBACKEND_LIBRESSL 1 +#define CURLSSLBACKEND_BORINGSSL 1 +#define CURLSSLBACKEND_WOLFSSL 6 + +/* Information about the SSL library used and the respective internal SSL + handle, which can be used to obtain further information regarding the + connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */ +struct curl_tlssessioninfo { + curl_sslbackend backend; + void *internals; +}; + +#define CURLINFO_STRING 0x100000 +#define CURLINFO_LONG 0x200000 +#define CURLINFO_DOUBLE 0x300000 +#define CURLINFO_SLIST 0x400000 +#define CURLINFO_SOCKET 0x500000 +#define CURLINFO_MASK 0x0fffff +#define CURLINFO_TYPEMASK 0xf00000 + +typedef enum { + CURLINFO_NONE, /* first, never use this */ + CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, + CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, + CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, + CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, + CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, + CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, + CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, + CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, + CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, + CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, + CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, + CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, + CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, + CURLINFO_FILETIME = CURLINFO_LONG + 14, + CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, + CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, + CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, + CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, + CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, + CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, + CURLINFO_PRIVATE = CURLINFO_STRING + 21, + CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, + CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, + CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, + CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, + CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, + CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, + CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, + CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, + CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, + CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, + CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, + CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, + CURLINFO_CERTINFO = CURLINFO_SLIST + 34, + CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, + CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, + CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, + CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38, + CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39, + CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, + CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, + CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, + CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43, + CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, + CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45, + CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, + CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, + CURLINFO_PROTOCOL = CURLINFO_LONG + 48, + CURLINFO_SCHEME = CURLINFO_STRING + 49, + /* Fill in new entries below here! */ + + CURLINFO_LASTONE = 49 +} CURLINFO; + +/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as + CURLINFO_HTTP_CODE */ +#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE + +typedef enum { + CURLCLOSEPOLICY_NONE, /* first, never use this */ + + CURLCLOSEPOLICY_OLDEST, + CURLCLOSEPOLICY_LEAST_RECENTLY_USED, + CURLCLOSEPOLICY_LEAST_TRAFFIC, + CURLCLOSEPOLICY_SLOWEST, + CURLCLOSEPOLICY_CALLBACK, + + CURLCLOSEPOLICY_LAST /* last, never use this */ +} curl_closepolicy; + +#define CURL_GLOBAL_SSL (1<<0) +#define CURL_GLOBAL_WIN32 (1<<1) +#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) +#define CURL_GLOBAL_NOTHING 0 +#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL +#define CURL_GLOBAL_ACK_EINTR (1<<2) + + +/***************************************************************************** + * Setup defines, protos etc for the sharing stuff. + */ + +/* Different data locks for a single share */ +typedef enum { + CURL_LOCK_DATA_NONE = 0, + /* CURL_LOCK_DATA_SHARE is used internally to say that + * the locking is just made to change the internal state of the share + * itself. + */ + CURL_LOCK_DATA_SHARE, + CURL_LOCK_DATA_COOKIE, + CURL_LOCK_DATA_DNS, + CURL_LOCK_DATA_SSL_SESSION, + CURL_LOCK_DATA_CONNECT, + CURL_LOCK_DATA_LAST +} curl_lock_data; + +/* Different lock access types */ +typedef enum { + CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */ + CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */ + CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */ + CURL_LOCK_ACCESS_LAST /* never use */ +} curl_lock_access; + +typedef void (*curl_lock_function)(CURL *handle, + curl_lock_data data, + curl_lock_access locktype, + void *userptr); +typedef void (*curl_unlock_function)(CURL *handle, + curl_lock_data data, + void *userptr); + + +typedef enum { + CURLSHE_OK, /* all is fine */ + CURLSHE_BAD_OPTION, /* 1 */ + CURLSHE_IN_USE, /* 2 */ + CURLSHE_INVALID, /* 3 */ + CURLSHE_NOMEM, /* 4 out of memory */ + CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */ + CURLSHE_LAST /* never use */ +} CURLSHcode; + +typedef enum { + CURLSHOPT_NONE, /* don't use */ + CURLSHOPT_SHARE, /* specify a data type to share */ + CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ + CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ + CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ + CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock + callback functions */ + CURLSHOPT_LAST /* never use */ +} CURLSHoption; + +CURL_EXTERN CURLSH *curl_share_init(void); +CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); +CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); + +/**************************************************************************** + * Structures for querying information about the curl library at runtime. + */ + +typedef enum { + CURLVERSION_FIRST, + CURLVERSION_SECOND, + CURLVERSION_THIRD, + CURLVERSION_FOURTH, + CURLVERSION_LAST /* never actually use this */ +} CURLversion; + +/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by + basically all programs ever that want to get version information. It is + meant to be a built-in version number for what kind of struct the caller + expects. If the struct ever changes, we redefine the NOW to another enum + from above. */ +#define CURLVERSION_NOW CURLVERSION_FOURTH + +typedef struct { + CURLversion age; /* age of the returned struct */ + const char *version; /* LIBCURL_VERSION */ + unsigned int version_num; /* LIBCURL_VERSION_NUM */ + const char *host; /* OS/host/cpu/machine when configured */ + int features; /* bitmask, see defines below */ + const char *ssl_version; /* human readable string */ + long ssl_version_num; /* not used anymore, always 0 */ + const char *libz_version; /* human readable string */ + /* protocols is terminated by an entry with a NULL protoname */ + const char * const *protocols; + + /* The fields below this were added in CURLVERSION_SECOND */ + const char *ares; + int ares_num; + + /* This field was added in CURLVERSION_THIRD */ + const char *libidn; + + /* These field were added in CURLVERSION_FOURTH */ + + /* Same as '_libiconv_version' if built with HAVE_ICONV */ + int iconv_ver_num; + + const char *libssh_version; /* human readable string */ + +} curl_version_info_data; + +#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ +#define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported + (deprecated) */ +#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ +#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ +#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ +#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported + (deprecated) */ +#define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */ +#define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */ +#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */ +#define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */ +#define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are + supported */ +#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */ +#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */ +#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */ +#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ +#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper + is suported */ +#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */ +#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */ +#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */ +#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */ +#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used + for cookie domain verification */ +#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */ + + /* + * NAME curl_version_info() + * + * DESCRIPTION + * + * This function returns a pointer to a static copy of the version info + * struct. See above. + */ +CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); + +/* + * NAME curl_easy_strerror() + * + * DESCRIPTION + * + * The curl_easy_strerror function may be used to turn a CURLcode value + * into the equivalent human readable error string. This is useful + * for printing meaningful error messages. + */ +CURL_EXTERN const char *curl_easy_strerror(CURLcode); + +/* + * NAME curl_share_strerror() + * + * DESCRIPTION + * + * The curl_share_strerror function may be used to turn a CURLSHcode value + * into the equivalent human readable error string. This is useful + * for printing meaningful error messages. + */ +CURL_EXTERN const char *curl_share_strerror(CURLSHcode); + +/* + * NAME curl_easy_pause() + * + * DESCRIPTION + * + * The curl_easy_pause function pauses or unpauses transfers. Select the new + * state by setting the bitmask, use the convenience defines below. + * + */ +CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); + +#define CURLPAUSE_RECV (1<<0) +#define CURLPAUSE_RECV_CONT (0) + +#define CURLPAUSE_SEND (1<<2) +#define CURLPAUSE_SEND_CONT (0) + +#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) +#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) + +#ifdef __cplusplus +} +#endif + +/* unfortunately, the easy.h and multi.h include files need options and info + stuff before they can be included! */ +#include "easy.h" /* nothing in curl is fun without the easy stuff */ +#include "multi.h" + +/* the typechecker doesn't work in C++ (yet) */ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ + ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ + !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) +#include "typecheck-gcc.h" +#else +#if defined(__STDC__) && (__STDC__ >= 1) +/* This preprocessor magic that replaces a call with the exact same call is + only done to make sure application authors pass exactly three arguments + to these functions. */ +#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) +#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) +#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) +#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) +#endif /* __STDC__ >= 1 */ +#endif /* gcc >= 4.3 && !__cplusplus */ + +#endif /* __CURL_CURL_H */ diff --git a/curl/include/ohos/curl/curlbuild-arm32.h b/curl/include/ohos/curl/curlbuild-arm32.h new file mode 100644 index 0000000000..8228e44f26 --- /dev/null +++ b/curl/include/ohos/curl/curlbuild-arm32.h @@ -0,0 +1,198 @@ +/* include/curl/curlbuild.h. Generated from curlbuild.h.in by configure. */ +#ifndef __CURL_CURLBUILD_H +#define __CURL_CURLBUILD_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* ================================================================ */ +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * If you think that something actually needs to be changed, adjusted + * or fixed in this file, then, report it on the libcurl development + * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ + * + * This header file shall only export symbols which are 'curl' or 'CURL' + * prefixed, otherwise public name space would be polluted. + * + * NOTE 2: + * ------- + * + * Right now you might be staring at file include/curl/curlbuild.h.in or + * at file include/curl/curlbuild.h, this is due to the following reason: + * + * On systems capable of running the configure script, the configure process + * will overwrite the distributed include/curl/curlbuild.h file with one that + * is suitable and specific to the library being configured and built, which + * is generated from the include/curl/curlbuild.h.in template file. + * + */ + +/* ================================================================ */ +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ +/* ================================================================ */ + +#ifdef CURL_SIZEOF_LONG +#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined +#endif + +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T +#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T +#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_TYPEOF_CURL_OFF_T +#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_T +#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_TU +#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined +#endif + +#ifdef CURL_FORMAT_OFF_T +#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_OFF_T +#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_T +#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_TU +#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined +#endif + +/* ================================================================ */ +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ +/* ================================================================ */ + +/* Configure process defines this to 1 when it finds out that system */ +/* header file ws2tcpip.h must be included by the external interface. */ +/* #undef CURL_PULL_WS2TCPIP_H */ +#ifdef CURL_PULL_WS2TCPIP_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# include +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/types.h must be included by the external interface. */ +#define CURL_PULL_SYS_TYPES_H 1 +#ifdef CURL_PULL_SYS_TYPES_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file stdint.h must be included by the external interface. */ +#define CURL_PULL_STDINT_H 1 +#ifdef CURL_PULL_STDINT_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file inttypes.h must be included by the external interface. */ +#define CURL_PULL_INTTYPES_H 1 +#ifdef CURL_PULL_INTTYPES_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/socket.h must be included by the external interface. */ +#define CURL_PULL_SYS_SOCKET_H 1 +#ifdef CURL_PULL_SYS_SOCKET_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/poll.h must be included by the external interface. */ +/* #undef CURL_PULL_SYS_POLL_H */ +#ifdef CURL_PULL_SYS_POLL_H +# include +#endif + +/* The size of `long', as computed by sizeof. */ +#define CURL_SIZEOF_LONG 4 + +/* Integral data type used for curl_socklen_t. */ +#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t + +/* The size of `curl_socklen_t', as computed by sizeof. */ +#define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +/* Data type definition of curl_socklen_t. */ +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; + +/* Signed integral data type used for curl_off_t. */ +#define CURL_TYPEOF_CURL_OFF_T int64_t + +/* Data type definition of curl_off_t. */ +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; + +/* curl_off_t formatting string directive without "%" conversion specifier. */ +#define CURL_FORMAT_CURL_OFF_T "lld" + +/* unsigned curl_off_t formatting string without "%" conversion specifier. */ +#define CURL_FORMAT_CURL_OFF_TU "llu" + +/* curl_off_t formatting string directive with "%" conversion specifier. */ +#define CURL_FORMAT_OFF_T "%lld" + +/* The size of `curl_off_t', as computed by sizeof. */ +#define CURL_SIZEOF_CURL_OFF_T 8 + +/* curl_off_t constant suffix. */ +#define CURL_SUFFIX_CURL_OFF_T LL + +/* unsigned curl_off_t constant suffix. */ +#define CURL_SUFFIX_CURL_OFF_TU ULL + +#endif /* __CURL_CURLBUILD_H */ diff --git a/curl/include/ohos/curl/curlbuild-arm64.h b/curl/include/ohos/curl/curlbuild-arm64.h new file mode 100644 index 0000000000..2fb43f3054 --- /dev/null +++ b/curl/include/ohos/curl/curlbuild-arm64.h @@ -0,0 +1,198 @@ +/* include/curl/curlbuild.h. Generated from curlbuild.h.in by configure. */ +#ifndef __CURL_CURLBUILD_H +#define __CURL_CURLBUILD_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* ================================================================ */ +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * If you think that something actually needs to be changed, adjusted + * or fixed in this file, then, report it on the libcurl development + * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ + * + * This header file shall only export symbols which are 'curl' or 'CURL' + * prefixed, otherwise public name space would be polluted. + * + * NOTE 2: + * ------- + * + * Right now you might be staring at file include/curl/curlbuild.h.in or + * at file include/curl/curlbuild.h, this is due to the following reason: + * + * On systems capable of running the configure script, the configure process + * will overwrite the distributed include/curl/curlbuild.h file with one that + * is suitable and specific to the library being configured and built, which + * is generated from the include/curl/curlbuild.h.in template file. + * + */ + +/* ================================================================ */ +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ +/* ================================================================ */ + +#ifdef CURL_SIZEOF_LONG +#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined +#endif + +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T +#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T +#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_TYPEOF_CURL_OFF_T +#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_T +#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_TU +#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined +#endif + +#ifdef CURL_FORMAT_OFF_T +#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_OFF_T +#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_T +#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_TU +#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined +#endif + +/* ================================================================ */ +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ +/* ================================================================ */ + +/* Configure process defines this to 1 when it finds out that system */ +/* header file ws2tcpip.h must be included by the external interface. */ +/* #undef CURL_PULL_WS2TCPIP_H */ +#ifdef CURL_PULL_WS2TCPIP_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# include +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/types.h must be included by the external interface. */ +#define CURL_PULL_SYS_TYPES_H 1 +#ifdef CURL_PULL_SYS_TYPES_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file stdint.h must be included by the external interface. */ +/* #undef CURL_PULL_STDINT_H */ +#ifdef CURL_PULL_STDINT_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file inttypes.h must be included by the external interface. */ +/* #undef CURL_PULL_INTTYPES_H */ +#ifdef CURL_PULL_INTTYPES_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/socket.h must be included by the external interface. */ +#define CURL_PULL_SYS_SOCKET_H 1 +#ifdef CURL_PULL_SYS_SOCKET_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/poll.h must be included by the external interface. */ +/* #undef CURL_PULL_SYS_POLL_H */ +#ifdef CURL_PULL_SYS_POLL_H +# include +#endif + +/* The size of `long', as computed by sizeof. */ +#define CURL_SIZEOF_LONG 8 + +/* Integral data type used for curl_socklen_t. */ +#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t + +/* The size of `curl_socklen_t', as computed by sizeof. */ +#define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +/* Data type definition of curl_socklen_t. */ +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; + +/* Signed integral data type used for curl_off_t. */ +#define CURL_TYPEOF_CURL_OFF_T long + +/* Data type definition of curl_off_t. */ +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; + +/* curl_off_t formatting string directive without "%" conversion specifier. */ +#define CURL_FORMAT_CURL_OFF_T "ld" + +/* unsigned curl_off_t formatting string without "%" conversion specifier. */ +#define CURL_FORMAT_CURL_OFF_TU "lu" + +/* curl_off_t formatting string directive with "%" conversion specifier. */ +#define CURL_FORMAT_OFF_T "%ld" + +/* The size of `curl_off_t', as computed by sizeof. */ +#define CURL_SIZEOF_CURL_OFF_T 8 + +/* curl_off_t constant suffix. */ +#define CURL_SUFFIX_CURL_OFF_T L + +/* unsigned curl_off_t constant suffix. */ +#define CURL_SUFFIX_CURL_OFF_TU UL + +#endif /* __CURL_CURLBUILD_H */ diff --git a/curl/include/ohos/curl/curlbuild-x86.h b/curl/include/ohos/curl/curlbuild-x86.h new file mode 100644 index 0000000000..8228e44f26 --- /dev/null +++ b/curl/include/ohos/curl/curlbuild-x86.h @@ -0,0 +1,198 @@ +/* include/curl/curlbuild.h. Generated from curlbuild.h.in by configure. */ +#ifndef __CURL_CURLBUILD_H +#define __CURL_CURLBUILD_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* ================================================================ */ +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * If you think that something actually needs to be changed, adjusted + * or fixed in this file, then, report it on the libcurl development + * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ + * + * This header file shall only export symbols which are 'curl' or 'CURL' + * prefixed, otherwise public name space would be polluted. + * + * NOTE 2: + * ------- + * + * Right now you might be staring at file include/curl/curlbuild.h.in or + * at file include/curl/curlbuild.h, this is due to the following reason: + * + * On systems capable of running the configure script, the configure process + * will overwrite the distributed include/curl/curlbuild.h file with one that + * is suitable and specific to the library being configured and built, which + * is generated from the include/curl/curlbuild.h.in template file. + * + */ + +/* ================================================================ */ +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ +/* ================================================================ */ + +#ifdef CURL_SIZEOF_LONG +#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined +#endif + +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T +#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T +#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_TYPEOF_CURL_OFF_T +#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_T +#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_TU +#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined +#endif + +#ifdef CURL_FORMAT_OFF_T +#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_OFF_T +#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_T +#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_TU +#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined +#endif + +/* ================================================================ */ +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ +/* ================================================================ */ + +/* Configure process defines this to 1 when it finds out that system */ +/* header file ws2tcpip.h must be included by the external interface. */ +/* #undef CURL_PULL_WS2TCPIP_H */ +#ifdef CURL_PULL_WS2TCPIP_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# include +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/types.h must be included by the external interface. */ +#define CURL_PULL_SYS_TYPES_H 1 +#ifdef CURL_PULL_SYS_TYPES_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file stdint.h must be included by the external interface. */ +#define CURL_PULL_STDINT_H 1 +#ifdef CURL_PULL_STDINT_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file inttypes.h must be included by the external interface. */ +#define CURL_PULL_INTTYPES_H 1 +#ifdef CURL_PULL_INTTYPES_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/socket.h must be included by the external interface. */ +#define CURL_PULL_SYS_SOCKET_H 1 +#ifdef CURL_PULL_SYS_SOCKET_H +# include +#endif + +/* Configure process defines this to 1 when it finds out that system */ +/* header file sys/poll.h must be included by the external interface. */ +/* #undef CURL_PULL_SYS_POLL_H */ +#ifdef CURL_PULL_SYS_POLL_H +# include +#endif + +/* The size of `long', as computed by sizeof. */ +#define CURL_SIZEOF_LONG 4 + +/* Integral data type used for curl_socklen_t. */ +#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t + +/* The size of `curl_socklen_t', as computed by sizeof. */ +#define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +/* Data type definition of curl_socklen_t. */ +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; + +/* Signed integral data type used for curl_off_t. */ +#define CURL_TYPEOF_CURL_OFF_T int64_t + +/* Data type definition of curl_off_t. */ +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; + +/* curl_off_t formatting string directive without "%" conversion specifier. */ +#define CURL_FORMAT_CURL_OFF_T "lld" + +/* unsigned curl_off_t formatting string without "%" conversion specifier. */ +#define CURL_FORMAT_CURL_OFF_TU "llu" + +/* curl_off_t formatting string directive with "%" conversion specifier. */ +#define CURL_FORMAT_OFF_T "%lld" + +/* The size of `curl_off_t', as computed by sizeof. */ +#define CURL_SIZEOF_CURL_OFF_T 8 + +/* curl_off_t constant suffix. */ +#define CURL_SUFFIX_CURL_OFF_T LL + +/* unsigned curl_off_t constant suffix. */ +#define CURL_SUFFIX_CURL_OFF_TU ULL + +#endif /* __CURL_CURLBUILD_H */ diff --git a/curl/include/ohos/curl/curlbuild.h b/curl/include/ohos/curl/curlbuild.h new file mode 100644 index 0000000000..c105acb8da --- /dev/null +++ b/curl/include/ohos/curl/curlbuild.h @@ -0,0 +1,9 @@ +#ifdef __aarch64__ +#include "curlbuild-arm64.h" +#elif __arm__ +#include "curlbuild-arm32.h" +#elif __i386__ +#include "curlbuild-x86.h" +#else +#error "Unsupported architecture!" +#endif diff --git a/curl/include/ohos/curl/curlrules.h b/curl/include/ohos/curl/curlrules.h new file mode 100644 index 0000000000..55d21f68f1 --- /dev/null +++ b/curl/include/ohos/curl/curlrules.h @@ -0,0 +1,262 @@ +#ifndef __CURL_CURLRULES_H +#define __CURL_CURLRULES_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* ================================================================ */ +/* COMPILE TIME SANITY CHECKS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * All checks done in this file are intentionally placed in a public + * header file which is pulled by curl/curl.h when an application is + * being built using an already built libcurl library. Additionally + * this file is also included and used when building the library. + * + * If compilation fails on this file it is certainly sure that the + * problem is elsewhere. It could be a problem in the curlbuild.h + * header file, or simply that you are using different compilation + * settings than those used to build the library. + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * Do not deactivate any check, these are done to make sure that the + * library is properly built and used. + * + * You can find further help on the libcurl development mailing list: + * https://cool.haxx.se/mailman/listinfo/curl-library/ + * + * NOTE 2 + * ------ + * + * Some of the following compile time checks are based on the fact + * that the dimension of a constant array can not be a negative one. + * In this way if the compile time verification fails, the compilation + * will fail issuing an error. The error description wording is compiler + * dependent but it will be quite similar to one of the following: + * + * "negative subscript or subscript is too large" + * "array must have at least one element" + * "-1 is an illegal array size" + * "size of array is negative" + * + * If you are building an application which tries to use an already + * built libcurl library and you are getting this kind of errors on + * this file, it is a clear indication that there is a mismatch between + * how the library was built and how you are trying to use it for your + * application. Your already compiled or binary library provider is the + * only one who can give you the details you need to properly use it. + */ + +/* + * Verify that some macros are actually defined. + */ + +#ifndef CURL_SIZEOF_LONG +# error "CURL_SIZEOF_LONG definition is missing!" + Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing +#endif + +#ifndef CURL_TYPEOF_CURL_SOCKLEN_T +# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing +#endif + +#ifndef CURL_SIZEOF_CURL_SOCKLEN_T +# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing +#endif + +#ifndef CURL_TYPEOF_CURL_OFF_T +# error "CURL_TYPEOF_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_FORMAT_CURL_OFF_T +# error "CURL_FORMAT_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_FORMAT_CURL_OFF_TU +# error "CURL_FORMAT_CURL_OFF_TU definition is missing!" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing +#endif + +#ifndef CURL_FORMAT_OFF_T +# error "CURL_FORMAT_OFF_T definition is missing!" + Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing +#endif + +#ifndef CURL_SIZEOF_CURL_OFF_T +# error "CURL_SIZEOF_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_SUFFIX_CURL_OFF_T +# error "CURL_SUFFIX_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_SUFFIX_CURL_OFF_TU +# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing +#endif + +/* + * Macros private to this header file. + */ + +#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1 + +#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 + +/* + * Verify that the size previously defined and expected for long + * is the same as the one reported by sizeof() at compile time. + */ + +typedef char + __curl_rule_01__ + [CurlchkszEQ(long, CURL_SIZEOF_LONG)]; + +/* + * Verify that the size previously defined and expected for + * curl_off_t is actually the the same as the one reported + * by sizeof() at compile time. + */ + +typedef char + __curl_rule_02__ + [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; + +/* + * Verify at compile time that the size of curl_off_t as reported + * by sizeof() is greater or equal than the one reported for long + * for the current compilation. + */ + +typedef char + __curl_rule_03__ + [CurlchkszGE(curl_off_t, long)]; + +/* + * Verify that the size previously defined and expected for + * curl_socklen_t is actually the the same as the one reported + * by sizeof() at compile time. + */ + +typedef char + __curl_rule_04__ + [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)]; + +/* + * Verify at compile time that the size of curl_socklen_t as reported + * by sizeof() is greater or equal than the one reported for int for + * the current compilation. + */ + +typedef char + __curl_rule_05__ + [CurlchkszGE(curl_socklen_t, int)]; + +/* ================================================================ */ +/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ +/* ================================================================ */ + +/* + * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow + * these to be visible and exported by the external libcurl interface API, + * while also making them visible to the library internals, simply including + * curl_setup.h, without actually needing to include curl.h internally. + * If some day this section would grow big enough, all this should be moved + * to its own header file. + */ + +/* + * Figure out if we can use the ## preprocessor operator, which is supported + * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ + * or __cplusplus so we need to carefully check for them too. + */ + +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ + defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ + defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ + defined(__ILEC400__) + /* This compiler is believed to have an ISO compatible preprocessor */ +#define CURL_ISOCPP +#else + /* This compiler is believed NOT to have an ISO compatible preprocessor */ +#undef CURL_ISOCPP +#endif + +/* + * Macros for minimum-width signed and unsigned curl_off_t integer constants. + */ + +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) +# define __CURL_OFF_T_C_HLPR2(x) x +# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) +#else +# ifdef CURL_ISOCPP +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix +# else +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix +# endif +# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) +#endif + +/* + * Get rid of macros private to this header file. + */ + +#undef CurlchkszEQ +#undef CurlchkszGE + +/* + * Get rid of macros not intended to exist beyond this point. + */ + +#undef CURL_PULL_WS2TCPIP_H +#undef CURL_PULL_SYS_TYPES_H +#undef CURL_PULL_SYS_SOCKET_H +#undef CURL_PULL_SYS_POLL_H +#undef CURL_PULL_STDINT_H +#undef CURL_PULL_INTTYPES_H + +#undef CURL_TYPEOF_CURL_SOCKLEN_T +#undef CURL_TYPEOF_CURL_OFF_T + +#ifdef CURL_NO_OLDIES +#undef CURL_FORMAT_OFF_T /* not required since 7.19.0 - obsoleted in 7.20.0 */ +#endif + +#endif /* __CURL_CURLRULES_H */ diff --git a/curl/include/ohos/curl/curlver.h b/curl/include/ohos/curl/curlver.h new file mode 100644 index 0000000000..ae91b0d2bb --- /dev/null +++ b/curl/include/ohos/curl/curlver.h @@ -0,0 +1,77 @@ +#ifndef __CURL_CURLVER_H +#define __CURL_CURLVER_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* This header file contains nothing but libcurl version info, generated by + a script at release-time. This was made its own header file in 7.11.2 */ + +/* This is the global package copyright */ +#define LIBCURL_COPYRIGHT "1996 - 2016 Daniel Stenberg, ." + +/* This is the version number of the libcurl package from which this header + file origins: */ +#define LIBCURL_VERSION "7.52.1" + +/* The numeric version number is also available "in parts" by using these + defines: */ +#define LIBCURL_VERSION_MAJOR 7 +#define LIBCURL_VERSION_MINOR 52 +#define LIBCURL_VERSION_PATCH 1 + +/* This is the numeric version of the libcurl version number, meant for easier + parsing and comparions by programs. The LIBCURL_VERSION_NUM define will + always follow this syntax: + + 0xXXYYZZ + + Where XX, YY and ZZ are the main version, release and patch numbers in + hexadecimal (using 8 bits each). All three numbers are always represented + using two digits. 1.2 would appear as "0x010200" while version 9.11.7 + appears as "0x090b07". + + This 6-digit (24 bits) hexadecimal number does not show pre-release number, + and it is always a greater number in a more recent release. It makes + comparisons with greater than and less than work. + + Note: This define is the full hex number and _does not_ use the + CURL_VERSION_BITS() macro since curl's own configure script greps for it + and needs it to contain the full number. +*/ +#define LIBCURL_VERSION_NUM 0x073401 + +/* + * This is the date and time when the full source package was created. The + * timestamp is not stored in git, as the timestamp is properly set in the + * tarballs by the maketgz script. + * + * The format of the date should follow this template: + * + * "Mon Feb 12 11:35:33 UTC 2007" + */ +#define LIBCURL_TIMESTAMP "Fri Dec 23 07:22:31 UTC 2016" + +#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) +#define CURL_AT_LEAST_VERSION(x,y,z) \ + (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) + +#endif /* __CURL_CURLVER_H */ diff --git a/curl/include/ohos/curl/easy.h b/curl/include/ohos/curl/easy.h new file mode 100644 index 0000000000..752c5049f8 --- /dev/null +++ b/curl/include/ohos/curl/easy.h @@ -0,0 +1,102 @@ +#ifndef __CURL_EASY_H +#define __CURL_EASY_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +CURL_EXTERN CURL *curl_easy_init(void); +CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); +CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); +CURL_EXTERN void curl_easy_cleanup(CURL *curl); + +/* + * NAME curl_easy_getinfo() + * + * DESCRIPTION + * + * Request internal information from the curl session with this function. The + * third argument MUST be a pointer to a long, a pointer to a char * or a + * pointer to a double (as the documentation describes elsewhere). The data + * pointed to will be filled in accordingly and can be relied upon only if the + * function returns CURLE_OK. This function is intended to get used *AFTER* a + * performed transfer, all results from this function are undefined until the + * transfer is completed. + */ +CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); + + +/* + * NAME curl_easy_duphandle() + * + * DESCRIPTION + * + * Creates a new curl session handle with the same options set for the handle + * passed in. Duplicating a handle could only be a matter of cloning data and + * options, internal state info and things like persistent connections cannot + * be transferred. It is useful in multithreaded applications when you can run + * curl_easy_duphandle() for each new thread to avoid a series of identical + * curl_easy_setopt() invokes in every thread. + */ +CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); + +/* + * NAME curl_easy_reset() + * + * DESCRIPTION + * + * Re-initializes a CURL handle to the default values. This puts back the + * handle to the same state as it was in when it was just created. + * + * It does keep: live connections, the Session ID cache, the DNS cache and the + * cookies. + */ +CURL_EXTERN void curl_easy_reset(CURL *curl); + +/* + * NAME curl_easy_recv() + * + * DESCRIPTION + * + * Receives data from the connected socket. Use after successful + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. + */ +CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, + size_t *n); + +/* + * NAME curl_easy_send() + * + * DESCRIPTION + * + * Sends data over the connected socket. Use after successful + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. + */ +CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, + size_t buflen, size_t *n); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/curl/include/ohos/curl/mprintf.h b/curl/include/ohos/curl/mprintf.h new file mode 100644 index 0000000000..e20f546e19 --- /dev/null +++ b/curl/include/ohos/curl/mprintf.h @@ -0,0 +1,50 @@ +#ifndef __CURL_MPRINTF_H +#define __CURL_MPRINTF_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include +#include /* needed for FILE */ +#include "curl.h" /* for CURL_EXTERN */ + +#ifdef __cplusplus +extern "C" { +#endif + +CURL_EXTERN int curl_mprintf(const char *format, ...); +CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); +CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); +CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, + const char *format, ...); +CURL_EXTERN int curl_mvprintf(const char *format, va_list args); +CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); +CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); +CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, + const char *format, va_list args); +CURL_EXTERN char *curl_maprintf(const char *format, ...); +CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); + +#ifdef __cplusplus +} +#endif + +#endif /* __CURL_MPRINTF_H */ diff --git a/curl/include/ohos/curl/multi.h b/curl/include/ohos/curl/multi.h new file mode 100644 index 0000000000..d1e00cc5d3 --- /dev/null +++ b/curl/include/ohos/curl/multi.h @@ -0,0 +1,439 @@ +#ifndef __CURL_MULTI_H +#define __CURL_MULTI_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* + This is an "external" header file. Don't give away any internals here! + + GOALS + + o Enable a "pull" interface. The application that uses libcurl decides where + and when to ask libcurl to get/send data. + + o Enable multiple simultaneous transfers in the same thread without making it + complicated for the application. + + o Enable the application to select() on its own file descriptors and curl's + file descriptors simultaneous easily. + +*/ + +/* + * This header file should not really need to include "curl.h" since curl.h + * itself includes this file and we expect user applications to do #include + * without the need for especially including multi.h. + * + * For some reason we added this include here at one point, and rather than to + * break existing (wrongly written) libcurl applications, we leave it as-is + * but with this warning attached. + */ +#include "curl.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) +typedef struct Curl_multi CURLM; +#else +typedef void CURLM; +#endif + +typedef enum { + CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or + curl_multi_socket*() soon */ + CURLM_OK, + CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ + CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ + CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ + CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ + CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ + CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ + CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was + attempted to get added - again */ + CURLM_LAST +} CURLMcode; + +/* just to make code nicer when using curl_multi_socket() you can now check + for CURLM_CALL_MULTI_SOCKET too in the same style it works for + curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ +#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM + +/* bitmask bits for CURLMOPT_PIPELINING */ +#define CURLPIPE_NOTHING 0L +#define CURLPIPE_HTTP1 1L +#define CURLPIPE_MULTIPLEX 2L + +typedef enum { + CURLMSG_NONE, /* first, not used */ + CURLMSG_DONE, /* This easy handle has completed. 'result' contains + the CURLcode of the transfer */ + CURLMSG_LAST /* last, not used */ +} CURLMSG; + +struct CURLMsg { + CURLMSG msg; /* what this message means */ + CURL *easy_handle; /* the handle it concerns */ + union { + void *whatever; /* message-specific data */ + CURLcode result; /* return code for transfer */ + } data; +}; +typedef struct CURLMsg CURLMsg; + +/* Based on poll(2) structure and values. + * We don't use pollfd and POLL* constants explicitly + * to cover platforms without poll(). */ +#define CURL_WAIT_POLLIN 0x0001 +#define CURL_WAIT_POLLPRI 0x0002 +#define CURL_WAIT_POLLOUT 0x0004 + +struct curl_waitfd { + curl_socket_t fd; + short events; + short revents; /* not supported yet */ +}; + +/* + * Name: curl_multi_init() + * + * Desc: inititalize multi-style curl usage + * + * Returns: a new CURLM handle to use in all 'curl_multi' functions. + */ +CURL_EXTERN CURLM *curl_multi_init(void); + +/* + * Name: curl_multi_add_handle() + * + * Desc: add a standard curl handle to the multi stack + * + * Returns: CURLMcode type, general multi error code. + */ +CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, + CURL *curl_handle); + + /* + * Name: curl_multi_remove_handle() + * + * Desc: removes a curl handle from the multi stack again + * + * Returns: CURLMcode type, general multi error code. + */ +CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, + CURL *curl_handle); + + /* + * Name: curl_multi_fdset() + * + * Desc: Ask curl for its fd_set sets. The app can use these to select() or + * poll() on. We want curl_multi_perform() called as soon as one of + * them are ready. + * + * Returns: CURLMcode type, general multi error code. + */ +CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, + fd_set *read_fd_set, + fd_set *write_fd_set, + fd_set *exc_fd_set, + int *max_fd); + +/* + * Name: curl_multi_wait() + * + * Desc: Poll on all fds within a CURLM set as well as any + * additional fds passed to the function. + * + * Returns: CURLMcode type, general multi error code. + */ +CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, + struct curl_waitfd extra_fds[], + unsigned int extra_nfds, + int timeout_ms, + int *ret); + + /* + * Name: curl_multi_perform() + * + * Desc: When the app thinks there's data available for curl it calls this + * function to read/write whatever there is right now. This returns + * as soon as the reads and writes are done. This function does not + * require that there actually is data available for reading or that + * data can be written, it can be called just in case. It returns + * the number of handles that still transfer data in the second + * argument's integer-pointer. + * + * Returns: CURLMcode type, general multi error code. *NOTE* that this only + * returns errors etc regarding the whole multi stack. There might + * still have occurred problems on invidual transfers even when this + * returns OK. + */ +CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, + int *running_handles); + + /* + * Name: curl_multi_cleanup() + * + * Desc: Cleans up and removes a whole multi stack. It does not free or + * touch any individual easy handles in any way. We need to define + * in what state those handles will be if this function is called + * in the middle of a transfer. + * + * Returns: CURLMcode type, general multi error code. + */ +CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); + +/* + * Name: curl_multi_info_read() + * + * Desc: Ask the multi handle if there's any messages/informationals from + * the individual transfers. Messages include informationals such as + * error code from the transfer or just the fact that a transfer is + * completed. More details on these should be written down as well. + * + * Repeated calls to this function will return a new struct each + * time, until a special "end of msgs" struct is returned as a signal + * that there is no more to get at this point. + * + * The data the returned pointer points to will not survive calling + * curl_multi_cleanup(). + * + * The 'CURLMsg' struct is meant to be very simple and only contain + * very basic informations. If more involved information is wanted, + * we will provide the particular "transfer handle" in that struct + * and that should/could/would be used in subsequent + * curl_easy_getinfo() calls (or similar). The point being that we + * must never expose complex structs to applications, as then we'll + * undoubtably get backwards compatibility problems in the future. + * + * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out + * of structs. It also writes the number of messages left in the + * queue (after this read) in the integer the second argument points + * to. + */ +CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, + int *msgs_in_queue); + +/* + * Name: curl_multi_strerror() + * + * Desc: The curl_multi_strerror function may be used to turn a CURLMcode + * value into the equivalent human readable error string. This is + * useful for printing meaningful error messages. + * + * Returns: A pointer to a zero-terminated error message. + */ +CURL_EXTERN const char *curl_multi_strerror(CURLMcode); + +/* + * Name: curl_multi_socket() and + * curl_multi_socket_all() + * + * Desc: An alternative version of curl_multi_perform() that allows the + * application to pass in one of the file descriptors that have been + * detected to have "action" on them and let libcurl perform. + * See man page for details. + */ +#define CURL_POLL_NONE 0 +#define CURL_POLL_IN 1 +#define CURL_POLL_OUT 2 +#define CURL_POLL_INOUT 3 +#define CURL_POLL_REMOVE 4 + +#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD + +#define CURL_CSELECT_IN 0x01 +#define CURL_CSELECT_OUT 0x02 +#define CURL_CSELECT_ERR 0x04 + +typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ + curl_socket_t s, /* socket */ + int what, /* see above */ + void *userp, /* private callback + pointer */ + void *socketp); /* private socket + pointer */ +/* + * Name: curl_multi_timer_callback + * + * Desc: Called by libcurl whenever the library detects a change in the + * maximum number of milliseconds the app is allowed to wait before + * curl_multi_socket() or curl_multi_perform() must be called + * (to allow libcurl's timed events to take place). + * + * Returns: The callback should return zero. + */ +typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ + long timeout_ms, /* see above */ + void *userp); /* private callback + pointer */ + +CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, + int *running_handles); + +CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, + curl_socket_t s, + int ev_bitmask, + int *running_handles); + +CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, + int *running_handles); + +#ifndef CURL_ALLOW_OLD_MULTI_SOCKET +/* This macro below was added in 7.16.3 to push users who recompile to use + the new curl_multi_socket_action() instead of the old curl_multi_socket() +*/ +#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) +#endif + +/* + * Name: curl_multi_timeout() + * + * Desc: Returns the maximum number of milliseconds the app is allowed to + * wait before curl_multi_socket() or curl_multi_perform() must be + * called (to allow libcurl's timed events to take place). + * + * Returns: CURLM error code. + */ +CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, + long *milliseconds); + +#undef CINIT /* re-using the same name as in curl.h */ + +#ifdef CURL_ISOCPP +#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define LONG CURLOPTTYPE_LONG +#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT +#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT +#define OFF_T CURLOPTTYPE_OFF_T +#define CINIT(name,type,number) CURLMOPT_/**/name = type + number +#endif + +typedef enum { + /* This is the socket callback function pointer */ + CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1), + + /* This is the argument passed to the socket callback */ + CINIT(SOCKETDATA, OBJECTPOINT, 2), + + /* set to 1 to enable pipelining for this multi handle */ + CINIT(PIPELINING, LONG, 3), + + /* This is the timer callback function pointer */ + CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4), + + /* This is the argument passed to the timer callback */ + CINIT(TIMERDATA, OBJECTPOINT, 5), + + /* maximum number of entries in the connection cache */ + CINIT(MAXCONNECTS, LONG, 6), + + /* maximum number of (pipelining) connections to one host */ + CINIT(MAX_HOST_CONNECTIONS, LONG, 7), + + /* maximum number of requests in a pipeline */ + CINIT(MAX_PIPELINE_LENGTH, LONG, 8), + + /* a connection with a content-length longer than this + will not be considered for pipelining */ + CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9), + + /* a connection with a chunk length longer than this + will not be considered for pipelining */ + CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10), + + /* a list of site names(+port) that are blacklisted from + pipelining */ + CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11), + + /* a list of server types that are blacklisted from + pipelining */ + CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12), + + /* maximum number of open connections in total */ + CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13), + + /* This is the server push callback function pointer */ + CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14), + + /* This is the argument passed to the server push callback */ + CINIT(PUSHDATA, OBJECTPOINT, 15), + + CURLMOPT_LASTENTRY /* the last unused */ +} CURLMoption; + + +/* + * Name: curl_multi_setopt() + * + * Desc: Sets options for the multi handle. + * + * Returns: CURLM error code. + */ +CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, + CURLMoption option, ...); + + +/* + * Name: curl_multi_assign() + * + * Desc: This function sets an association in the multi handle between the + * given socket and a private pointer of the application. This is + * (only) useful for curl_multi_socket uses. + * + * Returns: CURLM error code. + */ +CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, + curl_socket_t sockfd, void *sockp); + + +/* + * Name: curl_push_callback + * + * Desc: This callback gets called when a new stream is being pushed by the + * server. It approves or denies the new stream. + * + * Returns: CURL_PUSH_OK or CURL_PUSH_DENY. + */ +#define CURL_PUSH_OK 0 +#define CURL_PUSH_DENY 1 + +struct curl_pushheaders; /* forward declaration only */ + +CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h, + size_t num); +CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h, + const char *name); + +typedef int (*curl_push_callback)(CURL *parent, + CURL *easy, + size_t num_headers, + struct curl_pushheaders *headers, + void *userp); + +#ifdef __cplusplus +} /* end of extern "C" */ +#endif + +#endif diff --git a/curl/include/ohos/curl/stdcheaders.h b/curl/include/ohos/curl/stdcheaders.h new file mode 100644 index 0000000000..027b6f4211 --- /dev/null +++ b/curl/include/ohos/curl/stdcheaders.h @@ -0,0 +1,33 @@ +#ifndef __STDC_HEADERS_H +#define __STDC_HEADERS_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include + +size_t fread(void *, size_t, size_t, FILE *); +size_t fwrite(const void *, size_t, size_t, FILE *); + +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, size_t); + +#endif /* __STDC_HEADERS_H */ diff --git a/curl/include/ohos/curl/typecheck-gcc.h b/curl/include/ohos/curl/typecheck-gcc.h new file mode 100644 index 0000000000..4eb896eaa8 --- /dev/null +++ b/curl/include/ohos/curl/typecheck-gcc.h @@ -0,0 +1,623 @@ +#ifndef __CURL_TYPECHECK_GCC_H +#define __CURL_TYPECHECK_GCC_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* wraps curl_easy_setopt() with typechecking */ + +/* To add a new kind of warning, add an + * if(_curl_is_sometype_option(_curl_opt)) + * if(!_curl_is_sometype(value)) + * _curl_easy_setopt_err_sometype(); + * block and define _curl_is_sometype_option, _curl_is_sometype and + * _curl_easy_setopt_err_sometype below + * + * NOTE: We use two nested 'if' statements here instead of the && operator, in + * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x + * when compiling with -Wlogical-op. + * + * To add an option that uses the same type as an existing option, you'll just + * need to extend the appropriate _curl_*_option macro + */ +#define curl_easy_setopt(handle, option, value) \ +__extension__ ({ \ + __typeof__(option) _curl_opt = option; \ + if(__builtin_constant_p(_curl_opt)) { \ + if(_curl_is_long_option(_curl_opt)) \ + if(!_curl_is_long(value)) \ + _curl_easy_setopt_err_long(); \ + if(_curl_is_off_t_option(_curl_opt)) \ + if(!_curl_is_off_t(value)) \ + _curl_easy_setopt_err_curl_off_t(); \ + if(_curl_is_string_option(_curl_opt)) \ + if(!_curl_is_string(value)) \ + _curl_easy_setopt_err_string(); \ + if(_curl_is_write_cb_option(_curl_opt)) \ + if(!_curl_is_write_cb(value)) \ + _curl_easy_setopt_err_write_callback(); \ + if((_curl_opt) == CURLOPT_READFUNCTION) \ + if(!_curl_is_read_cb(value)) \ + _curl_easy_setopt_err_read_cb(); \ + if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ + if(!_curl_is_ioctl_cb(value)) \ + _curl_easy_setopt_err_ioctl_cb(); \ + if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ + if(!_curl_is_sockopt_cb(value)) \ + _curl_easy_setopt_err_sockopt_cb(); \ + if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ + if(!_curl_is_opensocket_cb(value)) \ + _curl_easy_setopt_err_opensocket_cb(); \ + if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ + if(!_curl_is_progress_cb(value)) \ + _curl_easy_setopt_err_progress_cb(); \ + if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ + if(!_curl_is_debug_cb(value)) \ + _curl_easy_setopt_err_debug_cb(); \ + if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ + if(!_curl_is_ssl_ctx_cb(value)) \ + _curl_easy_setopt_err_ssl_ctx_cb(); \ + if(_curl_is_conv_cb_option(_curl_opt)) \ + if(!_curl_is_conv_cb(value)) \ + _curl_easy_setopt_err_conv_cb(); \ + if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ + if(!_curl_is_seek_cb(value)) \ + _curl_easy_setopt_err_seek_cb(); \ + if(_curl_is_cb_data_option(_curl_opt)) \ + if(!_curl_is_cb_data(value)) \ + _curl_easy_setopt_err_cb_data(); \ + if((_curl_opt) == CURLOPT_ERRORBUFFER) \ + if(!_curl_is_error_buffer(value)) \ + _curl_easy_setopt_err_error_buffer(); \ + if((_curl_opt) == CURLOPT_STDERR) \ + if(!_curl_is_FILE(value)) \ + _curl_easy_setopt_err_FILE(); \ + if(_curl_is_postfields_option(_curl_opt)) \ + if(!_curl_is_postfields(value)) \ + _curl_easy_setopt_err_postfields(); \ + if((_curl_opt) == CURLOPT_HTTPPOST) \ + if(!_curl_is_arr((value), struct curl_httppost)) \ + _curl_easy_setopt_err_curl_httpost(); \ + if(_curl_is_slist_option(_curl_opt)) \ + if(!_curl_is_arr((value), struct curl_slist)) \ + _curl_easy_setopt_err_curl_slist(); \ + if((_curl_opt) == CURLOPT_SHARE) \ + if(!_curl_is_ptr((value), CURLSH)) \ + _curl_easy_setopt_err_CURLSH(); \ + } \ + curl_easy_setopt(handle, _curl_opt, value); \ +}) + +/* wraps curl_easy_getinfo() with typechecking */ +/* FIXME: don't allow const pointers */ +#define curl_easy_getinfo(handle, info, arg) \ +__extension__ ({ \ + __typeof__(info) _curl_info = info; \ + if(__builtin_constant_p(_curl_info)) { \ + if(_curl_is_string_info(_curl_info)) \ + if(!_curl_is_arr((arg), char *)) \ + _curl_easy_getinfo_err_string(); \ + if(_curl_is_long_info(_curl_info)) \ + if(!_curl_is_arr((arg), long)) \ + _curl_easy_getinfo_err_long(); \ + if(_curl_is_double_info(_curl_info)) \ + if(!_curl_is_arr((arg), double)) \ + _curl_easy_getinfo_err_double(); \ + if(_curl_is_slist_info(_curl_info)) \ + if(!_curl_is_arr((arg), struct curl_slist *)) \ + _curl_easy_getinfo_err_curl_slist(); \ + } \ + curl_easy_getinfo(handle, _curl_info, arg); \ +}) + +/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(), + * for now just make sure that the functions are called with three + * arguments + */ +#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) +#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) + + +/* the actual warnings, triggered by calling the _curl_easy_setopt_err* + * functions */ + +/* To define a new warning, use _CURL_WARNING(identifier, "message") */ +#define _CURL_WARNING(id, message) \ + static void __attribute__((__warning__(message))) \ + __attribute__((__unused__)) __attribute__((__noinline__)) \ + id(void) { __asm__(""); } + +_CURL_WARNING(_curl_easy_setopt_err_long, + "curl_easy_setopt expects a long argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_curl_off_t, + "curl_easy_setopt expects a curl_off_t argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_string, + "curl_easy_setopt expects a " + "string ('char *' or char[]) argument for this option" + ) +_CURL_WARNING(_curl_easy_setopt_err_write_callback, + "curl_easy_setopt expects a curl_write_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_read_cb, + "curl_easy_setopt expects a curl_read_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, + "curl_easy_setopt expects a curl_ioctl_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, + "curl_easy_setopt expects a curl_sockopt_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, + "curl_easy_setopt expects a " + "curl_opensocket_callback argument for this option" + ) +_CURL_WARNING(_curl_easy_setopt_err_progress_cb, + "curl_easy_setopt expects a curl_progress_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_debug_cb, + "curl_easy_setopt expects a curl_debug_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb, + "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_conv_cb, + "curl_easy_setopt expects a curl_conv_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_seek_cb, + "curl_easy_setopt expects a curl_seek_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_cb_data, + "curl_easy_setopt expects a " + "private data pointer as argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_error_buffer, + "curl_easy_setopt expects a " + "char buffer of CURL_ERROR_SIZE as argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_FILE, + "curl_easy_setopt expects a 'FILE *' argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_postfields, + "curl_easy_setopt expects a 'void *' or 'char *' argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_curl_httpost, + "curl_easy_setopt expects a 'struct curl_httppost *' " + "argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_curl_slist, + "curl_easy_setopt expects a 'struct curl_slist *' argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_CURLSH, + "curl_easy_setopt expects a CURLSH* argument for this option") + +_CURL_WARNING(_curl_easy_getinfo_err_string, + "curl_easy_getinfo expects a pointer to 'char *' for this info") +_CURL_WARNING(_curl_easy_getinfo_err_long, + "curl_easy_getinfo expects a pointer to long for this info") +_CURL_WARNING(_curl_easy_getinfo_err_double, + "curl_easy_getinfo expects a pointer to double for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_slist, + "curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info") + +/* groups of curl_easy_setops options that take the same type of argument */ + +/* To add a new option to one of the groups, just add + * (option) == CURLOPT_SOMETHING + * to the or-expression. If the option takes a long or curl_off_t, you don't + * have to do anything + */ + +/* evaluates to true if option takes a long argument */ +#define _curl_is_long_option(option) \ + (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT) + +#define _curl_is_off_t_option(option) \ + ((option) > CURLOPTTYPE_OFF_T) + +/* evaluates to true if option takes a char* argument */ +#define _curl_is_string_option(option) \ + ((option) == CURLOPT_ACCEPT_ENCODING || \ + (option) == CURLOPT_CAINFO || \ + (option) == CURLOPT_CAPATH || \ + (option) == CURLOPT_COOKIE || \ + (option) == CURLOPT_COOKIEFILE || \ + (option) == CURLOPT_COOKIEJAR || \ + (option) == CURLOPT_COOKIELIST || \ + (option) == CURLOPT_CRLFILE || \ + (option) == CURLOPT_CUSTOMREQUEST || \ + (option) == CURLOPT_DEFAULT_PROTOCOL || \ + (option) == CURLOPT_DNS_INTERFACE || \ + (option) == CURLOPT_DNS_LOCAL_IP4 || \ + (option) == CURLOPT_DNS_LOCAL_IP6 || \ + (option) == CURLOPT_DNS_SERVERS || \ + (option) == CURLOPT_EGDSOCKET || \ + (option) == CURLOPT_FTPPORT || \ + (option) == CURLOPT_FTP_ACCOUNT || \ + (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ + (option) == CURLOPT_INTERFACE || \ + (option) == CURLOPT_ISSUERCERT || \ + (option) == CURLOPT_KEYPASSWD || \ + (option) == CURLOPT_KRBLEVEL || \ + (option) == CURLOPT_LOGIN_OPTIONS || \ + (option) == CURLOPT_MAIL_AUTH || \ + (option) == CURLOPT_MAIL_FROM || \ + (option) == CURLOPT_NETRC_FILE || \ + (option) == CURLOPT_NOPROXY || \ + (option) == CURLOPT_PASSWORD || \ + (option) == CURLOPT_PINNEDPUBLICKEY || \ + (option) == CURLOPT_PROXY || \ + (option) == CURLOPT_PROXYPASSWORD || \ + (option) == CURLOPT_PROXYUSERNAME || \ + (option) == CURLOPT_PROXYUSERPWD || \ + (option) == CURLOPT_PROXY_SERVICE_NAME || \ + (option) == CURLOPT_RANDOM_FILE || \ + (option) == CURLOPT_RANGE || \ + (option) == CURLOPT_REFERER || \ + (option) == CURLOPT_RTSP_SESSION_ID || \ + (option) == CURLOPT_RTSP_STREAM_URI || \ + (option) == CURLOPT_RTSP_TRANSPORT || \ + (option) == CURLOPT_SERVICE_NAME || \ + (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \ + (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ + (option) == CURLOPT_SSH_KNOWNHOSTS || \ + (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ + (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ + (option) == CURLOPT_SSLCERT || \ + (option) == CURLOPT_SSLCERTTYPE || \ + (option) == CURLOPT_SSLENGINE || \ + (option) == CURLOPT_SSLKEY || \ + (option) == CURLOPT_SSLKEYTYPE || \ + (option) == CURLOPT_SSL_CIPHER_LIST || \ + (option) == CURLOPT_TLSAUTH_PASSWORD || \ + (option) == CURLOPT_TLSAUTH_TYPE || \ + (option) == CURLOPT_TLSAUTH_USERNAME || \ + (option) == CURLOPT_UNIX_SOCKET_PATH || \ + (option) == CURLOPT_URL || \ + (option) == CURLOPT_USERAGENT || \ + (option) == CURLOPT_USERNAME || \ + (option) == CURLOPT_USERPWD || \ + (option) == CURLOPT_XOAUTH2_BEARER || \ + 0) + +/* evaluates to true if option takes a curl_write_callback argument */ +#define _curl_is_write_cb_option(option) \ + ((option) == CURLOPT_HEADERFUNCTION || \ + (option) == CURLOPT_WRITEFUNCTION) + +/* evaluates to true if option takes a curl_conv_callback argument */ +#define _curl_is_conv_cb_option(option) \ + ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \ + (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \ + (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION) + +/* evaluates to true if option takes a data argument to pass to a callback */ +#define _curl_is_cb_data_option(option) \ + ((option) == CURLOPT_CHUNK_DATA || \ + (option) == CURLOPT_CLOSESOCKETDATA || \ + (option) == CURLOPT_DEBUGDATA || \ + (option) == CURLOPT_FNMATCH_DATA || \ + (option) == CURLOPT_HEADERDATA || \ + (option) == CURLOPT_INTERLEAVEDATA || \ + (option) == CURLOPT_IOCTLDATA || \ + (option) == CURLOPT_OPENSOCKETDATA || \ + (option) == CURLOPT_PRIVATE || \ + (option) == CURLOPT_PROGRESSDATA || \ + (option) == CURLOPT_READDATA || \ + (option) == CURLOPT_SEEKDATA || \ + (option) == CURLOPT_SOCKOPTDATA || \ + (option) == CURLOPT_SSH_KEYDATA || \ + (option) == CURLOPT_SSL_CTX_DATA || \ + (option) == CURLOPT_WRITEDATA || \ + 0) + +/* evaluates to true if option takes a POST data argument (void* or char*) */ +#define _curl_is_postfields_option(option) \ + ((option) == CURLOPT_POSTFIELDS || \ + (option) == CURLOPT_COPYPOSTFIELDS || \ + 0) + +/* evaluates to true if option takes a struct curl_slist * argument */ +#define _curl_is_slist_option(option) \ + ((option) == CURLOPT_HTTP200ALIASES || \ + (option) == CURLOPT_HTTPHEADER || \ + (option) == CURLOPT_MAIL_RCPT || \ + (option) == CURLOPT_POSTQUOTE || \ + (option) == CURLOPT_PREQUOTE || \ + (option) == CURLOPT_PROXYHEADER || \ + (option) == CURLOPT_QUOTE || \ + (option) == CURLOPT_RESOLVE || \ + (option) == CURLOPT_TELNETOPTIONS || \ + 0) + +/* groups of curl_easy_getinfo infos that take the same type of argument */ + +/* evaluates to true if info expects a pointer to char * argument */ +#define _curl_is_string_info(info) \ + (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG) + +/* evaluates to true if info expects a pointer to long argument */ +#define _curl_is_long_info(info) \ + (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE) + +/* evaluates to true if info expects a pointer to double argument */ +#define _curl_is_double_info(info) \ + (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) + +/* true if info expects a pointer to struct curl_slist * argument */ +#define _curl_is_slist_info(info) \ + (CURLINFO_SLIST < (info)) + + +/* typecheck helpers -- check whether given expression has requested type*/ + +/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros, + * otherwise define a new macro. Search for __builtin_types_compatible_p + * in the GCC manual. + * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is + * the actual expression passed to the curl_easy_setopt macro. This + * means that you can only apply the sizeof and __typeof__ operators, no + * == or whatsoever. + */ + +/* XXX: should evaluate to true iff expr is a pointer */ +#define _curl_is_any_ptr(expr) \ + (sizeof(expr) == sizeof(void *)) + +/* evaluates to true if expr is NULL */ +/* XXX: must not evaluate expr, so this check is not accurate */ +#define _curl_is_NULL(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL))) + +/* evaluates to true if expr is type*, const type* or NULL */ +#define _curl_is_ptr(expr, type) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), type *) || \ + __builtin_types_compatible_p(__typeof__(expr), const type *)) + +/* evaluates to true if expr is one of type[], type*, NULL or const type* */ +#define _curl_is_arr(expr, type) \ + (_curl_is_ptr((expr), type) || \ + __builtin_types_compatible_p(__typeof__(expr), type [])) + +/* evaluates to true if expr is a string */ +#define _curl_is_string(expr) \ + (_curl_is_arr((expr), char) || \ + _curl_is_arr((expr), signed char) || \ + _curl_is_arr((expr), unsigned char)) + +/* evaluates to true if expr is a long (no matter the signedness) + * XXX: for now, int is also accepted (and therefore short and char, which + * are promoted to int when passed to a variadic function) */ +#define _curl_is_long(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), long) || \ + __builtin_types_compatible_p(__typeof__(expr), signed long) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \ + __builtin_types_compatible_p(__typeof__(expr), int) || \ + __builtin_types_compatible_p(__typeof__(expr), signed int) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \ + __builtin_types_compatible_p(__typeof__(expr), short) || \ + __builtin_types_compatible_p(__typeof__(expr), signed short) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \ + __builtin_types_compatible_p(__typeof__(expr), char) || \ + __builtin_types_compatible_p(__typeof__(expr), signed char) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned char)) + +/* evaluates to true if expr is of type curl_off_t */ +#define _curl_is_off_t(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), curl_off_t)) + +/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ +/* XXX: also check size of an char[] array? */ +#define _curl_is_error_buffer(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), char *) || \ + __builtin_types_compatible_p(__typeof__(expr), char[])) + +/* evaluates to true if expr is of type (const) void* or (const) FILE* */ +#if 0 +#define _curl_is_cb_data(expr) \ + (_curl_is_ptr((expr), void) || \ + _curl_is_ptr((expr), FILE)) +#else /* be less strict */ +#define _curl_is_cb_data(expr) \ + _curl_is_any_ptr(expr) +#endif + +/* evaluates to true if expr is of type FILE* */ +#define _curl_is_FILE(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), FILE *)) + +/* evaluates to true if expr can be passed as POST data (void* or char*) */ +#define _curl_is_postfields(expr) \ + (_curl_is_ptr((expr), void) || \ + _curl_is_arr((expr), char)) + +/* FIXME: the whole callback checking is messy... + * The idea is to tolerate char vs. void and const vs. not const + * pointers in arguments at least + */ +/* helper: __builtin_types_compatible_p distinguishes between functions and + * function pointers, hide it */ +#define _curl_callback_compatible(func, type) \ + (__builtin_types_compatible_p(__typeof__(func), type) || \ + __builtin_types_compatible_p(__typeof__(func), type*)) + +/* evaluates to true if expr is of type curl_read_callback or "similar" */ +#define _curl_is_read_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \ + _curl_callback_compatible((expr), _curl_read_callback1) || \ + _curl_callback_compatible((expr), _curl_read_callback2) || \ + _curl_callback_compatible((expr), _curl_read_callback3) || \ + _curl_callback_compatible((expr), _curl_read_callback4) || \ + _curl_callback_compatible((expr), _curl_read_callback5) || \ + _curl_callback_compatible((expr), _curl_read_callback6)) +typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void *); +typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void *); +typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE *); +typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void *); +typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void *); +typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE *); + +/* evaluates to true if expr is of type curl_write_callback or "similar" */ +#define _curl_is_write_cb(expr) \ + (_curl_is_read_cb(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \ + _curl_callback_compatible((expr), _curl_write_callback1) || \ + _curl_callback_compatible((expr), _curl_write_callback2) || \ + _curl_callback_compatible((expr), _curl_write_callback3) || \ + _curl_callback_compatible((expr), _curl_write_callback4) || \ + _curl_callback_compatible((expr), _curl_write_callback5) || \ + _curl_callback_compatible((expr), _curl_write_callback6)) +typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void *); +typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, + const void *); +typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE *); +typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void *); +typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, + const void *); +typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE *); + +/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ +#define _curl_is_ioctl_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback1) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback2) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback3) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback4)) +typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void *); +typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void *); +typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void *); +typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void *); + +/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ +#define _curl_is_sockopt_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \ + _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ + _curl_callback_compatible((expr), _curl_sockopt_callback2)) +typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); +typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, + curlsocktype); + +/* evaluates to true if expr is of type curl_opensocket_callback or + "similar" */ +#define _curl_is_opensocket_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ + _curl_callback_compatible((expr), _curl_opensocket_callback1) || \ + _curl_callback_compatible((expr), _curl_opensocket_callback2) || \ + _curl_callback_compatible((expr), _curl_opensocket_callback3) || \ + _curl_callback_compatible((expr), _curl_opensocket_callback4)) +typedef curl_socket_t (_curl_opensocket_callback1) + (void *, curlsocktype, struct curl_sockaddr *); +typedef curl_socket_t (_curl_opensocket_callback2) + (void *, curlsocktype, const struct curl_sockaddr *); +typedef curl_socket_t (_curl_opensocket_callback3) + (const void *, curlsocktype, struct curl_sockaddr *); +typedef curl_socket_t (_curl_opensocket_callback4) + (const void *, curlsocktype, const struct curl_sockaddr *); + +/* evaluates to true if expr is of type curl_progress_callback or "similar" */ +#define _curl_is_progress_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \ + _curl_callback_compatible((expr), _curl_progress_callback1) || \ + _curl_callback_compatible((expr), _curl_progress_callback2)) +typedef int (_curl_progress_callback1)(void *, + double, double, double, double); +typedef int (_curl_progress_callback2)(const void *, + double, double, double, double); + +/* evaluates to true if expr is of type curl_debug_callback or "similar" */ +#define _curl_is_debug_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \ + _curl_callback_compatible((expr), _curl_debug_callback1) || \ + _curl_callback_compatible((expr), _curl_debug_callback2) || \ + _curl_callback_compatible((expr), _curl_debug_callback3) || \ + _curl_callback_compatible((expr), _curl_debug_callback4) || \ + _curl_callback_compatible((expr), _curl_debug_callback5) || \ + _curl_callback_compatible((expr), _curl_debug_callback6) || \ + _curl_callback_compatible((expr), _curl_debug_callback7) || \ + _curl_callback_compatible((expr), _curl_debug_callback8)) +typedef int (_curl_debug_callback1) (CURL *, + curl_infotype, char *, size_t, void *); +typedef int (_curl_debug_callback2) (CURL *, + curl_infotype, char *, size_t, const void *); +typedef int (_curl_debug_callback3) (CURL *, + curl_infotype, const char *, size_t, void *); +typedef int (_curl_debug_callback4) (CURL *, + curl_infotype, const char *, size_t, const void *); +typedef int (_curl_debug_callback5) (CURL *, + curl_infotype, unsigned char *, size_t, void *); +typedef int (_curl_debug_callback6) (CURL *, + curl_infotype, unsigned char *, size_t, const void *); +typedef int (_curl_debug_callback7) (CURL *, + curl_infotype, const unsigned char *, size_t, void *); +typedef int (_curl_debug_callback8) (CURL *, + curl_infotype, const unsigned char *, size_t, const void *); + +/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ +/* this is getting even messier... */ +#define _curl_is_ssl_ctx_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback8)) +typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *); +typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *); +typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *); +typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); +#ifdef HEADER_SSL_H +/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX + * this will of course break if we're included before OpenSSL headers... + */ +typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); +typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); +typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); +typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, + const void *); +#else +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7; +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; +#endif + +/* evaluates to true if expr is of type curl_conv_callback or "similar" */ +#define _curl_is_conv_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \ + _curl_callback_compatible((expr), _curl_conv_callback1) || \ + _curl_callback_compatible((expr), _curl_conv_callback2) || \ + _curl_callback_compatible((expr), _curl_conv_callback3) || \ + _curl_callback_compatible((expr), _curl_conv_callback4)) +typedef CURLcode (*_curl_conv_callback1)(char *, size_t length); +typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length); +typedef CURLcode (*_curl_conv_callback3)(void *, size_t length); +typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); + +/* evaluates to true if expr is of type curl_seek_callback or "similar" */ +#define _curl_is_seek_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \ + _curl_callback_compatible((expr), _curl_seek_callback1) || \ + _curl_callback_compatible((expr), _curl_seek_callback2)) +typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); +typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int); + + +#endif /* __CURL_TYPECHECK_GCC_H */ diff --git a/curl/prebuilt/ohos/libcurl.a b/curl/prebuilt/ohos/libcurl.a new file mode 100644 index 0000000000..1b97f1ce72 Binary files /dev/null and b/curl/prebuilt/ohos/libcurl.a differ diff --git a/freetype2/include/ohos/freetype2/config/ftconfig.h b/freetype2/include/ohos/freetype2/config/ftconfig.h new file mode 100644 index 0000000000..39bcaaea14 --- /dev/null +++ b/freetype2/include/ohos/freetype2/config/ftconfig.h @@ -0,0 +1,481 @@ +/* ftconfig.h. Generated from ftconfig.in by configure. */ +/***************************************************************************/ +/* */ +/* ftconfig.in */ +/* */ +/* UNIX-specific configuration file (specification only). */ +/* */ +/* Copyright 1996-2004, 2006-2009, 2011, 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This header file contains a number of macro definitions that are used */ + /* by the rest of the engine. Most of the macros here are automatically */ + /* determined at compile time, and you should not need to change it to */ + /* port FreeType, except to compile the library with a non-ANSI */ + /* compiler. */ + /* */ + /* Note however that if some specific modifications are needed, we */ + /* advise you to place a modified copy in your build directory. */ + /* */ + /* The build directory is usually `builds/', and contains */ + /* system-specific files that are always included first when building */ + /* the library. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTCONFIG_H__ +#define __FTCONFIG_H__ + +#include +#include FT_CONFIG_OPTIONS_H +#include FT_CONFIG_STANDARD_LIBRARY_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ + /* */ + /* These macros can be toggled to suit a specific system. The current */ + /* ones are defaults used to compile FreeType in an ANSI C environment */ + /* (16bit compilers are also supported). Copy this file to your own */ + /* `builds/' directory, and edit it to port the engine. */ + /* */ + /*************************************************************************/ + + +#define HAVE_UNISTD_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_STDINT_H 1 + + + /* There are systems (like the Texas Instruments 'C54x) where a `char' */ + /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */ + /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */ + /* is probably unexpected. */ + /* */ + /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */ + /* `char' type. */ + +#ifndef FT_CHAR_BIT +#define FT_CHAR_BIT CHAR_BIT +#endif + + +/* #undef FT_USE_AUTOCONF_SIZEOF_TYPES */ +#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES + +#define SIZEOF_INT 4 +#define SIZEOF_LONG 4 +#define FT_SIZEOF_INT SIZEOF_INT +#define FT_SIZEOF_LONG SIZEOF_LONG + +#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */ + + /* Following cpp computation of the bit length of int and long */ + /* is copied from default include/config/ftconfig.h. */ + /* If any improvement is required for this file, it should be */ + /* applied to the original header file for the builders that */ + /* does not use configure script. */ + + /* The size of an `int' type. */ +#if FT_UINT_MAX == 0xFFFFUL +#define FT_SIZEOF_INT (16 / FT_CHAR_BIT) +#elif FT_UINT_MAX == 0xFFFFFFFFUL +#define FT_SIZEOF_INT (32 / FT_CHAR_BIT) +#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL +#define FT_SIZEOF_INT (64 / FT_CHAR_BIT) +#else +#error "Unsupported size of `int' type!" +#endif + + /* The size of a `long' type. A five-byte `long' (as used e.g. on the */ + /* DM642) is recognized but avoided. */ +#if FT_ULONG_MAX == 0xFFFFFFFFUL +#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) +#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL +#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) +#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL +#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT) +#else +#error "Unsupported size of `long' type!" +#endif + +#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */ + + + /* FT_UNUSED is a macro used to indicate that a given parameter is not */ + /* used -- this is only used to get rid of unpleasant compiler warnings */ +#ifndef FT_UNUSED +#define FT_UNUSED( arg ) ( (arg) = (arg) ) +#endif + + + /*************************************************************************/ + /* */ + /* AUTOMATIC CONFIGURATION MACROS */ + /* */ + /* These macros are computed from the ones defined above. Don't touch */ + /* their definition, unless you know precisely what you are doing. No */ + /* porter should need to mess with them. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Mac support */ + /* */ + /* This is the only necessary change, so it is defined here instead */ + /* providing a new configuration file. */ + /* */ +#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) + /* no Carbon frameworks for 64bit 10.4.x */ + /* AvailabilityMacros.h is available since Mac OS X 10.2, */ + /* so guess the system version by maximum errno before inclusion */ +#include +#ifdef ECANCELED /* defined since 10.2 */ +#include "AvailabilityMacros.h" +#endif +#if defined( __LP64__ ) && \ + ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) +#undef FT_MACINTOSH +#endif + +#elif defined( __SC__ ) || defined( __MRC__ ) + /* Classic MacOS compilers */ +#include "ConditionalMacros.h" +#if TARGET_OS_MAC +#define FT_MACINTOSH 1 +#endif + +#endif + + + /* Fix compiler warning with sgi compiler */ +#if defined( __sgi ) && !defined( __GNUC__ ) +#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 ) +#pragma set woff 3505 +#endif +#endif + + + /*************************************************************************/ + /* */ + /*
*/ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int16 */ + /* */ + /* */ + /* A typedef for a 16bit signed integer type. */ + /* */ + typedef signed short FT_Int16; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt16 */ + /* */ + /* */ + /* A typedef for a 16bit unsigned integer type. */ + /* */ + typedef unsigned short FT_UInt16; + + /* */ + + + /* this #if 0 ... #endif clause is for documentation purposes */ +#if 0 + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int32 */ + /* */ + /* */ + /* A typedef for a 32bit signed integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef signed XXX FT_Int32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt32 */ + /* */ + /* A typedef for a 32bit unsigned integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef unsigned XXX FT_UInt32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int64 */ + /* */ + /* A typedef for a 64bit signed integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef signed XXX FT_Int64; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt64 */ + /* */ + /* A typedef for a 64bit unsigned integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef unsigned XXX FT_UInt64; + + /* */ + +#endif + +#if FT_SIZEOF_INT == 4 + + typedef signed int FT_Int32; + typedef unsigned int FT_UInt32; + +#elif FT_SIZEOF_LONG == 4 + + typedef signed long FT_Int32; + typedef unsigned long FT_UInt32; + +#else +#error "no 32bit type found -- please check your configuration files" +#endif + + + /* look up an integer type that is at least 32 bits */ +#if FT_SIZEOF_INT >= 4 + + typedef int FT_Fast; + typedef unsigned int FT_UFast; + +#elif FT_SIZEOF_LONG >= 4 + + typedef long FT_Fast; + typedef unsigned long FT_UFast; + +#endif + + + /* determine whether we have a 64-bit int type for platforms without */ + /* Autoconf */ +#if FT_SIZEOF_LONG == 8 + + /* FT_LONG64 must be defined if a 64-bit type is available */ +#define FT_LONG64 +#define FT_INT64 long +#define FT_UINT64 unsigned long + + /*************************************************************************/ + /* */ + /* A 64-bit data type may create compilation problems if you compile */ + /* in strict ANSI mode. To avoid them, we disable other 64-bit data */ + /* types if __STDC__ is defined. You can however ignore this rule */ + /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ + /* */ +#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) + +#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 + +#elif defined( __BORLANDC__ ) /* Borland C++ */ + + /* XXXX: We should probably check the value of __BORLANDC__ in order */ + /* to test the compiler version. */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 + +#elif defined( __WATCOMC__ ) /* Watcom C++ */ + + /* Watcom doesn't provide 64-bit data types */ + +#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ + +#define FT_LONG64 +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int + +#elif defined( __GNUC__ ) + + /* GCC provides the `long long' type */ +#define FT_LONG64 +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int + +#endif /* _MSC_VER */ + +#endif /* FT_SIZEOF_LONG == 8 */ + +#ifdef FT_LONG64 + typedef FT_INT64 FT_Int64; + typedef FT_UINT64 FT_UInt64; +#endif + + +#define FT_BEGIN_STMNT do { +#define FT_END_STMNT } while ( 0 ) +#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT + + +#ifdef FT_MAKE_OPTION_SINGLE_OBJECT + +#define FT_LOCAL( x ) static x +#define FT_LOCAL_DEF( x ) static x + +#else + +#ifdef __cplusplus +#define FT_LOCAL( x ) extern "C" x +#define FT_LOCAL_DEF( x ) extern "C" x +#else +#define FT_LOCAL( x ) extern x +#define FT_LOCAL_DEF( x ) x +#endif + +#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ + +#define FT_LOCAL_ARRAY( x ) extern const x +#define FT_LOCAL_ARRAY_DEF( x ) const x + + +#ifndef FT_BASE + +#ifdef __cplusplus +#define FT_BASE( x ) extern "C" x +#else +#define FT_BASE( x ) extern x +#endif + +#endif /* !FT_BASE */ + + +#ifndef FT_BASE_DEF + +#ifdef __cplusplus +#define FT_BASE_DEF( x ) x +#else +#define FT_BASE_DEF( x ) x +#endif + +#endif /* !FT_BASE_DEF */ + + +#ifndef FT_EXPORT + +#ifdef __cplusplus +#define FT_EXPORT( x ) extern "C" x +#else +#define FT_EXPORT( x ) extern x +#endif + +#endif /* !FT_EXPORT */ + + +#ifndef FT_EXPORT_DEF + +#ifdef __cplusplus +#define FT_EXPORT_DEF( x ) extern "C" x +#else +#define FT_EXPORT_DEF( x ) extern x +#endif + +#endif /* !FT_EXPORT_DEF */ + + +#ifndef FT_EXPORT_VAR + +#ifdef __cplusplus +#define FT_EXPORT_VAR( x ) extern "C" x +#else +#define FT_EXPORT_VAR( x ) extern x +#endif + +#endif /* !FT_EXPORT_VAR */ + + /* The following macros are needed to compile the library with a */ + /* C++ compiler and with 16bit compilers. */ + /* */ + + /* This is special. Within C++, you must specify `extern "C"' for */ + /* functions which are used via function pointers, and you also */ + /* must do that for structures which contain function pointers to */ + /* assure C linkage -- it's not possible to have (local) anonymous */ + /* functions which are accessed by (global) function pointers. */ + /* */ + /* */ + /* FT_CALLBACK_DEF is used to _define_ a callback function. */ + /* */ + /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ + /* contains pointers to callback functions. */ + /* */ + /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ + /* that contains pointers to callback functions. */ + /* */ + /* */ + /* Some 16bit compilers have to redefine these macros to insert */ + /* the infamous `_cdecl' or `__fastcall' declarations. */ + /* */ +#ifndef FT_CALLBACK_DEF +#ifdef __cplusplus +#define FT_CALLBACK_DEF( x ) extern "C" x +#else +#define FT_CALLBACK_DEF( x ) static x +#endif +#endif /* FT_CALLBACK_DEF */ + +#ifndef FT_CALLBACK_TABLE +#ifdef __cplusplus +#define FT_CALLBACK_TABLE extern "C" +#define FT_CALLBACK_TABLE_DEF extern "C" +#else +#define FT_CALLBACK_TABLE extern +#define FT_CALLBACK_TABLE_DEF /* nothing */ +#endif +#endif /* FT_CALLBACK_TABLE */ + + +FT_END_HEADER + + +#endif /* __FTCONFIG_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/config/ftheader.h b/freetype2/include/ohos/freetype2/config/ftheader.h new file mode 100644 index 0000000000..b623629921 --- /dev/null +++ b/freetype2/include/ohos/freetype2/config/ftheader.h @@ -0,0 +1,832 @@ +/***************************************************************************/ +/* */ +/* ftheader.h */ +/* */ +/* Build macros of the FreeType 2 library. */ +/* */ +/* Copyright 1996-2008, 2010, 2012, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +#ifndef __FT_HEADER_H__ +#define __FT_HEADER_H__ + + + /*@***********************************************************************/ + /* */ + /* */ + /* FT_BEGIN_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_END_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_BEGIN_HEADER extern "C" { +#else +#define FT_BEGIN_HEADER /* nothing */ +#endif + + + /*@***********************************************************************/ + /* */ + /* */ + /* FT_END_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_BEGIN_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_END_HEADER } +#else +#define FT_END_HEADER /* nothing */ +#endif + + + /*************************************************************************/ + /* */ + /* Aliases for the FreeType 2 public and configuration files. */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /*
*/ + /* header_file_macros */ + /* */ + /* */ + /* Header File Macros */ + /* */ + /* <Abstract> */ + /* Macro definitions used to #include specific header files. */ + /* */ + /* <Description> */ + /* The following macros are defined to the name of specific */ + /* FreeType~2 header files. They can be used directly in #include */ + /* statements as in: */ + /* */ + /* { */ + /* #include FT_FREETYPE_H */ + /* #include FT_MULTIPLE_MASTERS_H */ + /* #include FT_GLYPH_H */ + /* } */ + /* */ + /* There are several reasons why we are now using macros to name */ + /* public header files. The first one is that such macros are not */ + /* limited to the infamous 8.3~naming rule required by DOS (and */ + /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */ + /* */ + /* The second reason is that it allows for more flexibility in the */ + /* way FreeType~2 is installed on a given system. */ + /* */ + /*************************************************************************/ + + + /* configuration files */ + + /************************************************************************* + * + * @macro: + * FT_CONFIG_CONFIG_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 configuration data. + * + */ +#ifndef FT_CONFIG_CONFIG_H +#define FT_CONFIG_CONFIG_H <config/ftconfig.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_STANDARD_LIBRARY_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 interface to the standard C library functions. + * + */ +#ifndef FT_CONFIG_STANDARD_LIBRARY_H +#define FT_CONFIG_STANDARD_LIBRARY_H <config/ftstdlib.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_OPTIONS_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 project-specific configuration options. + * + */ +#ifndef FT_CONFIG_OPTIONS_H +#define FT_CONFIG_OPTIONS_H <config/ftoption.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_MODULES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 modules that are statically linked to new library + * instances in @FT_Init_FreeType. + * + */ +#ifndef FT_CONFIG_MODULES_H +#define FT_CONFIG_MODULES_H <config/ftmodule.h> +#endif + + /* */ + + /* public headers */ + + /************************************************************************* + * + * @macro: + * FT_FREETYPE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * base FreeType~2 API. + * + */ +#define FT_FREETYPE_H <freetype.h> + + + /************************************************************************* + * + * @macro: + * FT_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 error codes (and messages). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_ERRORS_H <fterrors.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 module error offsets (and messages). + * + */ +#define FT_MODULE_ERRORS_H <ftmoderr.h> + + + /************************************************************************* + * + * @macro: + * FT_SYSTEM_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 interface to low-level operations (i.e., memory management + * and stream i/o). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_SYSTEM_H <ftsystem.h> + + + /************************************************************************* + * + * @macro: + * FT_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing type + * definitions related to glyph images (i.e., bitmaps, outlines, + * scan-converter parameters). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_IMAGE_H <ftimage.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * basic data types defined by FreeType~2. + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_TYPES_H <fttypes.h> + + + /************************************************************************* + * + * @macro: + * FT_LIST_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list management API of FreeType~2. + * + * (Most applications will never need to include this file.) + * + */ +#define FT_LIST_H <ftlist.h> + + + /************************************************************************* + * + * @macro: + * FT_OUTLINE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * scalable outline management API of FreeType~2. + * + */ +#define FT_OUTLINE_H <ftoutln.h> + + + /************************************************************************* + * + * @macro: + * FT_SIZES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API which manages multiple @FT_Size objects per face. + * + */ +#define FT_SIZES_H <ftsizes.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * module management API of FreeType~2. + * + */ +#define FT_MODULE_H <ftmodapi.h> + + + /************************************************************************* + * + * @macro: + * FT_RENDER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * renderer module management API of FreeType~2. + * + */ +#define FT_RENDER_H <ftrender.h> + + + /************************************************************************* + * + * @macro: + * FT_AUTOHINTER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the auto-hinting module. + * + */ +#define FT_AUTOHINTER_H <ftautoh.h> + + + /************************************************************************* + * + * @macro: + * FT_CFF_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the CFF driver module. + * + */ +#define FT_CFF_DRIVER_H <ftcffdrv.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the TrueType driver module. + * + */ +#define FT_TRUETYPE_DRIVER_H <ftttdrv.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPE1_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the Type~1 format. + * + */ +#define FT_TYPE1_TABLES_H <t1tables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_IDS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * enumeration values which identify name strings, languages, encodings, + * etc. This file really contains a _large_ set of constant macro + * definitions, taken from the TrueType and OpenType specifications. + * + */ +#define FT_TRUETYPE_IDS_H <ttnameid.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the TrueType (as well as OpenType) format. + * + */ +#define FT_TRUETYPE_TABLES_H <tttables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TAGS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of TrueType four-byte `tags' which identify blocks in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_TRUETYPE_TAGS_H <tttags.h> + + + /************************************************************************* + * + * @macro: + * FT_BDF_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which accesses BDF-specific strings from a + * face. + * + */ +#define FT_BDF_H <ftbdf.h> + + + /************************************************************************* + * + * @macro: + * FT_CID_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which access CID font information from a + * face. + * + */ +#define FT_CID_H <ftcid.h> + + + /************************************************************************* + * + * @macro: + * FT_GZIP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports gzip-compressed files. + * + */ +#define FT_GZIP_H <ftgzip.h> + + + /************************************************************************* + * + * @macro: + * FT_LZW_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports LZW-compressed files. + * + */ +#define FT_LZW_H <ftlzw.h> + + + /************************************************************************* + * + * @macro: + * FT_BZIP2_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports bzip2-compressed files. + * + */ +#define FT_BZIP2_H <ftbzip2.h> + + + /************************************************************************* + * + * @macro: + * FT_WINFONTS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports Windows FNT files. + * + */ +#define FT_WINFONTS_H <ftwinfnt.h> + + + /************************************************************************* + * + * @macro: + * FT_GLYPH_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional glyph management component. + * + */ +#define FT_GLYPH_H <ftglyph.h> + + + /************************************************************************* + * + * @macro: + * FT_BITMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional bitmap conversion component. + * + */ +#define FT_BITMAP_H <ftbitmap.h> + + + /************************************************************************* + * + * @macro: + * FT_BBOX_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional exact bounding box computation routines. + * + */ +#define FT_BBOX_H <ftbbox.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional FreeType~2 cache sub-system. + * + */ +#define FT_CACHE_H <ftcache.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `glyph image' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for @FT_Glyph elements. You can also + * use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to + * store small glyph bitmaps, as it will use less memory. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * glyph image-related cache declarations. + * + */ +#define FT_CACHE_IMAGE_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_SMALL_BITMAPS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `small bitmaps' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for small glyph bitmaps in a relatively + * memory-efficient way. You can also use the API defined in + * @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, + * including scalable outlines. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * small bitmaps-related cache declarations. + * + */ +#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_CHARMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `charmap' API of the FreeType~2 cache sub-system. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * charmap-based cache declarations. + * + */ +#define FT_CACHE_CHARMAP_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_MAC_H + * + * @description: + * A macro used in #include statements to name the file containing the + * Macintosh-specific FreeType~2 API. The latter is used to access + * fonts embedded in resource forks. + * + * This header file must be explicitly included by client applications + * compiled on the Mac (note that the base API still works though). + * + */ +#define FT_MAC_H <ftmac.h> + + + /************************************************************************* + * + * @macro: + * FT_MULTIPLE_MASTERS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional multiple-masters management API of FreeType~2. + * + */ +#define FT_MULTIPLE_MASTERS_H <ftmm.h> + + + /************************************************************************* + * + * @macro: + * FT_SFNT_NAMES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which accesses embedded `name' strings in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_SFNT_NAMES_H <ftsnames.h> + + + /************************************************************************* + * + * @macro: + * FT_OPENTYPE_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates OpenType tables (BASE, GDEF, + * GPOS, GSUB, JSTF). + * + */ +#define FT_OPENTYPE_VALIDATE_H <ftotval.h> + + + /************************************************************************* + * + * @macro: + * FT_GX_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat, + * mort, morx, bsln, just, kern, opbd, trak, prop). + * + */ +#define FT_GX_VALIDATE_H <ftgxval.h> + + + /************************************************************************* + * + * @macro: + * FT_PFR_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which accesses PFR-specific data. + * + */ +#define FT_PFR_H <ftpfr.h> + + + /************************************************************************* + * + * @macro: + * FT_STROKER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions to stroke outline paths. + */ +#define FT_STROKER_H <ftstroke.h> + + + /************************************************************************* + * + * @macro: + * FT_SYNTHESIS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs artificial obliquing and emboldening. + */ +#define FT_SYNTHESIS_H <ftsynth.h> + + + /************************************************************************* + * + * @macro: + * FT_XFREE86_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions specific to the XFree86 and + * X.Org X11 servers. + */ +#define FT_XFREE86_H <ftxf86.h> + + + /************************************************************************* + * + * @macro: + * FT_TRIGONOMETRY_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs trigonometric computations (e.g., + * cosines and arc tangents). + */ +#define FT_TRIGONOMETRY_H <fttrigon.h> + + + /************************************************************************* + * + * @macro: + * FT_LCD_FILTER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_LCD_FILTER_H <ftlcdfil.h> + + + /************************************************************************* + * + * @macro: + * FT_UNPATENTED_HINTING_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_UNPATENTED_HINTING_H <ttunpat.h> + + + /************************************************************************* + * + * @macro: + * FT_INCREMENTAL_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_INCREMENTAL_H <ftincrem.h> + + + /************************************************************************* + * + * @macro: + * FT_GASP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns entries from the TrueType GASP table. + */ +#define FT_GASP_H <ftgasp.h> + + + /************************************************************************* + * + * @macro: + * FT_ADVANCES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns individual and ranged glyph advances. + */ +#define FT_ADVANCES_H <ftadvanc.h> + + + /* */ + +#define FT_ERROR_DEFINITIONS_H <fterrdef.h> + + + /* The internals of the cache sub-system are no longer exposed. We */ + /* default to FT_CACHE_H at the moment just in case, but we know of */ + /* no rogue client that uses them. */ + /* */ +#define FT_CACHE_MANAGER_H <ftcache.h> +#define FT_CACHE_INTERNAL_MRU_H <ftcache.h> +#define FT_CACHE_INTERNAL_MANAGER_H <ftcache.h> +#define FT_CACHE_INTERNAL_CACHE_H <ftcache.h> +#define FT_CACHE_INTERNAL_GLYPH_H <ftcache.h> +#define FT_CACHE_INTERNAL_IMAGE_H <ftcache.h> +#define FT_CACHE_INTERNAL_SBITS_H <ftcache.h> + + +#define FT_INCREMENTAL_H <ftincrem.h> + +#define FT_TRUETYPE_UNPATENTED_H <ttunpat.h> + + + /* + * Include internal headers definitions from <internal/...> + * only when building the library. + */ +#ifdef FT2_BUILD_LIBRARY +#define FT_INTERNAL_INTERNAL_H <internal/internal.h> +#include FT_INTERNAL_INTERNAL_H +#endif /* FT2_BUILD_LIBRARY */ + + +#endif /* __FT2_BUILD_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/config/ftmodule.h b/freetype2/include/ohos/freetype2/config/ftmodule.h new file mode 100644 index 0000000000..b7299779aa --- /dev/null +++ b/freetype2/include/ohos/freetype2/config/ftmodule.h @@ -0,0 +1,20 @@ +/* This is a generated file. */ +FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) +FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) +FT_USE_MODULE( FT_Module_Class, autofit_module_class ) +FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) +FT_USE_MODULE( FT_Module_Class, psaux_module_class ) +FT_USE_MODULE( FT_Module_Class, psnames_module_class ) +/* EOF */ diff --git a/freetype2/include/ohos/freetype2/config/ftoption.h b/freetype2/include/ohos/freetype2/config/ftoption.h new file mode 100644 index 0000000000..2b0b67e7af --- /dev/null +++ b/freetype2/include/ohos/freetype2/config/ftoption.h @@ -0,0 +1,899 @@ +/***************************************************************************/ +/* */ +/* ftoption.h */ +/* */ +/* User-selectable configuration macros (specification only). */ +/* */ +/* Copyright 1996-2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOPTION_H__ +#define __FTOPTION_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* USER-SELECTABLE CONFIGURATION MACROS */ + /* */ + /* This file contains the default configuration macro definitions for */ + /* a standard build of the FreeType library. There are three ways to */ + /* use this file to build project-specific versions of the library: */ + /* */ + /* - You can modify this file by hand, but this is not recommended in */ + /* cases where you would like to build several versions of the */ + /* library from a single source directory. */ + /* */ + /* - You can put a copy of this file in your build directory, more */ + /* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */ + /* name of a directory that is included _before_ the FreeType include */ + /* path during compilation. */ + /* */ + /* The default FreeType Makefiles and Jamfiles use the build */ + /* directory `builds/<system>' by default, but you can easily change */ + /* that for your own projects. */ + /* */ + /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */ + /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ + /* locate this file during the build. For example, */ + /* */ + /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ + /* #include <config/ftheader.h> */ + /* */ + /* will use `$BUILD/myftoptions.h' instead of this file for macro */ + /* definitions. */ + /* */ + /* Note also that you can similarly pre-define the macro */ + /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ + /* that are statically linked to the library at compile time. By */ + /* default, this file is <config/ftmodule.h>. */ + /* */ + /* We highly recommend using the third method whenever possible. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Uncomment the line below if you want to activate sub-pixel rendering */ + /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */ + /* */ + /* Note that this feature is covered by several Microsoft patents */ + /* and should not be activated in any default build of the library. */ + /* */ + /* This macro has no impact on the FreeType API, only on its */ + /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ + /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ + /* the original size in case this macro isn't defined; however, each */ + /* triplet of subpixels has R=G=B. */ + /* */ + /* This is done to allow FreeType clients to run unmodified, forcing */ + /* them to display normal gray-level anti-aliased glyphs. */ + /* */ +/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ + + + /*************************************************************************/ + /* */ + /* Many compilers provide a non-ANSI 64-bit data type that can be used */ + /* by FreeType to speed up some computations. However, this will create */ + /* some problems when compiling the library in strict ANSI mode. */ + /* */ + /* For this reason, the use of 64-bit integers is normally disabled when */ + /* the __STDC__ macro is defined. You can however disable this by */ + /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ + /* */ + /* For most compilers, this will only create compilation warnings when */ + /* building the library. */ + /* */ + /* ObNote: The compiler-specific 64-bit integers are detected in the */ + /* file `ftconfig.h' either statically or through the */ + /* `configure' script on supported platforms. */ + /* */ +#undef FT_CONFIG_OPTION_FORCE_INT64 + + + /*************************************************************************/ + /* */ + /* If this macro is defined, do not try to use an assembler version of */ + /* performance-critical functions (e.g. FT_MulFix). You should only do */ + /* that to verify that the assembler function works properly, or to */ + /* execute benchmark tests of the various implementations. */ +/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ + + + /*************************************************************************/ + /* */ + /* If this macro is defined, try to use an inlined assembler version of */ + /* the `FT_MulFix' function, which is a `hotspot' when loading and */ + /* hinting glyphs, and which should be executed as fast as possible. */ + /* */ + /* Note that if your compiler or CPU is not supported, this will default */ + /* to the standard and portable implementation found in `ftcalc.c'. */ + /* */ +#define FT_CONFIG_OPTION_INLINE_MULFIX + + + /*************************************************************************/ + /* */ + /* LZW-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `compress' program. This is mostly used to parse many of the PCF */ + /* files that come with various X11 distributions. The implementation */ + /* uses NetBSD's `zopen' to partially uncompress the file on the fly */ + /* (see src/lzw/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +#define FT_CONFIG_OPTION_USE_LZW + + + /*************************************************************************/ + /* */ + /* Gzip-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `gzip' program. This is mostly used to parse many of the PCF files */ + /* that come with XFree86. The implementation uses `zlib' to */ + /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. See also */ + /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */ + /* */ +#define FT_CONFIG_OPTION_USE_ZLIB + + + /*************************************************************************/ + /* */ + /* ZLib library selection */ + /* */ + /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */ + /* It allows FreeType's `ftgzip' component to link to the system's */ + /* installation of the ZLib library. This is useful on systems like */ + /* Unix or VMS where it generally is already available. */ + /* */ + /* If you let it undefined, the component will use its own copy */ + /* of the zlib sources instead. These have been modified to be */ + /* included directly within the component and *not* export external */ + /* function names. This allows you to link any program with FreeType */ + /* _and_ ZLib without linking conflicts. */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ + + + /*************************************************************************/ + /* */ + /* Bzip2-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `bzip2' program. This is mostly used to parse many of the PCF */ + /* files that come with XFree86. The implementation uses `libbz2' to */ + /* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */ + /* Contrary to gzip, bzip2 currently is not included and need to use */ + /* the system available bzip2 implementation. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +/* #define FT_CONFIG_OPTION_USE_BZIP2 */ + + + /*************************************************************************/ + /* */ + /* Define to disable the use of file stream functions and types, FILE, */ + /* fopen() etc. Enables the use of smaller system libraries on embedded */ + /* systems that have multiple system libraries, some with or without */ + /* file stream support, in the cases where file stream support is not */ + /* necessary such as memory loading of font files. */ + /* */ +/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ + + + /*************************************************************************/ + /* */ + /* PNG bitmap support. */ + /* */ + /* FreeType now handles loading color bitmap glyphs in the PNG format. */ + /* This requires help from the external libpng library. Uncompressed */ + /* color bitmaps do not need any external libraries and will be */ + /* supported regardless of this configuration. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +/* #define FT_CONFIG_OPTION_USE_PNG */ + + + /*************************************************************************/ + /* */ + /* HarfBuzz support. */ + /* */ + /* FreeType uses the HarfBuzz library to improve auto-hinting of */ + /* OpenType fonts. If available, many glyphs not directly addressable */ + /* by a font's character map will be hinted also. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */ + + + /*************************************************************************/ + /* */ + /* DLL export compilation */ + /* */ + /* When compiling FreeType as a DLL, some systems/compilers need a */ + /* special keyword in front OR after the return type of function */ + /* declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ + /* will be later automatically defined as `extern return_type' to */ + /* allow normal compilation. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_EXPORT(x) extern x */ +/* #define FT_EXPORT_DEF(x) x */ + + + /*************************************************************************/ + /* */ + /* Glyph Postscript Names handling */ + /* */ + /* By default, FreeType 2 is compiled with the `psnames' module. This */ + /* module is in charge of converting a glyph name string into a */ + /* Unicode value, or return a Macintosh standard glyph name for the */ + /* use with the TrueType `post' table. */ + /* */ + /* Undefine this macro if you do not want `psnames' compiled in your */ + /* build of FreeType. This has the following effects: */ + /* */ + /* - The TrueType driver will provide its own set of glyph names, */ + /* if you build it to support postscript names in the TrueType */ + /* `post' table. */ + /* */ + /* - The Type 1 driver will not be able to synthesize a Unicode */ + /* charmap out of the glyphs found in the fonts. */ + /* */ + /* You would normally undefine this configuration macro when building */ + /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ + /* */ +#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Postscript Names to Unicode Values support */ + /* */ + /* By default, FreeType 2 is built with the `PSNames' module compiled */ + /* in. Among other things, the module is used to convert a glyph name */ + /* into a Unicode value. This is especially useful in order to */ + /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */ + /* through a big table named the `Adobe Glyph List' (AGL). */ + /* */ + /* Undefine this macro if you do not want the Adobe Glyph List */ + /* compiled in your `PSNames' module. The Type 1 driver will not be */ + /* able to synthesize a Unicode charmap out of the glyphs found in the */ + /* fonts. */ + /* */ +#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST + + + /*************************************************************************/ + /* */ + /* Support for Mac fonts */ + /* */ + /* Define this macro if you want support for outline fonts in Mac */ + /* format (mac dfont, mac resource, macbinary containing a mac */ + /* resource) on non-Mac platforms. */ + /* */ + /* Note that the `FOND' resource isn't checked. */ + /* */ +#define FT_CONFIG_OPTION_MAC_FONTS + + + /*************************************************************************/ + /* */ + /* Guessing methods to access embedded resource forks */ + /* */ + /* Enable extra Mac fonts support on non-Mac platforms (e.g. */ + /* GNU/Linux). */ + /* */ + /* Resource forks which include fonts data are stored sometimes in */ + /* locations which users or developers don't expected. In some cases, */ + /* resource forks start with some offset from the head of a file. In */ + /* other cases, the actual resource fork is stored in file different */ + /* from what the user specifies. If this option is activated, */ + /* FreeType tries to guess whether such offsets or different file */ + /* names must be used. */ + /* */ + /* Note that normal, direct access of resource forks is controlled via */ + /* the FT_CONFIG_OPTION_MAC_FONTS option. */ + /* */ +#ifdef FT_CONFIG_OPTION_MAC_FONTS +#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK +#endif + + + /*************************************************************************/ + /* */ + /* Allow the use of FT_Incremental_Interface to load typefaces that */ + /* contain no glyph data, but supply it via a callback function. */ + /* This is required by clients supporting document formats which */ + /* supply font data incrementally as the document is parsed, such */ + /* as the Ghostscript interpreter for the PostScript language. */ + /* */ +#define FT_CONFIG_OPTION_INCREMENTAL + + + /*************************************************************************/ + /* */ + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work. */ + /* */ + /* This must be greater than 4KByte if you use FreeType to rasterize */ + /* glyphs; otherwise, you may set it to zero to avoid unnecessary */ + /* allocation of the render pool. */ + /* */ +#define FT_RENDER_POOL_SIZE 16384L + + + /*************************************************************************/ + /* */ + /* FT_MAX_MODULES */ + /* */ + /* The maximum number of modules that can be registered in a single */ + /* FreeType library object. 32 is the default. */ + /* */ +#define FT_MAX_MODULES 32 + + + /*************************************************************************/ + /* */ + /* Debug level */ + /* */ + /* FreeType can be compiled in debug or trace mode. In debug mode, */ + /* errors are reported through the `ftdebug' component. In trace */ + /* mode, additional messages are sent to the standard output during */ + /* execution. */ + /* */ + /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ + /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ + /* */ + /* Don't define any of these macros to compile in `release' mode! */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_LEVEL_ERROR */ +/* #define FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* Autofitter debugging */ + /* */ + /* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */ + /* control the autofitter behaviour for debugging purposes with global */ + /* boolean variables (consequently, you should *never* enable this */ + /* while compiling in `release' mode): */ + /* */ + /* _af_debug_disable_horz_hints */ + /* _af_debug_disable_vert_hints */ + /* _af_debug_disable_blue_hints */ + /* */ + /* Additionally, the following functions provide dumps of various */ + /* internal autofit structures to stdout (using `printf'): */ + /* */ + /* af_glyph_hints_dump_points */ + /* af_glyph_hints_dump_segments */ + /* af_glyph_hints_dump_edges */ + /* */ + /* As an argument, they use another global variable: */ + /* */ + /* _af_debug_hints */ + /* */ + /* Please have a look at the `ftgrid' demo program to see how those */ + /* variables and macros should be used. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_AUTOFIT */ + + + /*************************************************************************/ + /* */ + /* Memory Debugging */ + /* */ + /* FreeType now comes with an integrated memory debugger that is */ + /* capable of detecting simple errors like memory leaks or double */ + /* deletes. To compile it within your build of the library, you */ + /* should define FT_DEBUG_MEMORY here. */ + /* */ + /* Note that the memory debugger is only activated at runtime when */ + /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_DEBUG_MEMORY */ + + + /*************************************************************************/ + /* */ + /* Module errors */ + /* */ + /* If this macro is set (which is _not_ the default), the higher byte */ + /* of an error code gives the module in which the error has occurred, */ + /* while the lower byte is the real error code. */ + /* */ + /* Setting this macro makes sense for debugging purposes only, since */ + /* it would break source compatibility of certain programs that use */ + /* FreeType 2. */ + /* */ + /* More details can be found in the files ftmoderr.h and fterrors.h. */ + /* */ +#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS + + + /*************************************************************************/ + /* */ + /* Position Independent Code */ + /* */ + /* If this macro is set (which is _not_ the default), FreeType2 will */ + /* avoid creating constants that require address fixups. Instead the */ + /* constants will be moved into a struct and additional intialization */ + /* code will be used. */ + /* */ + /* Setting this macro is needed for systems that prohibit address */ + /* fixups, such as BREW. */ + /* */ +/* #define FT_CONFIG_OPTION_PIC */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ + /* embedded bitmaps in all formats using the SFNT module (namely */ + /* TrueType & OpenType). */ + /* */ +#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ + /* load and enumerate the glyph Postscript names in a TrueType or */ + /* OpenType file. */ + /* */ + /* Note that when you do not compile the `PSNames' module by undefining */ + /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ + /* contain additional code used to read the PS Names table from a font. */ + /* */ + /* (By default, the module uses `PSNames' to extract glyph names.) */ + /* */ +#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ + /* access the internal name table in a SFNT-based format like TrueType */ + /* or OpenType. The name table contains various strings used to */ + /* describe the font, like family name, copyright, version, etc. It */ + /* does not contain any glyph name though. */ + /* */ + /* Accessing SFNT names is done through the functions declared in */ + /* `ftsnames.h'. */ + /* */ +#define TT_CONFIG_OPTION_SFNT_NAMES + + + /*************************************************************************/ + /* */ + /* TrueType CMap support */ + /* */ + /* Here you can fine-tune which TrueType CMap table format shall be */ + /* supported. */ +#define TT_CONFIG_CMAP_FORMAT_0 +#define TT_CONFIG_CMAP_FORMAT_2 +#define TT_CONFIG_CMAP_FORMAT_4 +#define TT_CONFIG_CMAP_FORMAT_6 +#define TT_CONFIG_CMAP_FORMAT_8 +#define TT_CONFIG_CMAP_FORMAT_10 +#define TT_CONFIG_CMAP_FORMAT_12 +#define TT_CONFIG_CMAP_FORMAT_13 +#define TT_CONFIG_CMAP_FORMAT_14 + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ + /* a bytecode interpreter in the TrueType driver. */ + /* */ + /* By undefining this, you will only compile the code necessary to load */ + /* TrueType glyphs without hinting. */ + /* */ + /* Do not #undef this macro here, since the build system might */ + /* define it for certain configurations only. */ + /* */ +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */ + /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */ + /* replaces the native TrueType hinting mechanism when anything but */ + /* FT_RENDER_MODE_MONO is requested. */ + /* */ + /* Enabling this causes the TrueType driver to ignore instructions under */ + /* certain conditions. This is done in accordance with the guide here, */ + /* with some minor differences: */ + /* */ + /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ + /* */ + /* By undefining this, you only compile the code necessary to hint */ + /* TrueType glyphs with native TT hinting. */ + /* */ + /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ + /* defined. */ + /* */ +/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + + /*************************************************************************/ + /* */ + /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ + /* of the TrueType bytecode interpreter is used that doesn't implement */ + /* any of the patented opcodes and algorithms. The patents related to */ + /* TrueType hinting have expired worldwide since May 2010; this option */ + /* is now deprecated. */ + /* */ + /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */ + /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */ + /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */ + /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ + /* */ + /* This macro is only useful for a small number of font files (mostly */ + /* for Asian scripts) that require bytecode interpretation to properly */ + /* load glyphs. For all other fonts, this produces unpleasant results, */ + /* thus the unpatented interpreter is never used to load glyphs from */ + /* TrueType fonts unless one of the following two options is used. */ + /* */ + /* - The unpatented interpreter is explicitly activated by the user */ + /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */ + /* when opening the FT_Face. */ + /* */ + /* - FreeType detects that the FT_Face corresponds to one of the */ + /* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */ + /* contains a hard-coded list of font names and other matching */ + /* parameters (see function `tt_face_init' in file */ + /* `src/truetype/ttobjs.c'). */ + /* */ + /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */ + /* */ + /* { */ + /* FT_Parameter parameter; */ + /* FT_Open_Args open_args; */ + /* */ + /* */ + /* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */ + /* */ + /* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */ + /* open_args.pathname = my_font_pathname; */ + /* open_args.num_params = 1; */ + /* open_args.params = ¶meter; */ + /* */ + /* error = FT_Open_Face( library, &open_args, index, &face ); */ + /* ... */ + /* } */ + /* */ +/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ + /* bytecode interpreter with a huge switch statement, rather than a call */ + /* table. This results in smaller and faster code for a number of */ + /* architectures. */ + /* */ + /* Note however that on some compiler/processor combinations, undefining */ + /* this macro will generate faster, though larger, code. */ + /* */ +#define TT_CONFIG_OPTION_INTERPRETER_SWITCH + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ + /* TrueType glyph loader to use Apple's definition of how to handle */ + /* component offsets in composite glyphs. */ + /* */ + /* Apple and MS disagree on the default behavior of component offsets */ + /* in composites. Apple says that they should be scaled by the scaling */ + /* factors in the transformation matrix (roughly, it's more complex) */ + /* while MS says they should not. OpenType defines two bits in the */ + /* composite flags array which can be used to disambiguate, but old */ + /* fonts will not have them. */ + /* */ + /* http://www.microsoft.com/typography/otspec/glyf.htm */ + /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ + /* */ +#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ + /* support for Apple's distortable font technology (fvar, gvar, cvar, */ + /* and avar tables). This has many similarities to Type 1 Multiple */ + /* Masters support. */ + /* */ +#define TT_CONFIG_OPTION_GX_VAR_SUPPORT + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BDF if you want to include support for */ + /* an embedded `BDF ' table within SFNT-based bitmap formats. */ + /* */ +#define TT_CONFIG_OPTION_BDF + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */ + /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ + /* required. */ + /* */ +#define T1_MAX_DICT_DEPTH 5 + + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ +#define T1_MAX_SUBRS_CALLS 16 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ + /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ + /* */ +#define T1_MAX_CHARSTRINGS_OPERANDS 256 + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ + /* files into an existing face. Note that if set, the T1 driver will be */ + /* unable to produce kerning distances. */ + /* */ +#undef T1_CONFIG_OPTION_NO_AFM + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of the Multiple Masters font support in the Type 1 */ + /* driver. */ + /* */ +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** C F F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */ + /* possible to set up the default values of the four control points that */ + /* define the stem darkening behaviour of the (new) CFF engine. For */ + /* more details please read the documentation of the */ + /* `darkening-parameters' property of the cff driver module (file */ + /* `ftcffdrv.h'), which allows the control at run-time. */ + /* */ + /* Do *not* undefine these macros! */ + /* */ +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 + + + /*************************************************************************/ + /* */ + /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */ + /* engine gets compiled into FreeType. If defined, it is possible to */ + /* switch between the two engines using the `hinting-engine' property of */ + /* the cff driver module. */ + /* */ +/* #define CFF_CONFIG_OPTION_OLD_ENGINE */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */ + /* support. */ + /* */ +#define AF_CONFIG_OPTION_CJK + + /*************************************************************************/ + /* */ + /* Compile autofit module with Indic script support. */ + /* */ +#define AF_CONFIG_OPTION_INDIC + + /*************************************************************************/ + /* */ + /* Compile autofit module with warp hinting. The idea of the warping */ + /* code is to slightly scale and shift a glyph within a single dimension */ + /* so that as much of its segments are aligned (more or less) on the */ + /* grid. To find out the optimal scaling and shifting value, various */ + /* parameter combinations are tried and scored. */ + /* */ + /* This experimental option is only active if the render mode is */ + /* FT_RENDER_MODE_LIGHT. */ + /* */ +/* #define AF_CONFIG_OPTION_USE_WARPER */ + + /* */ + + + /* + * This macro is obsolete. Support has been removed in FreeType + * version 2.5. + */ +/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /* + * This macro is defined if either unpatented or native TrueType + * hinting is requested by the definitions above. + */ +#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER +#define TT_USE_BYTECODE_INTERPRETER +#undef TT_CONFIG_OPTION_UNPATENTED_HINTING +#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING +#define TT_USE_BYTECODE_INTERPRETER +#endif + + + /* + * Check CFF darkening parameters. The checks are the same as in function + * `cff_property_set' in file `cffdrivr.c'. + */ +#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500 +#error "Invalid CFF darkening parameters!" +#endif + +FT_END_HEADER + + +#endif /* __FTOPTION_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/config/ftstdlib.h b/freetype2/include/ohos/freetype2/config/ftstdlib.h new file mode 100644 index 0000000000..b940efc427 --- /dev/null +++ b/freetype2/include/ohos/freetype2/config/ftstdlib.h @@ -0,0 +1,174 @@ +/***************************************************************************/ +/* */ +/* ftstdlib.h */ +/* */ +/* ANSI-specific library and header configuration file (specification */ +/* only). */ +/* */ +/* Copyright 2002-2007, 2009, 2011-2012 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is used to group all #includes to the ANSI C library that */ + /* FreeType normally requires. It also defines macros to rename the */ + /* standard functions within the FreeType source code. */ + /* */ + /* Load a file which defines __FTSTDLIB_H__ before this one to override */ + /* it. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTSTDLIB_H__ +#define __FTSTDLIB_H__ + + +#include <stddef.h> + +#define ft_ptrdiff_t ptrdiff_t + + + /**********************************************************************/ + /* */ + /* integer limits */ + /* */ + /* UINT_MAX and ULONG_MAX are used to automatically compute the size */ + /* of `int' and `long' in bytes at compile-time. So far, this works */ + /* for all platforms the library has been tested on. */ + /* */ + /* Note that on the extremely rare platforms that do not provide */ + /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ + /* old Crays where `int' is 36 bits), we do not make any guarantee */ + /* about the correct behaviour of FT2 with all fonts. */ + /* */ + /* In these case, `ftconfig.h' will refuse to compile anyway with a */ + /* message like `couldn't find 32-bit type' or something similar. */ + /* */ + /**********************************************************************/ + + +#include <limits.h> + +#define FT_CHAR_BIT CHAR_BIT +#define FT_USHORT_MAX USHRT_MAX +#define FT_INT_MAX INT_MAX +#define FT_INT_MIN INT_MIN +#define FT_UINT_MAX UINT_MAX +#define FT_ULONG_MAX ULONG_MAX + + + /**********************************************************************/ + /* */ + /* character and string processing */ + /* */ + /**********************************************************************/ + + +#include <string.h> + +#define ft_memchr memchr +#define ft_memcmp memcmp +#define ft_memcpy memcpy +#define ft_memmove memmove +#define ft_memset memset +#define ft_strcat strcat +#define ft_strcmp strcmp +#define ft_strcpy strcpy +#define ft_strlen strlen +#define ft_strncmp strncmp +#define ft_strncpy strncpy +#define ft_strrchr strrchr +#define ft_strstr strstr + + + /**********************************************************************/ + /* */ + /* file handling */ + /* */ + /**********************************************************************/ + + +#include <stdio.h> + +#define FT_FILE FILE +#define ft_fclose fclose +#define ft_fopen fopen +#define ft_fread fread +#define ft_fseek fseek +#define ft_ftell ftell +#define ft_sprintf sprintf + + + /**********************************************************************/ + /* */ + /* sorting */ + /* */ + /**********************************************************************/ + + +#include <stdlib.h> + +#define ft_qsort qsort + + + /**********************************************************************/ + /* */ + /* memory allocation */ + /* */ + /**********************************************************************/ + + +#define ft_scalloc calloc +#define ft_sfree free +#define ft_smalloc malloc +#define ft_srealloc realloc + + + /**********************************************************************/ + /* */ + /* miscellaneous */ + /* */ + /**********************************************************************/ + + +#define ft_atol atol +#define ft_labs labs + + + /**********************************************************************/ + /* */ + /* execution control */ + /* */ + /**********************************************************************/ + + +#include <setjmp.h> + +#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ + /* jmp_buf is defined as a macro */ + /* on certain platforms */ + +#define ft_longjmp longjmp +#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */ + + + /* the following is only used for debugging purposes, i.e., if */ + /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ + +#include <stdarg.h> + + +#endif /* __FTSTDLIB_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/freetype.h b/freetype2/include/ohos/freetype2/freetype.h new file mode 100644 index 0000000000..27fd44bfc2 --- /dev/null +++ b/freetype2/include/ohos/freetype2/freetype.h @@ -0,0 +1,4048 @@ +/***************************************************************************/ +/* */ +/* freetype.h */ +/* */ +/* FreeType high-level API and common types (specification only). */ +/* */ +/* Copyright 1996-2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FREETYPE_H__ +#define __FREETYPE_H__ + + +#ifndef FT_FREETYPE_H +#error "`ft2build.h' hasn't been included yet!" +#error "Please always use macros to include FreeType header files." +#error "Example:" +#error " #include <ft2build.h>" +#error " #include FT_FREETYPE_H" +#endif + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_TYPES_H +#include FT_ERRORS_H + + +FT_BEGIN_HEADER + + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* header_inclusion */ + /* */ + /* <Title> */ + /* FreeType's header inclusion scheme */ + /* */ + /* <Abstract> */ + /* How client applications should include FreeType header files. */ + /* */ + /* <Description> */ + /* To be as flexible as possible (and for historical reasons), */ + /* FreeType uses a very special inclusion scheme to load header */ + /* files, for example */ + /* */ + /* { */ + /* #include <ft2build.h> */ + /* */ + /* #include FT_FREETYPE_H */ + /* #include FT_OUTLINE_H */ + /* } */ + /* */ + /* A compiler and its preprocessor only needs an include path to find */ + /* the file `ft2build.h'; the exact locations and names of the other */ + /* FreeType header files are hidden by preprocessor macro names, */ + /* loaded by `ft2build.h'. The API documentation always gives the */ + /* header macro name needed for a particular function. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* user_allocation */ + /* */ + /* <Title> */ + /* User allocation */ + /* */ + /* <Abstract> */ + /* How client applications should allocate FreeType data structures. */ + /* */ + /* <Description> */ + /* FreeType assumes that structures allocated by the user and passed */ + /* as arguments are zeroed out except for the actual data. In other */ + /* words, it is recommended to use `calloc' (or variants of it) */ + /* instead of `malloc' for allocation. */ + /* */ + /*************************************************************************/ + + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* B A S I C T Y P E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* base_interface */ + /* */ + /* <Title> */ + /* Base Interface */ + /* */ + /* <Abstract> */ + /* The FreeType~2 base font interface. */ + /* */ + /* <Description> */ + /* This section describes the most important public high-level API */ + /* functions of FreeType~2. */ + /* */ + /* <Order> */ + /* FT_Library */ + /* FT_Face */ + /* FT_Size */ + /* FT_GlyphSlot */ + /* FT_CharMap */ + /* FT_Encoding */ + /* FT_ENC_TAG */ + /* */ + /* FT_FaceRec */ + /* */ + /* FT_FACE_FLAG_SCALABLE */ + /* FT_FACE_FLAG_FIXED_SIZES */ + /* FT_FACE_FLAG_FIXED_WIDTH */ + /* FT_FACE_FLAG_HORIZONTAL */ + /* FT_FACE_FLAG_VERTICAL */ + /* FT_FACE_FLAG_COLOR */ + /* FT_FACE_FLAG_SFNT */ + /* FT_FACE_FLAG_CID_KEYED */ + /* FT_FACE_FLAG_TRICKY */ + /* FT_FACE_FLAG_KERNING */ + /* FT_FACE_FLAG_MULTIPLE_MASTERS */ + /* FT_FACE_FLAG_GLYPH_NAMES */ + /* FT_FACE_FLAG_EXTERNAL_STREAM */ + /* FT_FACE_FLAG_HINTER */ + /* FT_FACE_FLAG_TRICKY */ + /* */ + /* FT_HAS_HORIZONTAL */ + /* FT_HAS_VERTICAL */ + /* FT_HAS_KERNING */ + /* FT_HAS_FIXED_SIZES */ + /* FT_HAS_GLYPH_NAMES */ + /* FT_HAS_MULTIPLE_MASTERS */ + /* FT_HAS_COLOR */ + /* */ + /* FT_IS_SFNT */ + /* FT_IS_SCALABLE */ + /* FT_IS_FIXED_WIDTH */ + /* FT_IS_CID_KEYED */ + /* FT_IS_TRICKY */ + /* */ + /* FT_STYLE_FLAG_BOLD */ + /* FT_STYLE_FLAG_ITALIC */ + /* */ + /* FT_SizeRec */ + /* FT_Size_Metrics */ + /* */ + /* FT_GlyphSlotRec */ + /* FT_Glyph_Metrics */ + /* FT_SubGlyph */ + /* */ + /* FT_Bitmap_Size */ + /* */ + /* FT_Init_FreeType */ + /* FT_Done_FreeType */ + /* */ + /* FT_New_Face */ + /* FT_Done_Face */ + /* FT_Reference_Face */ + /* FT_New_Memory_Face */ + /* FT_Open_Face */ + /* FT_Open_Args */ + /* FT_Parameter */ + /* FT_Attach_File */ + /* FT_Attach_Stream */ + /* */ + /* FT_Set_Char_Size */ + /* FT_Set_Pixel_Sizes */ + /* FT_Request_Size */ + /* FT_Select_Size */ + /* FT_Size_Request_Type */ + /* FT_Size_RequestRec */ + /* FT_Size_Request */ + /* FT_Set_Transform */ + /* FT_Load_Glyph */ + /* FT_Get_Char_Index */ + /* FT_Get_First_Char */ + /* FT_Get_Next_Char */ + /* FT_Get_Name_Index */ + /* FT_Load_Char */ + /* */ + /* FT_OPEN_MEMORY */ + /* FT_OPEN_STREAM */ + /* FT_OPEN_PATHNAME */ + /* FT_OPEN_DRIVER */ + /* FT_OPEN_PARAMS */ + /* */ + /* FT_LOAD_DEFAULT */ + /* FT_LOAD_RENDER */ + /* FT_LOAD_MONOCHROME */ + /* FT_LOAD_LINEAR_DESIGN */ + /* FT_LOAD_NO_SCALE */ + /* FT_LOAD_NO_HINTING */ + /* FT_LOAD_NO_BITMAP */ + /* FT_LOAD_NO_AUTOHINT */ + /* FT_LOAD_COLOR */ + /* */ + /* FT_LOAD_VERTICAL_LAYOUT */ + /* FT_LOAD_IGNORE_TRANSFORM */ + /* FT_LOAD_FORCE_AUTOHINT */ + /* FT_LOAD_NO_RECURSE */ + /* FT_LOAD_PEDANTIC */ + /* */ + /* FT_LOAD_TARGET_NORMAL */ + /* FT_LOAD_TARGET_LIGHT */ + /* FT_LOAD_TARGET_MONO */ + /* FT_LOAD_TARGET_LCD */ + /* FT_LOAD_TARGET_LCD_V */ + /* */ + /* FT_LOAD_TARGET_MODE */ + /* */ + /* FT_Render_Glyph */ + /* FT_Render_Mode */ + /* FT_Get_Kerning */ + /* FT_Kerning_Mode */ + /* FT_Get_Track_Kerning */ + /* FT_Get_Glyph_Name */ + /* FT_Get_Postscript_Name */ + /* */ + /* FT_CharMapRec */ + /* FT_Select_Charmap */ + /* FT_Set_Charmap */ + /* FT_Get_Charmap_Index */ + /* */ + /* FT_Get_FSType_Flags */ + /* FT_Get_SubGlyph_Info */ + /* */ + /* FT_Face_Internal */ + /* FT_Size_Internal */ + /* FT_Slot_Internal */ + /* */ + /* FT_FACE_FLAG_XXX */ + /* FT_STYLE_FLAG_XXX */ + /* FT_OPEN_XXX */ + /* FT_LOAD_XXX */ + /* FT_LOAD_TARGET_XXX */ + /* FT_SUBGLYPH_FLAG_XXX */ + /* FT_FSTYPE_XXX */ + /* */ + /* FT_HAS_FAST_GLYPHS */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Glyph_Metrics */ + /* */ + /* <Description> */ + /* A structure used to model the metrics of a single glyph. The */ + /* values are expressed in 26.6 fractional pixel format; if the flag */ + /* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */ + /* are expressed in font units instead. */ + /* */ + /* <Fields> */ + /* width :: */ + /* The glyph's width. */ + /* */ + /* height :: */ + /* The glyph's height. */ + /* */ + /* horiBearingX :: */ + /* Left side bearing for horizontal layout. */ + /* */ + /* horiBearingY :: */ + /* Top side bearing for horizontal layout. */ + /* */ + /* horiAdvance :: */ + /* Advance width for horizontal layout. */ + /* */ + /* vertBearingX :: */ + /* Left side bearing for vertical layout. */ + /* */ + /* vertBearingY :: */ + /* Top side bearing for vertical layout. Larger positive values */ + /* mean further below the vertical glyph origin. */ + /* */ + /* vertAdvance :: */ + /* Advance height for vertical layout. Positive values mean the */ + /* glyph has a positive advance downward. */ + /* */ + /* <Note> */ + /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ + /* dimensions of the hinted glyph (in case hinting is applicable). */ + /* */ + /* Stroking a glyph with an outside border does not increase */ + /* `horiAdvance' or `vertAdvance'; you have to manually adjust these */ + /* values to account for the added width and height. */ + /* */ + typedef struct FT_Glyph_Metrics_ + { + FT_Pos width; + FT_Pos height; + + FT_Pos horiBearingX; + FT_Pos horiBearingY; + FT_Pos horiAdvance; + + FT_Pos vertBearingX; + FT_Pos vertBearingY; + FT_Pos vertAdvance; + + } FT_Glyph_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Bitmap_Size */ + /* */ + /* <Description> */ + /* This structure models the metrics of a bitmap strike (i.e., a set */ + /* of glyphs for a given point size and resolution) in a bitmap font. */ + /* It is used for the `available_sizes' field of @FT_Face. */ + /* */ + /* <Fields> */ + /* height :: The vertical distance, in pixels, between two */ + /* consecutive baselines. It is always positive. */ + /* */ + /* width :: The average width, in pixels, of all glyphs in the */ + /* strike. */ + /* */ + /* size :: The nominal size of the strike in 26.6 fractional */ + /* points. This field is not very useful. */ + /* */ + /* x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional */ + /* pixels. */ + /* */ + /* y_ppem :: The vertical ppem (nominal height) in 26.6 fractional */ + /* pixels. */ + /* */ + /* <Note> */ + /* Windows FNT: */ + /* The nominal size given in a FNT font is not reliable. Thus when */ + /* the driver finds it incorrect, it sets `size' to some calculated */ + /* values and sets `x_ppem' and `y_ppem' to the pixel width and */ + /* height given in the font, respectively. */ + /* */ + /* TrueType embedded bitmaps: */ + /* `size', `width', and `height' values are not contained in the */ + /* bitmap strike itself. They are computed from the global font */ + /* parameters. */ + /* */ + typedef struct FT_Bitmap_Size_ + { + FT_Short height; + FT_Short width; + + FT_Pos size; + + FT_Pos x_ppem; + FT_Pos y_ppem; + + } FT_Bitmap_Size; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* O B J E C T C L A S S E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Library */ + /* */ + /* <Description> */ + /* A handle to a FreeType library instance. Each `library' is */ + /* completely independent from the others; it is the `root' of a set */ + /* of objects like fonts, faces, sizes, etc. */ + /* */ + /* It also embeds a memory manager (see @FT_Memory), as well as a */ + /* scan-line converter object (see @FT_Raster). */ + /* */ + /* In multi-threaded applications, make sure that the same FT_Library */ + /* object or any of its children doesn't get accessed in parallel. */ + /* */ + /* <Note> */ + /* Library objects are normally created by @FT_Init_FreeType, and */ + /* destroyed with @FT_Done_FreeType. If you need reference-counting */ + /* (cf. @FT_Reference_Library), use @FT_New_Library and */ + /* @FT_Done_Library. */ + /* */ + typedef struct FT_LibraryRec_ *FT_Library; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Module */ + /* */ + /* <Description> */ + /* A handle to a given FreeType module object. Each module can be a */ + /* font driver, a renderer, or anything else that provides services */ + /* to the formers. */ + /* */ + typedef struct FT_ModuleRec_* FT_Module; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Driver */ + /* */ + /* <Description> */ + /* A handle to a given FreeType font driver object. Each font driver */ + /* is a special module capable of creating faces from font files. */ + /* */ + typedef struct FT_DriverRec_* FT_Driver; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Renderer */ + /* */ + /* <Description> */ + /* A handle to a given FreeType renderer. A renderer is a special */ + /* module in charge of converting a glyph image to a bitmap, when */ + /* necessary. Each renderer supports a given glyph image format, and */ + /* one or more target surface depths. */ + /* */ + typedef struct FT_RendererRec_* FT_Renderer; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* base_interface */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Face */ + /* */ + /* <Description> */ + /* A handle to a given typographic face object. A face object models */ + /* a given typeface, in a given style. */ + /* */ + /* <Note> */ + /* Each face object also owns a single @FT_GlyphSlot object, as well */ + /* as one or more @FT_Size objects. */ + /* */ + /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */ + /* a given filepathname or a custom input stream. */ + /* */ + /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ + /* */ + /* <Also> */ + /* See @FT_FaceRec for the publicly accessible fields of a given face */ + /* object. */ + /* */ + typedef struct FT_FaceRec_* FT_Face; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Size */ + /* */ + /* <Description> */ + /* A handle to an object used to model a face scaled to a given */ + /* character size. */ + /* */ + /* <Note> */ + /* Each @FT_Face has an _active_ @FT_Size object that is used by */ + /* functions like @FT_Load_Glyph to determine the scaling */ + /* transformation that in turn is used to load and hint glyphs and */ + /* metrics. */ + /* */ + /* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */ + /* @FT_Request_Size or even @FT_Select_Size to change the content */ + /* (i.e., the scaling values) of the active @FT_Size. */ + /* */ + /* You can use @FT_New_Size to create additional size objects for a */ + /* given @FT_Face, but they won't be used by other functions until */ + /* you activate it through @FT_Activate_Size. Only one size can be */ + /* activated at any given time per face. */ + /* */ + /* <Also> */ + /* See @FT_SizeRec for the publicly accessible fields of a given size */ + /* object. */ + /* */ + typedef struct FT_SizeRec_* FT_Size; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_GlyphSlot */ + /* */ + /* <Description> */ + /* A handle to a given `glyph slot'. A slot is a container where it */ + /* is possible to load any of the glyphs contained in its parent */ + /* face. */ + /* */ + /* In other words, each time you call @FT_Load_Glyph or */ + /* @FT_Load_Char, the slot's content is erased by the new glyph data, */ + /* i.e., the glyph's metrics, its image (bitmap or outline), and */ + /* other control information. */ + /* */ + /* <Also> */ + /* See @FT_GlyphSlotRec for the publicly accessible glyph fields. */ + /* */ + typedef struct FT_GlyphSlotRec_* FT_GlyphSlot; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_CharMap */ + /* */ + /* <Description> */ + /* A handle to a given character map. A charmap is used to translate */ + /* character codes in a given encoding into glyph indexes for its */ + /* parent's face. Some font formats may provide several charmaps per */ + /* font. */ + /* */ + /* Each face object owns zero or more charmaps, but only one of them */ + /* can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char. */ + /* */ + /* The list of available charmaps in a face is available through the */ + /* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */ + /* */ + /* The currently active charmap is available as `face->charmap'. */ + /* You should call @FT_Set_Charmap to change it. */ + /* */ + /* <Note> */ + /* When a new face is created (either through @FT_New_Face or */ + /* @FT_Open_Face), the library looks for a Unicode charmap within */ + /* the list and automatically activates it. */ + /* */ + /* <Also> */ + /* See @FT_CharMapRec for the publicly accessible fields of a given */ + /* character map. */ + /* */ + typedef struct FT_CharMapRec_* FT_CharMap; + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_ENC_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags into an unsigned long. It is */ + /* used to define `encoding' identifiers (see @FT_Encoding). */ + /* */ + /* <Note> */ + /* Since many 16-bit compilers don't like 32-bit enumerations, you */ + /* should redefine this macro in case of problems to something like */ + /* this: */ + /* */ + /* { */ + /* #define FT_ENC_TAG( value, a, b, c, d ) value */ + /* } */ + /* */ + /* to get a simple enumeration without assigning special numbers. */ + /* */ + +#ifndef FT_ENC_TAG +#define FT_ENC_TAG( value, a, b, c, d ) \ + value = ( ( (FT_UInt32)(a) << 24 ) | \ + ( (FT_UInt32)(b) << 16 ) | \ + ( (FT_UInt32)(c) << 8 ) | \ + (FT_UInt32)(d) ) + +#endif /* FT_ENC_TAG */ + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Encoding */ + /* */ + /* <Description> */ + /* An enumeration used to specify character sets supported by */ + /* charmaps. Used in the @FT_Select_Charmap API function. */ + /* */ + /* <Note> */ + /* Despite the name, this enumeration lists specific character */ + /* repertories (i.e., charsets), and not text encoding methods (e.g., */ + /* UTF-8, UTF-16, etc.). */ + /* */ + /* Other encodings might be defined in the future. */ + /* */ + /* <Values> */ + /* FT_ENCODING_NONE :: */ + /* The encoding value~0 is reserved. */ + /* */ + /* FT_ENCODING_UNICODE :: */ + /* Corresponds to the Unicode character set. This value covers */ + /* all versions of the Unicode repertoire, including ASCII and */ + /* Latin-1. Most fonts include a Unicode charmap, but not all */ + /* of them. */ + /* */ + /* For example, if you want to access Unicode value U+1F028 (and */ + /* the font contains it), use value 0x1F028 as the input value for */ + /* @FT_Get_Char_Index. */ + /* */ + /* FT_ENCODING_MS_SYMBOL :: */ + /* Corresponds to the Microsoft Symbol encoding, used to encode */ + /* mathematical symbols in the 32..255 character code range. For */ + /* more information, see */ + /* `http://www.kostis.net/charsets/symbol.htm'. */ + /* */ + /* FT_ENCODING_SJIS :: */ + /* Corresponds to Japanese SJIS encoding. More info at */ + /* at `http://en.wikipedia.org/wiki/Shift_JIS'. */ + /* See note on multi-byte encodings below. */ + /* */ + /* FT_ENCODING_GB2312 :: */ + /* Corresponds to an encoding system for Simplified Chinese as used */ + /* used in mainland China. */ + /* */ + /* FT_ENCODING_BIG5 :: */ + /* Corresponds to an encoding system for Traditional Chinese as */ + /* used in Taiwan and Hong Kong. */ + /* */ + /* FT_ENCODING_WANSUNG :: */ + /* Corresponds to the Korean encoding system known as Wansung. */ + /* For more information see */ + /* `http://msdn.microsoft.com/en-US/goglobal/cc305154'. */ + /* */ + /* FT_ENCODING_JOHAB :: */ + /* The Korean standard character set (KS~C 5601-1992), which */ + /* corresponds to MS Windows code page 1361. This character set */ + /* includes all possible Hangeul character combinations. */ + /* */ + /* FT_ENCODING_ADOBE_LATIN_1 :: */ + /* Corresponds to a Latin-1 encoding as defined in a Type~1 */ + /* PostScript font. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_ADOBE_STANDARD :: */ + /* Corresponds to the Adobe Standard encoding, as found in Type~1, */ + /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ + /* codes. */ + /* */ + /* FT_ENCODING_ADOBE_EXPERT :: */ + /* Corresponds to the Adobe Expert encoding, as found in Type~1, */ + /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ + /* codes. */ + /* */ + /* FT_ENCODING_ADOBE_CUSTOM :: */ + /* Corresponds to a custom encoding, as found in Type~1, CFF, and */ + /* OpenType/CFF fonts. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_APPLE_ROMAN :: */ + /* Corresponds to the 8-bit Apple roman encoding. Many TrueType */ + /* and OpenType fonts contain a charmap for this encoding, since */ + /* older versions of Mac OS are able to use it. */ + /* */ + /* FT_ENCODING_OLD_LATIN_2 :: */ + /* This value is deprecated and was never used nor reported by */ + /* FreeType. Don't use or test for it. */ + /* */ + /* FT_ENCODING_MS_SJIS :: */ + /* Same as FT_ENCODING_SJIS. Deprecated. */ + /* */ + /* FT_ENCODING_MS_GB2312 :: */ + /* Same as FT_ENCODING_GB2312. Deprecated. */ + /* */ + /* FT_ENCODING_MS_BIG5 :: */ + /* Same as FT_ENCODING_BIG5. Deprecated. */ + /* */ + /* FT_ENCODING_MS_WANSUNG :: */ + /* Same as FT_ENCODING_WANSUNG. Deprecated. */ + /* */ + /* FT_ENCODING_MS_JOHAB :: */ + /* Same as FT_ENCODING_JOHAB. Deprecated. */ + /* */ + /* <Note> */ + /* By default, FreeType automatically synthesizes a Unicode charmap */ + /* for PostScript fonts, using their glyph names dictionaries. */ + /* However, it also reports the encodings defined explicitly in the */ + /* font file, for the cases when they are needed, with the Adobe */ + /* values as well. */ + /* */ + /* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */ + /* is neither Unicode nor ISO-8859-1 (otherwise it is set to */ + /* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out */ + /* which encoding is really present. If, for example, the */ + /* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */ + /* the font is encoded in KOI8-R. */ + /* */ + /* FT_ENCODING_NONE is always set (with a single exception) by the */ + /* winfonts driver. Use @FT_Get_WinFNT_Header and examine the */ + /* `charset' field of the @FT_WinFNT_HeaderRec structure to find out */ + /* which encoding is really present. For example, */ + /* @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for */ + /* Russian). */ + /* */ + /* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */ + /* and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to */ + /* FT_ENCODING_APPLE_ROMAN). */ + /* */ + /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */ + /* @FT_Get_CMap_Language_ID to query the Mac language ID that may */ + /* be needed to be able to distinguish Apple encoding variants. See */ + /* */ + /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */ + /* */ + /* to get an idea how to do that. Basically, if the language ID */ + /* is~0, don't use it, otherwise subtract 1 from the language ID. */ + /* Then examine `encoding_id'. If, for example, `encoding_id' is */ + /* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */ + /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */ + /* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */ + /* variant the Arabic encoding. */ + /* */ + typedef enum FT_Encoding_ + { + FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ), + + FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ), + FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ), + + FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ), + FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ), + FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ), + FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), + FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), + + /* for backwards compatibility */ + FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, + FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312, + FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, + FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, + FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, + + FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ), + + FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ), + + FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' ) + + } FT_Encoding; + + + /* these constants are deprecated; use the corresponding `FT_Encoding' */ + /* values instead */ +#define ft_encoding_none FT_ENCODING_NONE +#define ft_encoding_unicode FT_ENCODING_UNICODE +#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL +#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 +#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 +#define ft_encoding_sjis FT_ENCODING_SJIS +#define ft_encoding_gb2312 FT_ENCODING_GB2312 +#define ft_encoding_big5 FT_ENCODING_BIG5 +#define ft_encoding_wansung FT_ENCODING_WANSUNG +#define ft_encoding_johab FT_ENCODING_JOHAB + +#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD +#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT +#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM +#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_CharMapRec */ + /* */ + /* <Description> */ + /* The base charmap structure. */ + /* */ + /* <Fields> */ + /* face :: A handle to the parent face object. */ + /* */ + /* encoding :: An @FT_Encoding tag identifying the charmap. Use */ + /* this with @FT_Select_Charmap. */ + /* */ + /* platform_id :: An ID number describing the platform for the */ + /* following encoding ID. This comes directly from */ + /* the TrueType specification and should be emulated */ + /* for other formats. */ + /* */ + /* encoding_id :: A platform specific encoding number. This also */ + /* comes from the TrueType specification and should be */ + /* emulated similarly. */ + /* */ + typedef struct FT_CharMapRec_ + { + FT_Face face; + FT_Encoding encoding; + FT_UShort platform_id; + FT_UShort encoding_id; + + } FT_CharMapRec; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* B A S E O B J E C T C L A S S E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Face_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Face_InternalRec' structure, used to */ + /* model private data of a given @FT_Face object. */ + /* */ + /* This structure might change between releases of FreeType~2 and is */ + /* not generally available to client applications. */ + /* */ + typedef struct FT_Face_InternalRec_* FT_Face_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_FaceRec */ + /* */ + /* <Description> */ + /* FreeType root face class structure. A face object models a */ + /* typeface in a font file. */ + /* */ + /* <Fields> */ + /* num_faces :: The number of faces in the font file. Some */ + /* font formats can have multiple faces in */ + /* a font file. */ + /* */ + /* face_index :: The index of the face in the font file. It */ + /* is set to~0 if there is only one face in */ + /* the font file. */ + /* */ + /* face_flags :: A set of bit flags that give important */ + /* information about the face; see */ + /* @FT_FACE_FLAG_XXX for the details. */ + /* */ + /* style_flags :: A set of bit flags indicating the style of */ + /* the face; see @FT_STYLE_FLAG_XXX for the */ + /* details. */ + /* */ + /* num_glyphs :: The number of glyphs in the face. If the */ + /* face is scalable and has sbits (see */ + /* `num_fixed_sizes'), it is set to the number */ + /* of outline glyphs. */ + /* */ + /* For CID-keyed fonts, this value gives the */ + /* highest CID used in the font. */ + /* */ + /* family_name :: The face's family name. This is an ASCII */ + /* string, usually in English, that describes */ + /* the typeface's family (like `Times New */ + /* Roman', `Bodoni', `Garamond', etc). This */ + /* is a least common denominator used to list */ + /* fonts. Some formats (TrueType & OpenType) */ + /* provide localized and Unicode versions of */ + /* this string. Applications should use the */ + /* format specific interface to access them. */ + /* Can be NULL (e.g., in fonts embedded in a */ + /* PDF file). */ + /* */ + /* style_name :: The face's style name. This is an ASCII */ + /* string, usually in English, that describes */ + /* the typeface's style (like `Italic', */ + /* `Bold', `Condensed', etc). Not all font */ + /* formats provide a style name, so this field */ + /* is optional, and can be set to NULL. As */ + /* for `family_name', some formats provide */ + /* localized and Unicode versions of this */ + /* string. Applications should use the format */ + /* specific interface to access them. */ + /* */ + /* num_fixed_sizes :: The number of bitmap strikes in the face. */ + /* Even if the face is scalable, there might */ + /* still be bitmap strikes, which are called */ + /* `sbits' in that case. */ + /* */ + /* available_sizes :: An array of @FT_Bitmap_Size for all bitmap */ + /* strikes in the face. It is set to NULL if */ + /* there is no bitmap strike. */ + /* */ + /* num_charmaps :: The number of charmaps in the face. */ + /* */ + /* charmaps :: An array of the charmaps of the face. */ + /* */ + /* generic :: A field reserved for client uses. See the */ + /* @FT_Generic type description. */ + /* */ + /* bbox :: The font bounding box. Coordinates are */ + /* expressed in font units (see */ + /* `units_per_EM'). The box is large enough */ + /* to contain any glyph from the font. Thus, */ + /* `bbox.yMax' can be seen as the `maximum */ + /* ascender', and `bbox.yMin' as the `minimum */ + /* descender'. Only relevant for scalable */ + /* formats. */ + /* */ + /* Note that the bounding box might be off by */ + /* (at least) one pixel for hinted fonts. See */ + /* @FT_Size_Metrics for further discussion. */ + /* */ + /* units_per_EM :: The number of font units per EM square for */ + /* this face. This is typically 2048 for */ + /* TrueType fonts, and 1000 for Type~1 fonts. */ + /* Only relevant for scalable formats. */ + /* */ + /* ascender :: The typographic ascender of the face, */ + /* expressed in font units. For font formats */ + /* not having this information, it is set to */ + /* `bbox.yMax'. Only relevant for scalable */ + /* formats. */ + /* */ + /* descender :: The typographic descender of the face, */ + /* expressed in font units. For font formats */ + /* not having this information, it is set to */ + /* `bbox.yMin'. Note that this field is */ + /* usually negative. Only relevant for */ + /* scalable formats. */ + /* */ + /* height :: This value is the vertical distance */ + /* between two consecutive baselines, */ + /* expressed in font units. It is always */ + /* positive. Only relevant for scalable */ + /* formats. */ + /* */ + /* If you want the global glyph height, use */ + /* `ascender - descender'. */ + /* */ + /* max_advance_width :: The maximum advance width, in font units, */ + /* for all glyphs in this face. This can be */ + /* used to make word wrapping computations */ + /* faster. Only relevant for scalable */ + /* formats. */ + /* */ + /* max_advance_height :: The maximum advance height, in font units, */ + /* for all glyphs in this face. This is only */ + /* relevant for vertical layouts, and is set */ + /* to `height' for fonts that do not provide */ + /* vertical metrics. Only relevant for */ + /* scalable formats. */ + /* */ + /* underline_position :: The position, in font units, of the */ + /* underline line for this face. It is the */ + /* center of the underlining stem. Only */ + /* relevant for scalable formats. */ + /* */ + /* underline_thickness :: The thickness, in font units, of the */ + /* underline for this face. Only relevant for */ + /* scalable formats. */ + /* */ + /* glyph :: The face's associated glyph slot(s). */ + /* */ + /* size :: The current active size for this face. */ + /* */ + /* charmap :: The current active charmap for this face. */ + /* */ + /* <Note> */ + /* Fields may be changed after a call to @FT_Attach_File or */ + /* @FT_Attach_Stream. */ + /* */ + typedef struct FT_FaceRec_ + { + FT_Long num_faces; + FT_Long face_index; + + FT_Long face_flags; + FT_Long style_flags; + + FT_Long num_glyphs; + + FT_String* family_name; + FT_String* style_name; + + FT_Int num_fixed_sizes; + FT_Bitmap_Size* available_sizes; + + FT_Int num_charmaps; + FT_CharMap* charmaps; + + FT_Generic generic; + + /*# The following member variables (down to `underline_thickness') */ + /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */ + /*# for bitmap fonts. */ + FT_BBox bbox; + + FT_UShort units_per_EM; + FT_Short ascender; + FT_Short descender; + FT_Short height; + + FT_Short max_advance_width; + FT_Short max_advance_height; + + FT_Short underline_position; + FT_Short underline_thickness; + + FT_GlyphSlot glyph; + FT_Size size; + FT_CharMap charmap; + + /*@private begin */ + + FT_Driver driver; + FT_Memory memory; + FT_Stream stream; + + FT_ListRec sizes_list; + + FT_Generic autohint; /* face-specific auto-hinter data */ + void* extensions; /* unused */ + + FT_Face_Internal internal; + + /*@private end */ + + } FT_FaceRec; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_FACE_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the `face_flags' field of the */ + /* @FT_FaceRec structure. They inform client applications of */ + /* properties of the corresponding face. */ + /* */ + /* <Values> */ + /* FT_FACE_FLAG_SCALABLE :: */ + /* Indicates that the face contains outline glyphs. This doesn't */ + /* prevent bitmap strikes, i.e., a face can have both this and */ + /* and @FT_FACE_FLAG_FIXED_SIZES set. */ + /* */ + /* FT_FACE_FLAG_FIXED_SIZES :: */ + /* Indicates that the face contains bitmap strikes. See also the */ + /* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */ + /* */ + /* FT_FACE_FLAG_FIXED_WIDTH :: */ + /* Indicates that the face contains fixed-width characters (like */ + /* Courier, Lucido, MonoType, etc.). */ + /* */ + /* FT_FACE_FLAG_SFNT :: */ + /* Indicates that the face uses the `sfnt' storage scheme. For */ + /* now, this means TrueType and OpenType. */ + /* */ + /* FT_FACE_FLAG_HORIZONTAL :: */ + /* Indicates that the face contains horizontal glyph metrics. This */ + /* should be set for all common formats. */ + /* */ + /* FT_FACE_FLAG_VERTICAL :: */ + /* Indicates that the face contains vertical glyph metrics. This */ + /* is only available in some formats, not all of them. */ + /* */ + /* FT_FACE_FLAG_KERNING :: */ + /* Indicates that the face contains kerning information. If set, */ + /* the kerning distance can be retrieved through the function */ + /* @FT_Get_Kerning. Otherwise the function always return the */ + /* vector (0,0). Note that FreeType doesn't handle kerning data */ + /* from the `GPOS' table (as present in some OpenType fonts). */ + /* */ + /* FT_FACE_FLAG_FAST_GLYPHS :: */ + /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */ + /* */ + /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ + /* Indicates that the font contains multiple masters and is capable */ + /* of interpolating between them. See the multiple-masters */ + /* specific API for details. */ + /* */ + /* FT_FACE_FLAG_GLYPH_NAMES :: */ + /* Indicates that the font contains glyph names that can be */ + /* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */ + /* fonts contain broken glyph name tables. Use the function */ + /* @FT_Has_PS_Glyph_Names when needed. */ + /* */ + /* FT_FACE_FLAG_EXTERNAL_STREAM :: */ + /* Used internally by FreeType to indicate that a face's stream was */ + /* provided by the client application and should not be destroyed */ + /* when @FT_Done_Face is called. Don't read or test this flag. */ + /* */ + /* FT_FACE_FLAG_HINTER :: */ + /* Set if the font driver has a hinting machine of its own. For */ + /* example, with TrueType fonts, it makes sense to use data from */ + /* the SFNT `gasp' table only if the native TrueType hinting engine */ + /* (with the bytecode interpreter) is available and active. */ + /* */ + /* FT_FACE_FLAG_CID_KEYED :: */ + /* Set if the font is CID-keyed. In that case, the font is not */ + /* accessed by glyph indices but by CID values. For subsetted */ + /* CID-keyed fonts this has the consequence that not all index */ + /* values are a valid argument to FT_Load_Glyph. Only the CID */ + /* values for which corresponding glyphs in the subsetted font */ + /* exist make FT_Load_Glyph return successfully; in all other cases */ + /* you get an `FT_Err_Invalid_Argument' error. */ + /* */ + /* Note that CID-keyed fonts that are in an SFNT wrapper don't */ + /* have this flag set since the glyphs are accessed in the normal */ + /* way (using contiguous indices); the `CID-ness' isn't visible to */ + /* the application. */ + /* */ + /* FT_FACE_FLAG_TRICKY :: */ + /* Set if the font is `tricky', this is, it always needs the */ + /* font format's native hinting engine to get a reasonable result. */ + /* A typical example is the Chinese font `mingli.ttf' that uses */ + /* TrueType bytecode instructions to move and scale all of its */ + /* subglyphs. */ + /* */ + /* It is not possible to autohint such fonts using */ + /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ + /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */ + /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ + /* probably never want this except for demonstration purposes. */ + /* */ + /* Currently, there are about a dozen TrueType fonts in the list of */ + /* tricky fonts; they are hard-coded in file `ttobjs.c'. */ + /* */ + /* FT_FACE_FLAG_COLOR :: */ + /* Set if the font has color glyph tables. To access color glyphs */ + /* use @FT_LOAD_COLOR. */ + /* */ +#define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) +#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) +#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 ) +#define FT_FACE_FLAG_SFNT ( 1L << 3 ) +#define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 ) +#define FT_FACE_FLAG_VERTICAL ( 1L << 5 ) +#define FT_FACE_FLAG_KERNING ( 1L << 6 ) +#define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 ) +#define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 ) +#define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 ) +#define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 ) +#define FT_FACE_FLAG_HINTER ( 1L << 11 ) +#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 ) +#define FT_FACE_FLAG_TRICKY ( 1L << 13 ) +#define FT_FACE_FLAG_COLOR ( 1L << 14 ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_HORIZONTAL( face ) + * + * @description: + * A macro that returns true whenever a face object contains + * horizontal metrics (this is true for all font formats though). + * + * @also: + * @FT_HAS_VERTICAL can be used to check for vertical metrics. + * + */ +#define FT_HAS_HORIZONTAL( face ) \ + ( face->face_flags & FT_FACE_FLAG_HORIZONTAL ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_VERTICAL( face ) + * + * @description: + * A macro that returns true whenever a face object contains real + * vertical metrics (and not only synthesized ones). + * + */ +#define FT_HAS_VERTICAL( face ) \ + ( face->face_flags & FT_FACE_FLAG_VERTICAL ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_KERNING( face ) + * + * @description: + * A macro that returns true whenever a face object contains kerning + * data that can be accessed with @FT_Get_Kerning. + * + */ +#define FT_HAS_KERNING( face ) \ + ( face->face_flags & FT_FACE_FLAG_KERNING ) + + + /************************************************************************* + * + * @macro: + * FT_IS_SCALABLE( face ) + * + * @description: + * A macro that returns true whenever a face object contains a scalable + * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, + * and PFR font formats. + * + */ +#define FT_IS_SCALABLE( face ) \ + ( face->face_flags & FT_FACE_FLAG_SCALABLE ) + + + /************************************************************************* + * + * @macro: + * FT_IS_SFNT( face ) + * + * @description: + * A macro that returns true whenever a face object contains a font + * whose format is based on the SFNT storage scheme. This usually + * means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded + * bitmap fonts. + * + * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and + * @FT_TRUETYPE_TABLES_H are available. + * + */ +#define FT_IS_SFNT( face ) \ + ( face->face_flags & FT_FACE_FLAG_SFNT ) + + + /************************************************************************* + * + * @macro: + * FT_IS_FIXED_WIDTH( face ) + * + * @description: + * A macro that returns true whenever a face object contains a font face + * that contains fixed-width (or `monospace', `fixed-pitch', etc.) + * glyphs. + * + */ +#define FT_IS_FIXED_WIDTH( face ) \ + ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_FIXED_SIZES( face ) + * + * @description: + * A macro that returns true whenever a face object contains some + * embedded bitmaps. See the `available_sizes' field of the + * @FT_FaceRec structure. + * + */ +#define FT_HAS_FIXED_SIZES( face ) \ + ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_FAST_GLYPHS( face ) + * + * @description: + * Deprecated. + * + */ +#define FT_HAS_FAST_GLYPHS( face ) 0 + + + /************************************************************************* + * + * @macro: + * FT_HAS_GLYPH_NAMES( face ) + * + * @description: + * A macro that returns true whenever a face object contains some glyph + * names that can be accessed through @FT_Get_Glyph_Name. + * + */ +#define FT_HAS_GLYPH_NAMES( face ) \ + ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_MULTIPLE_MASTERS( face ) + * + * @description: + * A macro that returns true whenever a face object contains some + * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H + * are then available to choose the exact design you want. + * + */ +#define FT_HAS_MULTIPLE_MASTERS( face ) \ + ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) + + + /************************************************************************* + * + * @macro: + * FT_IS_CID_KEYED( face ) + * + * @description: + * A macro that returns true whenever a face object contains a CID-keyed + * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more + * details. + * + * If this macro is true, all functions defined in @FT_CID_H are + * available. + * + */ +#define FT_IS_CID_KEYED( face ) \ + ( face->face_flags & FT_FACE_FLAG_CID_KEYED ) + + + /************************************************************************* + * + * @macro: + * FT_IS_TRICKY( face ) + * + * @description: + * A macro that returns true whenever a face represents a `tricky' font. + * See the discussion of @FT_FACE_FLAG_TRICKY for more details. + * + */ +#define FT_IS_TRICKY( face ) \ + ( face->face_flags & FT_FACE_FLAG_TRICKY ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_COLOR( face ) + * + * @description: + * A macro that returns true whenever a face object contains + * tables for color glyphs. + * + */ +#define FT_HAS_COLOR( face ) \ + ( face->face_flags & FT_FACE_FLAG_COLOR ) + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* FT_STYLE_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit-flags used to indicate the style of a given face. */ + /* These are used in the `style_flags' field of @FT_FaceRec. */ + /* */ + /* <Values> */ + /* FT_STYLE_FLAG_ITALIC :: */ + /* Indicates that a given face style is italic or oblique. */ + /* */ + /* FT_STYLE_FLAG_BOLD :: */ + /* Indicates that a given face is bold. */ + /* */ + /* <Note> */ + /* The style information as provided by FreeType is very basic. More */ + /* details are beyond the scope and should be done on a higher level */ + /* (for example, by analyzing various fields of the `OS/2' table in */ + /* SFNT based fonts). */ + /* */ +#define FT_STYLE_FLAG_ITALIC ( 1 << 0 ) +#define FT_STYLE_FLAG_BOLD ( 1 << 1 ) + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Size_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Size_InternalRec' structure, used to */ + /* model private data of a given @FT_Size object. */ + /* */ + typedef struct FT_Size_InternalRec_* FT_Size_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_Metrics */ + /* */ + /* <Description> */ + /* The size metrics structure gives the metrics of a size object. */ + /* */ + /* <Fields> */ + /* x_ppem :: The width of the scaled EM square in pixels, hence */ + /* the term `ppem' (pixels per EM). It is also */ + /* referred to as `nominal width'. */ + /* */ + /* y_ppem :: The height of the scaled EM square in pixels, */ + /* hence the term `ppem' (pixels per EM). It is also */ + /* referred to as `nominal height'. */ + /* */ + /* x_scale :: A 16.16 fractional scaling value used to convert */ + /* horizontal metrics from font units to 26.6 */ + /* fractional pixels. Only relevant for scalable */ + /* font formats. */ + /* */ + /* y_scale :: A 16.16 fractional scaling value used to convert */ + /* vertical metrics from font units to 26.6 */ + /* fractional pixels. Only relevant for scalable */ + /* font formats. */ + /* */ + /* ascender :: The ascender in 26.6 fractional pixels. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* descender :: The descender in 26.6 fractional pixels. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* height :: The height in 26.6 fractional pixels. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* max_advance :: The maximum advance width in 26.6 fractional */ + /* pixels. See @FT_FaceRec for the details. */ + /* */ + /* <Note> */ + /* The scaling values, if relevant, are determined first during a */ + /* size changing operation. The remaining fields are then set by the */ + /* driver. For scalable formats, they are usually set to scaled */ + /* values of the corresponding fields in @FT_FaceRec. */ + /* */ + /* Note that due to glyph hinting, these values might not be exact */ + /* for certain fonts. Thus they must be treated as unreliable */ + /* with an error margin of at least one pixel! */ + /* */ + /* Indeed, the only way to get the exact metrics is to render _all_ */ + /* glyphs. As this would be a definite performance hit, it is up to */ + /* client applications to perform such computations. */ + /* */ + /* The FT_Size_Metrics structure is valid for bitmap fonts also. */ + /* */ + typedef struct FT_Size_Metrics_ + { + FT_UShort x_ppem; /* horizontal pixels per EM */ + FT_UShort y_ppem; /* vertical pixels per EM */ + + FT_Fixed x_scale; /* scaling values used to convert font */ + FT_Fixed y_scale; /* units to 26.6 fractional pixels */ + + FT_Pos ascender; /* ascender in 26.6 frac. pixels */ + FT_Pos descender; /* descender in 26.6 frac. pixels */ + FT_Pos height; /* text height in 26.6 frac. pixels */ + FT_Pos max_advance; /* max horizontal advance, in 26.6 pixels */ + + } FT_Size_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SizeRec */ + /* */ + /* <Description> */ + /* FreeType root size class structure. A size object models a face */ + /* object at a given size. */ + /* */ + /* <Fields> */ + /* face :: Handle to the parent face object. */ + /* */ + /* generic :: A typeless pointer, unused by the FreeType library or */ + /* any of its drivers. It can be used by client */ + /* applications to link their own data to each size */ + /* object. */ + /* */ + /* metrics :: Metrics for this size object. This field is read-only. */ + /* */ + typedef struct FT_SizeRec_ + { + FT_Face face; /* parent face object */ + FT_Generic generic; /* generic pointer for client uses */ + FT_Size_Metrics metrics; /* size metrics */ + FT_Size_Internal internal; + + } FT_SizeRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SubGlyph */ + /* */ + /* <Description> */ + /* The subglyph structure is an internal object used to describe */ + /* subglyphs (for example, in the case of composites). */ + /* */ + /* <Note> */ + /* The subglyph implementation is not part of the high-level API, */ + /* hence the forward structure declaration. */ + /* */ + /* You can however retrieve subglyph information with */ + /* @FT_Get_SubGlyph_Info. */ + /* */ + typedef struct FT_SubGlyphRec_* FT_SubGlyph; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Slot_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Slot_InternalRec' structure, used to */ + /* model private data of a given @FT_GlyphSlot object. */ + /* */ + typedef struct FT_Slot_InternalRec_* FT_Slot_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphSlotRec */ + /* */ + /* <Description> */ + /* FreeType root glyph slot class structure. A glyph slot is a */ + /* container where individual glyphs can be loaded, be they in */ + /* outline or bitmap format. */ + /* */ + /* <Fields> */ + /* library :: A handle to the FreeType library instance */ + /* this slot belongs to. */ + /* */ + /* face :: A handle to the parent face object. */ + /* */ + /* next :: In some cases (like some font tools), several */ + /* glyph slots per face object can be a good */ + /* thing. As this is rare, the glyph slots are */ + /* listed through a direct, single-linked list */ + /* using its `next' field. */ + /* */ + /* generic :: A typeless pointer unused by the FreeType */ + /* library or any of its drivers. It can be */ + /* used by client applications to link their own */ + /* data to each glyph slot object. */ + /* */ + /* metrics :: The metrics of the last loaded glyph in the */ + /* slot. The returned values depend on the last */ + /* load flags (see the @FT_Load_Glyph API */ + /* function) and can be expressed either in 26.6 */ + /* fractional pixels or font units. */ + /* */ + /* Note that even when the glyph image is */ + /* transformed, the metrics are not. */ + /* */ + /* linearHoriAdvance :: The advance width of the unhinted glyph. */ + /* Its value is expressed in 16.16 fractional */ + /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ + /* when loading the glyph. This field can be */ + /* important to perform correct WYSIWYG layout. */ + /* Only relevant for outline glyphs. */ + /* */ + /* linearVertAdvance :: The advance height of the unhinted glyph. */ + /* Its value is expressed in 16.16 fractional */ + /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ + /* when loading the glyph. This field can be */ + /* important to perform correct WYSIWYG layout. */ + /* Only relevant for outline glyphs. */ + /* */ + /* advance :: This shorthand is, depending on */ + /* @FT_LOAD_IGNORE_TRANSFORM, the transformed */ + /* (hinted) advance width for the glyph, in 26.6 */ + /* fractional pixel format. As specified with */ + /* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */ + /* `horiAdvance' or the `vertAdvance' value of */ + /* `metrics' field. */ + /* */ + /* format :: This field indicates the format of the image */ + /* contained in the glyph slot. Typically */ + /* @FT_GLYPH_FORMAT_BITMAP, */ + /* @FT_GLYPH_FORMAT_OUTLINE, or */ + /* @FT_GLYPH_FORMAT_COMPOSITE, but others are */ + /* possible. */ + /* */ + /* bitmap :: This field is used as a bitmap descriptor */ + /* when the slot format is */ + /* @FT_GLYPH_FORMAT_BITMAP. Note that the */ + /* address and content of the bitmap buffer can */ + /* change between calls of @FT_Load_Glyph and a */ + /* few other functions. */ + /* */ + /* bitmap_left :: The bitmap's left bearing expressed in */ + /* integer pixels. Only valid if the format is */ + /* @FT_GLYPH_FORMAT_BITMAP, this is, if the */ + /* glyph slot contains a bitmap. */ + /* */ + /* bitmap_top :: The bitmap's top bearing expressed in integer */ + /* pixels. Remember that this is the distance */ + /* from the baseline to the top-most glyph */ + /* scanline, upwards y~coordinates being */ + /* *positive*. */ + /* */ + /* outline :: The outline descriptor for the current glyph */ + /* image if its format is */ + /* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */ + /* loaded, `outline' can be transformed, */ + /* distorted, embolded, etc. However, it must */ + /* not be freed. */ + /* */ + /* num_subglyphs :: The number of subglyphs in a composite glyph. */ + /* This field is only valid for the composite */ + /* glyph format that should normally only be */ + /* loaded with the @FT_LOAD_NO_RECURSE flag. */ + /* */ + /* subglyphs :: An array of subglyph descriptors for */ + /* composite glyphs. There are `num_subglyphs' */ + /* elements in there. Currently internal to */ + /* FreeType. */ + /* */ + /* control_data :: Certain font drivers can also return the */ + /* control data for a given glyph image (e.g. */ + /* TrueType bytecode, Type~1 charstrings, etc.). */ + /* This field is a pointer to such data. */ + /* */ + /* control_len :: This is the length in bytes of the control */ + /* data. */ + /* */ + /* other :: Really wicked formats can use this pointer to */ + /* present their own glyph image to client */ + /* applications. Note that the application */ + /* needs to know about the image format. */ + /* */ + /* lsb_delta :: The difference between hinted and unhinted */ + /* left side bearing while autohinting is */ + /* active. Zero otherwise. */ + /* */ + /* rsb_delta :: The difference between hinted and unhinted */ + /* right side bearing while autohinting is */ + /* active. Zero otherwise. */ + /* */ + /* <Note> */ + /* If @FT_Load_Glyph is called with default flags (see */ + /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */ + /* its native format (e.g., an outline glyph for TrueType and Type~1 */ + /* formats). */ + /* */ + /* This image can later be converted into a bitmap by calling */ + /* @FT_Render_Glyph. This function finds the current renderer for */ + /* the native image's format, then invokes it. */ + /* */ + /* The renderer is in charge of transforming the native image through */ + /* the slot's face transformation fields, then converting it into a */ + /* bitmap that is returned in `slot->bitmap'. */ + /* */ + /* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */ + /* to specify the position of the bitmap relative to the current pen */ + /* position (e.g., coordinates (0,0) on the baseline). Of course, */ + /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ + /* */ + /* <Note> */ + /* Here a small pseudo code fragment that shows how to use */ + /* `lsb_delta' and `rsb_delta': */ + /* */ + /* { */ + /* FT_Pos origin_x = 0; */ + /* FT_Pos prev_rsb_delta = 0; */ + /* */ + /* */ + /* for all glyphs do */ + /* <compute kern between current and previous glyph and add it to */ + /* `origin_x'> */ + /* */ + /* <load glyph with `FT_Load_Glyph'> */ + /* */ + /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */ + /* origin_x -= 64; */ + /* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */ + /* origin_x += 64; */ + /* */ + /* prev_rsb_delta = face->glyph->rsb_delta; */ + /* */ + /* <save glyph image, or render glyph, or ...> */ + /* */ + /* origin_x += face->glyph->advance.x; */ + /* endfor */ + /* } */ + /* */ + typedef struct FT_GlyphSlotRec_ + { + FT_Library library; + FT_Face face; + FT_GlyphSlot next; + FT_UInt reserved; /* retained for binary compatibility */ + FT_Generic generic; + + FT_Glyph_Metrics metrics; + FT_Fixed linearHoriAdvance; + FT_Fixed linearVertAdvance; + FT_Vector advance; + + FT_Glyph_Format format; + + FT_Bitmap bitmap; + FT_Int bitmap_left; + FT_Int bitmap_top; + + FT_Outline outline; + + FT_UInt num_subglyphs; + FT_SubGlyph subglyphs; + + void* control_data; + long control_len; + + FT_Pos lsb_delta; + FT_Pos rsb_delta; + + void* other; + + FT_Slot_Internal internal; + + } FT_GlyphSlotRec; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* F U N C T I O N S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Init_FreeType */ + /* */ + /* <Description> */ + /* Initialize a new FreeType library object. The set of modules */ + /* that are registered by this function is determined at build time. */ + /* */ + /* <Output> */ + /* alibrary :: A handle to a new library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* In case you want to provide your own memory allocating routines, */ + /* use @FT_New_Library instead, followed by a call to */ + /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ + /* */ + /* For multi-threading applications each thread should have its own */ + /* FT_Library object. */ + /* */ + /* If you need reference-counting (cf. @FT_Reference_Library), use */ + /* @FT_New_Library and @FT_Done_Library. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Init_FreeType( FT_Library *alibrary ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_FreeType */ + /* */ + /* <Description> */ + /* Destroy a given FreeType library object and all of its children, */ + /* including resources, drivers, faces, sizes, etc. */ + /* */ + /* <Input> */ + /* library :: A handle to the target library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_FreeType( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_OPEN_XXX */ + /* */ + /* <Description> */ + /* A list of bit-field constants used within the `flags' field of the */ + /* @FT_Open_Args structure. */ + /* */ + /* <Values> */ + /* FT_OPEN_MEMORY :: This is a memory-based stream. */ + /* */ + /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */ + /* */ + /* FT_OPEN_PATHNAME :: Create a new input stream from a C~path */ + /* name. */ + /* */ + /* FT_OPEN_DRIVER :: Use the `driver' field. */ + /* */ + /* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */ + /* */ + /* <Note> */ + /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */ + /* flags are mutually exclusive. */ + /* */ +#define FT_OPEN_MEMORY 0x1 +#define FT_OPEN_STREAM 0x2 +#define FT_OPEN_PATHNAME 0x4 +#define FT_OPEN_DRIVER 0x8 +#define FT_OPEN_PARAMS 0x10 + + + /* these constants are deprecated; use the corresponding `FT_OPEN_XXX' */ + /* values instead */ +#define ft_open_memory FT_OPEN_MEMORY +#define ft_open_stream FT_OPEN_STREAM +#define ft_open_pathname FT_OPEN_PATHNAME +#define ft_open_driver FT_OPEN_DRIVER +#define ft_open_params FT_OPEN_PARAMS + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Parameter */ + /* */ + /* <Description> */ + /* A simple structure used to pass more or less generic parameters to */ + /* @FT_Open_Face. */ + /* */ + /* <Fields> */ + /* tag :: A four-byte identification tag. */ + /* */ + /* data :: A pointer to the parameter data. */ + /* */ + /* <Note> */ + /* The ID and function of parameters are driver-specific. See the */ + /* various FT_PARAM_TAG_XXX flags for more information. */ + /* */ + typedef struct FT_Parameter_ + { + FT_ULong tag; + FT_Pointer data; + + } FT_Parameter; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Open_Args */ + /* */ + /* <Description> */ + /* A structure used to indicate how to open a new font file or */ + /* stream. A pointer to such a structure can be used as a parameter */ + /* for the functions @FT_Open_Face and @FT_Attach_Stream. */ + /* */ + /* <Fields> */ + /* flags :: A set of bit flags indicating how to use the */ + /* structure. */ + /* */ + /* memory_base :: The first byte of the file in memory. */ + /* */ + /* memory_size :: The size in bytes of the file in memory. */ + /* */ + /* pathname :: A pointer to an 8-bit file pathname. */ + /* */ + /* stream :: A handle to a source stream object. */ + /* */ + /* driver :: This field is exclusively used by @FT_Open_Face; */ + /* it simply specifies the font driver to use to open */ + /* the face. If set to~0, FreeType tries to load the */ + /* face with each one of the drivers in its list. */ + /* */ + /* num_params :: The number of extra parameters. */ + /* */ + /* params :: Extra parameters passed to the font driver when */ + /* opening a new face. */ + /* */ + /* <Note> */ + /* The stream type is determined by the contents of `flags' that */ + /* are tested in the following order by @FT_Open_Face: */ + /* */ + /* If the @FT_OPEN_MEMORY bit is set, assume that this is a */ + /* memory file of `memory_size' bytes, located at `memory_address'. */ + /* The data are are not copied, and the client is responsible for */ + /* releasing and destroying them _after_ the corresponding call to */ + /* @FT_Done_Face. */ + /* */ + /* Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a */ + /* custom input stream `stream' is used. */ + /* */ + /* Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this */ + /* is a normal file and use `pathname' to open it. */ + /* */ + /* If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to */ + /* open the file with the driver whose handler is in `driver'. */ + /* */ + /* If the @FT_OPEN_PARAMS bit is set, the parameters given by */ + /* `num_params' and `params' is used. They are ignored otherwise. */ + /* */ + /* Ideally, both the `pathname' and `params' fields should be tagged */ + /* as `const'; this is missing for API backwards compatibility. In */ + /* other words, applications should treat them as read-only. */ + /* */ + typedef struct FT_Open_Args_ + { + FT_UInt flags; + const FT_Byte* memory_base; + FT_Long memory_size; + FT_String* pathname; + FT_Stream stream; + FT_Module driver; + FT_Int num_params; + FT_Parameter* params; + + } FT_Open_Args; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face */ + /* */ + /* <Description> */ + /* This function calls @FT_Open_Face to open a font by its pathname. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* pathname :: A path to the font file. */ + /* */ + /* face_index :: The index of the face within the font. The first */ + /* face has index~0. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* See @FT_Open_Face for more details. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Use @FT_Done_Face to destroy the created @FT_Face object (along */ + /* with its slot and sizes). */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face( FT_Library library, + const char* filepathname, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Memory_Face */ + /* */ + /* <Description> */ + /* This function calls @FT_Open_Face to open a font that has been */ + /* loaded into memory. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* file_base :: A pointer to the beginning of the font data. */ + /* */ + /* file_size :: The size of the memory chunk used by the font data. */ + /* */ + /* face_index :: The index of the face within the font. The first */ + /* face has index~0. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* See @FT_Open_Face for more details. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You must not deallocate the memory before calling @FT_Done_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Memory_Face( FT_Library library, + const FT_Byte* file_base, + FT_Long file_size, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Open_Face */ + /* */ + /* <Description> */ + /* Create a face object from a given resource described by */ + /* @FT_Open_Args. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* args :: A pointer to an `FT_Open_Args' structure that must */ + /* be filled by the caller. */ + /* */ + /* face_index :: The index of the face within the font. The first */ + /* face has index~0. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* See note below. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Unlike FreeType 1.x, this function automatically creates a glyph */ + /* slot for the face object that can be accessed directly through */ + /* `face->glyph'. */ + /* */ + /* FT_Open_Face can be used to quickly check whether the font */ + /* format of a given font resource is supported by FreeType. If the */ + /* `face_index' field is negative, the function's return value is~0 */ + /* if the font format is recognized, or non-zero otherwise; */ + /* the function returns a more or less empty face handle in `*aface' */ + /* (if `aface' isn't NULL). The only useful field in this special */ + /* case is `face->num_faces' that gives the number of faces within */ + /* the font file. After examination, the returned @FT_Face structure */ + /* should be deallocated with a call to @FT_Done_Face. */ + /* */ + /* Each new face object created with this function also owns a */ + /* default @FT_Size object, accessible as `face->size'. */ + /* */ + /* One @FT_Library instance can have multiple face objects, this is, */ + /* @FT_Open_Face and its siblings can be called multiple times using */ + /* the same `library' argument. */ + /* */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Open_Face( FT_Library library, + const FT_Open_Args* args, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Attach_File */ + /* */ + /* <Description> */ + /* This function calls @FT_Attach_Stream to attach a file. */ + /* */ + /* <InOut> */ + /* face :: The target face object. */ + /* */ + /* <Input> */ + /* filepathname :: The pathname. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Attach_File( FT_Face face, + const char* filepathname ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Attach_Stream */ + /* */ + /* <Description> */ + /* `Attach' data to a face object. Normally, this is used to read */ + /* additional information for the face object. For example, you can */ + /* attach an AFM file that comes with a Type~1 font to get the */ + /* kerning values and other metrics. */ + /* */ + /* <InOut> */ + /* face :: The target face object. */ + /* */ + /* <Input> */ + /* parameters :: A pointer to @FT_Open_Args that must be filled by */ + /* the caller. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The meaning of the `attach' (i.e., what really happens when the */ + /* new file is read) is not fixed by FreeType itself. It really */ + /* depends on the font format (and thus the font driver). */ + /* */ + /* Client applications are expected to know what they are doing */ + /* when invoking this function. Most drivers simply do not implement */ + /* file attachments. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Attach_Stream( FT_Face face, + FT_Open_Args* parameters ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Reference_Face */ + /* */ + /* <Description> */ + /* A counter gets initialized to~1 at the time an @FT_Face structure */ + /* is created. This function increments the counter. @FT_Done_Face */ + /* then only destroys a face if the counter is~1, otherwise it simply */ + /* decrements the counter. */ + /* */ + /* This function helps in managing life-cycles of structures that */ + /* reference @FT_Face objects. */ + /* */ + /* <Input> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.4.2 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Reference_Face( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Face */ + /* */ + /* <Description> */ + /* Discard a given face object, as well as all of its child slots and */ + /* sizes. */ + /* */ + /* <Input> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Face( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Select_Size */ + /* */ + /* <Description> */ + /* Select a bitmap strike. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* strike_index :: The index of the bitmap strike in the */ + /* `available_sizes' field of @FT_FaceRec structure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Select_Size( FT_Face face, + FT_Int strike_index ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Size_Request_Type */ + /* */ + /* <Description> */ + /* An enumeration type that lists the supported size request types. */ + /* */ + /* <Values> */ + /* FT_SIZE_REQUEST_TYPE_NOMINAL :: */ + /* The nominal size. The `units_per_EM' field of @FT_FaceRec is */ + /* used to determine both scaling values. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */ + /* The real dimension. The sum of the the `ascender' and (minus */ + /* of) the `descender' fields of @FT_FaceRec are used to determine */ + /* both scaling values. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_BBOX :: */ + /* The font bounding box. The width and height of the `bbox' field */ + /* of @FT_FaceRec are used to determine the horizontal and vertical */ + /* scaling value, respectively. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_CELL :: */ + /* The `max_advance_width' field of @FT_FaceRec is used to */ + /* determine the horizontal scaling value; the vertical scaling */ + /* value is determined the same way as */ + /* @FT_SIZE_REQUEST_TYPE_REAL_DIM does. Finally, both scaling */ + /* values are set to the smaller one. This type is useful if you */ + /* want to specify the font size for, say, a window of a given */ + /* dimension and 80x24 cells. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_SCALES :: */ + /* Specify the scaling values directly. */ + /* */ + /* <Note> */ + /* The above descriptions only apply to scalable formats. For bitmap */ + /* formats, the behaviour is up to the driver. */ + /* */ + /* See the note section of @FT_Size_Metrics if you wonder how size */ + /* requesting relates to scaling values. */ + /* */ + typedef enum FT_Size_Request_Type_ + { + FT_SIZE_REQUEST_TYPE_NOMINAL, + FT_SIZE_REQUEST_TYPE_REAL_DIM, + FT_SIZE_REQUEST_TYPE_BBOX, + FT_SIZE_REQUEST_TYPE_CELL, + FT_SIZE_REQUEST_TYPE_SCALES, + + FT_SIZE_REQUEST_TYPE_MAX + + } FT_Size_Request_Type; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_RequestRec */ + /* */ + /* <Description> */ + /* A structure used to model a size request. */ + /* */ + /* <Fields> */ + /* type :: See @FT_Size_Request_Type. */ + /* */ + /* width :: The desired width. */ + /* */ + /* height :: The desired height. */ + /* */ + /* horiResolution :: The horizontal resolution. If set to zero, */ + /* `width' is treated as a 26.6 fractional pixel */ + /* value. */ + /* */ + /* vertResolution :: The vertical resolution. If set to zero, */ + /* `height' is treated as a 26.6 fractional pixel */ + /* value. */ + /* */ + /* <Note> */ + /* If `width' is zero, then the horizontal scaling value is set equal */ + /* to the vertical scaling value, and vice versa. */ + /* */ + typedef struct FT_Size_RequestRec_ + { + FT_Size_Request_Type type; + FT_Long width; + FT_Long height; + FT_UInt horiResolution; + FT_UInt vertResolution; + + } FT_Size_RequestRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_Request */ + /* */ + /* <Description> */ + /* A handle to a size request structure. */ + /* */ + typedef struct FT_Size_RequestRec_ *FT_Size_Request; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Request_Size */ + /* */ + /* <Description> */ + /* Resize the scale of the active @FT_Size object in a face. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* req :: A pointer to a @FT_Size_RequestRec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Although drivers may select the bitmap strike matching the */ + /* request, you should not rely on this if you intend to select a */ + /* particular bitmap strike. Use @FT_Select_Size instead in that */ + /* case. */ + /* */ + /* The relation between the requested size and the resulting glyph */ + /* size is dependent entirely on how the size is defined in the */ + /* source face. The font designer chooses the final size of each */ + /* glyph relative to this size. For more information refer to */ + /* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Request_Size( FT_Face face, + FT_Size_Request req ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Char_Size */ + /* */ + /* <Description> */ + /* This function calls @FT_Request_Size to request the nominal size */ + /* (in points). */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* char_width :: The nominal width, in 26.6 fractional points. */ + /* */ + /* char_height :: The nominal height, in 26.6 fractional points. */ + /* */ + /* horz_resolution :: The horizontal resolution in dpi. */ + /* */ + /* vert_resolution :: The vertical resolution in dpi. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If either the character width or height is zero, it is set equal */ + /* to the other value. */ + /* */ + /* If either the horizontal or vertical resolution is zero, it is set */ + /* equal to the other value. */ + /* */ + /* A character width or height smaller than 1pt is set to 1pt; if */ + /* both resolution values are zero, they are set to 72dpi. */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Char_Size( FT_Face face, + FT_F26Dot6 char_width, + FT_F26Dot6 char_height, + FT_UInt horz_resolution, + FT_UInt vert_resolution ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Pixel_Sizes */ + /* */ + /* <Description> */ + /* This function calls @FT_Request_Size to request the nominal size */ + /* (in pixels). */ + /* */ + /* <InOut> */ + /* face :: A handle to the target face object. */ + /* */ + /* <Input> */ + /* pixel_width :: The nominal width, in pixels. */ + /* */ + /* pixel_height :: The nominal height, in pixels. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You should not rely on the resulting glyphs matching, or being */ + /* constrained, to this pixel size. Refer to @FT_Request_Size to */ + /* understand how requested sizes relate to actual sizes. */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Pixel_Sizes( FT_Face face, + FT_UInt pixel_width, + FT_UInt pixel_height ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Load_Glyph */ + /* */ + /* <Description> */ + /* A function used to load a single glyph into the glyph slot of a */ + /* face object. */ + /* */ + /* <InOut> */ + /* face :: A handle to the target face object where the glyph */ + /* is loaded. */ + /* */ + /* <Input> */ + /* glyph_index :: The index of the glyph in the font file. For */ + /* CID-keyed fonts (either in PS or in CFF format) */ + /* this argument specifies the CID value. */ + /* */ + /* load_flags :: A flag indicating what to load for this glyph. The */ + /* @FT_LOAD_XXX constants can be used to control the */ + /* glyph loading process (e.g., whether the outline */ + /* should be scaled, whether to load bitmaps or not, */ + /* whether to hint the outline, etc). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The loaded glyph may be transformed. See @FT_Set_Transform for */ + /* the details. */ + /* */ + /* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */ + /* returned for invalid CID values (this is, for CID values that */ + /* don't have a corresponding glyph in the font). See the discussion */ + /* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Load_Glyph( FT_Face face, + FT_UInt glyph_index, + FT_Int32 load_flags ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Load_Char */ + /* */ + /* <Description> */ + /* A function used to load a single glyph into the glyph slot of a */ + /* face object, according to its character code. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object where the glyph */ + /* is loaded. */ + /* */ + /* <Input> */ + /* char_code :: The glyph's character code, according to the */ + /* current charmap used in the face. */ + /* */ + /* load_flags :: A flag indicating what to load for this glyph. The */ + /* @FT_LOAD_XXX constants can be used to control the */ + /* glyph loading process (e.g., whether the outline */ + /* should be scaled, whether to load bitmaps or not, */ + /* whether to hint the outline, etc). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Load_Char( FT_Face face, + FT_ULong char_code, + FT_Int32 load_flags ); + + + /************************************************************************* + * + * @enum: + * FT_LOAD_XXX + * + * @description: + * A list of bit-field constants used with @FT_Load_Glyph to indicate + * what kind of operations to perform during glyph loading. + * + * @values: + * FT_LOAD_DEFAULT :: + * Corresponding to~0, this value is used as the default glyph load + * operation. In this case, the following happens: + * + * 1. FreeType looks for a bitmap for the glyph corresponding to the + * face's current size. If one is found, the function returns. + * The bitmap data can be accessed from the glyph slot (see note + * below). + * + * 2. If no embedded bitmap is searched or found, FreeType looks for a + * scalable outline. If one is found, it is loaded from the font + * file, scaled to device pixels, then `hinted' to the pixel grid + * in order to optimize it. The outline data can be accessed from + * the glyph slot (see note below). + * + * Note that by default, the glyph loader doesn't render outlines into + * bitmaps. The following flags are used to modify this default + * behaviour to more specific and useful cases. + * + * FT_LOAD_NO_SCALE :: + * Don't scale the loaded outline glyph but keep it in font units. + * + * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and + * unsets @FT_LOAD_RENDER. + * + * If the font is `tricky' (see @FT_FACE_FLAG_TRICKY for more), using + * FT_LOAD_NO_SCALE usually yields meaningless outlines because the + * subglyphs must be scaled and positioned with hinting instructions. + * This can be solved by loading the font without FT_LOAD_NO_SCALE and + * setting the character size to `font->units_per_EM'. + * + * FT_LOAD_NO_HINTING :: + * Disable hinting. This generally generates `blurrier' bitmap glyphs + * when the glyph are rendered in any of the anti-aliased modes. See + * also the note below. + * + * This flag is implied by @FT_LOAD_NO_SCALE. + * + * FT_LOAD_RENDER :: + * Call @FT_Render_Glyph after the glyph is loaded. By default, the + * glyph is rendered in @FT_RENDER_MODE_NORMAL mode. This can be + * overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME. + * + * This flag is unset by @FT_LOAD_NO_SCALE. + * + * FT_LOAD_NO_BITMAP :: + * Ignore bitmap strikes when loading. Bitmap-only fonts ignore this + * flag. + * + * @FT_LOAD_NO_SCALE always sets this flag. + * + * FT_LOAD_VERTICAL_LAYOUT :: + * Load the glyph for vertical text layout. In particular, the + * `advance' value in the @FT_GlyphSlotRec structure is set to the + * `vertAdvance' value of the `metrics' field. + * + * In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use + * this flag currently. Reason is that in this case vertical metrics + * get synthesized, and those values are not always consistent across + * various font formats. + * + * FT_LOAD_FORCE_AUTOHINT :: + * Indicates that the auto-hinter is preferred over the font's native + * hinter. See also the note below. + * + * FT_LOAD_PEDANTIC :: + * Indicates that the font driver should perform pedantic verifications + * during glyph loading. This is mostly used to detect broken glyphs + * in fonts. By default, FreeType tries to handle broken fonts also. + * + * In particular, errors from the TrueType bytecode engine are not + * passed to the application if this flag is not set; this might + * result in partially hinted or distorted glyphs in case a glyph's + * bytecode is buggy. + * + * FT_LOAD_NO_RECURSE :: + * Indicate that the font driver should not load composite glyphs + * recursively. Instead, it should set the `num_subglyph' and + * `subglyphs' values of the glyph slot accordingly, and set + * `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE. The description of + * subglyphs can then be accessed with @FT_Get_SubGlyph_Info. + * + * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. + * + * FT_LOAD_IGNORE_TRANSFORM :: + * Indicates that the transform matrix set by @FT_Set_Transform should + * be ignored. + * + * FT_LOAD_MONOCHROME :: + * This flag is used with @FT_LOAD_RENDER to indicate that you want to + * render an outline glyph to a 1-bit monochrome bitmap glyph, with + * 8~pixels packed into each byte of the bitmap data. + * + * Note that this has no effect on the hinting algorithm used. You + * should rather use @FT_LOAD_TARGET_MONO so that the + * monochrome-optimized hinting algorithm is used. + * + * FT_LOAD_LINEAR_DESIGN :: + * Indicates that the `linearHoriAdvance' and `linearVertAdvance' + * fields of @FT_GlyphSlotRec should be kept in font units. See + * @FT_GlyphSlotRec for details. + * + * FT_LOAD_NO_AUTOHINT :: + * Disable auto-hinter. See also the note below. + * + * FT_LOAD_COLOR :: + * This flag is used to request loading of color embedded-bitmap + * images. The resulting color bitmaps, if available, will have the + * @FT_PIXEL_MODE_BGRA format. When the flag is not used and color + * bitmaps are found, they will be converted to 256-level gray + * bitmaps transparently. Those bitmaps will be in the + * @FT_PIXEL_MODE_GRAY format. + * + * FT_LOAD_CROP_BITMAP :: + * Ignored. Deprecated. + * + * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: + * Ignored. Deprecated. + * + * @note: + * By default, hinting is enabled and the font's native hinter (see + * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can + * disable hinting by setting @FT_LOAD_NO_HINTING or change the + * precedence by setting @FT_LOAD_FORCE_AUTOHINT. You can also set + * @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be + * used at all. + * + * See the description of @FT_FACE_FLAG_TRICKY for a special exception + * (affecting only a handful of Asian fonts). + * + * Besides deciding which hinter to use, you can also decide which + * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. + * + * Note that the auto-hinter needs a valid Unicode cmap (either a native + * one or synthesized by FreeType) for producing correct results. If a + * font provides an incorrect mapping (for example, assigning the + * character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a + * mathematical integral sign), the auto-hinter might produce useless + * results. + * + */ +#define FT_LOAD_DEFAULT 0x0 +#define FT_LOAD_NO_SCALE ( 1L << 0 ) +#define FT_LOAD_NO_HINTING ( 1L << 1 ) +#define FT_LOAD_RENDER ( 1L << 2 ) +#define FT_LOAD_NO_BITMAP ( 1L << 3 ) +#define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 ) +#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 ) +#define FT_LOAD_CROP_BITMAP ( 1L << 6 ) +#define FT_LOAD_PEDANTIC ( 1L << 7 ) +#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 ) +#define FT_LOAD_NO_RECURSE ( 1L << 10 ) +#define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 ) +#define FT_LOAD_MONOCHROME ( 1L << 12 ) +#define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) +#define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) + /* Bits 16..19 are used by `FT_LOAD_TARGET_' */ +#define FT_LOAD_COLOR ( 1L << 20 ) + + /* */ + + /* used internally only by certain font drivers! */ +#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) +#define FT_LOAD_SBITS_ONLY ( 1L << 14 ) + + + /************************************************************************** + * + * @enum: + * FT_LOAD_TARGET_XXX + * + * @description: + * A list of values that are used to select a specific hinting algorithm + * to use by the hinter. You should OR one of these values to your + * `load_flags' when calling @FT_Load_Glyph. + * + * Note that font's native hinters may ignore the hinting algorithm you + * have specified (e.g., the TrueType bytecode interpreter). You can set + * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used. + * + * Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it + * always implies @FT_LOAD_FORCE_AUTOHINT. + * + * @values: + * FT_LOAD_TARGET_NORMAL :: + * This corresponds to the default hinting algorithm, optimized for + * standard gray-level rendering. For monochrome output, use + * @FT_LOAD_TARGET_MONO instead. + * + * FT_LOAD_TARGET_LIGHT :: + * A lighter hinting algorithm for non-monochrome modes. Many + * generated glyphs are more fuzzy but better resemble its original + * shape. A bit like rendering on Mac OS~X. + * + * As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT. + * + * FT_LOAD_TARGET_MONO :: + * Strong hinting algorithm that should only be used for monochrome + * output. The result is probably unpleasant if the glyph is rendered + * in non-monochrome modes. + * + * FT_LOAD_TARGET_LCD :: + * A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally + * decimated LCD displays. + * + * FT_LOAD_TARGET_LCD_V :: + * A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically + * decimated LCD displays. + * + * @note: + * You should use only _one_ of the FT_LOAD_TARGET_XXX values in your + * `load_flags'. They can't be ORed. + * + * If @FT_LOAD_RENDER is also set, the glyph is rendered in the + * corresponding mode (i.e., the mode that matches the used algorithm + * best). An exeption is FT_LOAD_TARGET_MONO since it implies + * @FT_LOAD_MONOCHROME. + * + * You can use a hinting algorithm that doesn't correspond to the same + * rendering mode. As an example, it is possible to use the `light' + * hinting algorithm and have the results rendered in horizontal LCD + * pixel mode, with code like + * + * { + * FT_Load_Glyph( face, glyph_index, + * load_flags | FT_LOAD_TARGET_LIGHT ); + * + * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD ); + * } + * + */ +#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) + +#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) +#define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) +#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) +#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) +#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ) + + + /************************************************************************** + * + * @macro: + * FT_LOAD_TARGET_MODE + * + * @description: + * Return the @FT_Render_Mode corresponding to a given + * @FT_LOAD_TARGET_XXX value. + * + */ +#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) ) + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Transform */ + /* */ + /* <Description> */ + /* A function used to set the transformation that is applied to glyph */ + /* images when they are loaded into a glyph slot through */ + /* @FT_Load_Glyph. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the transformation's 2x2 matrix. Use~0 for */ + /* the identity matrix. */ + /* delta :: A pointer to the translation vector. Use~0 for the null */ + /* vector. */ + /* */ + /* <Note> */ + /* The transformation is only applied to scalable image formats after */ + /* the glyph has been loaded. It means that hinting is unaltered by */ + /* the transformation and is performed on the character size given in */ + /* the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes. */ + /* */ + /* Note that this also transforms the `face.glyph.advance' field, but */ + /* *not* the values in `face.glyph.metrics'. */ + /* */ + FT_EXPORT( void ) + FT_Set_Transform( FT_Face face, + FT_Matrix* matrix, + FT_Vector* delta ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Render_Mode */ + /* */ + /* <Description> */ + /* An enumeration type that lists the render modes supported by */ + /* FreeType~2. Each mode corresponds to a specific type of scanline */ + /* conversion performed on the outline. */ + /* */ + /* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */ + /* field in the @FT_GlyphSlotRec structure gives the format of the */ + /* returned bitmap. */ + /* */ + /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity. */ + /* */ + /* <Values> */ + /* FT_RENDER_MODE_NORMAL :: */ + /* This is the default render mode; it corresponds to 8-bit */ + /* anti-aliased bitmaps. */ + /* */ + /* FT_RENDER_MODE_LIGHT :: */ + /* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */ + /* defined as a separate value because render modes are also used */ + /* indirectly to define hinting algorithm selectors. See */ + /* @FT_LOAD_TARGET_XXX for details. */ + /* */ + /* FT_RENDER_MODE_MONO :: */ + /* This mode corresponds to 1-bit bitmaps (with 2~levels of */ + /* opacity). */ + /* */ + /* FT_RENDER_MODE_LCD :: */ + /* This mode corresponds to horizontal RGB and BGR sub-pixel */ + /* displays like LCD screens. It produces 8-bit bitmaps that are */ + /* 3~times the width of the original glyph outline in pixels, and */ + /* which use the @FT_PIXEL_MODE_LCD mode. */ + /* */ + /* FT_RENDER_MODE_LCD_V :: */ + /* This mode corresponds to vertical RGB and BGR sub-pixel displays */ + /* (like PDA screens, rotated LCD displays, etc.). It produces */ + /* 8-bit bitmaps that are 3~times the height of the original */ + /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */ + /* */ + /* <Note> */ + /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */ + /* filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */ + /* (not active in the default builds). It is up to the caller to */ + /* either call @FT_Library_SetLcdFilter (if available) or do the */ + /* filtering itself. */ + /* */ + /* The selected render mode only affects vector glyphs of a font. */ + /* Embedded bitmaps often have a different pixel mode like */ + /* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform */ + /* them into 8-bit pixmaps. */ + /* */ + typedef enum FT_Render_Mode_ + { + FT_RENDER_MODE_NORMAL = 0, + FT_RENDER_MODE_LIGHT, + FT_RENDER_MODE_MONO, + FT_RENDER_MODE_LCD, + FT_RENDER_MODE_LCD_V, + + FT_RENDER_MODE_MAX + + } FT_Render_Mode; + + + /* these constants are deprecated; use the corresponding */ + /* `FT_Render_Mode' values instead */ +#define ft_render_mode_normal FT_RENDER_MODE_NORMAL +#define ft_render_mode_mono FT_RENDER_MODE_MONO + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Render_Glyph */ + /* */ + /* <Description> */ + /* Convert a given glyph image to a bitmap. It does so by inspecting */ + /* the glyph image format, finding the relevant renderer, and */ + /* invoking it. */ + /* */ + /* <InOut> */ + /* slot :: A handle to the glyph slot containing the image to */ + /* convert. */ + /* */ + /* <Input> */ + /* render_mode :: This is the render mode used to render the glyph */ + /* image into a bitmap. See @FT_Render_Mode for a */ + /* list of possible values. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* To get meaningful results, font scaling values must be set with */ + /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Render_Glyph( FT_GlyphSlot slot, + FT_Render_Mode render_mode ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Kerning_Mode */ + /* */ + /* <Description> */ + /* An enumeration used to specify which kerning values to return in */ + /* @FT_Get_Kerning. */ + /* */ + /* <Values> */ + /* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */ + /* distances (value is~0). */ + /* */ + /* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */ + /* distances. */ + /* */ + /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */ + /* units. */ + /* */ + typedef enum FT_Kerning_Mode_ + { + FT_KERNING_DEFAULT = 0, + FT_KERNING_UNFITTED, + FT_KERNING_UNSCALED + + } FT_Kerning_Mode; + + + /* these constants are deprecated; use the corresponding */ + /* `FT_Kerning_Mode' values instead */ +#define ft_kerning_default FT_KERNING_DEFAULT +#define ft_kerning_unfitted FT_KERNING_UNFITTED +#define ft_kerning_unscaled FT_KERNING_UNSCALED + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Kerning */ + /* */ + /* <Description> */ + /* Return the kerning vector between two glyphs of a same face. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* left_glyph :: The index of the left glyph in the kern pair. */ + /* */ + /* right_glyph :: The index of the right glyph in the kern pair. */ + /* */ + /* kern_mode :: See @FT_Kerning_Mode for more information. */ + /* Determines the scale and dimension of the returned */ + /* kerning vector. */ + /* */ + /* <Output> */ + /* akerning :: The kerning vector. This is either in font units */ + /* or in pixels (26.6 format) for scalable formats, */ + /* and in pixels for fixed-sizes formats. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Only horizontal layouts (left-to-right & right-to-left) are */ + /* supported by this method. Other layouts, or more sophisticated */ + /* kernings, are out of the scope of this API function -- they can be */ + /* implemented through format-specific interfaces. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Kerning( FT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph, + FT_UInt kern_mode, + FT_Vector *akerning ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Track_Kerning */ + /* */ + /* <Description> */ + /* Return the track kerning for a given face object at a given size. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* point_size :: The point size in 16.16 fractional points. */ + /* */ + /* degree :: The degree of tightness. Increasingly negative */ + /* values represent tighter track kerning, while */ + /* increasingly positive values represent looser track */ + /* kerning. Value zero means no track kerning. */ + /* */ + /* <Output> */ + /* akerning :: The kerning in 16.16 fractional points, to be */ + /* uniformly applied between all glyphs. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Currently, only the Type~1 font driver supports track kerning, */ + /* using data from AFM files (if attached with @FT_Attach_File or */ + /* @FT_Attach_Stream). */ + /* */ + /* Only very few AFM files come with track kerning data; please refer */ + /* to the Adobe's AFM specification for more details. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Track_Kerning( FT_Face face, + FT_Fixed point_size, + FT_Int degree, + FT_Fixed* akerning ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Glyph_Name */ + /* */ + /* <Description> */ + /* Retrieve the ASCII name of a given glyph in a face. This only */ + /* works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* glyph_index :: The glyph index. */ + /* */ + /* buffer_max :: The maximum number of bytes available in the */ + /* buffer. */ + /* */ + /* <Output> */ + /* buffer :: A pointer to a target buffer where the name is */ + /* copied to. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* An error is returned if the face doesn't provide glyph names or if */ + /* the glyph index is invalid. In all cases of failure, the first */ + /* byte of `buffer' is set to~0 to indicate an empty name. */ + /* */ + /* The glyph name is truncated to fit within the buffer if it is too */ + /* long. The returned string is always zero-terminated. */ + /* */ + /* Be aware that FreeType reorders glyph indices internally so that */ + /* glyph index~0 always corresponds to the `missing glyph' (called */ + /* `.notdef'). */ + /* */ + /* This function always returns an error if the config macro */ + /* `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is not defined in `ftoptions.h'. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Glyph_Name( FT_Face face, + FT_UInt glyph_index, + FT_Pointer buffer, + FT_UInt buffer_max ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Postscript_Name */ + /* */ + /* <Description> */ + /* Retrieve the ASCII PostScript name of a given face, if available. */ + /* This only works with PostScript and TrueType fonts. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Return> */ + /* A pointer to the face's PostScript name. NULL if unavailable. */ + /* */ + /* <Note> */ + /* The returned pointer is owned by the face and is destroyed with */ + /* it. */ + /* */ + FT_EXPORT( const char* ) + FT_Get_Postscript_Name( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Select_Charmap */ + /* */ + /* <Description> */ + /* Select a given charmap by its encoding tag (as listed in */ + /* `freetype.h'). */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* encoding :: A handle to the selected encoding. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function returns an error if no charmap in the face */ + /* corresponds to the encoding queried here. */ + /* */ + /* Because many fonts contain more than a single cmap for Unicode */ + /* encoding, this function has some special code to select the one */ + /* that covers Unicode best (`best' in the sense that a UCS-4 cmap is */ + /* preferred to a UCS-2 cmap). It is thus preferable to */ + /* @FT_Set_Charmap in this case. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Select_Charmap( FT_Face face, + FT_Encoding encoding ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Charmap */ + /* */ + /* <Description> */ + /* Select a given charmap for character code to glyph index mapping. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* charmap :: A handle to the selected charmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function returns an error if the charmap is not part of */ + /* the face (i.e., if it is not listed in the `face->charmaps' */ + /* table). */ + /* */ + /* It also fails if a type~14 charmap is selected. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Charmap( FT_Face face, + FT_CharMap charmap ); + + + /************************************************************************* + * + * @function: + * FT_Get_Charmap_Index + * + * @description: + * Retrieve index of a given charmap. + * + * @input: + * charmap :: + * A handle to a charmap. + * + * @return: + * The index into the array of character maps within the face to which + * `charmap' belongs. If an error occurs, -1 is returned. + * + */ + FT_EXPORT( FT_Int ) + FT_Get_Charmap_Index( FT_CharMap charmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Char_Index */ + /* */ + /* <Description> */ + /* Return the glyph index of a given character code. This function */ + /* uses a charmap object to do the mapping. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* charcode :: The character code. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means `undefined character code'. */ + /* */ + /* <Note> */ + /* If you use FreeType to manipulate the contents of font files */ + /* directly, be aware that the glyph index returned by this function */ + /* doesn't always correspond to the internal indices used within the */ + /* file. This is done to ensure that value~0 always corresponds to */ + /* the `missing glyph'. If the first glyph is not named `.notdef', */ + /* then for Type~1 and Type~42 fonts, `.notdef' will be moved into */ + /* the glyph ID~0 position, and whatever was there will be moved to */ + /* the position `.notdef' had. For Type~1 fonts, if there is no */ + /* `.notdef' glyph at all, then one will be created at index~0 and */ + /* whatever was there will be moved to the last index -- Type~42 */ + /* fonts are considered invalid under this condition. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Char_Index( FT_Face face, + FT_ULong charcode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_First_Char */ + /* */ + /* <Description> */ + /* This function is used to return the first character code in the */ + /* current charmap of a given face. It also returns the */ + /* corresponding glyph index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Output> */ + /* agindex :: Glyph index of first character code. 0~if charmap is */ + /* empty. */ + /* */ + /* <Return> */ + /* The charmap's first character code. */ + /* */ + /* <Note> */ + /* You should use this function with @FT_Get_Next_Char to be able to */ + /* parse all character codes available in a given charmap. The code */ + /* should look like this: */ + /* */ + /* { */ + /* FT_ULong charcode; */ + /* FT_UInt gindex; */ + /* */ + /* */ + /* charcode = FT_Get_First_Char( face, &gindex ); */ + /* while ( gindex != 0 ) */ + /* { */ + /* ... do something with (charcode,gindex) pair ... */ + /* */ + /* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */ + /* } */ + /* } */ + /* */ + /* Note that `*agindex' is set to~0 if the charmap is empty. The */ + /* result itself can be~0 in two cases: if the charmap is empty or */ + /* if the value~0 is the first valid character code. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_First_Char( FT_Face face, + FT_UInt *agindex ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Next_Char */ + /* */ + /* <Description> */ + /* This function is used to return the next character code in the */ + /* current charmap of a given face following the value `char_code', */ + /* as well as the corresponding glyph index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* char_code :: The starting character code. */ + /* */ + /* <Output> */ + /* agindex :: Glyph index of next character code. 0~if charmap */ + /* is empty. */ + /* */ + /* <Return> */ + /* The charmap's next character code. */ + /* */ + /* <Note> */ + /* You should use this function with @FT_Get_First_Char to walk */ + /* over all character codes available in a given charmap. See the */ + /* note for this function for a simple code example. */ + /* */ + /* Note that `*agindex' is set to~0 when there are no more codes in */ + /* the charmap. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_Next_Char( FT_Face face, + FT_ULong char_code, + FT_UInt *agindex ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Name_Index */ + /* */ + /* <Description> */ + /* Return the glyph index of a given glyph name. This function uses */ + /* driver specific objects to do the translation. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* glyph_name :: The glyph name. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means `undefined character code'. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Name_Index( FT_Face face, + FT_String* glyph_name ); + + + /************************************************************************* + * + * @macro: + * FT_SUBGLYPH_FLAG_XXX + * + * @description: + * A list of constants used to describe subglyphs. Please refer to the + * TrueType specification for the meaning of the various flags. + * + * @values: + * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: + * FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES :: + * FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID :: + * FT_SUBGLYPH_FLAG_SCALE :: + * FT_SUBGLYPH_FLAG_XY_SCALE :: + * FT_SUBGLYPH_FLAG_2X2 :: + * FT_SUBGLYPH_FLAG_USE_MY_METRICS :: + * + */ +#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 +#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 +#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 +#define FT_SUBGLYPH_FLAG_SCALE 8 +#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 +#define FT_SUBGLYPH_FLAG_2X2 0x80 +#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 + + + /************************************************************************* + * + * @func: + * FT_Get_SubGlyph_Info + * + * @description: + * Retrieve a description of a given subglyph. Only use it if + * `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is + * returned otherwise. + * + * @input: + * glyph :: + * The source glyph slot. + * + * sub_index :: + * The index of the subglyph. Must be less than + * `glyph->num_subglyphs'. + * + * @output: + * p_index :: + * The glyph index of the subglyph. + * + * p_flags :: + * The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX. + * + * p_arg1 :: + * The subglyph's first argument (if any). + * + * p_arg2 :: + * The subglyph's second argument (if any). + * + * p_transform :: + * The subglyph transformation (if any). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The values of `*p_arg1', `*p_arg2', and `*p_transform' must be + * interpreted depending on the flags returned in `*p_flags'. See the + * TrueType specification for details. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_SubGlyph_Info( FT_GlyphSlot glyph, + FT_UInt sub_index, + FT_Int *p_index, + FT_UInt *p_flags, + FT_Int *p_arg1, + FT_Int *p_arg2, + FT_Matrix *p_transform ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_FSTYPE_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the `fsType' field of the OS/2 table */ + /* in a TrueType or OpenType font and the `FSType' entry in a */ + /* PostScript font. These bit flags are returned by */ + /* @FT_Get_FSType_Flags; they inform client applications of embedding */ + /* and subsetting restrictions associated with a font. */ + /* */ + /* See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for */ + /* more details. */ + /* */ + /* <Values> */ + /* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */ + /* Fonts with no fsType bit set may be embedded and permanently */ + /* installed on the remote system by an application. */ + /* */ + /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */ + /* Fonts that have only this bit set must not be modified, embedded */ + /* or exchanged in any manner without first obtaining permission of */ + /* the font software copyright owner. */ + /* */ + /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */ + /* If this bit is set, the font may be embedded and temporarily */ + /* loaded on the remote system. Documents containing Preview & */ + /* Print fonts must be opened `read-only'; no edits can be applied */ + /* to the document. */ + /* */ + /* FT_FSTYPE_EDITABLE_EMBEDDING :: */ + /* If this bit is set, the font may be embedded but must only be */ + /* installed temporarily on other systems. In contrast to Preview */ + /* & Print fonts, documents containing editable fonts may be opened */ + /* for reading, editing is permitted, and changes may be saved. */ + /* */ + /* FT_FSTYPE_NO_SUBSETTING :: */ + /* If this bit is set, the font may not be subsetted prior to */ + /* embedding. */ + /* */ + /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ + /* If this bit is set, only bitmaps contained in the font may be */ + /* embedded; no outline data may be embedded. If there are no */ + /* bitmaps available in the font, then the font is unembeddable. */ + /* */ + /* <Note> */ + /* While the fsType flags can indicate that a font may be embedded, a */ + /* license with the font vendor may be separately required to use the */ + /* font in this way. */ + /* */ +#define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 +#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 +#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004 +#define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008 +#define FT_FSTYPE_NO_SUBSETTING 0x0100 +#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_FSType_Flags */ + /* */ + /* <Description> */ + /* Return the fsType flags for a font. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Return> */ + /* The fsType flags, @FT_FSTYPE_XXX. */ + /* */ + /* <Note> */ + /* Use this function rather than directly reading the `fs_type' field */ + /* in the @PS_FontInfoRec structure, which is only guaranteed to */ + /* return the correct results for Type~1 fonts. */ + /* */ + /* <Since> */ + /* 2.3.8 */ + /* */ + FT_EXPORT( FT_UShort ) + FT_Get_FSType_Flags( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* glyph_variants */ + /* */ + /* <Title> */ + /* Glyph Variants */ + /* */ + /* <Abstract> */ + /* The FreeType~2 interface to Unicode Ideographic Variation */ + /* Sequences (IVS), using the SFNT cmap format~14. */ + /* */ + /* <Description> */ + /* Many CJK characters have variant forms. They are a sort of grey */ + /* area somewhere between being totally irrelevant and semantically */ + /* distinct; for this reason, the Unicode consortium decided to */ + /* introduce Ideographic Variation Sequences (IVS), consisting of a */ + /* Unicode base character and one of 240 variant selectors */ + /* (U+E0100-U+E01EF), instead of further extending the already huge */ + /* code range for CJK characters. */ + /* */ + /* An IVS is registered and unique; for further details please refer */ + /* to Unicode Technical Standard #37, the Ideographic Variation */ + /* Database: */ + /* */ + /* http://www.unicode.org/reports/tr37/ */ + /* */ + /* To date (November 2014), the character with the most variants is */ + /* U+9089, having 32 such IVS. */ + /* */ + /* Adobe and MS decided to support IVS with a new cmap subtable */ + /* (format~14). It is an odd subtable because it is not a mapping of */ + /* input code points to glyphs, but contains lists of all variants */ + /* supported by the font. */ + /* */ + /* A variant may be either `default' or `non-default'. A default */ + /* variant is the one you will get for that code point if you look it */ + /* up in the standard Unicode cmap. A non-default variant is a */ + /* different glyph. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharVariantIndex */ + /* */ + /* <Description> */ + /* Return the glyph index of a given character code as modified by */ + /* the variation selector. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character code point in Unicode. */ + /* */ + /* variantSelector :: */ + /* The Unicode code point of the variation selector. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means either `undefined character code', or */ + /* `undefined selector code', or `no variation selector cmap */ + /* subtable', or `current CharMap is not Unicode'. */ + /* */ + /* <Note> */ + /* If you use FreeType to manipulate the contents of font files */ + /* directly, be aware that the glyph index returned by this function */ + /* doesn't always correspond to the internal indices used within */ + /* the file. This is done to ensure that value~0 always corresponds */ + /* to the `missing glyph'. */ + /* */ + /* This function is only meaningful if */ + /* a) the font has a variation selector cmap sub table, */ + /* and */ + /* b) the current charmap has a Unicode encoding. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Face_GetCharVariantIndex( FT_Face face, + FT_ULong charcode, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharVariantIsDefault */ + /* */ + /* <Description> */ + /* Check whether this variant of this Unicode character is the one to */ + /* be found in the `cmap'. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character codepoint in Unicode. */ + /* */ + /* variantSelector :: */ + /* The Unicode codepoint of the variation selector. */ + /* */ + /* <Return> */ + /* 1~if found in the standard (Unicode) cmap, 0~if found in the */ + /* variation selector cmap, or -1 if it is not a variant. */ + /* */ + /* <Note> */ + /* This function is only meaningful if the font has a variation */ + /* selector cmap subtable. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_Int ) + FT_Face_GetCharVariantIsDefault( FT_Face face, + FT_ULong charcode, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetVariantSelectors */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode variant selectors found */ + /* in the font. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* <Return> */ + /* A pointer to an array of selector code points, or NULL if there is */ + /* no valid variant selector cmap subtable. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetVariantSelectors( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetVariantsOfChar */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode variant selectors found */ + /* for the specified character code. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character codepoint in Unicode. */ + /* */ + /* <Return> */ + /* A pointer to an array of variant selector code points that are */ + /* active for the given character, or NULL if the corresponding list */ + /* is empty. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetVariantsOfChar( FT_Face face, + FT_ULong charcode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharsOfVariant */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode character codes found for */ + /* the specified variant selector. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* variantSelector :: */ + /* The variant selector code point in Unicode. */ + /* */ + /* <Return> */ + /* A list of all the code points that are specified by this selector */ + /* (both default and non-default codes are returned) or NULL if there */ + /* is no valid cmap or the variant selector is invalid. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetCharsOfVariant( FT_Face face, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /* <Title> */ + /* Computations */ + /* */ + /* <Abstract> */ + /* Crunching fixed numbers and vectors. */ + /* */ + /* <Description> */ + /* This section contains various functions used to perform */ + /* computations on 16.16 fixed-float numbers or 2d vectors. */ + /* */ + /* <Order> */ + /* FT_MulDiv */ + /* FT_MulFix */ + /* FT_DivFix */ + /* FT_RoundFix */ + /* FT_CeilFix */ + /* FT_FloorFix */ + /* FT_Vector_Transform */ + /* FT_Matrix_Multiply */ + /* FT_Matrix_Invert */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulDiv */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation `(a*b)/c' */ + /* with maximum accuracy (it uses a 64-bit intermediate integer */ + /* whenever necessary). */ + /* */ + /* This function isn't necessarily as fast as some processor specific */ + /* operations, but is at least completely portable. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. */ + /* c :: The divisor. */ + /* */ + /* <Return> */ + /* The result of `(a*b)/c'. This function never traps when trying to */ + /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ + /* on the signs of `a' and `b'. */ + /* */ + FT_EXPORT( FT_Long ) + FT_MulDiv( FT_Long a, + FT_Long b, + FT_Long c ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulFix */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation */ + /* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */ + /* used to multiply a given value by a 16.16 fixed-point factor. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. Use a 16.16 factor here whenever */ + /* possible (see note below). */ + /* */ + /* <Return> */ + /* The result of `(a*b)/0x10000'. */ + /* */ + /* <Note> */ + /* This function has been optimized for the case where the absolute */ + /* value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */ + /* As this happens mainly when scaling from notional units to */ + /* fractional pixels in FreeType, it resulted in noticeable speed */ + /* improvements between versions 2.x and 1.x. */ + /* */ + /* As a conclusion, always try to place a 16.16 factor as the */ + /* _second_ argument of this function; this can make a great */ + /* difference. */ + /* */ + FT_EXPORT( FT_Long ) + FT_MulFix( FT_Long a, + FT_Long b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_DivFix */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation */ + /* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */ + /* used to divide a given value by a 16.16 fixed-point factor. */ + /* */ + /* <Input> */ + /* a :: The numerator. */ + /* b :: The denominator. Use a 16.16 factor here. */ + /* */ + /* <Return> */ + /* The result of `(a*0x10000)/b'. */ + /* */ + FT_EXPORT( FT_Long ) + FT_DivFix( FT_Long a, + FT_Long b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_RoundFix */ + /* */ + /* <Description> */ + /* A very simple function used to round a 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number to be rounded. */ + /* */ + /* <Return> */ + /* The result of `(a + 0x8000) & -0x10000'. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_RoundFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_CeilFix */ + /* */ + /* <Description> */ + /* A very simple function used to compute the ceiling function of a */ + /* 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number for which the ceiling function is to be computed. */ + /* */ + /* <Return> */ + /* The result of `(a + 0x10000 - 1) & -0x10000'. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_CeilFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_FloorFix */ + /* */ + /* <Description> */ + /* A very simple function used to compute the floor function of a */ + /* 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number for which the floor function is to be computed. */ + /* */ + /* <Return> */ + /* The result of `a & -0x10000'. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_FloorFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Vector_Transform */ + /* */ + /* <Description> */ + /* Transform a single vector through a 2x2 matrix. */ + /* */ + /* <InOut> */ + /* vector :: The target vector to transform. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the source 2x2 matrix. */ + /* */ + /* <Note> */ + /* The result is undefined if either `vector' or `matrix' is invalid. */ + /* */ + FT_EXPORT( void ) + FT_Vector_Transform( FT_Vector* vec, + const FT_Matrix* matrix ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* version */ + /* */ + /* <Title> */ + /* FreeType Version */ + /* */ + /* <Abstract> */ + /* Functions and macros related to FreeType versions. */ + /* */ + /* <Description> */ + /* Note that those functions and macros are of limited use because */ + /* even a new release of FreeType with only documentation changes */ + /* increases the version number. */ + /* */ + /* <Order> */ + /* FT_Library_Version */ + /* */ + /* FREETYPE_MAJOR */ + /* FREETYPE_MINOR */ + /* FREETYPE_PATCH */ + /* */ + /* FT_Face_CheckTrueTypePatents */ + /* FT_Face_SetUnpatentedHinting */ + /* */ + /* FREETYPE_XXX */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @enum: + * FREETYPE_XXX + * + * @description: + * These three macros identify the FreeType source code version. + * Use @FT_Library_Version to access them at runtime. + * + * @values: + * FREETYPE_MAJOR :: The major version number. + * FREETYPE_MINOR :: The minor version number. + * FREETYPE_PATCH :: The patch level. + * + * @note: + * The version number of FreeType if built as a dynamic link library + * with the `libtool' package is _not_ controlled by these three + * macros. + * + */ +#define FREETYPE_MAJOR 2 +#define FREETYPE_MINOR 5 +#define FREETYPE_PATCH 5 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Library_Version */ + /* */ + /* <Description> */ + /* Return the version of the FreeType library being used. This is */ + /* useful when dynamically linking to the library, since one cannot */ + /* use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and */ + /* @FREETYPE_PATCH. */ + /* */ + /* <Input> */ + /* library :: A source library handle. */ + /* */ + /* <Output> */ + /* amajor :: The major version number. */ + /* */ + /* aminor :: The minor version number. */ + /* */ + /* apatch :: The patch version number. */ + /* */ + /* <Note> */ + /* The reason why this function takes a `library' argument is because */ + /* certain programs implement library initialization in a custom way */ + /* that doesn't use @FT_Init_FreeType. */ + /* */ + /* In such cases, the library version might not be available before */ + /* the library object has been created. */ + /* */ + FT_EXPORT( void ) + FT_Library_Version( FT_Library library, + FT_Int *amajor, + FT_Int *aminor, + FT_Int *apatch ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_CheckTrueTypePatents */ + /* */ + /* <Description> */ + /* Parse all bytecode instructions of a TrueType font file to check */ + /* whether any of the patented opcodes are used. This is only useful */ + /* if you want to be able to use the unpatented hinter with */ + /* fonts that do *not* use these opcodes. */ + /* */ + /* Note that this function parses *all* glyph instructions in the */ + /* font file, which may be slow. */ + /* */ + /* <Input> */ + /* face :: A face handle. */ + /* */ + /* <Return> */ + /* 1~if this is a TrueType font that uses one of the patented */ + /* opcodes, 0~otherwise. */ + /* */ + /* <Note> */ + /* Since May 2010, TrueType hinting is no longer patented. */ + /* */ + /* <Since> */ + /* 2.3.5 */ + /* */ + FT_EXPORT( FT_Bool ) + FT_Face_CheckTrueTypePatents( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_SetUnpatentedHinting */ + /* */ + /* <Description> */ + /* Enable or disable the unpatented hinter for a given face. */ + /* Only enable it if you have determined that the face doesn't */ + /* use any patented opcodes (see @FT_Face_CheckTrueTypePatents). */ + /* */ + /* <Input> */ + /* face :: A face handle. */ + /* */ + /* value :: New boolean setting. */ + /* */ + /* <Return> */ + /* The old setting value. This will always be false if this is not */ + /* an SFNT font, or if the unpatented hinter is not compiled in this */ + /* instance of the library. */ + /* */ + /* <Note> */ + /* Since May 2010, TrueType hinting is no longer patented. */ + /* */ + /* <Since> */ + /* 2.3.5 */ + /* */ + FT_EXPORT( FT_Bool ) + FT_Face_SetUnpatentedHinting( FT_Face face, + FT_Bool value ); + + /* */ + + +FT_END_HEADER + +#endif /* __FREETYPE_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ft2build.h b/freetype2/include/ohos/freetype2/ft2build.h new file mode 100644 index 0000000000..6f8eb7f373 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ft2build.h @@ -0,0 +1,42 @@ +/***************************************************************************/ +/* */ +/* ft2build.h */ +/* */ +/* FreeType 2 build and setup macros. */ +/* */ +/* Copyright 1996-2001, 2006, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This is the `entry point' for FreeType header file inclusions. It is */ + /* the only header file which should be included directly; all other */ + /* FreeType header files should be accessed with macro names (after */ + /* including `ft2build.h'). */ + /* */ + /* A typical example is */ + /* */ + /* #include <ft2build.h> */ + /* #include FT_FREETYPE_H */ + /* */ + /*************************************************************************/ + + +#ifndef __FT2BUILD_H__ +#define __FT2BUILD_H__ + +#include <config/ftheader.h> + +#endif /* __FT2BUILD_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftadvanc.h b/freetype2/include/ohos/freetype2/ftadvanc.h new file mode 100644 index 0000000000..955f93fa16 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftadvanc.h @@ -0,0 +1,187 @@ +/***************************************************************************/ +/* */ +/* ftadvanc.h */ +/* */ +/* Quick computation of advance widths (specification only). */ +/* */ +/* Copyright 2008, 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTADVANC_H__ +#define __FTADVANC_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * quick_advance + * + * @title: + * Quick retrieval of advance values + * + * @abstract: + * Retrieve horizontal and vertical advance values without processing + * glyph outlines, if possible. + * + * @description: + * This section contains functions to quickly extract advance values + * without handling glyph outlines, if possible. + * + * @order: + * FT_Get_Advance + * FT_Get_Advances + * + */ + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* FT_ADVANCE_FLAG_FAST_ONLY */ + /* */ + /* <Description> */ + /* A bit-flag to be OR-ed with the `flags' parameter of the */ + /* @FT_Get_Advance and @FT_Get_Advances functions. */ + /* */ + /* If set, it indicates that you want these functions to fail if the */ + /* corresponding hinting mode or font driver doesn't allow for very */ + /* quick advance computation. */ + /* */ + /* Typically, glyphs that are either unscaled, unhinted, bitmapped, */ + /* or light-hinted can have their advance width computed very */ + /* quickly. */ + /* */ + /* Normal and bytecode hinted modes that require loading, scaling, */ + /* and hinting of the glyph outline, are extremely slow by */ + /* comparison. */ + /* */ +#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000UL + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Advance */ + /* */ + /* <Description> */ + /* Retrieve the advance value of a given glyph outline in an */ + /* @FT_Face. */ + /* */ + /* <Input> */ + /* face :: The source @FT_Face handle. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* load_flags :: A set of bit flags similar to those used when */ + /* calling @FT_Load_Glyph, used to determine what kind */ + /* of advances you need. */ + /* <Output> */ + /* padvance :: The advance value. If scaling is performed (based on */ + /* the value of `load_flags'), the advance value is in */ + /* 16.16 format. Otherwise, it is in font units. */ + /* */ + /* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */ + /* vertical advance corresponding to a vertical layout. */ + /* Otherwise, it is the horizontal advance in a */ + /* horizontal layout. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ + /* if the corresponding font backend doesn't have a quick way to */ + /* retrieve the advances. */ + /* */ + /* A scaled advance is returned in 16.16 format but isn't transformed */ + /* by the affine transformation specified by @FT_Set_Transform. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Advance( FT_Face face, + FT_UInt gindex, + FT_Int32 load_flags, + FT_Fixed *padvance ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Advances */ + /* */ + /* <Description> */ + /* Retrieve the advance values of several glyph outlines in an */ + /* @FT_Face. */ + /* */ + /* <Input> */ + /* face :: The source @FT_Face handle. */ + /* */ + /* start :: The first glyph index. */ + /* */ + /* count :: The number of advance values you want to retrieve. */ + /* */ + /* load_flags :: A set of bit flags similar to those used when */ + /* calling @FT_Load_Glyph. */ + /* */ + /* <Output> */ + /* padvance :: The advance values. This array, to be provided by the */ + /* caller, must contain at least `count' elements. */ + /* */ + /* If scaling is performed (based on the value of */ + /* `load_flags'), the advance values are in 16.16 format. */ + /* Otherwise, they are in font units. */ + /* */ + /* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */ + /* vertical advances corresponding to a vertical layout. */ + /* Otherwise, they are the horizontal advances in a */ + /* horizontal layout. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ + /* if the corresponding font backend doesn't have a quick way to */ + /* retrieve the advances. */ + /* */ + /* Scaled advances are returned in 16.16 format but aren't */ + /* transformed by the affine transformation specified by */ + /* @FT_Set_Transform. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Advances( FT_Face face, + FT_UInt start, + FT_UInt count, + FT_Int32 load_flags, + FT_Fixed *padvances ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTADVANC_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftautoh.h b/freetype2/include/ohos/freetype2/ftautoh.h new file mode 100644 index 0000000000..59191abbfe --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftautoh.h @@ -0,0 +1,402 @@ +/***************************************************************************/ +/* */ +/* ftautoh.h */ +/* */ +/* FreeType API for controlling the auto-hinter (specification only). */ +/* */ +/* Copyright 2012, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTAUTOH_H__ +#define __FTAUTOH_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * auto_hinter + * + * @title: + * The auto-hinter + * + * @abstract: + * Controlling the auto-hinting module. + * + * @description: + * While FreeType's auto-hinter doesn't expose API functions by itself, + * it is possible to control its behaviour with @FT_Property_Set and + * @FT_Property_Get. The following lists the available properties + * together with the necessary macros and structures. + * + * Note that the auto-hinter's module name is `autofitter' for + * historical reasons. + * + */ + + + /************************************************************************** + * + * @property: + * glyph-to-script-map + * + * @description: + * *Experimental* *only* + * + * The auto-hinter provides various script modules to hint glyphs. + * Examples of supported scripts are Latin or CJK. Before a glyph is + * auto-hinted, the Unicode character map of the font gets examined, and + * the script is then determined based on Unicode character ranges, see + * below. + * + * OpenType fonts, however, often provide much more glyphs than + * character codes (small caps, superscripts, ligatures, swashes, etc.), + * to be controlled by so-called `features'. Handling OpenType features + * can be quite complicated and thus needs a separate library on top of + * FreeType. + * + * The mapping between glyph indices and scripts (in the auto-hinter + * sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an + * array with `num_glyphs' elements, as found in the font's @FT_Face + * structure. The `glyph-to-script-map' property returns a pointer to + * this array, which can be modified as needed. Note that the + * modification should happen before the first glyph gets processed by + * the auto-hinter so that the global analysis of the font shapes + * actually uses the modified mapping. + * + * The following example code demonstrates how to access it (omitting + * the error handling). + * + * { + * FT_Library library; + * FT_Face face; + * FT_Prop_GlyphToScriptMap prop; + * + * + * FT_Init_FreeType( &library ); + * FT_New_Face( library, "foo.ttf", 0, &face ); + * + * prop.face = face; + * + * FT_Property_Get( library, "autofitter", + * "glyph-to-script-map", &prop ); + * + * // adjust `prop.map' as needed right here + * + * FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT ); + * } + * + */ + + + /************************************************************************** + * + * @enum: + * FT_AUTOHINTER_SCRIPT_XXX + * + * @description: + * *Experimental* *only* + * + * A list of constants used for the @glyph-to-script-map property to + * specify the script submodule the auto-hinter should use for hinting a + * particular glyph. + * + * @values: + * FT_AUTOHINTER_SCRIPT_NONE :: + * Don't auto-hint this glyph. + * + * FT_AUTOHINTER_SCRIPT_LATIN :: + * Apply the latin auto-hinter. For the auto-hinter, `latin' is a + * very broad term, including Cyrillic and Greek also since characters + * from those scripts share the same design constraints. + * + * By default, characters from the following Unicode ranges are + * assigned to this submodule. + * + * { + * U+0020 - U+007F // Basic Latin (no control characters) + * U+00A0 - U+00FF // Latin-1 Supplement (no control characters) + * U+0100 - U+017F // Latin Extended-A + * U+0180 - U+024F // Latin Extended-B + * U+0250 - U+02AF // IPA Extensions + * U+02B0 - U+02FF // Spacing Modifier Letters + * U+0300 - U+036F // Combining Diacritical Marks + * U+0370 - U+03FF // Greek and Coptic + * U+0400 - U+04FF // Cyrillic + * U+0500 - U+052F // Cyrillic Supplement + * U+1D00 - U+1D7F // Phonetic Extensions + * U+1D80 - U+1DBF // Phonetic Extensions Supplement + * U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement + * U+1E00 - U+1EFF // Latin Extended Additional + * U+1F00 - U+1FFF // Greek Extended + * U+2000 - U+206F // General Punctuation + * U+2070 - U+209F // Superscripts and Subscripts + * U+20A0 - U+20CF // Currency Symbols + * U+2150 - U+218F // Number Forms + * U+2460 - U+24FF // Enclosed Alphanumerics + * U+2C60 - U+2C7F // Latin Extended-C + * U+2DE0 - U+2DFF // Cyrillic Extended-A + * U+2E00 - U+2E7F // Supplemental Punctuation + * U+A640 - U+A69F // Cyrillic Extended-B + * U+A720 - U+A7FF // Latin Extended-D + * U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures) + * U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols + * U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement + * } + * + * FT_AUTOHINTER_SCRIPT_CJK :: + * Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old + * Vietnamese, and some other scripts. + * + * By default, characters from the following Unicode ranges are + * assigned to this submodule. + * + * { + * U+1100 - U+11FF // Hangul Jamo + * U+2E80 - U+2EFF // CJK Radicals Supplement + * U+2F00 - U+2FDF // Kangxi Radicals + * U+2FF0 - U+2FFF // Ideographic Description Characters + * U+3000 - U+303F // CJK Symbols and Punctuation + * U+3040 - U+309F // Hiragana + * U+30A0 - U+30FF // Katakana + * U+3100 - U+312F // Bopomofo + * U+3130 - U+318F // Hangul Compatibility Jamo + * U+3190 - U+319F // Kanbun + * U+31A0 - U+31BF // Bopomofo Extended + * U+31C0 - U+31EF // CJK Strokes + * U+31F0 - U+31FF // Katakana Phonetic Extensions + * U+3200 - U+32FF // Enclosed CJK Letters and Months + * U+3300 - U+33FF // CJK Compatibility + * U+3400 - U+4DBF // CJK Unified Ideographs Extension A + * U+4DC0 - U+4DFF // Yijing Hexagram Symbols + * U+4E00 - U+9FFF // CJK Unified Ideographs + * U+A960 - U+A97F // Hangul Jamo Extended-A + * U+AC00 - U+D7AF // Hangul Syllables + * U+D7B0 - U+D7FF // Hangul Jamo Extended-B + * U+F900 - U+FAFF // CJK Compatibility Ideographs + * U+FE10 - U+FE1F // Vertical forms + * U+FE30 - U+FE4F // CJK Compatibility Forms + * U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms + * U+1B000 - U+1B0FF // Kana Supplement + * U+1D300 - U+1D35F // Tai Xuan Hing Symbols + * U+1F200 - U+1F2FF // Enclosed Ideographic Supplement + * U+20000 - U+2A6DF // CJK Unified Ideographs Extension B + * U+2A700 - U+2B73F // CJK Unified Ideographs Extension C + * U+2B740 - U+2B81F // CJK Unified Ideographs Extension D + * U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement + * } + * + * FT_AUTOHINTER_SCRIPT_INDIC :: + * Apply the indic auto-hinter, covering all major scripts from the + * Indian sub-continent and some other related scripts like Thai, Lao, + * or Tibetan. + * + * By default, characters from the following Unicode ranges are + * assigned to this submodule. + * + * { + * U+0900 - U+0DFF // Indic Range + * U+0F00 - U+0FFF // Tibetan + * U+1900 - U+194F // Limbu + * U+1B80 - U+1BBF // Sundanese + * U+1C80 - U+1CDF // Meetei Mayak + * U+A800 - U+A82F // Syloti Nagri + * U+11800 - U+118DF // Sharada + * } + * + * Note that currently Indic support is rudimentary only, missing blue + * zone support. + * + */ +#define FT_AUTOHINTER_SCRIPT_NONE 0 +#define FT_AUTOHINTER_SCRIPT_LATIN 1 +#define FT_AUTOHINTER_SCRIPT_CJK 2 +#define FT_AUTOHINTER_SCRIPT_INDIC 3 + + + /************************************************************************** + * + * @struct: + * FT_Prop_GlyphToScriptMap + * + * @description: + * *Experimental* *only* + * + * The data exchange structure for the @glyph-to-script-map property. + * + */ + typedef struct FT_Prop_GlyphToScriptMap_ + { + FT_Face face; + FT_Byte* map; + + } FT_Prop_GlyphToScriptMap; + + + /************************************************************************** + * + * @property: + * fallback-script + * + * @description: + * *Experimental* *only* + * + * If no auto-hinter script module can be assigned to a glyph, a + * fallback script gets assigned to it (see also the + * @glyph-to-script-map property). By default, this is + * @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property, + * this fallback value can be changed. + * + * { + * FT_Library library; + * FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "autofitter", + * "fallback-script", &fallback_script ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * It's important to use the right timing for changing this value: The + * creation of the glyph-to-script map that eventually uses the + * fallback script value gets triggered either by setting or reading a + * face-specific property like @glyph-to-script-map, or by auto-hinting + * any glyph from that face. In particular, if you have already created + * an @FT_Face structure but not loaded any glyph (using the + * auto-hinter), a change of the fallback script will affect this face. + * + */ + + + /************************************************************************** + * + * @property: + * default-script + * + * @description: + * *Experimental* *only* + * + * If Freetype gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make + * the HarfBuzz library access OpenType features for getting better + * glyph coverages, this property sets the (auto-fitter) script to be + * used for the default (OpenType) script data of a font's GSUB table. + * Features for the default script are intended for all scripts not + * explicitly handled in GSUB; an example is a `dlig' feature, + * containing the combination of the characters `T', `E', and `L' to + * form a `TEL' ligature. + * + * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the + * `default-script' property, this default value can be changed. + * + * { + * FT_Library library; + * FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "autofitter", + * "default-script", &default_script ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * It's important to use the right timing for changing this value: The + * creation of the glyph-to-script map that eventually uses the + * default script value gets triggered either by setting or reading a + * face-specific property like @glyph-to-script-map, or by auto-hinting + * any glyph from that face. In particular, if you have already created + * an @FT_Face structure but not loaded any glyph (using the + * auto-hinter), a change of the default script will affect this face. + * + */ + + + /************************************************************************** + * + * @property: + * increase-x-height + * + * @description: + * For ppem values in the range 6~<= ppem <= `increase-x-height', round + * up the font's x~height much more often than normally. If the value + * is set to~0, which is the default, this feature is switched off. Use + * this property to improve the legibility of small font sizes if + * necessary. + * + * { + * FT_Library library; + * FT_Face face; + * FT_Prop_IncreaseXHeight prop; + * + * + * FT_Init_FreeType( &library ); + * FT_New_Face( library, "foo.ttf", 0, &face ); + * FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 ); + * + * prop.face = face; + * prop.limit = 14; + * + * FT_Property_Set( library, "autofitter", + * "increase-x-height", &prop ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * Set this value right after calling @FT_Set_Char_Size, but before + * loading any glyph (using the auto-hinter). + * + */ + + + /************************************************************************** + * + * @struct: + * FT_Prop_IncreaseXHeight + * + * @description: + * The data exchange structure for the @increase-x-height property. + * + */ + typedef struct FT_Prop_IncreaseXHeight_ + { + FT_Face face; + FT_UInt limit; + + } FT_Prop_IncreaseXHeight; + + /* */ + + +FT_END_HEADER + +#endif /* __FTAUTOH_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftbbox.h b/freetype2/include/ohos/freetype2/ftbbox.h new file mode 100644 index 0000000000..d6800e240f --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftbbox.h @@ -0,0 +1,101 @@ +/***************************************************************************/ +/* */ +/* ftbbox.h */ +/* */ +/* FreeType exact bbox computation (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This component has a _single_ role: to compute exact outline bounding */ + /* boxes. */ + /* */ + /* It is separated from the rest of the engine for various technical */ + /* reasons. It may well be integrated in `ftoutln' later. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTBBOX_H__ +#define __FTBBOX_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_BBox */ + /* */ + /* <Description> */ + /* Compute the exact bounding box of an outline. This is slower */ + /* than computing the control box. However, it uses an advanced */ + /* algorithm that returns _very_ quickly when the two boxes */ + /* coincide. Otherwise, the outline Bézier arcs are traversed to */ + /* extract their extrema. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source outline. */ + /* */ + /* <Output> */ + /* abbox :: The outline's exact bounding box. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If the font is tricky and the glyph has been loaded with */ + /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ + /* reasonable values for the BBox it is necessary to load the glyph */ + /* at a large ppem value (so that the hinting instructions can */ + /* properly shift and scale the subglyphs), then extracting the BBox, */ + /* which can be eventually converted back to font units. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Get_BBox( FT_Outline* outline, + FT_BBox *abbox ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTBBOX_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/freetype2/include/ohos/freetype2/ftbdf.h b/freetype2/include/ohos/freetype2/ftbdf.h new file mode 100644 index 0000000000..6d262e4141 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftbdf.h @@ -0,0 +1,210 @@ +/***************************************************************************/ +/* */ +/* ftbdf.h */ +/* */ +/* FreeType API for accessing BDF-specific strings (specification). */ +/* */ +/* Copyright 2002-2004, 2006, 2009, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTBDF_H__ +#define __FTBDF_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bdf_fonts */ + /* */ + /* <Title> */ + /* BDF and PCF Files */ + /* */ + /* <Abstract> */ + /* BDF and PCF specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions specific to BDF */ + /* and PCF fonts. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @enum: + * BDF_PropertyType + * + * @description: + * A list of BDF property types. + * + * @values: + * BDF_PROPERTY_TYPE_NONE :: + * Value~0 is used to indicate a missing property. + * + * BDF_PROPERTY_TYPE_ATOM :: + * Property is a string atom. + * + * BDF_PROPERTY_TYPE_INTEGER :: + * Property is a 32-bit signed integer. + * + * BDF_PROPERTY_TYPE_CARDINAL :: + * Property is a 32-bit unsigned integer. + */ + typedef enum BDF_PropertyType_ + { + BDF_PROPERTY_TYPE_NONE = 0, + BDF_PROPERTY_TYPE_ATOM = 1, + BDF_PROPERTY_TYPE_INTEGER = 2, + BDF_PROPERTY_TYPE_CARDINAL = 3 + + } BDF_PropertyType; + + + /********************************************************************** + * + * @type: + * BDF_Property + * + * @description: + * A handle to a @BDF_PropertyRec structure to model a given + * BDF/PCF property. + */ + typedef struct BDF_PropertyRec_* BDF_Property; + + + /********************************************************************** + * + * @struct: + * BDF_PropertyRec + * + * @description: + * This structure models a given BDF/PCF property. + * + * @fields: + * type :: + * The property type. + * + * u.atom :: + * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be + * NULL, indicating an empty string. + * + * u.integer :: + * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. + * + * u.cardinal :: + * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL. + */ + typedef struct BDF_PropertyRec_ + { + BDF_PropertyType type; + union { + const char* atom; + FT_Int32 integer; + FT_UInt32 cardinal; + + } u; + + } BDF_PropertyRec; + + + /********************************************************************** + * + * @function: + * FT_Get_BDF_Charset_ID + * + * @description: + * Retrieve a BDF font character set identity, according to + * the BDF specification. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * acharset_encoding :: + * Charset encoding, as a C~string, owned by the face. + * + * acharset_registry :: + * Charset registry, as a C~string, owned by the face. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with BDF faces, returning an error otherwise. + */ + FT_EXPORT( FT_Error ) + FT_Get_BDF_Charset_ID( FT_Face face, + const char* *acharset_encoding, + const char* *acharset_registry ); + + + /********************************************************************** + * + * @function: + * FT_Get_BDF_Property + * + * @description: + * Retrieve a BDF property from a BDF or PCF font file. + * + * @input: + * face :: A handle to the input face. + * + * name :: The property name. + * + * @output: + * aproperty :: The property. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function works with BDF _and_ PCF fonts. It returns an error + * otherwise. It also returns an error if the property is not in the + * font. + * + * A `property' is a either key-value pair within the STARTPROPERTIES + * ... ENDPROPERTIES block of a BDF font or a key-value pair from the + * `info->props' array within a `FontRec' structure of a PCF font. + * + * Integer properties are always stored as `signed' within PCF fonts; + * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value + * for BDF fonts only. + * + * In case of error, `aproperty->type' is always set to + * @BDF_PROPERTY_TYPE_NONE. + */ + FT_EXPORT( FT_Error ) + FT_Get_BDF_Property( FT_Face face, + const char* prop_name, + BDF_PropertyRec *aproperty ); + + /* */ + +FT_END_HEADER + +#endif /* __FTBDF_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftbitmap.h b/freetype2/include/ohos/freetype2/ftbitmap.h new file mode 100644 index 0000000000..eae716904b --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftbitmap.h @@ -0,0 +1,232 @@ +/***************************************************************************/ +/* */ +/* ftbitmap.h */ +/* */ +/* FreeType utility functions for bitmaps (specification). */ +/* */ +/* Copyright 2004-2006, 2008, 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTBITMAP_H__ +#define __FTBITMAP_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bitmap_handling */ + /* */ + /* <Title> */ + /* Bitmap Handling */ + /* */ + /* <Abstract> */ + /* Handling FT_Bitmap objects. */ + /* */ + /* <Description> */ + /* This section contains functions for handling @FT_Bitmap objects. */ + /* Note that none of the functions changes the bitmap's `flow' (as */ + /* indicated by the sign of the `pitch' field in `FT_Bitmap'). */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_New */ + /* */ + /* <Description> */ + /* Initialize a pointer to an @FT_Bitmap structure. */ + /* */ + /* <InOut> */ + /* abitmap :: A pointer to the bitmap structure. */ + /* */ + FT_EXPORT( void ) + FT_Bitmap_New( FT_Bitmap *abitmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Copy */ + /* */ + /* <Description> */ + /* Copy a bitmap into another one. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* source :: A handle to the source bitmap. */ + /* */ + /* <Output> */ + /* target :: A handle to the target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Copy( FT_Library library, + const FT_Bitmap *source, + FT_Bitmap *target); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Embolden */ + /* */ + /* <Description> */ + /* Embolden a bitmap. The new bitmap will be about `xStrength' */ + /* pixels wider and `yStrength' pixels higher. The left and bottom */ + /* borders are kept unchanged. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* xStrength :: How strong the glyph is emboldened horizontally. */ + /* Expressed in 26.6 pixel format. */ + /* */ + /* yStrength :: How strong the glyph is emboldened vertically. */ + /* Expressed in 26.6 pixel format. */ + /* */ + /* <InOut> */ + /* bitmap :: A handle to the target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The current implementation restricts `xStrength' to be less than */ + /* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */ + /* */ + /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ + /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ + /* */ + /* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format */ + /* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Embolden( FT_Library library, + FT_Bitmap* bitmap, + FT_Pos xStrength, + FT_Pos yStrength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Convert */ + /* */ + /* <Description> */ + /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */ + /* to a bitmap object with depth 8bpp, making the number of used */ + /* bytes line (a.k.a. the `pitch') a multiple of `alignment'. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* source :: The source bitmap. */ + /* */ + /* alignment :: The pitch of the bitmap is a multiple of this */ + /* parameter. Common values are 1, 2, or 4. */ + /* */ + /* <Output> */ + /* target :: The target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* It is possible to call @FT_Bitmap_Convert multiple times without */ + /* calling @FT_Bitmap_Done (the memory is simply reallocated). */ + /* */ + /* Use @FT_Bitmap_Done to finally remove the bitmap object. */ + /* */ + /* The `library' argument is taken to have access to FreeType's */ + /* memory handling functions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Convert( FT_Library library, + const FT_Bitmap *source, + FT_Bitmap *target, + FT_Int alignment ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GlyphSlot_Own_Bitmap */ + /* */ + /* <Description> */ + /* Make sure that a glyph slot owns `slot->bitmap'. */ + /* */ + /* <Input> */ + /* slot :: The glyph slot. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function is to be used in combination with */ + /* @FT_Bitmap_Embolden. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Done */ + /* */ + /* <Description> */ + /* Destroy a bitmap object created with @FT_Bitmap_New. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* bitmap :: The bitmap object to be freed. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `library' argument is taken to have access to FreeType's */ + /* memory handling functions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Done( FT_Library library, + FT_Bitmap *bitmap ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTBITMAP_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftbzip2.h b/freetype2/include/ohos/freetype2/ftbzip2.h new file mode 100644 index 0000000000..4dce161fd6 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftbzip2.h @@ -0,0 +1,102 @@ +/***************************************************************************/ +/* */ +/* ftbzip2.h */ +/* */ +/* Bzip2-compressed stream support. */ +/* */ +/* Copyright 2010 by */ +/* Joel Klinghed. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTBZIP2_H__ +#define __FTBZIP2_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bzip2 */ + /* */ + /* <Title> */ + /* BZIP2 Streams */ + /* */ + /* <Abstract> */ + /* Using bzip2-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Bzip2-specific functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************ + * + * @function: + * FT_Stream_OpenBzip2 + * + * @description: + * Open a new stream to parse bzip2-compressed font files. This is + * mainly used to support the compressed `*.pcf.bz2' fonts that come + * with XFree86. + * + * @input: + * stream :: + * The target embedding stream. + * + * source :: + * The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream. + * + * In certain builds of the library, bzip2 compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a bzip2 compressed stream + * from it and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with bzip2 support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenBzip2( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTBZIP2_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftcache.h b/freetype2/include/ohos/freetype2/ftcache.h new file mode 100644 index 0000000000..a30e925cc5 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftcache.h @@ -0,0 +1,1057 @@ +/***************************************************************************/ +/* */ +/* ftcache.h */ +/* */ +/* FreeType Cache subsystem (specification). */ +/* */ +/* Copyright 1996-2008, 2010, 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCACHE_H__ +#define __FTCACHE_H__ + + +#include <ft2build.h> +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /************************************************************************* + * + * <Section> + * cache_subsystem + * + * <Title> + * Cache Sub-System + * + * <Abstract> + * How to cache face, size, and glyph data with FreeType~2. + * + * <Description> + * This section describes the FreeType~2 cache sub-system, which is used + * to limit the number of concurrently opened @FT_Face and @FT_Size + * objects, as well as caching information like character maps and glyph + * images while limiting their maximum memory usage. + * + * Note that all types and functions begin with the `FTC_' prefix. + * + * The cache is highly portable and thus doesn't know anything about the + * fonts installed on your system, or how to access them. This implies + * the following scheme: + * + * First, available or installed font faces are uniquely identified by + * @FTC_FaceID values, provided to the cache by the client. Note that + * the cache only stores and compares these values, and doesn't try to + * interpret them in any way. + * + * Second, the cache calls, only when needed, a client-provided function + * to convert an @FTC_FaceID into a new @FT_Face object. The latter is + * then completely managed by the cache, including its termination + * through @FT_Done_Face. To monitor termination of face objects, the + * finalizer callback in the `generic' field of the @FT_Face object can + * be used, which might also be used to store the @FTC_FaceID of the + * face. + * + * Clients are free to map face IDs to anything else. The most simple + * usage is to associate them to a (pathname,face_index) pair that is + * used to call @FT_New_Face. However, more complex schemes are also + * possible. + * + * Note that for the cache to work correctly, the face ID values must be + * *persistent*, which means that the contents they point to should not + * change at runtime, or that their value should not become invalid. + * + * If this is unavoidable (e.g., when a font is uninstalled at runtime), + * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let + * the cache get rid of any references to the old @FTC_FaceID it may + * keep internally. Failure to do so will lead to incorrect behaviour + * or even crashes. + * + * To use the cache, start with calling @FTC_Manager_New to create a new + * @FTC_Manager object, which models a single cache instance. You can + * then look up @FT_Face and @FT_Size objects with + * @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively. + * + * If you want to use the charmap caching, call @FTC_CMapCache_New, then + * later use @FTC_CMapCache_Lookup to perform the equivalent of + * @FT_Get_Char_Index, only much faster. + * + * If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then + * later use @FTC_ImageCache_Lookup to retrieve the corresponding + * @FT_Glyph objects from the cache. + * + * If you need lots of small bitmaps, it is much more memory efficient + * to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This + * returns @FTC_SBitRec structures, which are used to store small + * bitmaps directly. (A small bitmap is one whose metrics and + * dimensions all fit into 8-bit integers). + * + * We hope to also provide a kerning cache in the near future. + * + * + * <Order> + * FTC_Manager + * FTC_FaceID + * FTC_Face_Requester + * + * FTC_Manager_New + * FTC_Manager_Reset + * FTC_Manager_Done + * FTC_Manager_LookupFace + * FTC_Manager_LookupSize + * FTC_Manager_RemoveFaceID + * + * FTC_Node + * FTC_Node_Unref + * + * FTC_ImageCache + * FTC_ImageCache_New + * FTC_ImageCache_Lookup + * + * FTC_SBit + * FTC_SBitCache + * FTC_SBitCache_New + * FTC_SBitCache_Lookup + * + * FTC_CMapCache + * FTC_CMapCache_New + * FTC_CMapCache_Lookup + * + *************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** BASIC TYPE DEFINITIONS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: FTC_FaceID + * + * @description: + * An opaque pointer type that is used to identity face objects. The + * contents of such objects is application-dependent. + * + * These pointers are typically used to point to a user-defined + * structure containing a font file path, and face index. + * + * @note: + * Never use NULL as a valid @FTC_FaceID. + * + * Face IDs are passed by the client to the cache manager that calls, + * when needed, the @FTC_Face_Requester to translate them into new + * @FT_Face objects. + * + * If the content of a given face ID changes at runtime, or if the value + * becomes invalid (e.g., when uninstalling a font), you should + * immediately call @FTC_Manager_RemoveFaceID before any other cache + * function. + * + * Failure to do so will result in incorrect behaviour or even + * memory leaks and crashes. + */ + typedef FT_Pointer FTC_FaceID; + + + /************************************************************************ + * + * @functype: + * FTC_Face_Requester + * + * @description: + * A callback function provided by client applications. It is used by + * the cache manager to translate a given @FTC_FaceID into a new valid + * @FT_Face object, on demand. + * + * <Input> + * face_id :: + * The face ID to resolve. + * + * library :: + * A handle to a FreeType library object. + * + * req_data :: + * Application-provided request data (see note below). + * + * <Output> + * aface :: + * A new @FT_Face handle. + * + * <Return> + * FreeType error code. 0~means success. + * + * <Note> + * The third parameter `req_data' is the same as the one passed by the + * client when @FTC_Manager_New is called. + * + * The face requester should not perform funny things on the returned + * face object, like creating a new @FT_Size for it, or setting a + * transformation through @FT_Set_Transform! + */ + typedef FT_Error + (*FTC_Face_Requester)( FTC_FaceID face_id, + FT_Library library, + FT_Pointer req_data, + FT_Face* aface ); + + /* */ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** CACHE MANAGER OBJECT *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_Manager */ + /* */ + /* <Description> */ + /* This object corresponds to one instance of the cache-subsystem. */ + /* It is used to cache one or more @FT_Face objects, along with */ + /* corresponding @FT_Size objects. */ + /* */ + /* The manager intentionally limits the total number of opened */ + /* @FT_Face and @FT_Size objects to control memory usage. See the */ + /* `max_faces' and `max_sizes' parameters of @FTC_Manager_New. */ + /* */ + /* The manager is also used to cache `nodes' of various types while */ + /* limiting their total memory usage. */ + /* */ + /* All limitations are enforced by keeping lists of managed objects */ + /* in most-recently-used order, and flushing old nodes to make room */ + /* for new ones. */ + /* */ + typedef struct FTC_ManagerRec_* FTC_Manager; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_Node */ + /* */ + /* <Description> */ + /* An opaque handle to a cache node object. Each cache node is */ + /* reference-counted. A node with a count of~0 might be flushed */ + /* out of a full cache whenever a lookup request is performed. */ + /* */ + /* If you look up nodes, you have the ability to `acquire' them, */ + /* i.e., to increment their reference count. This will prevent the */ + /* node from being flushed out of the cache until you explicitly */ + /* `release' it (see @FTC_Node_Unref). */ + /* */ + /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */ + /* */ + typedef struct FTC_NodeRec_* FTC_Node; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_New */ + /* */ + /* <Description> */ + /* Create a new cache manager. */ + /* */ + /* <Input> */ + /* library :: The parent FreeType library handle to use. */ + /* */ + /* max_faces :: Maximum number of opened @FT_Face objects managed by */ + /* this cache instance. Use~0 for defaults. */ + /* */ + /* max_sizes :: Maximum number of opened @FT_Size objects managed by */ + /* this cache instance. Use~0 for defaults. */ + /* */ + /* max_bytes :: Maximum number of bytes to use for cached data nodes. */ + /* Use~0 for defaults. Note that this value does not */ + /* account for managed @FT_Face and @FT_Size objects. */ + /* */ + /* requester :: An application-provided callback used to translate */ + /* face IDs into real @FT_Face objects. */ + /* */ + /* req_data :: A generic pointer that is passed to the requester */ + /* each time it is called (see @FTC_Face_Requester). */ + /* */ + /* <Output> */ + /* amanager :: A handle to a new manager object. 0~in case of */ + /* failure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_New( FT_Library library, + FT_UInt max_faces, + FT_UInt max_sizes, + FT_ULong max_bytes, + FTC_Face_Requester requester, + FT_Pointer req_data, + FTC_Manager *amanager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_Reset */ + /* */ + /* <Description> */ + /* Empty a given cache manager. This simply gets rid of all the */ + /* currently cached @FT_Face and @FT_Size objects within the manager. */ + /* */ + /* <InOut> */ + /* manager :: A handle to the manager. */ + /* */ + FT_EXPORT( void ) + FTC_Manager_Reset( FTC_Manager manager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_Done */ + /* */ + /* <Description> */ + /* Destroy a given manager after emptying it. */ + /* */ + /* <Input> */ + /* manager :: A handle to the target cache manager object. */ + /* */ + FT_EXPORT( void ) + FTC_Manager_Done( FTC_Manager manager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_LookupFace */ + /* */ + /* <Description> */ + /* Retrieve the @FT_Face object that corresponds to a given face ID */ + /* through a cache manager. */ + /* */ + /* <Input> */ + /* manager :: A handle to the cache manager. */ + /* */ + /* face_id :: The ID of the face object. */ + /* */ + /* <Output> */ + /* aface :: A handle to the face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned @FT_Face object is always owned by the manager. You */ + /* should never try to discard it yourself. */ + /* */ + /* The @FT_Face object doesn't necessarily have a current size object */ + /* (i.e., face->size can be~0). If you need a specific `font size', */ + /* use @FTC_Manager_LookupSize instead. */ + /* */ + /* Never change the face's transformation matrix (i.e., never call */ + /* the @FT_Set_Transform function) on a returned face! If you need */ + /* to transform glyphs, do it yourself after glyph loading. */ + /* */ + /* When you perform a lookup, out-of-memory errors are detected */ + /* _within_ the lookup and force incremental flushes of the cache */ + /* until enough memory is released for the lookup to succeed. */ + /* */ + /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ + /* already been completely flushed, and still no memory was available */ + /* for the operation. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_LookupFace( FTC_Manager manager, + FTC_FaceID face_id, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_ScalerRec */ + /* */ + /* <Description> */ + /* A structure used to describe a given character size in either */ + /* pixels or points to the cache manager. See */ + /* @FTC_Manager_LookupSize. */ + /* */ + /* <Fields> */ + /* face_id :: The source face ID. */ + /* */ + /* width :: The character width. */ + /* */ + /* height :: The character height. */ + /* */ + /* pixel :: A Boolean. If 1, the `width' and `height' fields are */ + /* interpreted as integer pixel character sizes. */ + /* Otherwise, they are expressed as 1/64th of points. */ + /* */ + /* x_res :: Only used when `pixel' is value~0 to indicate the */ + /* horizontal resolution in dpi. */ + /* */ + /* y_res :: Only used when `pixel' is value~0 to indicate the */ + /* vertical resolution in dpi. */ + /* */ + /* <Note> */ + /* This type is mainly used to retrieve @FT_Size objects through the */ + /* cache manager. */ + /* */ + typedef struct FTC_ScalerRec_ + { + FTC_FaceID face_id; + FT_UInt width; + FT_UInt height; + FT_Int pixel; + FT_UInt x_res; + FT_UInt y_res; + + } FTC_ScalerRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_Scaler */ + /* */ + /* <Description> */ + /* A handle to an @FTC_ScalerRec structure. */ + /* */ + typedef struct FTC_ScalerRec_* FTC_Scaler; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_LookupSize */ + /* */ + /* <Description> */ + /* Retrieve the @FT_Size object that corresponds to a given */ + /* @FTC_ScalerRec pointer through a cache manager. */ + /* */ + /* <Input> */ + /* manager :: A handle to the cache manager. */ + /* */ + /* scaler :: A scaler handle. */ + /* */ + /* <Output> */ + /* asize :: A handle to the size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned @FT_Size object is always owned by the manager. You */ + /* should never try to discard it by yourself. */ + /* */ + /* You can access the parent @FT_Face object simply as `size->face' */ + /* if you need it. Note that this object is also owned by the */ + /* manager. */ + /* */ + /* <Note> */ + /* When you perform a lookup, out-of-memory errors are detected */ + /* _within_ the lookup and force incremental flushes of the cache */ + /* until enough memory is released for the lookup to succeed. */ + /* */ + /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ + /* already been completely flushed, and still no memory is available */ + /* for the operation. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_LookupSize( FTC_Manager manager, + FTC_Scaler scaler, + FT_Size *asize ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Node_Unref */ + /* */ + /* <Description> */ + /* Decrement a cache node's internal reference count. When the count */ + /* reaches 0, it is not destroyed but becomes eligible for subsequent */ + /* cache flushes. */ + /* */ + /* <Input> */ + /* node :: The cache node handle. */ + /* */ + /* manager :: The cache manager handle. */ + /* */ + FT_EXPORT( void ) + FTC_Node_Unref( FTC_Node node, + FTC_Manager manager ); + + + /************************************************************************* + * + * @function: + * FTC_Manager_RemoveFaceID + * + * @description: + * A special function used to indicate to the cache manager that + * a given @FTC_FaceID is no longer valid, either because its + * content changed, or because it was deallocated or uninstalled. + * + * @input: + * manager :: + * The cache manager handle. + * + * face_id :: + * The @FTC_FaceID to be removed. + * + * @note: + * This function flushes all nodes from the cache corresponding to this + * `face_id', with the exception of nodes with a non-null reference + * count. + * + * Such nodes are however modified internally so as to never appear + * in later lookups with the same `face_id' value, and to be immediately + * destroyed when released by all their users. + * + */ + FT_EXPORT( void ) + FTC_Manager_RemoveFaceID( FTC_Manager manager, + FTC_FaceID face_id ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cache_subsystem */ + /* */ + /*************************************************************************/ + + /************************************************************************* + * + * @type: + * FTC_CMapCache + * + * @description: + * An opaque handle used to model a charmap cache. This cache is to + * hold character codes -> glyph indices mappings. + * + */ + typedef struct FTC_CMapCacheRec_* FTC_CMapCache; + + + /************************************************************************* + * + * @function: + * FTC_CMapCache_New + * + * @description: + * Create a new charmap cache. + * + * @input: + * manager :: + * A handle to the cache manager. + * + * @output: + * acache :: + * A new cache handle. NULL in case of error. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Like all other caches, this one will be destroyed with the cache + * manager. + * + */ + FT_EXPORT( FT_Error ) + FTC_CMapCache_New( FTC_Manager manager, + FTC_CMapCache *acache ); + + + /************************************************************************ + * + * @function: + * FTC_CMapCache_Lookup + * + * @description: + * Translate a character code into a glyph index, using the charmap + * cache. + * + * @input: + * cache :: + * A charmap cache handle. + * + * face_id :: + * The source face ID. + * + * cmap_index :: + * The index of the charmap in the source face. Any negative value + * means to use the cache @FT_Face's default charmap. + * + * char_code :: + * The character code (in the corresponding charmap). + * + * @return: + * Glyph index. 0~means `no glyph'. + * + */ + FT_EXPORT( FT_UInt ) + FTC_CMapCache_Lookup( FTC_CMapCache cache, + FTC_FaceID face_id, + FT_Int cmap_index, + FT_UInt32 char_code ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cache_subsystem */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** IMAGE CACHE OBJECT *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /************************************************************************* + * + * @struct: + * FTC_ImageTypeRec + * + * @description: + * A structure used to model the type of images in a glyph cache. + * + * @fields: + * face_id :: + * The face ID. + * + * width :: + * The width in pixels. + * + * height :: + * The height in pixels. + * + * flags :: + * The load flags, as in @FT_Load_Glyph. + * + */ + typedef struct FTC_ImageTypeRec_ + { + FTC_FaceID face_id; + FT_Int width; + FT_Int height; + FT_Int32 flags; + + } FTC_ImageTypeRec; + + + /************************************************************************* + * + * @type: + * FTC_ImageType + * + * @description: + * A handle to an @FTC_ImageTypeRec structure. + * + */ + typedef struct FTC_ImageTypeRec_* FTC_ImageType; + + + /* */ + + +#define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \ + ( (d1)->face_id == (d2)->face_id && \ + (d1)->width == (d2)->width && \ + (d1)->flags == (d2)->flags ) + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_ImageCache */ + /* */ + /* <Description> */ + /* A handle to a glyph image cache object. They are designed to */ + /* hold many distinct glyph images while not exceeding a certain */ + /* memory threshold. */ + /* */ + typedef struct FTC_ImageCacheRec_* FTC_ImageCache; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_New */ + /* */ + /* <Description> */ + /* Create a new glyph image cache. */ + /* */ + /* <Input> */ + /* manager :: The parent manager for the image cache. */ + /* */ + /* <Output> */ + /* acache :: A handle to the new glyph image cache object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_New( FTC_Manager manager, + FTC_ImageCache *acache ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_Lookup */ + /* */ + /* <Description> */ + /* Retrieve a given glyph image from a glyph image cache. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source glyph image cache. */ + /* */ + /* type :: A pointer to a glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index to retrieve. */ + /* */ + /* <Output> */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ + /* failure. */ + /* */ + /* anode :: Used to return the address of of the corresponding cache */ + /* node after incrementing its reference count (see note */ + /* below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned glyph is owned and managed by the glyph image cache. */ + /* Never try to transform or discard it manually! You can however */ + /* create a copy with @FT_Glyph_Copy and modify the new one. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the glyph image, after increasing its reference */ + /* count. This ensures that the node (as well as the @FT_Glyph) will */ + /* always be kept in the cache until you call @FTC_Node_Unref to */ + /* `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the @FT_Glyph could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_Lookup( FTC_ImageCache cache, + FTC_ImageType type, + FT_UInt gindex, + FT_Glyph *aglyph, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_LookupScaler */ + /* */ + /* <Description> */ + /* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source glyph image cache. */ + /* */ + /* scaler :: A pointer to a scaler descriptor. */ + /* */ + /* load_flags :: The corresponding load flags. */ + /* */ + /* gindex :: The glyph index to retrieve. */ + /* */ + /* <Output> */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ + /* failure. */ + /* */ + /* anode :: Used to return the address of of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned glyph is owned and managed by the glyph image cache. */ + /* Never try to transform or discard it manually! You can however */ + /* create a copy with @FT_Glyph_Copy and modify the new one. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the glyph image, after increasing its reference */ + /* count. This ensures that the node (as well as the @FT_Glyph) will */ + /* always be kept in the cache until you call @FTC_Node_Unref to */ + /* `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the @FT_Glyph could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + /* Calls to @FT_Set_Char_Size and friends have no effect on cached */ + /* glyphs; you should always use the FreeType cache API instead. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_LookupScaler( FTC_ImageCache cache, + FTC_Scaler scaler, + FT_ULong load_flags, + FT_UInt gindex, + FT_Glyph *aglyph, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_SBit */ + /* */ + /* <Description> */ + /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */ + /* structure for details. */ + /* */ + typedef struct FTC_SBitRec_* FTC_SBit; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_SBitRec */ + /* */ + /* <Description> */ + /* A very compact structure used to describe a small glyph bitmap. */ + /* */ + /* <Fields> */ + /* width :: The bitmap width in pixels. */ + /* */ + /* height :: The bitmap height in pixels. */ + /* */ + /* left :: The horizontal distance from the pen position to the */ + /* left bitmap border (a.k.a. `left side bearing', or */ + /* `lsb'). */ + /* */ + /* top :: The vertical distance from the pen position (on the */ + /* baseline) to the upper bitmap border (a.k.a. `top */ + /* side bearing'). The distance is positive for upwards */ + /* y~coordinates. */ + /* */ + /* format :: The format of the glyph bitmap (monochrome or gray). */ + /* */ + /* max_grays :: Maximum gray level value (in the range 1 to~255). */ + /* */ + /* pitch :: The number of bytes per bitmap line. May be positive */ + /* or negative. */ + /* */ + /* xadvance :: The horizontal advance width in pixels. */ + /* */ + /* yadvance :: The vertical advance height in pixels. */ + /* */ + /* buffer :: A pointer to the bitmap pixels. */ + /* */ + typedef struct FTC_SBitRec_ + { + FT_Byte width; + FT_Byte height; + FT_Char left; + FT_Char top; + + FT_Byte format; + FT_Byte max_grays; + FT_Short pitch; + FT_Char xadvance; + FT_Char yadvance; + + FT_Byte* buffer; + + } FTC_SBitRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_SBitCache */ + /* */ + /* <Description> */ + /* A handle to a small bitmap cache. These are special cache objects */ + /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */ + /* much more efficient way than the traditional glyph image cache */ + /* implemented by @FTC_ImageCache. */ + /* */ + typedef struct FTC_SBitCacheRec_* FTC_SBitCache; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_New */ + /* */ + /* <Description> */ + /* Create a new cache to store small glyph bitmaps. */ + /* */ + /* <Input> */ + /* manager :: A handle to the source cache manager. */ + /* */ + /* <Output> */ + /* acache :: A handle to the new sbit cache. NULL in case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_New( FTC_Manager manager, + FTC_SBitCache *acache ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_Lookup */ + /* */ + /* <Description> */ + /* Look up a given small glyph bitmap in a given sbit cache and */ + /* `lock' it to prevent its flushing from the cache until needed. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source sbit cache. */ + /* */ + /* type :: A pointer to the glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* <Output> */ + /* sbit :: A handle to a small bitmap descriptor. */ + /* */ + /* anode :: Used to return the address of of the corresponding cache */ + /* node after incrementing its reference count (see note */ + /* below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The small bitmap descriptor and its bit buffer are owned by the */ + /* cache and should never be freed by the application. They might */ + /* as well disappear from memory on the next cache lookup, so don't */ + /* treat them as persistent data. */ + /* */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ + /* glyph bitmap. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the bitmap, after increasing its reference count. */ + /* This ensures that the node (as well as the image) will always be */ + /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the bitmap could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_Lookup( FTC_SBitCache cache, + FTC_ImageType type, + FT_UInt gindex, + FTC_SBit *sbit, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_LookupScaler */ + /* */ + /* <Description> */ + /* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source sbit cache. */ + /* */ + /* scaler :: A pointer to the scaler descriptor. */ + /* */ + /* load_flags :: The corresponding load flags. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* <Output> */ + /* sbit :: A handle to a small bitmap descriptor. */ + /* */ + /* anode :: Used to return the address of of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The small bitmap descriptor and its bit buffer are owned by the */ + /* cache and should never be freed by the application. They might */ + /* as well disappear from memory on the next cache lookup, so don't */ + /* treat them as persistent data. */ + /* */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ + /* glyph bitmap. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the bitmap, after increasing its reference count. */ + /* This ensures that the node (as well as the image) will always be */ + /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the bitmap could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_LookupScaler( FTC_SBitCache cache, + FTC_Scaler scaler, + FT_ULong load_flags, + FT_UInt gindex, + FTC_SBit *sbit, + FTC_Node *anode ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTCACHE_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftcffdrv.h b/freetype2/include/ohos/freetype2/ftcffdrv.h new file mode 100644 index 0000000000..f7031bc883 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftcffdrv.h @@ -0,0 +1,262 @@ +/***************************************************************************/ +/* */ +/* ftcffdrv.h */ +/* */ +/* FreeType API for controlling the CFF driver (specification only). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCFFDRV_H__ +#define __FTCFFDRV_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * cff_driver + * + * @title: + * The CFF driver + * + * @abstract: + * Controlling the CFF driver module. + * + * @description: + * While FreeType's CFF driver doesn't expose API functions by itself, + * it is possible to control its behaviour with @FT_Property_Set and + * @FT_Property_Get. The list below gives the available properties + * together with the necessary macros and structures. + * + * The CFF driver's module name is `cff'. + * + * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine* + * + * The rasterizer is positioning horizontal features (e.g., ascender + * height & x-height, or crossbars) on the pixel grid and minimizing the + * amount of antialiasing applied to them, while placing vertical + * features (vertical stems) on the pixel grid without hinting, thus + * representing the stem position and weight accurately. Sometimes the + * vertical stems may be only partially black. In this context, + * `antialiasing' means that stems are not positioned exactly on pixel + * borders, causing a fuzzy appearance. + * + * There are two principles behind this approach. + * + * 1) No hinting in the horizontal direction: Unlike `superhinted' + * TrueType, which changes glyph widths to accommodate regular + * inter-glyph spacing, Adobe's approach is `faithful to the design' in + * representing both the glyph width and the inter-glyph spacing + * designed for the font. This makes the screen display as close as it + * can be to the result one would get with infinite resolution, while + * preserving what is considered the key characteristics of each glyph. + * Note that the distances between unhinted and grid-fitted positions at + * small sizes are comparable to kerning values and thus would be + * noticeable (and distracting) while reading if hinting were applied. + * + * One of the reasons to not hint horizontally is antialiasing for LCD + * screens: The pixel geometry of modern displays supplies three + * vertical sub-pixels as the eye moves horizontally across each visible + * pixel. On devices where we can be certain this characteristic is + * present a rasterizer can take advantage of the sub-pixels to add + * increments of weight. In Western writing systems this turns out to + * be the more critical direction anyway; the weights and spacing of + * vertical stems (see above) are central to Armenian, Cyrillic, Greek, + * and Latin type designs. Even when the rasterizer uses greyscale + * antialiasing instead of color (a necessary compromise when one + * doesn't know the screen characteristics), the unhinted vertical + * features preserve the design's weight and spacing much better than + * aliased type would. + * + * 2) Aligment in the vertical direction: Weights and spacing along the + * y~axis are less critical; what is much more important is the visual + * alignment of related features (like cap-height and x-height). The + * sense of alignment for these is enhanced by the sharpness of grid-fit + * edges, while the cruder vertical resolution (full pixels instead of + * 1/3 pixels) is less of a problem. + * + * On the technical side, horizontal alignment zones for ascender, + * x-height, and other important height values (traditionally called + * `blue zones') as defined in the font are positioned independently, + * each being rounded to the nearest pixel edge, taking care of + * overshoot suppression at small sizes, stem darkening, and scaling. + * + * Hstems (this is, hint values defined in the font to help align + * horizontal features) that fall within a blue zone are said to be + * `captured' and are aligned to that zone. Uncaptured stems are moved + * in one of four ways, top edge up or down, bottom edge up or down. + * Unless there are conflicting hstems, the smallest movement is taken + * to minimize distortion. + * + * @order: + * hinting-engine + * no-stem-darkening + * darkening-parameters + * + */ + + + /************************************************************************** + * + * @property: + * hinting-engine + * + * @description: + * Thanks to Adobe, which contributed a new hinting (and parsing) + * engine, an application can select between `freetype' and `adobe' if + * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration + * macro isn't defined, `hinting-engine' does nothing. + * + * The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is + * defined, and `adobe' otherwise. + * + * The following example code demonstrates how to select Adobe's hinting + * engine (omitting the error handling). + * + * { + * FT_Library library; + * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "cff", + * "hinting-engine", &hinting_engine ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + */ + + + /************************************************************************** + * + * @enum: + * FT_CFF_HINTING_XXX + * + * @description: + * A list of constants used for the @hinting-engine property to select + * the hinting engine for CFF fonts. + * + * @values: + * FT_CFF_HINTING_FREETYPE :: + * Use the old FreeType hinting engine. + * + * FT_CFF_HINTING_ADOBE :: + * Use the hinting engine contributed by Adobe. + * + */ +#define FT_CFF_HINTING_FREETYPE 0 +#define FT_CFF_HINTING_ADOBE 1 + + + /************************************************************************** + * + * @property: + * no-stem-darkening + * + * @description: + * By default, the Adobe CFF engine darkens stems at smaller sizes, + * regardless of hinting, to enhance contrast. This feature requires + * a rendering system with proper gamma correction. Setting this + * property, stem darkening gets switched off. + * + * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set. + * + * { + * FT_Library library; + * FT_Bool no_stem_darkening = TRUE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "cff", + * "no-stem-darkening", &no_stem_darkening ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + */ + + + /************************************************************************** + * + * @property: + * darkening-parameters + * + * @description: + * By default, the Adobe CFF engine darkens stems as follows (if the + * `no-stem-darkening' property isn't set): + * + * { + * stem width <= 0.5px: darkening amount = 0.4px + * stem width = 1px: darkening amount = 0.275px + * stem width = 1.667px: darkening amount = 0.275px + * stem width >= 2.333px: darkening amount = 0px + * } + * + * and piecewise linear in-between. At configuration time, these four + * control points can be set with the macro + * `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'. At runtime, the control + * points can be changed using the `darkening-parameters' property, as + * the following example demonstrates. + * + * { + * FT_Library library; + * FT_Int darken_params[8] = { 500, 300, // x1, y1 + * 1000, 200, // x2, y2 + * 1500, 100, // x3, y3 + * 2000, 0 }; // x4, y4 + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "cff", + * "darkening-parameters", darken_params ); + * } + * + * The x~values give the stem width, and the y~values the darkening + * amount. The unit is 1000th of pixels. All coordinate values must be + * positive; the x~values must be monotonically increasing; the + * y~values must be monotonically decreasing and smaller than or + * equal to 500 (corresponding to half a pixel); the slope of each + * linear piece must be shallower than -1 (e.g., -.4). + * + * @note: + * This property can be used with @FT_Property_Get also. + * + */ + + /* */ + + +FT_END_HEADER + + +#endif /* __FTCFFDRV_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftchapters.h b/freetype2/include/ohos/freetype2/ftchapters.h new file mode 100644 index 0000000000..d333761c81 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftchapters.h @@ -0,0 +1,121 @@ +/***************************************************************************/ +/* */ +/* This file defines the structure of the FreeType reference. */ +/* It is used by the python script that generates the HTML files. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* general_remarks */ +/* */ +/* <Title> */ +/* General Remarks */ +/* */ +/* <Sections> */ +/* header_inclusion */ +/* user_allocation */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* core_api */ +/* */ +/* <Title> */ +/* Core API */ +/* */ +/* <Sections> */ +/* version */ +/* basic_types */ +/* base_interface */ +/* glyph_variants */ +/* glyph_management */ +/* mac_specific */ +/* sizes_management */ +/* header_file_macros */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* format_specific */ +/* */ +/* <Title> */ +/* Format-Specific API */ +/* */ +/* <Sections> */ +/* multiple_masters */ +/* truetype_tables */ +/* type1_tables */ +/* sfnt_names */ +/* bdf_fonts */ +/* cid_fonts */ +/* pfr_fonts */ +/* winfnt_fonts */ +/* font_formats */ +/* gasp_table */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* module_specific */ +/* */ +/* <Title> */ +/* Controlling FreeType Modules */ +/* */ +/* <Sections> */ +/* auto_hinter */ +/* cff_driver */ +/* tt_driver */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* cache_subsystem */ +/* */ +/* <Title> */ +/* Cache Sub-System */ +/* */ +/* <Sections> */ +/* cache_subsystem */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* support_api */ +/* */ +/* <Title> */ +/* Support API */ +/* */ +/* <Sections> */ +/* computations */ +/* list_processing */ +/* outline_processing */ +/* quick_advance */ +/* bitmap_handling */ +/* raster */ +/* glyph_stroker */ +/* system_interface */ +/* module_management */ +/* gzip */ +/* lzw */ +/* bzip2 */ +/* lcd_filtering */ +/* */ +/***************************************************************************/ diff --git a/freetype2/include/ohos/freetype2/ftcid.h b/freetype2/include/ohos/freetype2/ftcid.h new file mode 100644 index 0000000000..17550d87b5 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftcid.h @@ -0,0 +1,167 @@ +/***************************************************************************/ +/* */ +/* ftcid.h */ +/* */ +/* FreeType API for accessing CID font information (specification). */ +/* */ +/* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCID_H__ +#define __FTCID_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cid_fonts */ + /* */ + /* <Title> */ + /* CID Fonts */ + /* */ + /* <Abstract> */ + /* CID-keyed font specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of CID-keyed font specific */ + /* functions. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @function: + * FT_Get_CID_Registry_Ordering_Supplement + * + * @description: + * Retrieve the Registry/Ordering/Supplement triple (also known as the + * "R/O/S") from a CID-keyed font. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * registry :: + * The registry, as a C~string, owned by the face. + * + * ordering :: + * The ordering, as a C~string, owned by the face. + * + * supplement :: + * The supplement. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces, returning an error + * otherwise. + * + * @since: + * 2.3.6 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, + const char* *registry, + const char* *ordering, + FT_Int *supplement); + + + /********************************************************************** + * + * @function: + * FT_Get_CID_Is_Internally_CID_Keyed + * + * @description: + * Retrieve the type of the input face, CID keyed or not. In + * constrast to the @FT_IS_CID_KEYED macro this function returns + * successfully also for CID-keyed fonts in an SNFT wrapper. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * is_cid :: + * The type of the face as an @FT_Bool. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces and OpenType fonts, + * returning an error otherwise. + * + * @since: + * 2.3.9 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, + FT_Bool *is_cid ); + + + /********************************************************************** + * + * @function: + * FT_Get_CID_From_Glyph_Index + * + * @description: + * Retrieve the CID of the input glyph index. + * + * @input: + * face :: + * A handle to the input face. + * + * glyph_index :: + * The input glyph index. + * + * @output: + * cid :: + * The CID as an @FT_UInt. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces and OpenType fonts, + * returning an error otherwise. + * + * @since: + * 2.3.9 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_From_Glyph_Index( FT_Face face, + FT_UInt glyph_index, + FT_UInt *cid ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTCID_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/fterrdef.h b/freetype2/include/ohos/freetype2/fterrdef.h new file mode 100644 index 0000000000..99b2fadec6 --- /dev/null +++ b/freetype2/include/ohos/freetype2/fterrdef.h @@ -0,0 +1,249 @@ +/***************************************************************************/ +/* */ +/* fterrdef.h */ +/* */ +/* FreeType error codes (specification). */ +/* */ +/* Copyright 2002, 2004, 2006, 2007, 2010-2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** LIST OF ERROR CODES/MESSAGES *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + + /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */ + /* including this file. */ + + + /* generic errors */ + + FT_NOERRORDEF_( Ok, 0x00, + "no error" ) + + FT_ERRORDEF_( Cannot_Open_Resource, 0x01, + "cannot open resource" ) + FT_ERRORDEF_( Unknown_File_Format, 0x02, + "unknown file format" ) + FT_ERRORDEF_( Invalid_File_Format, 0x03, + "broken file" ) + FT_ERRORDEF_( Invalid_Version, 0x04, + "invalid FreeType version" ) + FT_ERRORDEF_( Lower_Module_Version, 0x05, + "module version is too low" ) + FT_ERRORDEF_( Invalid_Argument, 0x06, + "invalid argument" ) + FT_ERRORDEF_( Unimplemented_Feature, 0x07, + "unimplemented feature" ) + FT_ERRORDEF_( Invalid_Table, 0x08, + "broken table" ) + FT_ERRORDEF_( Invalid_Offset, 0x09, + "broken offset within table" ) + FT_ERRORDEF_( Array_Too_Large, 0x0A, + "array allocation size too large" ) + FT_ERRORDEF_( Missing_Module, 0x0B, + "missing module" ) + FT_ERRORDEF_( Missing_Property, 0x0C, + "missing property" ) + + /* glyph/character errors */ + + FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, + "invalid glyph index" ) + FT_ERRORDEF_( Invalid_Character_Code, 0x11, + "invalid character code" ) + FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, + "unsupported glyph image format" ) + FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, + "cannot render this glyph format" ) + FT_ERRORDEF_( Invalid_Outline, 0x14, + "invalid outline" ) + FT_ERRORDEF_( Invalid_Composite, 0x15, + "invalid composite glyph" ) + FT_ERRORDEF_( Too_Many_Hints, 0x16, + "too many hints" ) + FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, + "invalid pixel size" ) + + /* handle errors */ + + FT_ERRORDEF_( Invalid_Handle, 0x20, + "invalid object handle" ) + FT_ERRORDEF_( Invalid_Library_Handle, 0x21, + "invalid library handle" ) + FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, + "invalid module handle" ) + FT_ERRORDEF_( Invalid_Face_Handle, 0x23, + "invalid face handle" ) + FT_ERRORDEF_( Invalid_Size_Handle, 0x24, + "invalid size handle" ) + FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, + "invalid glyph slot handle" ) + FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, + "invalid charmap handle" ) + FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, + "invalid cache manager handle" ) + FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, + "invalid stream handle" ) + + /* driver errors */ + + FT_ERRORDEF_( Too_Many_Drivers, 0x30, + "too many modules" ) + FT_ERRORDEF_( Too_Many_Extensions, 0x31, + "too many extensions" ) + + /* memory errors */ + + FT_ERRORDEF_( Out_Of_Memory, 0x40, + "out of memory" ) + FT_ERRORDEF_( Unlisted_Object, 0x41, + "unlisted object" ) + + /* stream errors */ + + FT_ERRORDEF_( Cannot_Open_Stream, 0x51, + "cannot open stream" ) + FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, + "invalid stream seek" ) + FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, + "invalid stream skip" ) + FT_ERRORDEF_( Invalid_Stream_Read, 0x54, + "invalid stream read" ) + FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, + "invalid stream operation" ) + FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, + "invalid frame operation" ) + FT_ERRORDEF_( Nested_Frame_Access, 0x57, + "nested frame access" ) + FT_ERRORDEF_( Invalid_Frame_Read, 0x58, + "invalid frame read" ) + + /* raster errors */ + + FT_ERRORDEF_( Raster_Uninitialized, 0x60, + "raster uninitialized" ) + FT_ERRORDEF_( Raster_Corrupted, 0x61, + "raster corrupted" ) + FT_ERRORDEF_( Raster_Overflow, 0x62, + "raster overflow" ) + FT_ERRORDEF_( Raster_Negative_Height, 0x63, + "negative height while rastering" ) + + /* cache errors */ + + FT_ERRORDEF_( Too_Many_Caches, 0x70, + "too many registered caches" ) + + /* TrueType and SFNT errors */ + + FT_ERRORDEF_( Invalid_Opcode, 0x80, + "invalid opcode" ) + FT_ERRORDEF_( Too_Few_Arguments, 0x81, + "too few arguments" ) + FT_ERRORDEF_( Stack_Overflow, 0x82, + "stack overflow" ) + FT_ERRORDEF_( Code_Overflow, 0x83, + "code overflow" ) + FT_ERRORDEF_( Bad_Argument, 0x84, + "bad argument" ) + FT_ERRORDEF_( Divide_By_Zero, 0x85, + "division by zero" ) + FT_ERRORDEF_( Invalid_Reference, 0x86, + "invalid reference" ) + FT_ERRORDEF_( Debug_OpCode, 0x87, + "found debug opcode" ) + FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, + "found ENDF opcode in execution stream" ) + FT_ERRORDEF_( Nested_DEFS, 0x89, + "nested DEFS" ) + FT_ERRORDEF_( Invalid_CodeRange, 0x8A, + "invalid code range" ) + FT_ERRORDEF_( Execution_Too_Long, 0x8B, + "execution context too long" ) + FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, + "too many function definitions" ) + FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, + "too many instruction definitions" ) + FT_ERRORDEF_( Table_Missing, 0x8E, + "SFNT font table missing" ) + FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, + "horizontal header (hhea) table missing" ) + FT_ERRORDEF_( Locations_Missing, 0x90, + "locations (loca) table missing" ) + FT_ERRORDEF_( Name_Table_Missing, 0x91, + "name table missing" ) + FT_ERRORDEF_( CMap_Table_Missing, 0x92, + "character map (cmap) table missing" ) + FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, + "horizontal metrics (hmtx) table missing" ) + FT_ERRORDEF_( Post_Table_Missing, 0x94, + "PostScript (post) table missing" ) + FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, + "invalid horizontal metrics" ) + FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, + "invalid character map (cmap) format" ) + FT_ERRORDEF_( Invalid_PPem, 0x97, + "invalid ppem value" ) + FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, + "invalid vertical metrics" ) + FT_ERRORDEF_( Could_Not_Find_Context, 0x99, + "could not find context" ) + FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, + "invalid PostScript (post) table format" ) + FT_ERRORDEF_( Invalid_Post_Table, 0x9B, + "invalid PostScript (post) table" ) + + /* CFF, CID, and Type 1 errors */ + + FT_ERRORDEF_( Syntax_Error, 0xA0, + "opcode syntax error" ) + FT_ERRORDEF_( Stack_Underflow, 0xA1, + "argument stack underflow" ) + FT_ERRORDEF_( Ignore, 0xA2, + "ignore" ) + FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, + "no Unicode glyph name found" ) + FT_ERRORDEF_( Glyph_Too_Big, 0xA4, + "glyph to big for hinting" ) + + /* BDF errors */ + + FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, + "`STARTFONT' field missing" ) + FT_ERRORDEF_( Missing_Font_Field, 0xB1, + "`FONT' field missing" ) + FT_ERRORDEF_( Missing_Size_Field, 0xB2, + "`SIZE' field missing" ) + FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, + "`FONTBOUNDINGBOX' field missing" ) + FT_ERRORDEF_( Missing_Chars_Field, 0xB4, + "`CHARS' field missing" ) + FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, + "`STARTCHAR' field missing" ) + FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, + "`ENCODING' field missing" ) + FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, + "`BBX' field missing" ) + FT_ERRORDEF_( Bbx_Too_Big, 0xB8, + "`BBX' too big" ) + FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, + "Font header corrupted or missing fields" ) + FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, + "Font glyphs corrupted or missing fields" ) + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/fterrors.h b/freetype2/include/ohos/freetype2/fterrors.h new file mode 100644 index 0000000000..0fa3e4dce1 --- /dev/null +++ b/freetype2/include/ohos/freetype2/fterrors.h @@ -0,0 +1,198 @@ +/***************************************************************************/ +/* */ +/* fterrors.h */ +/* */ +/* FreeType error code handling (specification). */ +/* */ +/* Copyright 1996-2002, 2004, 2007, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This special header file is used to define the handling of FT2 */ + /* enumeration constants. It can also be used to generate error message */ + /* strings with a small macro trick explained below. */ + /* */ + /* I - Error Formats */ + /* ----------------- */ + /* */ + /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */ + /* defined in ftoption.h in order to make the higher byte indicate */ + /* the module where the error has happened (this is not compatible */ + /* with standard builds of FreeType 2). See the file `ftmoderr.h' for */ + /* more details. */ + /* */ + /* */ + /* II - Error Message strings */ + /* -------------------------- */ + /* */ + /* The error definitions below are made through special macros that */ + /* allow client applications to build a table of error message strings */ + /* if they need it. The strings are not included in a normal build of */ + /* FreeType 2 to save space (most client applications do not use */ + /* them). */ + /* */ + /* To do so, you have to define the following macros before including */ + /* this file: */ + /* */ + /* FT_ERROR_START_LIST :: */ + /* This macro is called before anything else to define the start of */ + /* the error list. It is followed by several FT_ERROR_DEF calls */ + /* (see below). */ + /* */ + /* FT_ERROR_DEF( e, v, s ) :: */ + /* This macro is called to define one single error. */ + /* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */ + /* `v' is the error numerical value. */ + /* `s' is the corresponding error string. */ + /* */ + /* FT_ERROR_END_LIST :: */ + /* This macro ends the list. */ + /* */ + /* Additionally, you have to undefine __FTERRORS_H__ before #including */ + /* this file. */ + /* */ + /* Here is a simple example: */ + /* */ + /* { */ + /* #undef __FTERRORS_H__ */ + /* #define FT_ERRORDEF( e, v, s ) { e, s }, */ + /* #define FT_ERROR_START_LIST { */ + /* #define FT_ERROR_END_LIST { 0, 0 } }; */ + /* */ + /* const struct */ + /* { */ + /* int err_code; */ + /* const char* err_msg; */ + /* } ft_errors[] = */ + /* */ + /* #include FT_ERRORS_H */ + /* } */ + /* */ + /*************************************************************************/ + + +#ifndef __FTERRORS_H__ +#define __FTERRORS_H__ + + + /* include module base error codes */ +#include FT_MODULE_ERRORS_H + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SETUP MACROS *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#undef FT_NEED_EXTERN_C + + + /* FT_ERR_PREFIX is used as a prefix for error identifiers. */ + /* By default, we use `FT_Err_'. */ + /* */ +#ifndef FT_ERR_PREFIX +#define FT_ERR_PREFIX FT_Err_ +#endif + + + /* FT_ERR_BASE is used as the base for module-specific errors. */ + /* */ +#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS + +#ifndef FT_ERR_BASE +#define FT_ERR_BASE FT_Mod_Err_Base +#endif + +#else + +#undef FT_ERR_BASE +#define FT_ERR_BASE 0 + +#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */ + + + /* If FT_ERRORDEF is not defined, we need to define a simple */ + /* enumeration type. */ + /* */ +#ifndef FT_ERRORDEF + +#define FT_ERRORDEF( e, v, s ) e = v, +#define FT_ERROR_START_LIST enum { +#define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) }; + +#ifdef __cplusplus +#define FT_NEED_EXTERN_C + extern "C" { +#endif + +#endif /* !FT_ERRORDEF */ + + + /* this macro is used to define an error */ +#define FT_ERRORDEF_( e, v, s ) \ + FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s ) + + /* this is only used for <module>_Err_Ok, which must be 0! */ +#define FT_NOERRORDEF_( e, v, s ) \ + FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s ) + + +#ifdef FT_ERROR_START_LIST + FT_ERROR_START_LIST +#endif + + + /* now include the error codes */ +#include FT_ERROR_DEFINITIONS_H + + +#ifdef FT_ERROR_END_LIST + FT_ERROR_END_LIST +#endif + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SIMPLE CLEANUP *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + +#ifdef FT_NEED_EXTERN_C + } +#endif + +#undef FT_ERROR_START_LIST +#undef FT_ERROR_END_LIST + +#undef FT_ERRORDEF +#undef FT_ERRORDEF_ +#undef FT_NOERRORDEF_ + +#undef FT_NEED_EXTERN_C +#undef FT_ERR_BASE + + /* FT_ERR_PREFIX is needed internally */ +#ifndef FT2_BUILD_LIBRARY +#undef FT_ERR_PREFIX +#endif + +#endif /* __FTERRORS_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftgasp.h b/freetype2/include/ohos/freetype2/ftgasp.h new file mode 100644 index 0000000000..3f3d765467 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftgasp.h @@ -0,0 +1,129 @@ +/***************************************************************************/ +/* */ +/* ftgasp.h */ +/* */ +/* Access of TrueType's `gasp' table (specification). */ +/* */ +/* Copyright 2007, 2008, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef _FT_GASP_H_ +#define _FT_GASP_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + + /*************************************************************************** + * + * @section: + * gasp_table + * + * @title: + * Gasp Table + * + * @abstract: + * Retrieving TrueType `gasp' table entries. + * + * @description: + * The function @FT_Get_Gasp can be used to query a TrueType or OpenType + * font for specific entries in its `gasp' table, if any. This is + * mainly useful when implementing native TrueType hinting with the + * bytecode interpreter to duplicate the Windows text rendering results. + */ + + /************************************************************************* + * + * @enum: + * FT_GASP_XXX + * + * @description: + * A list of values and/or bit-flags returned by the @FT_Get_Gasp + * function. + * + * @values: + * FT_GASP_NO_TABLE :: + * This special value means that there is no GASP table in this face. + * It is up to the client to decide what to do. + * + * FT_GASP_DO_GRIDFIT :: + * Grid-fitting and hinting should be performed at the specified ppem. + * This *really* means TrueType bytecode interpretation. If this bit + * is not set, no hinting gets applied. + * + * FT_GASP_DO_GRAY :: + * Anti-aliased rendering should be performed at the specified ppem. + * If not set, do monochrome rendering. + * + * FT_GASP_SYMMETRIC_SMOOTHING :: + * If set, smoothing along multiple axes must be used with ClearType. + * + * FT_GASP_SYMMETRIC_GRIDFIT :: + * Grid-fitting must be used with ClearType's symmetric smoothing. + * + * @note: + * The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be + * used for standard font rasterization only. Independently of that, + * `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to + * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and + * `FT_GASP_DO_GRAY' are consequently ignored). + * + * `ClearType' is Microsoft's implementation of LCD rendering, partly + * protected by patents. + * + * @since: + * 2.3.0 + */ +#define FT_GASP_NO_TABLE -1 +#define FT_GASP_DO_GRIDFIT 0x01 +#define FT_GASP_DO_GRAY 0x02 +#define FT_GASP_SYMMETRIC_SMOOTHING 0x08 +#define FT_GASP_SYMMETRIC_GRIDFIT 0x10 + + + /************************************************************************* + * + * @func: + * FT_Get_Gasp + * + * @description: + * Read the `gasp' table from a TrueType or OpenType font file and + * return the entry corresponding to a given character pixel size. + * + * @input: + * face :: The source face handle. + * ppem :: The vertical character pixel size. + * + * @return: + * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no + * `gasp' table in the face. + * + * @since: + * 2.3.0 + */ + FT_EXPORT( FT_Int ) + FT_Get_Gasp( FT_Face face, + FT_UInt ppem ); + + /* */ + + +#endif /* _FT_GASP_H_ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftglyph.h b/freetype2/include/ohos/freetype2/ftglyph.h new file mode 100644 index 0000000000..15fa6a9950 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftglyph.h @@ -0,0 +1,605 @@ +/***************************************************************************/ +/* */ +/* ftglyph.h */ +/* */ +/* FreeType convenience functions to handle glyphs (specification). */ +/* */ +/* Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file contains the definition of several convenience functions */ + /* that can be used by client applications to easily retrieve glyph */ + /* bitmaps and outlines from a given face. */ + /* */ + /* These functions should be optional if you are writing a font server */ + /* or text layout engine on top of FreeType. However, they are pretty */ + /* handy for many other simple uses of the library. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTGLYPH_H__ +#define __FTGLYPH_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* glyph_management */ + /* */ + /* <Title> */ + /* Glyph Management */ + /* */ + /* <Abstract> */ + /* Generic interface to manage individual glyph data. */ + /* */ + /* <Description> */ + /* This section contains definitions used to manage glyph data */ + /* through generic FT_Glyph objects. Each of them can contain a */ + /* bitmap, a vector outline, or even images in other formats. */ + /* */ + /*************************************************************************/ + + + /* forward declaration to a private type */ + typedef struct FT_Glyph_Class_ FT_Glyph_Class; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Glyph */ + /* */ + /* <Description> */ + /* Handle to an object used to model generic glyph images. It is a */ + /* pointer to the @FT_GlyphRec structure and can contain a glyph */ + /* bitmap or pointer. */ + /* */ + /* <Note> */ + /* Glyph objects are not owned by the library. You must thus release */ + /* them manually (through @FT_Done_Glyph) _before_ calling */ + /* @FT_Done_FreeType. */ + /* */ + typedef struct FT_GlyphRec_* FT_Glyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphRec */ + /* */ + /* <Description> */ + /* The root glyph structure contains a given glyph image plus its */ + /* advance width in 16.16 fixed-point format. */ + /* */ + /* <Fields> */ + /* library :: A handle to the FreeType library object. */ + /* */ + /* clazz :: A pointer to the glyph's class. Private. */ + /* */ + /* format :: The format of the glyph's image. */ + /* */ + /* advance :: A 16.16 vector that gives the glyph's advance width. */ + /* */ + typedef struct FT_GlyphRec_ + { + FT_Library library; + const FT_Glyph_Class* clazz; + FT_Glyph_Format format; + FT_Vector advance; + + } FT_GlyphRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_BitmapGlyph */ + /* */ + /* <Description> */ + /* A handle to an object used to model a bitmap glyph image. This is */ + /* a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. */ + /* */ + typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_BitmapGlyphRec */ + /* */ + /* <Description> */ + /* A structure used for bitmap glyph images. This really is a */ + /* `sub-class' of @FT_GlyphRec. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Glyph fields. */ + /* */ + /* left :: The left-side bearing, i.e., the horizontal distance */ + /* from the current pen position to the left border of the */ + /* glyph bitmap. */ + /* */ + /* top :: The top-side bearing, i.e., the vertical distance from */ + /* the current pen position to the top border of the glyph */ + /* bitmap. This distance is positive for upwards~y! */ + /* */ + /* bitmap :: A descriptor for the bitmap. */ + /* */ + /* <Note> */ + /* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */ + /* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */ + /* the bitmap's contents easily. */ + /* */ + /* The corresponding pixel buffer is always owned by @FT_BitmapGlyph */ + /* and is thus created and destroyed with it. */ + /* */ + typedef struct FT_BitmapGlyphRec_ + { + FT_GlyphRec root; + FT_Int left; + FT_Int top; + FT_Bitmap bitmap; + + } FT_BitmapGlyphRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_OutlineGlyph */ + /* */ + /* <Description> */ + /* A handle to an object used to model an outline glyph image. This */ + /* is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */ + /* */ + typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_OutlineGlyphRec */ + /* */ + /* <Description> */ + /* A structure used for outline (vectorial) glyph images. This */ + /* really is a `sub-class' of @FT_GlyphRec. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Glyph fields. */ + /* */ + /* outline :: A descriptor for the outline. */ + /* */ + /* <Note> */ + /* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */ + /* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */ + /* the outline's content easily. */ + /* */ + /* As the outline is extracted from a glyph slot, its coordinates are */ + /* expressed normally in 26.6 pixels, unless the flag */ + /* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */ + /* */ + /* The outline's tables are always owned by the object and are */ + /* destroyed with it. */ + /* */ + typedef struct FT_OutlineGlyphRec_ + { + FT_GlyphRec root; + FT_Outline outline; + + } FT_OutlineGlyphRec; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Glyph */ + /* */ + /* <Description> */ + /* A function used to extract a glyph image from a slot. Note that */ + /* the created @FT_Glyph object must be released with @FT_Done_Glyph. */ + /* */ + /* <Input> */ + /* slot :: A handle to the source glyph slot. */ + /* */ + /* <Output> */ + /* aglyph :: A handle to the glyph object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Glyph( FT_GlyphSlot slot, + FT_Glyph *aglyph ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Copy */ + /* */ + /* <Description> */ + /* A function used to copy a glyph image. Note that the created */ + /* @FT_Glyph object must be released with @FT_Done_Glyph. */ + /* */ + /* <Input> */ + /* source :: A handle to the source glyph object. */ + /* */ + /* <Output> */ + /* target :: A handle to the target glyph object. 0~in case of */ + /* error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_Copy( FT_Glyph source, + FT_Glyph *target ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Transform */ + /* */ + /* <Description> */ + /* Transform a glyph image if its format is scalable. */ + /* */ + /* <InOut> */ + /* glyph :: A handle to the target glyph object. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to a 2x2 matrix to apply. */ + /* */ + /* delta :: A pointer to a 2d vector to apply. Coordinates are */ + /* expressed in 1/64th of a pixel. */ + /* */ + /* <Return> */ + /* FreeType error code (if not 0, the glyph format is not scalable). */ + /* */ + /* <Note> */ + /* The 2x2 transformation matrix is also applied to the glyph's */ + /* advance vector. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_Transform( FT_Glyph glyph, + FT_Matrix* matrix, + FT_Vector* delta ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Glyph_BBox_Mode */ + /* */ + /* <Description> */ + /* The mode how the values of @FT_Glyph_Get_CBox are returned. */ + /* */ + /* <Values> */ + /* FT_GLYPH_BBOX_UNSCALED :: */ + /* Return unscaled font units. */ + /* */ + /* FT_GLYPH_BBOX_SUBPIXELS :: */ + /* Return unfitted 26.6 coordinates. */ + /* */ + /* FT_GLYPH_BBOX_GRIDFIT :: */ + /* Return grid-fitted 26.6 coordinates. */ + /* */ + /* FT_GLYPH_BBOX_TRUNCATE :: */ + /* Return coordinates in integer pixels. */ + /* */ + /* FT_GLYPH_BBOX_PIXELS :: */ + /* Return grid-fitted pixel coordinates. */ + /* */ + typedef enum FT_Glyph_BBox_Mode_ + { + FT_GLYPH_BBOX_UNSCALED = 0, + FT_GLYPH_BBOX_SUBPIXELS = 0, + FT_GLYPH_BBOX_GRIDFIT = 1, + FT_GLYPH_BBOX_TRUNCATE = 2, + FT_GLYPH_BBOX_PIXELS = 3 + + } FT_Glyph_BBox_Mode; + + + /* these constants are deprecated; use the corresponding */ + /* `FT_Glyph_BBox_Mode' values instead */ +#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED +#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS +#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT +#define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE +#define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Get_CBox */ + /* */ + /* <Description> */ + /* Return a glyph's `control box'. The control box encloses all the */ + /* outline's points, including Bézier control points. Though it */ + /* coincides with the exact bounding box for most glyphs, it can be */ + /* slightly larger in some situations (like when rotating an outline */ + /* that contains Bézier outside arcs). */ + /* */ + /* Computing the control box is very fast, while getting the bounding */ + /* box can take much more time as it needs to walk over all segments */ + /* and arcs in the outline. To get the latter, you can use the */ + /* `ftbbox' component, which is dedicated to this single task. */ + /* */ + /* <Input> */ + /* glyph :: A handle to the source glyph object. */ + /* */ + /* mode :: The mode that indicates how to interpret the returned */ + /* bounding box values. */ + /* */ + /* <Output> */ + /* acbox :: The glyph coordinate bounding box. Coordinates are */ + /* expressed in 1/64th of pixels if it is grid-fitted. */ + /* */ + /* <Note> */ + /* Coordinates are relative to the glyph origin, using the y~upwards */ + /* convention. */ + /* */ + /* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' */ + /* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font */ + /* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */ + /* is another name for this constant. */ + /* */ + /* If the font is tricky and the glyph has been loaded with */ + /* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */ + /* reasonable values for the CBox it is necessary to load the glyph */ + /* at a large ppem value (so that the hinting instructions can */ + /* properly shift and scale the subglyphs), then extracting the CBox, */ + /* which can be eventually converted back to font units. */ + /* */ + /* Note that the maximum coordinates are exclusive, which means that */ + /* one can compute the width and height of the glyph image (be it in */ + /* integer or 26.6 pixels) as: */ + /* */ + /* { */ + /* width = bbox.xMax - bbox.xMin; */ + /* height = bbox.yMax - bbox.yMin; */ + /* } */ + /* */ + /* Note also that for 26.6 coordinates, if `bbox_mode' is set to */ + /* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, */ + /* which corresponds to: */ + /* */ + /* { */ + /* bbox.xMin = FLOOR(bbox.xMin); */ + /* bbox.yMin = FLOOR(bbox.yMin); */ + /* bbox.xMax = CEILING(bbox.xMax); */ + /* bbox.yMax = CEILING(bbox.yMax); */ + /* } */ + /* */ + /* To get the bbox in pixel coordinates, set `bbox_mode' to */ + /* @FT_GLYPH_BBOX_TRUNCATE. */ + /* */ + /* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */ + /* to @FT_GLYPH_BBOX_PIXELS. */ + /* */ + FT_EXPORT( void ) + FT_Glyph_Get_CBox( FT_Glyph glyph, + FT_UInt bbox_mode, + FT_BBox *acbox ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_To_Bitmap */ + /* */ + /* <Description> */ + /* Convert a given glyph object to a bitmap glyph object. */ + /* */ + /* <InOut> */ + /* the_glyph :: A pointer to a handle to the target glyph. */ + /* */ + /* <Input> */ + /* render_mode :: An enumeration that describes how the data is */ + /* rendered. */ + /* */ + /* origin :: A pointer to a vector used to translate the glyph */ + /* image before rendering. Can be~0 (if no */ + /* translation). The origin is expressed in */ + /* 26.6 pixels. */ + /* */ + /* destroy :: A boolean that indicates that the original glyph */ + /* image should be destroyed by this function. It is */ + /* never destroyed in case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function does nothing if the glyph format isn't scalable. */ + /* */ + /* The glyph image is translated with the `origin' vector before */ + /* rendering. */ + /* */ + /* The first parameter is a pointer to an @FT_Glyph handle, that will */ + /* be _replaced_ by this function (with newly allocated data). */ + /* Typically, you would use (omitting error handling): */ + /* */ + /* */ + /* { */ + /* FT_Glyph glyph; */ + /* FT_BitmapGlyph glyph_bitmap; */ + /* */ + /* */ + /* // load glyph */ + /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */ + /* */ + /* // extract glyph image */ + /* error = FT_Get_Glyph( face->glyph, &glyph ); */ + /* */ + /* // convert to a bitmap (default render mode + destroying old) */ + /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ + /* { */ + /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */ + /* 0, 1 ); */ + /* if ( error ) // `glyph' unchanged */ + /* ... */ + /* } */ + /* */ + /* // access bitmap content by typecasting */ + /* glyph_bitmap = (FT_BitmapGlyph)glyph; */ + /* */ + /* // do funny stuff with it, like blitting/drawing */ + /* ... */ + /* */ + /* // discard glyph image (bitmap or not) */ + /* FT_Done_Glyph( glyph ); */ + /* } */ + /* */ + /* */ + /* Here another example, again without error handling: */ + /* */ + /* */ + /* { */ + /* FT_Glyph glyphs[MAX_GLYPHS] */ + /* */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */ + /* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* { */ + /* FT_Glyph bitmap = glyphs[idx]; */ + /* */ + /* */ + /* ... */ + /* */ + /* // after this call, `bitmap' no longer points into */ + /* // the `glyphs' array (and the old value isn't destroyed) */ + /* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */ + /* */ + /* ... */ + /* */ + /* FT_Done_Glyph( bitmap ); */ + /* } */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* FT_Done_Glyph( glyphs[idx] ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, + FT_Render_Mode render_mode, + FT_Vector* origin, + FT_Bool destroy ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Glyph */ + /* */ + /* <Description> */ + /* Destroy a given glyph. */ + /* */ + /* <Input> */ + /* glyph :: A handle to the target glyph object. */ + /* */ + FT_EXPORT( void ) + FT_Done_Glyph( FT_Glyph glyph ); + + /* */ + + + /* other helpful functions */ + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Matrix_Multiply */ + /* */ + /* <Description> */ + /* Perform the matrix operation `b = a*b'. */ + /* */ + /* <Input> */ + /* a :: A pointer to matrix `a'. */ + /* */ + /* <InOut> */ + /* b :: A pointer to matrix `b'. */ + /* */ + /* <Note> */ + /* The result is undefined if either `a' or `b' is zero. */ + /* */ + FT_EXPORT( void ) + FT_Matrix_Multiply( const FT_Matrix* a, + FT_Matrix* b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Matrix_Invert */ + /* */ + /* <Description> */ + /* Invert a 2x2 matrix. Return an error if it can't be inverted. */ + /* */ + /* <InOut> */ + /* matrix :: A pointer to the target matrix. Remains untouched in */ + /* case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Matrix_Invert( FT_Matrix* matrix ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTGLYPH_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/freetype2/include/ohos/freetype2/ftgxval.h b/freetype2/include/ohos/freetype2/ftgxval.h new file mode 100644 index 0000000000..88c3d93750 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftgxval.h @@ -0,0 +1,357 @@ +/***************************************************************************/ +/* */ +/* ftgxval.h */ +/* */ +/* FreeType API for validating TrueTypeGX/AAT tables (specification). */ +/* */ +/* Copyright 2004-2006, 2013 by */ +/* Masatake YAMATO, Redhat K.K, */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/***************************************************************************/ +/* */ +/* gxvalid is derived from both gxlayout module and otvalid module. */ +/* Development of gxlayout is supported by the Information-technology */ +/* Promotion Agency(IPA), Japan. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTGXVAL_H__ +#define __FTGXVAL_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* gx_validation */ + /* */ + /* <Title> */ + /* TrueTypeGX/AAT Validation */ + /* */ + /* <Abstract> */ + /* An API to validate TrueTypeGX/AAT tables. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions to validate */ + /* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */ + /* trak, prop, lcar). */ + /* */ + /* <Order> */ + /* FT_TrueTypeGX_Validate */ + /* FT_TrueTypeGX_Free */ + /* */ + /* FT_ClassicKern_Validate */ + /* FT_ClassicKern_Free */ + /* */ + /* FT_VALIDATE_GX_LENGTH */ + /* FT_VALIDATE_GXXXX */ + /* FT_VALIDATE_CKERNXXX */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* */ + /* Warning: Use FT_VALIDATE_XXX to validate a table. */ + /* Following definitions are for gxvalid developers. */ + /* */ + /* */ + /*************************************************************************/ + +#define FT_VALIDATE_feat_INDEX 0 +#define FT_VALIDATE_mort_INDEX 1 +#define FT_VALIDATE_morx_INDEX 2 +#define FT_VALIDATE_bsln_INDEX 3 +#define FT_VALIDATE_just_INDEX 4 +#define FT_VALIDATE_kern_INDEX 5 +#define FT_VALIDATE_opbd_INDEX 6 +#define FT_VALIDATE_trak_INDEX 7 +#define FT_VALIDATE_prop_INDEX 8 +#define FT_VALIDATE_lcar_INDEX 9 +#define FT_VALIDATE_GX_LAST_INDEX FT_VALIDATE_lcar_INDEX + + + /************************************************************************* + * + * @macro: + * FT_VALIDATE_GX_LENGTH + * + * @description: + * The number of tables checked in this module. Use it as a parameter + * for the `table-length' argument of function @FT_TrueTypeGX_Validate. + */ +#define FT_VALIDATE_GX_LENGTH (FT_VALIDATE_GX_LAST_INDEX + 1) + + /* */ + + /* Up to 0x1000 is used by otvalid. + Ox2xxx is reserved for feature OT extension. */ +#define FT_VALIDATE_GX_START 0x4000 +#define FT_VALIDATE_GX_BITFIELD( tag ) \ + ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX ) + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_GXXXX + * + * @description: + * A list of bit-field constants used with @FT_TrueTypeGX_Validate to + * indicate which TrueTypeGX/AAT Type tables should be validated. + * + * @values: + * FT_VALIDATE_feat :: + * Validate `feat' table. + * + * FT_VALIDATE_mort :: + * Validate `mort' table. + * + * FT_VALIDATE_morx :: + * Validate `morx' table. + * + * FT_VALIDATE_bsln :: + * Validate `bsln' table. + * + * FT_VALIDATE_just :: + * Validate `just' table. + * + * FT_VALIDATE_kern :: + * Validate `kern' table. + * + * FT_VALIDATE_opbd :: + * Validate `opbd' table. + * + * FT_VALIDATE_trak :: + * Validate `trak' table. + * + * FT_VALIDATE_prop :: + * Validate `prop' table. + * + * FT_VALIDATE_lcar :: + * Validate `lcar' table. + * + * FT_VALIDATE_GX :: + * Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, + * opbd, trak, prop and lcar). + * + */ + +#define FT_VALIDATE_feat FT_VALIDATE_GX_BITFIELD( feat ) +#define FT_VALIDATE_mort FT_VALIDATE_GX_BITFIELD( mort ) +#define FT_VALIDATE_morx FT_VALIDATE_GX_BITFIELD( morx ) +#define FT_VALIDATE_bsln FT_VALIDATE_GX_BITFIELD( bsln ) +#define FT_VALIDATE_just FT_VALIDATE_GX_BITFIELD( just ) +#define FT_VALIDATE_kern FT_VALIDATE_GX_BITFIELD( kern ) +#define FT_VALIDATE_opbd FT_VALIDATE_GX_BITFIELD( opbd ) +#define FT_VALIDATE_trak FT_VALIDATE_GX_BITFIELD( trak ) +#define FT_VALIDATE_prop FT_VALIDATE_GX_BITFIELD( prop ) +#define FT_VALIDATE_lcar FT_VALIDATE_GX_BITFIELD( lcar ) + +#define FT_VALIDATE_GX ( FT_VALIDATE_feat | \ + FT_VALIDATE_mort | \ + FT_VALIDATE_morx | \ + FT_VALIDATE_bsln | \ + FT_VALIDATE_just | \ + FT_VALIDATE_kern | \ + FT_VALIDATE_opbd | \ + FT_VALIDATE_trak | \ + FT_VALIDATE_prop | \ + FT_VALIDATE_lcar ) + + + /********************************************************************** + * + * @function: + * FT_TrueTypeGX_Validate + * + * @description: + * Validate various TrueTypeGX tables to assure that all offsets and + * indices are valid. The idea is that a higher-level library that + * actually does the text layout can access those tables without + * error checking (which can be quite time consuming). + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field that specifies the tables to be validated. See + * @FT_VALIDATE_GXXXX for possible values. + * + * table_length :: + * The size of the `tables' array. Normally, @FT_VALIDATE_GX_LENGTH + * should be passed. + * + * @output: + * tables :: + * The array where all validated sfnt tables are stored. + * The array itself must be allocated by a client. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with TrueTypeGX fonts, returning an error + * otherwise. + * + * After use, the application should deallocate the buffers pointed to by + * each `tables' element, by calling @FT_TrueTypeGX_Free. A NULL value + * indicates that the table either doesn't exist in the font, the + * application hasn't asked for validation, or the validator doesn't have + * the ability to validate the sfnt table. + */ + FT_EXPORT( FT_Error ) + FT_TrueTypeGX_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes tables[FT_VALIDATE_GX_LENGTH], + FT_UInt table_length ); + + + /********************************************************************** + * + * @function: + * FT_TrueTypeGX_Free + * + * @description: + * Free the buffer allocated by TrueTypeGX validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer allocated by + * @FT_TrueTypeGX_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_TrueTypeGX_Validate only. + */ + FT_EXPORT( void ) + FT_TrueTypeGX_Free( FT_Face face, + FT_Bytes table ); + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_CKERNXXX + * + * @description: + * A list of bit-field constants used with @FT_ClassicKern_Validate + * to indicate the classic kern dialect or dialects. If the selected + * type doesn't fit, @FT_ClassicKern_Validate regards the table as + * invalid. + * + * @values: + * FT_VALIDATE_MS :: + * Handle the `kern' table as a classic Microsoft kern table. + * + * FT_VALIDATE_APPLE :: + * Handle the `kern' table as a classic Apple kern table. + * + * FT_VALIDATE_CKERN :: + * Handle the `kern' as either classic Apple or Microsoft kern table. + */ +#define FT_VALIDATE_MS ( FT_VALIDATE_GX_START << 0 ) +#define FT_VALIDATE_APPLE ( FT_VALIDATE_GX_START << 1 ) + +#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE ) + + + /********************************************************************** + * + * @function: + * FT_ClassicKern_Validate + * + * @description: + * Validate classic (16-bit format) kern table to assure that the offsets + * and indices are valid. The idea is that a higher-level library that + * actually does the text layout can access those tables without error + * checking (which can be quite time consuming). + * + * The `kern' table validator in @FT_TrueTypeGX_Validate deals with both + * the new 32-bit format and the classic 16-bit format, while + * FT_ClassicKern_Validate only supports the classic 16-bit format. + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field that specifies the dialect to be validated. See + * @FT_VALIDATE_CKERNXXX for possible values. + * + * @output: + * ckern_table :: + * A pointer to the kern table. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * After use, the application should deallocate the buffers pointed to by + * `ckern_table', by calling @FT_ClassicKern_Free. A NULL value + * indicates that the table doesn't exist in the font. + */ + FT_EXPORT( FT_Error ) + FT_ClassicKern_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes *ckern_table ); + + + /********************************************************************** + * + * @function: + * FT_ClassicKern_Free + * + * @description: + * Free the buffer allocated by classic Kern validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer that is allocated by + * @FT_ClassicKern_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_ClassicKern_Validate only. + */ + FT_EXPORT( void ) + FT_ClassicKern_Free( FT_Face face, + FT_Bytes table ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTGXVAL_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftgzip.h b/freetype2/include/ohos/freetype2/ftgzip.h new file mode 100644 index 0000000000..eb346c6dc7 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftgzip.h @@ -0,0 +1,148 @@ +/***************************************************************************/ +/* */ +/* ftgzip.h */ +/* */ +/* Gzip-compressed stream support. */ +/* */ +/* Copyright 2002-2004, 2006, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTGZIP_H__ +#define __FTGZIP_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* gzip */ + /* */ + /* <Title> */ + /* GZIP Streams */ + /* */ + /* <Abstract> */ + /* Using gzip-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Gzip-specific functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************ + * + * @function: + * FT_Stream_OpenGzip + * + * @description: + * Open a new stream to parse gzip-compressed font files. This is + * mainly used to support the compressed `*.pcf.gz' fonts that come + * with XFree86. + * + * @input: + * stream :: + * The target embedding stream. + * + * source :: + * The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream. + * + * In certain builds of the library, gzip compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a gzipped stream from + * it and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with zlib support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenGzip( FT_Stream stream, + FT_Stream source ); + + + /************************************************************************ + * + * @function: + * FT_Gzip_Uncompress + * + * @description: + * Decompress a zipped input buffer into an output buffer. This function + * is modeled after zlib's `uncompress' function. + * + * @input: + * memory :: + * A FreeType memory handle. + * + * input :: + * The input buffer. + * + * input_len :: + * The length of the input buffer. + * + * @output: + * output:: + * The output buffer. + * + * @inout: + * output_len :: + * Before calling the function, this is the the total size of the + * output buffer, which must be large enough to hold the entire + * uncompressed data (so the size of the uncompressed data must be + * known in advance). After calling the function, `output_len' is the + * size of the used data in `output'. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with zlib support. + */ + FT_EXPORT( FT_Error ) + FT_Gzip_Uncompress( FT_Memory memory, + FT_Byte* output, + FT_ULong* output_len, + const FT_Byte* input, + FT_ULong input_len ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTGZIP_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftimage.h b/freetype2/include/ohos/freetype2/ftimage.h new file mode 100644 index 0000000000..2f7ca2aaf5 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftimage.h @@ -0,0 +1,1220 @@ +/***************************************************************************/ +/* */ +/* ftimage.h */ +/* */ +/* FreeType glyph image formats and default raster interface */ +/* (specification). */ +/* */ +/* Copyright 1996-2010, 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + /*************************************************************************/ + /* */ + /* Note: A `raster' is simply a scan-line converter, used to render */ + /* FT_Outlines into FT_Bitmaps. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTIMAGE_H__ +#define __FTIMAGE_H__ + + + /* _STANDALONE_ is from ftgrays.c */ +#ifndef _STANDALONE_ +#include <ft2build.h> +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Pos */ + /* */ + /* <Description> */ + /* The type FT_Pos is used to store vectorial coordinates. Depending */ + /* on the context, these can represent distances in integer font */ + /* units, or 16.16, or 26.6 fixed-point pixel coordinates. */ + /* */ + typedef signed long FT_Pos; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Vector */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2D vector; coordinates are of */ + /* the FT_Pos type. */ + /* */ + /* <Fields> */ + /* x :: The horizontal coordinate. */ + /* y :: The vertical coordinate. */ + /* */ + typedef struct FT_Vector_ + { + FT_Pos x; + FT_Pos y; + + } FT_Vector; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_BBox */ + /* */ + /* <Description> */ + /* A structure used to hold an outline's bounding box, i.e., the */ + /* coordinates of its extrema in the horizontal and vertical */ + /* directions. */ + /* */ + /* <Fields> */ + /* xMin :: The horizontal minimum (left-most). */ + /* */ + /* yMin :: The vertical minimum (bottom-most). */ + /* */ + /* xMax :: The horizontal maximum (right-most). */ + /* */ + /* yMax :: The vertical maximum (top-most). */ + /* */ + /* <Note> */ + /* The bounding box is specified with the coordinates of the lower */ + /* left and the upper right corner. In PostScript, those values are */ + /* often called (llx,lly) and (urx,ury), respectively. */ + /* */ + /* If `yMin' is negative, this value gives the glyph's descender. */ + /* Otherwise, the glyph doesn't descend below the baseline. */ + /* Similarly, if `ymax' is positive, this value gives the glyph's */ + /* ascender. */ + /* */ + /* `xMin' gives the horizontal distance from the glyph's origin to */ + /* the left edge of the glyph's bounding box. If `xMin' is negative, */ + /* the glyph extends to the left of the origin. */ + /* */ + typedef struct FT_BBox_ + { + FT_Pos xMin, yMin; + FT_Pos xMax, yMax; + + } FT_BBox; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Pixel_Mode */ + /* */ + /* <Description> */ + /* An enumeration type used to describe the format of pixels in a */ + /* given bitmap. Note that additional formats may be added in the */ + /* future. */ + /* */ + /* <Values> */ + /* FT_PIXEL_MODE_NONE :: */ + /* Value~0 is reserved. */ + /* */ + /* FT_PIXEL_MODE_MONO :: */ + /* A monochrome bitmap, using 1~bit per pixel. Note that pixels */ + /* are stored in most-significant order (MSB), which means that */ + /* the left-most pixel in a byte has value 128. */ + /* */ + /* FT_PIXEL_MODE_GRAY :: */ + /* An 8-bit bitmap, generally used to represent anti-aliased glyph */ + /* images. Each pixel is stored in one byte. Note that the number */ + /* of `gray' levels is stored in the `num_grays' field of the */ + /* @FT_Bitmap structure (it generally is 256). */ + /* */ + /* FT_PIXEL_MODE_GRAY2 :: */ + /* A 2-bit per pixel bitmap, used to represent embedded */ + /* anti-aliased bitmaps in font files according to the OpenType */ + /* specification. We haven't found a single font using this */ + /* format, however. */ + /* */ + /* FT_PIXEL_MODE_GRAY4 :: */ + /* A 4-bit per pixel bitmap, representing embedded anti-aliased */ + /* bitmaps in font files according to the OpenType specification. */ + /* We haven't found a single font using this format, however. */ + /* */ + /* FT_PIXEL_MODE_LCD :: */ + /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ + /* used for display on LCD displays; the bitmap is three times */ + /* wider than the original glyph image. See also */ + /* @FT_RENDER_MODE_LCD. */ + /* */ + /* FT_PIXEL_MODE_LCD_V :: */ + /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ + /* used for display on rotated LCD displays; the bitmap is three */ + /* times taller than the original glyph image. See also */ + /* @FT_RENDER_MODE_LCD_V. */ + /* */ + /* FT_PIXEL_MODE_BGRA :: */ + /* An image with four 8-bit channels per pixel, representing a */ + /* color image (such as emoticons) with alpha channel. For each */ + /* pixel, the format is BGRA, which means, the blue channel comes */ + /* first in memory. The color channels are pre-multiplied and in */ + /* the sRGB colorspace. For example, full red at half-translucent */ + /* opacity will be represented as `00,00,80,80', not `00,00,FF,80'. */ + /* See also @FT_LOAD_COLOR. */ + /* */ + typedef enum FT_Pixel_Mode_ + { + FT_PIXEL_MODE_NONE = 0, + FT_PIXEL_MODE_MONO, + FT_PIXEL_MODE_GRAY, + FT_PIXEL_MODE_GRAY2, + FT_PIXEL_MODE_GRAY4, + FT_PIXEL_MODE_LCD, + FT_PIXEL_MODE_LCD_V, + FT_PIXEL_MODE_BGRA, + + FT_PIXEL_MODE_MAX /* do not remove */ + + } FT_Pixel_Mode; + + + /* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */ + /* values instead. */ +#define ft_pixel_mode_none FT_PIXEL_MODE_NONE +#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO +#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY +#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2 +#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4 + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Bitmap */ + /* */ + /* <Description> */ + /* A structure used to describe a bitmap or pixmap to the raster. */ + /* Note that we now manage pixmaps of various depths through the */ + /* `pixel_mode' field. */ + /* */ + /* <Fields> */ + /* rows :: The number of bitmap rows. */ + /* */ + /* width :: The number of pixels in bitmap row. */ + /* */ + /* pitch :: The pitch's absolute value is the number of bytes */ + /* taken by one bitmap row, including padding. */ + /* However, the pitch is positive when the bitmap has */ + /* a `down' flow, and negative when it has an `up' */ + /* flow. In all cases, the pitch is an offset to add */ + /* to a bitmap pointer in order to go down one row. */ + /* */ + /* Note that `padding' means the alignment of a */ + /* bitmap to a byte border, and FreeType functions */ + /* normally align to the smallest possible integer */ + /* value. */ + /* */ + /* For the B/W rasterizer, `pitch' is always an even */ + /* number. */ + /* */ + /* To change the pitch of a bitmap (say, to make it a */ + /* multiple of 4), use @FT_Bitmap_Convert. */ + /* Alternatively, you might use callback functions to */ + /* directly render to the application's surface; see */ + /* the file `example2.cpp' in the tutorial for a */ + /* demonstration. */ + /* */ + /* buffer :: A typeless pointer to the bitmap buffer. This */ + /* value should be aligned on 32-bit boundaries in */ + /* most cases. */ + /* */ + /* num_grays :: This field is only used with */ + /* @FT_PIXEL_MODE_GRAY; it gives the number of gray */ + /* levels used in the bitmap. */ + /* */ + /* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */ + /* See @FT_Pixel_Mode for possible values. */ + /* */ + /* palette_mode :: This field is intended for paletted pixel modes; */ + /* it indicates how the palette is stored. Not */ + /* used currently. */ + /* */ + /* palette :: A typeless pointer to the bitmap palette; this */ + /* field is intended for paletted pixel modes. Not */ + /* used currently. */ + /* */ + /* <Note> */ + /* For now, the only pixel modes supported by FreeType are mono and */ + /* grays. However, drivers might be added in the future to support */ + /* more `colorful' options. */ + /* */ + typedef struct FT_Bitmap_ + { + unsigned int rows; + unsigned int width; + int pitch; + unsigned char* buffer; + unsigned short num_grays; + unsigned char pixel_mode; + unsigned char palette_mode; + void* palette; + + } FT_Bitmap; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Outline */ + /* */ + /* <Description> */ + /* This structure is used to describe an outline to the scan-line */ + /* converter. */ + /* */ + /* <Fields> */ + /* n_contours :: The number of contours in the outline. */ + /* */ + /* n_points :: The number of points in the outline. */ + /* */ + /* points :: A pointer to an array of `n_points' @FT_Vector */ + /* elements, giving the outline's point coordinates. */ + /* */ + /* tags :: A pointer to an array of `n_points' chars, giving */ + /* each outline point's type. */ + /* */ + /* If bit~0 is unset, the point is `off' the curve, */ + /* i.e., a Bézier control point, while it is `on' if */ + /* set. */ + /* */ + /* Bit~1 is meaningful for `off' points only. If set, */ + /* it indicates a third-order Bézier arc control point; */ + /* and a second-order control point if unset. */ + /* */ + /* If bit~2 is set, bits 5-7 contain the drop-out mode */ + /* (as defined in the OpenType specification; the value */ + /* is the same as the argument to the SCANMODE */ + /* instruction). */ + /* */ + /* Bits 3 and~4 are reserved for internal purposes. */ + /* */ + /* contours :: An array of `n_contours' shorts, giving the end */ + /* point of each contour within the outline. For */ + /* example, the first contour is defined by the points */ + /* `0' to `contours[0]', the second one is defined by */ + /* the points `contours[0]+1' to `contours[1]', etc. */ + /* */ + /* flags :: A set of bit flags used to characterize the outline */ + /* and give hints to the scan-converter and hinter on */ + /* how to convert/grid-fit it. See @FT_OUTLINE_XXX. */ + /* */ + /* <Note> */ + /* The B/W rasterizer only checks bit~2 in the `tags' array for the */ + /* first point of each contour. The drop-out mode as given with */ + /* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */ + /* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */ + /* */ + typedef struct FT_Outline_ + { + short n_contours; /* number of contours in glyph */ + short n_points; /* number of points in the glyph */ + + FT_Vector* points; /* the outline's points */ + char* tags; /* the points flags */ + short* contours; /* the contour end points */ + + int flags; /* outline masks */ + + } FT_Outline; + + /* */ + + /* Following limits must be consistent with */ + /* FT_Outline.{n_contours,n_points} */ +#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX +#define FT_OUTLINE_POINTS_MAX SHRT_MAX + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_OUTLINE_XXX */ + /* */ + /* <Description> */ + /* A list of bit-field constants use for the flags in an outline's */ + /* `flags' field. */ + /* */ + /* <Values> */ + /* FT_OUTLINE_NONE :: */ + /* Value~0 is reserved. */ + /* */ + /* FT_OUTLINE_OWNER :: */ + /* If set, this flag indicates that the outline's field arrays */ + /* (i.e., `points', `flags', and `contours') are `owned' by the */ + /* outline object, and should thus be freed when it is destroyed. */ + /* */ + /* FT_OUTLINE_EVEN_ODD_FILL :: */ + /* By default, outlines are filled using the non-zero winding rule. */ + /* If set to 1, the outline will be filled using the even-odd fill */ + /* rule (only works with the smooth rasterizer). */ + /* */ + /* FT_OUTLINE_REVERSE_FILL :: */ + /* By default, outside contours of an outline are oriented in */ + /* clock-wise direction, as defined in the TrueType specification. */ + /* This flag is set if the outline uses the opposite direction */ + /* (typically for Type~1 fonts). This flag is ignored by the scan */ + /* converter. */ + /* */ + /* FT_OUTLINE_IGNORE_DROPOUTS :: */ + /* By default, the scan converter will try to detect drop-outs in */ + /* an outline and correct the glyph bitmap to ensure consistent */ + /* shape continuity. If set, this flag hints the scan-line */ + /* converter to ignore such cases. See below for more information. */ + /* */ + /* FT_OUTLINE_SMART_DROPOUTS :: */ + /* Select smart dropout control. If unset, use simple dropout */ + /* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */ + /* below for more information. */ + /* */ + /* FT_OUTLINE_INCLUDE_STUBS :: */ + /* If set, turn pixels on for `stubs', otherwise exclude them. */ + /* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */ + /* more information. */ + /* */ + /* FT_OUTLINE_HIGH_PRECISION :: */ + /* This flag indicates that the scan-line converter should try to */ + /* convert this outline to bitmaps with the highest possible */ + /* quality. It is typically set for small character sizes. Note */ + /* that this is only a hint that might be completely ignored by a */ + /* given scan-converter. */ + /* */ + /* FT_OUTLINE_SINGLE_PASS :: */ + /* This flag is set to force a given scan-converter to only use a */ + /* single pass over the outline to render a bitmap glyph image. */ + /* Normally, it is set for very large character sizes. It is only */ + /* a hint that might be completely ignored by a given */ + /* scan-converter. */ + /* */ + /* <Note> */ + /* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */ + /* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */ + /* rasterizer. */ + /* */ + /* There exists a second mechanism to pass the drop-out mode to the */ + /* B/W rasterizer; see the `tags' field in @FT_Outline. */ + /* */ + /* Please refer to the description of the `SCANTYPE' instruction in */ + /* the OpenType specification (in file `ttinst1.doc') how simple */ + /* drop-outs, smart drop-outs, and stubs are defined. */ + /* */ +#define FT_OUTLINE_NONE 0x0 +#define FT_OUTLINE_OWNER 0x1 +#define FT_OUTLINE_EVEN_ODD_FILL 0x2 +#define FT_OUTLINE_REVERSE_FILL 0x4 +#define FT_OUTLINE_IGNORE_DROPOUTS 0x8 +#define FT_OUTLINE_SMART_DROPOUTS 0x10 +#define FT_OUTLINE_INCLUDE_STUBS 0x20 + +#define FT_OUTLINE_HIGH_PRECISION 0x100 +#define FT_OUTLINE_SINGLE_PASS 0x200 + + + /* these constants are deprecated; use the corresponding */ + /* `FT_OUTLINE_XXX' values instead */ +#define ft_outline_none FT_OUTLINE_NONE +#define ft_outline_owner FT_OUTLINE_OWNER +#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL +#define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL +#define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS +#define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION +#define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS + + /* */ + +#define FT_CURVE_TAG( flag ) ( flag & 3 ) + +#define FT_CURVE_TAG_ON 1 +#define FT_CURVE_TAG_CONIC 0 +#define FT_CURVE_TAG_CUBIC 2 + +#define FT_CURVE_TAG_HAS_SCANMODE 4 + +#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */ +#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */ + +#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \ + FT_CURVE_TAG_TOUCH_Y ) + +#define FT_Curve_Tag_On FT_CURVE_TAG_ON +#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC +#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC +#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X +#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_MoveToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `move */ + /* to' function during outline walking/decomposition. */ + /* */ + /* A `move to' is emitted to start a new contour in an outline. */ + /* */ + /* <Input> */ + /* to :: A pointer to the target point of the `move to'. */ + /* */ + /* user :: A typeless pointer, which is passed from the caller of the */ + /* decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_MoveToFunc)( const FT_Vector* to, + void* user ); + +#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_LineToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `line */ + /* to' function during outline walking/decomposition. */ + /* */ + /* A `line to' is emitted to indicate a segment in the outline. */ + /* */ + /* <Input> */ + /* to :: A pointer to the target point of the `line to'. */ + /* */ + /* user :: A typeless pointer, which is passed from the caller of the */ + /* decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_LineToFunc)( const FT_Vector* to, + void* user ); + +#define FT_Outline_LineTo_Func FT_Outline_LineToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_ConicToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `conic */ + /* to' function during outline walking or decomposition. */ + /* */ + /* A `conic to' is emitted to indicate a second-order Bézier arc in */ + /* the outline. */ + /* */ + /* <Input> */ + /* control :: An intermediate control point between the last position */ + /* and the new target in `to'. */ + /* */ + /* to :: A pointer to the target end point of the conic arc. */ + /* */ + /* user :: A typeless pointer, which is passed from the caller of */ + /* the decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_ConicToFunc)( const FT_Vector* control, + const FT_Vector* to, + void* user ); + +#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_CubicToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `cubic */ + /* to' function during outline walking or decomposition. */ + /* */ + /* A `cubic to' is emitted to indicate a third-order Bézier arc. */ + /* */ + /* <Input> */ + /* control1 :: A pointer to the first Bézier control point. */ + /* */ + /* control2 :: A pointer to the second Bézier control point. */ + /* */ + /* to :: A pointer to the target end point. */ + /* */ + /* user :: A typeless pointer, which is passed from the caller of */ + /* the decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_CubicToFunc)( const FT_Vector* control1, + const FT_Vector* control2, + const FT_Vector* to, + void* user ); + +#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Outline_Funcs */ + /* */ + /* <Description> */ + /* A structure to hold various function pointers used during outline */ + /* decomposition in order to emit segments, conic, and cubic Béziers. */ + /* */ + /* <Fields> */ + /* move_to :: The `move to' emitter. */ + /* */ + /* line_to :: The segment emitter. */ + /* */ + /* conic_to :: The second-order Bézier arc emitter. */ + /* */ + /* cubic_to :: The third-order Bézier arc emitter. */ + /* */ + /* shift :: The shift that is applied to coordinates before they */ + /* are sent to the emitter. */ + /* */ + /* delta :: The delta that is applied to coordinates before they */ + /* are sent to the emitter, but after the shift. */ + /* */ + /* <Note> */ + /* The point coordinates sent to the emitters are the transformed */ + /* version of the original coordinates (this is important for high */ + /* accuracy during scan-conversion). The transformation is simple: */ + /* */ + /* { */ + /* x' = (x << shift) - delta */ + /* y' = (x << shift) - delta */ + /* } */ + /* */ + /* Set the values of `shift' and `delta' to~0 to get the original */ + /* point coordinates. */ + /* */ + typedef struct FT_Outline_Funcs_ + { + FT_Outline_MoveToFunc move_to; + FT_Outline_LineToFunc line_to; + FT_Outline_ConicToFunc conic_to; + FT_Outline_CubicToFunc cubic_to; + + int shift; + FT_Pos delta; + + } FT_Outline_Funcs; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_IMAGE_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags to an unsigned long type. */ + /* */ + /* <Note> */ + /* Since many 16-bit compilers don't like 32-bit enumerations, you */ + /* should redefine this macro in case of problems to something like */ + /* this: */ + /* */ + /* { */ + /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */ + /* } */ + /* */ + /* to get a simple enumeration without assigning special numbers. */ + /* */ +#ifndef FT_IMAGE_TAG +#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \ + value = ( ( (unsigned long)_x1 << 24 ) | \ + ( (unsigned long)_x2 << 16 ) | \ + ( (unsigned long)_x3 << 8 ) | \ + (unsigned long)_x4 ) +#endif /* FT_IMAGE_TAG */ + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Glyph_Format */ + /* */ + /* <Description> */ + /* An enumeration type used to describe the format of a given glyph */ + /* image. Note that this version of FreeType only supports two image */ + /* formats, even though future font drivers will be able to register */ + /* their own format. */ + /* */ + /* <Values> */ + /* FT_GLYPH_FORMAT_NONE :: */ + /* The value~0 is reserved. */ + /* */ + /* FT_GLYPH_FORMAT_COMPOSITE :: */ + /* The glyph image is a composite of several other images. This */ + /* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */ + /* report compound glyphs (like accented characters). */ + /* */ + /* FT_GLYPH_FORMAT_BITMAP :: */ + /* The glyph image is a bitmap, and can be described as an */ + /* @FT_Bitmap. You generally need to access the `bitmap' field of */ + /* the @FT_GlyphSlotRec structure to read it. */ + /* */ + /* FT_GLYPH_FORMAT_OUTLINE :: */ + /* The glyph image is a vectorial outline made of line segments */ + /* and Bézier arcs; it can be described as an @FT_Outline; you */ + /* generally want to access the `outline' field of the */ + /* @FT_GlyphSlotRec structure to read it. */ + /* */ + /* FT_GLYPH_FORMAT_PLOTTER :: */ + /* The glyph image is a vectorial path with no inside and outside */ + /* contours. Some Type~1 fonts, like those in the Hershey family, */ + /* contain glyphs in this format. These are described as */ + /* @FT_Outline, but FreeType isn't currently capable of rendering */ + /* them correctly. */ + /* */ + typedef enum FT_Glyph_Format_ + { + FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ), + + FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' ) + + } FT_Glyph_Format; + + + /* these constants are deprecated; use the corresponding */ + /* `FT_Glyph_Format' values instead. */ +#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE +#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE +#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP +#define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE +#define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** R A S T E R D E F I N I T I O N S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* A raster is a scan converter, in charge of rendering an outline into */ + /* a a bitmap. This section contains the public API for rasters. */ + /* */ + /* Note that in FreeType 2, all rasters are now encapsulated within */ + /* specific modules called `renderers'. See `ftrender.h' for more */ + /* details on renderers. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* raster */ + /* */ + /* <Title> */ + /* Scanline Converter */ + /* */ + /* <Abstract> */ + /* How vectorial outlines are converted into bitmaps and pixmaps. */ + /* */ + /* <Description> */ + /* This section contains technical definitions. */ + /* */ + /* <Order> */ + /* FT_Raster */ + /* FT_Span */ + /* FT_SpanFunc */ + /* */ + /* FT_Raster_Params */ + /* FT_RASTER_FLAG_XXX */ + /* */ + /* FT_Raster_NewFunc */ + /* FT_Raster_DoneFunc */ + /* FT_Raster_ResetFunc */ + /* FT_Raster_SetModeFunc */ + /* FT_Raster_RenderFunc */ + /* FT_Raster_Funcs */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Raster */ + /* */ + /* <Description> */ + /* An opaque handle (pointer) to a raster object. Each object can be */ + /* used independently to convert an outline into a bitmap or pixmap. */ + /* */ + typedef struct FT_RasterRec_* FT_Raster; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Span */ + /* */ + /* <Description> */ + /* A structure used to model a single span of gray pixels when */ + /* rendering an anti-aliased bitmap. */ + /* */ + /* <Fields> */ + /* x :: The span's horizontal start position. */ + /* */ + /* len :: The span's length in pixels. */ + /* */ + /* coverage :: The span color/coverage, ranging from 0 (background) */ + /* to 255 (foreground). */ + /* */ + /* <Note> */ + /* This structure is used by the span drawing callback type named */ + /* @FT_SpanFunc that takes the y~coordinate of the span as a */ + /* parameter. */ + /* */ + /* The coverage value is always between 0 and 255. If you want less */ + /* gray values, the callback function has to reduce them. */ + /* */ + typedef struct FT_Span_ + { + short x; + unsigned short len; + unsigned char coverage; + + } FT_Span; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_SpanFunc */ + /* */ + /* <Description> */ + /* A function used as a call-back by the anti-aliased renderer in */ + /* order to let client applications draw themselves the gray pixel */ + /* spans on each scan line. */ + /* */ + /* <Input> */ + /* y :: The scanline's y~coordinate. */ + /* */ + /* count :: The number of spans to draw on this scanline. */ + /* */ + /* spans :: A table of `count' spans to draw on the scanline. */ + /* */ + /* user :: User-supplied data that is passed to the callback. */ + /* */ + /* <Note> */ + /* This callback allows client applications to directly render the */ + /* gray spans of the anti-aliased bitmap to any kind of surfaces. */ + /* */ + /* This can be used to write anti-aliased outlines directly to a */ + /* given background bitmap, and even perform translucency. */ + /* */ + /* Note that the `count' field cannot be greater than a fixed value */ + /* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */ + /* `ftoption.h'. By default, this value is set to~32, which means */ + /* that if there are more than 32~spans on a given scanline, the */ + /* callback is called several times with the same `y' parameter in */ + /* order to draw all callbacks. */ + /* */ + /* Otherwise, the callback is only called once per scan-line, and */ + /* only for those scanlines that do have `gray' pixels on them. */ + /* */ + typedef void + (*FT_SpanFunc)( int y, + int count, + const FT_Span* spans, + void* user ); + +#define FT_Raster_Span_Func FT_SpanFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_BitTest_Func */ + /* */ + /* <Description> */ + /* Deprecated, unimplemented. */ + /* */ + typedef int + (*FT_Raster_BitTest_Func)( int y, + int x, + void* user ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_BitSet_Func */ + /* */ + /* <Description> */ + /* Deprecated, unimplemented. */ + /* */ + typedef void + (*FT_Raster_BitSet_Func)( int y, + int x, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_RASTER_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flag constants as used in the `flags' field of a */ + /* @FT_Raster_Params structure. */ + /* */ + /* <Values> */ + /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */ + /* */ + /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */ + /* anti-aliased glyph image should be */ + /* generated. Otherwise, it will be */ + /* monochrome (1-bit). */ + /* */ + /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */ + /* rendering. In this mode, client */ + /* applications must provide their own span */ + /* callback. This lets them directly */ + /* draw or compose over an existing bitmap. */ + /* If this bit is not set, the target */ + /* pixmap's buffer _must_ be zeroed before */ + /* rendering. */ + /* */ + /* Direct rendering is only possible with */ + /* anti-aliased glyphs. */ + /* */ + /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */ + /* rendering mode. If set, the output will */ + /* be clipped to a box specified in the */ + /* `clip_box' field of the */ + /* @FT_Raster_Params structure. */ + /* */ + /* Note that by default, the glyph bitmap */ + /* is clipped to the target pixmap, except */ + /* in direct rendering mode where all spans */ + /* are generated if no clipping box is set. */ + /* */ +#define FT_RASTER_FLAG_DEFAULT 0x0 +#define FT_RASTER_FLAG_AA 0x1 +#define FT_RASTER_FLAG_DIRECT 0x2 +#define FT_RASTER_FLAG_CLIP 0x4 + + /* these constants are deprecated; use the corresponding */ + /* `FT_RASTER_FLAG_XXX' values instead */ +#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT +#define ft_raster_flag_aa FT_RASTER_FLAG_AA +#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT +#define ft_raster_flag_clip FT_RASTER_FLAG_CLIP + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Raster_Params */ + /* */ + /* <Description> */ + /* A structure to hold the arguments used by a raster's render */ + /* function. */ + /* */ + /* <Fields> */ + /* target :: The target bitmap. */ + /* */ + /* source :: A pointer to the source glyph image (e.g., an */ + /* @FT_Outline). */ + /* */ + /* flags :: The rendering flags. */ + /* */ + /* gray_spans :: The gray span drawing callback. */ + /* */ + /* black_spans :: Unused. */ + /* */ + /* bit_test :: Unused. */ + /* */ + /* bit_set :: Unused. */ + /* */ + /* user :: User-supplied data that is passed to each drawing */ + /* callback. */ + /* */ + /* clip_box :: An optional clipping box. It is only used in */ + /* direct rendering mode. Note that coordinates here */ + /* should be expressed in _integer_ pixels (and not in */ + /* 26.6 fixed-point units). */ + /* */ + /* <Note> */ + /* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */ + /* bit flag is set in the `flags' field, otherwise a monochrome */ + /* bitmap is generated. */ + /* */ + /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */ + /* raster will call the `gray_spans' callback to draw gray pixel */ + /* spans. This allows direct composition over a pre-existing bitmap */ + /* through user-provided callbacks to perform the span drawing and */ + /* composition. Not supported by the monochrome rasterizer. */ + /* */ + typedef struct FT_Raster_Params_ + { + const FT_Bitmap* target; + const void* source; + int flags; + FT_SpanFunc gray_spans; + FT_SpanFunc black_spans; /* unused */ + FT_Raster_BitTest_Func bit_test; /* unused */ + FT_Raster_BitSet_Func bit_set; /* unused */ + void* user; + FT_BBox clip_box; + + } FT_Raster_Params; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_NewFunc */ + /* */ + /* <Description> */ + /* A function used to create a new raster object. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory allocator. */ + /* */ + /* <Output> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `memory' parameter is a typeless pointer in order to avoid */ + /* un-wanted dependencies on the rest of the FreeType code. In */ + /* practice, it is an @FT_Memory object, i.e., a handle to the */ + /* standard FreeType memory allocator. However, this field can be */ + /* completely ignored by a given raster implementation. */ + /* */ + typedef int + (*FT_Raster_NewFunc)( void* memory, + FT_Raster* raster ); + +#define FT_Raster_New_Func FT_Raster_NewFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_DoneFunc */ + /* */ + /* <Description> */ + /* A function used to destroy a given raster object. */ + /* */ + /* <Input> */ + /* raster :: A handle to the raster object. */ + /* */ + typedef void + (*FT_Raster_DoneFunc)( FT_Raster raster ); + +#define FT_Raster_Done_Func FT_Raster_DoneFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_ResetFunc */ + /* */ + /* <Description> */ + /* FreeType provides an area of memory called the `render pool', */ + /* available to all registered rasters. This pool can be freely used */ + /* during a given scan-conversion but is shared by all rasters. Its */ + /* content is thus transient. */ + /* */ + /* This function is called each time the render pool changes, or just */ + /* after a new raster object is created. */ + /* */ + /* <Input> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* pool_base :: The address in memory of the render pool. */ + /* */ + /* pool_size :: The size in bytes of the render pool. */ + /* */ + /* <Note> */ + /* Rasters can ignore the render pool and rely on dynamic memory */ + /* allocation if they want to (a handle to the memory allocator is */ + /* passed to the raster constructor). However, this is not */ + /* recommended for efficiency purposes. */ + /* */ + typedef void + (*FT_Raster_ResetFunc)( FT_Raster raster, + unsigned char* pool_base, + unsigned long pool_size ); + +#define FT_Raster_Reset_Func FT_Raster_ResetFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_SetModeFunc */ + /* */ + /* <Description> */ + /* This function is a generic facility to change modes or attributes */ + /* in a given raster. This can be used for debugging purposes, or */ + /* simply to allow implementation-specific `features' in a given */ + /* raster module. */ + /* */ + /* <Input> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* mode :: A 4-byte tag used to name the mode or property. */ + /* */ + /* args :: A pointer to the new mode/property to use. */ + /* */ + typedef int + (*FT_Raster_SetModeFunc)( FT_Raster raster, + unsigned long mode, + void* args ); + +#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_RenderFunc */ + /* */ + /* <Description> */ + /* Invoke a given raster to scan-convert a given glyph image into a */ + /* target bitmap. */ + /* */ + /* <Input> */ + /* raster :: A handle to the raster object. */ + /* */ + /* params :: A pointer to an @FT_Raster_Params structure used to */ + /* store the rendering parameters. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + /* <Note> */ + /* The exact format of the source image depends on the raster's glyph */ + /* format defined in its @FT_Raster_Funcs structure. It can be an */ + /* @FT_Outline or anything else in order to support a large array of */ + /* glyph formats. */ + /* */ + /* Note also that the render function can fail and return a */ + /* `FT_Err_Unimplemented_Feature' error code if the raster used does */ + /* not support direct composition. */ + /* */ + /* XXX: For now, the standard raster doesn't support direct */ + /* composition but this should change for the final release (see */ + /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */ + /* for examples of distinct implementations that support direct */ + /* composition). */ + /* */ + typedef int + (*FT_Raster_RenderFunc)( FT_Raster raster, + const FT_Raster_Params* params ); + +#define FT_Raster_Render_Func FT_Raster_RenderFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Raster_Funcs */ + /* */ + /* <Description> */ + /* A structure used to describe a given raster class to the library. */ + /* */ + /* <Fields> */ + /* glyph_format :: The supported glyph format for this raster. */ + /* */ + /* raster_new :: The raster constructor. */ + /* */ + /* raster_reset :: Used to reset the render pool within the raster. */ + /* */ + /* raster_render :: A function to render a glyph into a given bitmap. */ + /* */ + /* raster_done :: The raster destructor. */ + /* */ + typedef struct FT_Raster_Funcs_ + { + FT_Glyph_Format glyph_format; + FT_Raster_NewFunc raster_new; + FT_Raster_ResetFunc raster_reset; + FT_Raster_SetModeFunc raster_set_mode; + FT_Raster_RenderFunc raster_render; + FT_Raster_DoneFunc raster_done; + + } FT_Raster_Funcs; + + /* */ + + +FT_END_HEADER + +#endif /* __FTIMAGE_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/freetype2/include/ohos/freetype2/ftincrem.h b/freetype2/include/ohos/freetype2/ftincrem.h new file mode 100644 index 0000000000..4c0246c5df --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftincrem.h @@ -0,0 +1,354 @@ +/***************************************************************************/ +/* */ +/* ftincrem.h */ +/* */ +/* FreeType incremental loading (specification). */ +/* */ +/* Copyright 2002, 2003, 2006-2008, 2010, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTINCREM_H__ +#define __FTINCREM_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************** + * + * @section: + * incremental + * + * @title: + * Incremental Loading + * + * @abstract: + * Custom Glyph Loading. + * + * @description: + * This section contains various functions used to perform so-called + * `incremental' glyph loading. This is a mode where all glyphs loaded + * from a given @FT_Face are provided by the client application. + * + * Apart from that, all other tables are loaded normally from the font + * file. This mode is useful when FreeType is used within another + * engine, e.g., a PostScript Imaging Processor. + * + * To enable this mode, you must use @FT_Open_Face, passing an + * @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an + * @FT_Incremental_Interface value. See the comments for + * @FT_Incremental_InterfaceRec for an example. + * + */ + + + /*************************************************************************** + * + * @type: + * FT_Incremental + * + * @description: + * An opaque type describing a user-provided object used to implement + * `incremental' glyph loading within FreeType. This is used to support + * embedded fonts in certain environments (e.g., PostScript interpreters), + * where the glyph data isn't in the font file, or must be overridden by + * different values. + * + * @note: + * It is up to client applications to create and implement @FT_Incremental + * objects, as long as they provide implementations for the methods + * @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc + * and @FT_Incremental_GetGlyphMetricsFunc. + * + * See the description of @FT_Incremental_InterfaceRec to understand how + * to use incremental objects with FreeType. + * + */ + typedef struct FT_IncrementalRec_* FT_Incremental; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_MetricsRec + * + * @description: + * A small structure used to contain the basic glyph metrics returned + * by the @FT_Incremental_GetGlyphMetricsFunc method. + * + * @fields: + * bearing_x :: + * Left bearing, in font units. + * + * bearing_y :: + * Top bearing, in font units. + * + * advance :: + * Horizontal component of glyph advance, in font units. + * + * advance_v :: + * Vertical component of glyph advance, in font units. + * + * @note: + * These correspond to horizontal or vertical metrics depending on the + * value of the `vertical' argument to the function + * @FT_Incremental_GetGlyphMetricsFunc. + * + */ + typedef struct FT_Incremental_MetricsRec_ + { + FT_Long bearing_x; + FT_Long bearing_y; + FT_Long advance; + FT_Long advance_v; /* since 2.3.12 */ + + } FT_Incremental_MetricsRec; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_Metrics + * + * @description: + * A handle to an @FT_Incremental_MetricsRec structure. + * + */ + typedef struct FT_Incremental_MetricsRec_* FT_Incremental_Metrics; + + + /*************************************************************************** + * + * @type: + * FT_Incremental_GetGlyphDataFunc + * + * @description: + * A function called by FreeType to access a given glyph's data bytes + * during @FT_Load_Glyph or @FT_Load_Char if incremental loading is + * enabled. + * + * Note that the format of the glyph's data bytes depends on the font + * file format. For TrueType, it must correspond to the raw bytes within + * the `glyf' table. For PostScript formats, it must correspond to the + * *unencrypted* charstring bytes, without any `lenIV' header. It is + * undefined for any other format. + * + * @input: + * incremental :: + * Handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * glyph_index :: + * Index of relevant glyph. + * + * @output: + * adata :: + * A structure describing the returned glyph data bytes (which will be + * accessed as a read-only byte block). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If this function returns successfully the method + * @FT_Incremental_FreeGlyphDataFunc will be called later to release + * the data bytes. + * + * Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for + * compound glyphs. + * + */ + typedef FT_Error + (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental incremental, + FT_UInt glyph_index, + FT_Data* adata ); + + + /*************************************************************************** + * + * @type: + * FT_Incremental_FreeGlyphDataFunc + * + * @description: + * A function used to release the glyph data bytes returned by a + * successful call to @FT_Incremental_GetGlyphDataFunc. + * + * @input: + * incremental :: + * A handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * data :: + * A structure describing the glyph data bytes (which will be accessed + * as a read-only byte block). + * + */ + typedef void + (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental incremental, + FT_Data* data ); + + + /*************************************************************************** + * + * @type: + * FT_Incremental_GetGlyphMetricsFunc + * + * @description: + * A function used to retrieve the basic metrics of a given glyph index + * before accessing its data. This is necessary because, in certain + * formats like TrueType, the metrics are stored in a different place from + * the glyph images proper. + * + * @input: + * incremental :: + * A handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * glyph_index :: + * Index of relevant glyph. + * + * vertical :: + * If true, return vertical metrics. + * + * ametrics :: + * This parameter is used for both input and output. + * The original glyph metrics, if any, in font units. If metrics are + * not available all the values must be set to zero. + * + * @output: + * ametrics :: + * The replacement glyph metrics in font units. + * + */ + typedef FT_Error + (*FT_Incremental_GetGlyphMetricsFunc) + ( FT_Incremental incremental, + FT_UInt glyph_index, + FT_Bool vertical, + FT_Incremental_MetricsRec *ametrics ); + + + /************************************************************************** + * + * @struct: + * FT_Incremental_FuncsRec + * + * @description: + * A table of functions for accessing fonts that load data + * incrementally. Used in @FT_Incremental_InterfaceRec. + * + * @fields: + * get_glyph_data :: + * The function to get glyph data. Must not be null. + * + * free_glyph_data :: + * The function to release glyph data. Must not be null. + * + * get_glyph_metrics :: + * The function to get glyph metrics. May be null if the font does + * not provide overriding glyph metrics. + * + */ + typedef struct FT_Incremental_FuncsRec_ + { + FT_Incremental_GetGlyphDataFunc get_glyph_data; + FT_Incremental_FreeGlyphDataFunc free_glyph_data; + FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics; + + } FT_Incremental_FuncsRec; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_InterfaceRec + * + * @description: + * A structure to be used with @FT_Open_Face to indicate that the user + * wants to support incremental glyph loading. You should use it with + * @FT_PARAM_TAG_INCREMENTAL as in the following example: + * + * { + * FT_Incremental_InterfaceRec inc_int; + * FT_Parameter parameter; + * FT_Open_Args open_args; + * + * + * // set up incremental descriptor + * inc_int.funcs = my_funcs; + * inc_int.object = my_object; + * + * // set up optional parameter + * parameter.tag = FT_PARAM_TAG_INCREMENTAL; + * parameter.data = &inc_int; + * + * // set up FT_Open_Args structure + * open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; + * open_args.pathname = my_font_pathname; + * open_args.num_params = 1; + * open_args.params = ¶meter; // we use one optional argument + * + * // open the font + * error = FT_Open_Face( library, &open_args, index, &face ); + * ... + * } + * + */ + typedef struct FT_Incremental_InterfaceRec_ + { + const FT_Incremental_FuncsRec* funcs; + FT_Incremental object; + + } FT_Incremental_InterfaceRec; + + + /*************************************************************************** + * + * @type: + * FT_Incremental_Interface + * + * @description: + * A pointer to an @FT_Incremental_InterfaceRec structure. + * + */ + typedef FT_Incremental_InterfaceRec* FT_Incremental_Interface; + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_INCREMENTAL + * + * @description: + * A constant used as the tag of @FT_Parameter structures to indicate + * an incremental loading object to be used by FreeType. + * + */ +#define FT_PARAM_TAG_INCREMENTAL FT_MAKE_TAG( 'i', 'n', 'c', 'r' ) + + /* */ + + +FT_END_HEADER + +#endif /* __FTINCREM_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftlcdfil.h b/freetype2/include/ohos/freetype2/ftlcdfil.h new file mode 100644 index 0000000000..e8679c1a3f --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftlcdfil.h @@ -0,0 +1,251 @@ +/***************************************************************************/ +/* */ +/* ftlcdfil.h */ +/* */ +/* FreeType API for color filtering of subpixel bitmap glyphs */ +/* (specification). */ +/* */ +/* Copyright 2006-2008, 2010, 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FT_LCD_FILTER_H__ +#define __FT_LCD_FILTER_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************** + * + * @section: + * lcd_filtering + * + * @title: + * LCD Filtering + * + * @abstract: + * Reduce color fringes of LCD-optimized bitmaps. + * + * @description: + * The @FT_Library_SetLcdFilter API can be used to specify a low-pass + * filter, which is then applied to LCD-optimized bitmaps generated + * through @FT_Render_Glyph. This is useful to reduce color fringes + * that would occur with unfiltered rendering. + * + * Note that no filter is active by default, and that this function is + * *not* implemented in default builds of the library. You need to + * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file + * in order to activate it. + * + * FreeType generates alpha coverage maps, which are linear by nature. + * For instance, the value 0x80 in bitmap representation means that + * (within numerical precision) 0x80/0xFF fraction of that pixel is + * covered by the glyph's outline. The blending function for placing + * text over a background is + * + * { + * dst = alpha * src + (1 - alpha) * dst , + * } + * + * which is known as OVER. However, when calculating the output of the + * OVER operator, the source colors should first be transformed to a + * linear color space, then alpha blended in that space, and transformed + * back to the output color space. + * + * When linear light blending is used, the default FIR5 filtering + * weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as + * they have been designed for black on white rendering while lacking + * gamma correction. To preserve color neutrality, weights for a FIR5 + * filter should be chosen according to two free parameters `a' and `c', + * and the FIR weights should be + * + * { + * [a - c, a + c, 2 * a, a + c, a - c] . + * } + * + * This formula generates equal weights for all the color primaries + * across the filter kernel, which makes it colorless. One suggested + * set of weights is + * + * { + * [0x10, 0x50, 0x60, 0x50, 0x10] , + * } + * + * where `a' has value 0x30 and `b' value 0x20. The weights in filter + * may have a sum larger than 0x100, which increases coloration slightly + * but also improves contrast. + */ + + + /**************************************************************************** + * + * @enum: + * FT_LcdFilter + * + * @description: + * A list of values to identify various types of LCD filters. + * + * @values: + * FT_LCD_FILTER_NONE :: + * Do not perform filtering. When used with subpixel rendering, this + * results in sometimes severe color fringes. + * + * FT_LCD_FILTER_DEFAULT :: + * The default filter reduces color fringes considerably, at the cost + * of a slight blurriness in the output. + * + * FT_LCD_FILTER_LIGHT :: + * The light filter is a variant that produces less blurriness at the + * cost of slightly more color fringes than the default one. It might + * be better, depending on taste, your monitor, or your personal vision. + * + * FT_LCD_FILTER_LEGACY :: + * This filter corresponds to the original libXft color filter. It + * provides high contrast output but can exhibit really bad color + * fringes if glyphs are not extremely well hinted to the pixel grid. + * In other words, it only works well if the TrueType bytecode + * interpreter is enabled *and* high-quality hinted fonts are used. + * + * This filter is only provided for comparison purposes, and might be + * disabled or stay unsupported in the future. + * + * @since: + * 2.3.0 + */ + typedef enum FT_LcdFilter_ + { + FT_LCD_FILTER_NONE = 0, + FT_LCD_FILTER_DEFAULT = 1, + FT_LCD_FILTER_LIGHT = 2, + FT_LCD_FILTER_LEGACY = 16, + + FT_LCD_FILTER_MAX /* do not remove */ + + } FT_LcdFilter; + + + /************************************************************************** + * + * @func: + * FT_Library_SetLcdFilter + * + * @description: + * This function is used to apply color filtering to LCD decimated + * bitmaps, like the ones used when calling @FT_Render_Glyph with + * @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V. + * + * @input: + * library :: + * A handle to the target library instance. + * + * filter :: + * The filter type. + * + * You can use @FT_LCD_FILTER_NONE here to disable this feature, or + * @FT_LCD_FILTER_DEFAULT to use a default filter that should work + * well on most LCD screens. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This feature is always disabled by default. Clients must make an + * explicit call to this function with a `filter' value other than + * @FT_LCD_FILTER_NONE in order to enable it. + * + * Due to *PATENTS* covering subpixel rendering, this function doesn't + * do anything except returning `FT_Err_Unimplemented_Feature' if the + * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not + * defined in your build of the library, which should correspond to all + * default builds of FreeType. + * + * The filter affects glyph bitmaps rendered through @FT_Render_Glyph, + * @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char. + * + * It does _not_ affect the output of @FT_Outline_Render and + * @FT_Outline_Get_Bitmap. + * + * If this feature is activated, the dimensions of LCD glyph bitmaps are + * either larger or taller than the dimensions of the corresponding + * outline with regards to the pixel grid. For example, for + * @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and + * up to 3~pixels to the right. + * + * The bitmap offset values are adjusted correctly, so clients shouldn't + * need to modify their layout and glyph positioning code when enabling + * the filter. + * + * @since: + * 2.3.0 + */ + FT_EXPORT( FT_Error ) + FT_Library_SetLcdFilter( FT_Library library, + FT_LcdFilter filter ); + + + /************************************************************************** + * + * @func: + * FT_Library_SetLcdFilterWeights + * + * @description: + * Use this function to override the filter weights selected by + * @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple + * (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10, + * 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and + * FT_LCD_FILTER_LEGACY. + * + * @input: + * library :: + * A handle to the target library instance. + * + * weights :: + * A pointer to an array; the function copies the first five bytes and + * uses them to specify the filter weights. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Due to *PATENTS* covering subpixel rendering, this function doesn't + * do anything except returning `FT_Err_Unimplemented_Feature' if the + * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not + * defined in your build of the library, which should correspond to all + * default builds of FreeType. + * + * This function must be called after @FT_Library_SetLcdFilter to have + * any effect. + * + * @since: + * 2.4.0 + */ + FT_EXPORT( FT_Error ) + FT_Library_SetLcdFilterWeights( FT_Library library, + unsigned char *weights ); + + /* */ + + +FT_END_HEADER + +#endif /* __FT_LCD_FILTER_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftlist.h b/freetype2/include/ohos/freetype2/ftlist.h new file mode 100644 index 0000000000..9950a27997 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftlist.h @@ -0,0 +1,276 @@ +/***************************************************************************/ +/* */ +/* ftlist.h */ +/* */ +/* Generic list support for FreeType (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2007, 2010, 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file implements functions relative to list processing. Its */ + /* data structures are defined in `freetype.h'. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTLIST_H__ +#define __FTLIST_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* list_processing */ + /* */ + /* <Title> */ + /* List Processing */ + /* */ + /* <Abstract> */ + /* Simple management of lists. */ + /* */ + /* <Description> */ + /* This section contains various definitions related to list */ + /* processing using doubly-linked nodes. */ + /* */ + /* <Order> */ + /* FT_List */ + /* FT_ListNode */ + /* FT_ListRec */ + /* FT_ListNodeRec */ + /* */ + /* FT_List_Add */ + /* FT_List_Insert */ + /* FT_List_Find */ + /* FT_List_Remove */ + /* FT_List_Up */ + /* FT_List_Iterate */ + /* FT_List_Iterator */ + /* FT_List_Finalize */ + /* FT_List_Destructor */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Find */ + /* */ + /* <Description> */ + /* Find the list node for a given listed object. */ + /* */ + /* <Input> */ + /* list :: A pointer to the parent list. */ + /* data :: The address of the listed object. */ + /* */ + /* <Return> */ + /* List node. NULL if it wasn't found. */ + /* */ + FT_EXPORT( FT_ListNode ) + FT_List_Find( FT_List list, + void* data ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Add */ + /* */ + /* <Description> */ + /* Append an element to the end of a list. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* node :: The node to append. */ + /* */ + FT_EXPORT( void ) + FT_List_Add( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Insert */ + /* */ + /* <Description> */ + /* Insert an element at the head of a list. */ + /* */ + /* <InOut> */ + /* list :: A pointer to parent list. */ + /* node :: The node to insert. */ + /* */ + FT_EXPORT( void ) + FT_List_Insert( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Remove */ + /* */ + /* <Description> */ + /* Remove a node from a list. This function doesn't check whether */ + /* the node is in the list! */ + /* */ + /* <Input> */ + /* node :: The node to remove. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* */ + FT_EXPORT( void ) + FT_List_Remove( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Up */ + /* */ + /* <Description> */ + /* Move a node to the head/top of a list. Used to maintain LRU */ + /* lists. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* node :: The node to move. */ + /* */ + FT_EXPORT( void ) + FT_List_Up( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_List_Iterator */ + /* */ + /* <Description> */ + /* An FT_List iterator function that is called during a list parse */ + /* by @FT_List_Iterate. */ + /* */ + /* <Input> */ + /* node :: The current iteration list node. */ + /* */ + /* user :: A typeless pointer passed to @FT_List_Iterate. */ + /* Can be used to point to the iteration's state. */ + /* */ + typedef FT_Error + (*FT_List_Iterator)( FT_ListNode node, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Iterate */ + /* */ + /* <Description> */ + /* Parse a list and calls a given iterator function on each element. */ + /* Note that parsing is stopped as soon as one of the iterator calls */ + /* returns a non-zero value. */ + /* */ + /* <Input> */ + /* list :: A handle to the list. */ + /* iterator :: An iterator function, called on each node of the list. */ + /* user :: A user-supplied field that is passed as the second */ + /* argument to the iterator. */ + /* */ + /* <Return> */ + /* The result (a FreeType error code) of the last iterator call. */ + /* */ + FT_EXPORT( FT_Error ) + FT_List_Iterate( FT_List list, + FT_List_Iterator iterator, + void* user ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_List_Destructor */ + /* */ + /* <Description> */ + /* An @FT_List iterator function that is called during a list */ + /* finalization by @FT_List_Finalize to destroy all elements in a */ + /* given list. */ + /* */ + /* <Input> */ + /* system :: The current system object. */ + /* */ + /* data :: The current object to destroy. */ + /* */ + /* user :: A typeless pointer passed to @FT_List_Iterate. It can */ + /* be used to point to the iteration's state. */ + /* */ + typedef void + (*FT_List_Destructor)( FT_Memory memory, + void* data, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Finalize */ + /* */ + /* <Description> */ + /* Destroy all elements in the list as well as the list itself. */ + /* */ + /* <Input> */ + /* list :: A handle to the list. */ + /* */ + /* destroy :: A list destructor that will be applied to each element */ + /* of the list. Set this to NULL if not needed. */ + /* */ + /* memory :: The current memory object that handles deallocation. */ + /* */ + /* user :: A user-supplied field that is passed as the last */ + /* argument to the destructor. */ + /* */ + /* <Note> */ + /* This function expects that all nodes added by @FT_List_Add or */ + /* @FT_List_Insert have been dynamically allocated. */ + /* */ + FT_EXPORT( void ) + FT_List_Finalize( FT_List list, + FT_List_Destructor destroy, + FT_Memory memory, + void* user ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTLIST_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftlzw.h b/freetype2/include/ohos/freetype2/ftlzw.h new file mode 100644 index 0000000000..857c0c52bb --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftlzw.h @@ -0,0 +1,99 @@ +/***************************************************************************/ +/* */ +/* ftlzw.h */ +/* */ +/* LZW-compressed stream support. */ +/* */ +/* Copyright 2004, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTLZW_H__ +#define __FTLZW_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* lzw */ + /* */ + /* <Title> */ + /* LZW Streams */ + /* */ + /* <Abstract> */ + /* Using LZW-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of LZW-specific functions. */ + /* */ + /*************************************************************************/ + + /************************************************************************ + * + * @function: + * FT_Stream_OpenLZW + * + * @description: + * Open a new stream to parse LZW-compressed font files. This is + * mainly used to support the compressed `*.pcf.Z' fonts that come + * with XFree86. + * + * @input: + * stream :: The target embedding stream. + * + * source :: The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream + * + * In certain builds of the library, LZW compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a LZW stream from it + * and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with LZW support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenLZW( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTLZW_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftmac.h b/freetype2/include/ohos/freetype2/ftmac.h new file mode 100644 index 0000000000..42874fe6fc --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftmac.h @@ -0,0 +1,274 @@ +/***************************************************************************/ +/* */ +/* ftmac.h */ +/* */ +/* Additional Mac-specific API. */ +/* */ +/* Copyright 1996-2001, 2004, 2006, 2007, 2013 by */ +/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* NOTE: Include this file after FT_FREETYPE_H and after any */ +/* Mac-specific headers (because this header uses Mac types such as */ +/* Handle, FSSpec, FSRef, etc.) */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMAC_H__ +#define __FTMAC_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + +/* gcc-3.4.1 and later can warn about functions tagged as deprecated */ +#ifndef FT_DEPRECATED_ATTRIBUTE +#if defined(__GNUC__) && \ + ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) +#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) +#else +#define FT_DEPRECATED_ATTRIBUTE +#endif +#endif + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* mac_specific */ + /* */ + /* <Title> */ + /* Mac Specific Interface */ + /* */ + /* <Abstract> */ + /* Only available on the Macintosh. */ + /* */ + /* <Description> */ + /* The following definitions are only available if FreeType is */ + /* compiled on a Macintosh. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FOND */ + /* */ + /* <Description> */ + /* Create a new face object from a FOND resource. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* fond :: A FOND resource. */ + /* */ + /* face_index :: Only supported for the -1 `sanity check' special */ + /* case. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Notes> */ + /* This function can be used to create @FT_Face objects from fonts */ + /* that are installed in the system as follows. */ + /* */ + /* { */ + /* fond = GetResource( 'FOND', fontName ); */ + /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FOND( FT_Library library, + Handle fond, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFile_From_Mac_Name */ + /* */ + /* <Description> */ + /* Return an FSSpec for the disk file containing the named font. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font (e.g., Times New Roman */ + /* Bold). */ + /* */ + /* <Output> */ + /* pathSpec :: FSSpec to the file. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* face_index :: Index of the face. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFile_From_Mac_Name( const char* fontName, + FSSpec* pathSpec, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFile_From_Mac_ATS_Name */ + /* */ + /* <Description> */ + /* Return an FSSpec for the disk file containing the named font. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font in ATS framework. */ + /* */ + /* <Output> */ + /* pathSpec :: FSSpec to the file. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* face_index :: Index of the face. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFile_From_Mac_ATS_Name( const char* fontName, + FSSpec* pathSpec, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFilePath_From_Mac_ATS_Name */ + /* */ + /* <Description> */ + /* Return a pathname of the disk file and face index for given font */ + /* name that is handled by ATS framework. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font in ATS framework. */ + /* */ + /* <Output> */ + /* path :: Buffer to store pathname of the file. For passing */ + /* to @FT_New_Face. The client must allocate this */ + /* buffer before calling this function. */ + /* */ + /* maxPathSize :: Lengths of the buffer `path' that client allocated. */ + /* */ + /* face_index :: Index of the face. For passing to @FT_New_Face. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFilePath_From_Mac_ATS_Name( const char* fontName, + UInt8* path, + UInt32 maxPathSize, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FSSpec */ + /* */ + /* <Description> */ + /* Create a new face object from a given resource and typeface index */ + /* using an FSSpec to the font file. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* spec :: FSSpec to the font file. */ + /* */ + /* face_index :: The index of the face within the resource. The */ + /* first face has index~0. */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except */ + /* it accepts an FSSpec instead of a path. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FSSpec( FT_Library library, + const FSSpec *spec, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FSRef */ + /* */ + /* <Description> */ + /* Create a new face object from a given resource and typeface index */ + /* using an FSRef to the font file. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* spec :: FSRef to the font file. */ + /* */ + /* face_index :: The index of the face within the resource. The */ + /* first face has index~0. */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* @FT_New_Face_From_FSRef is identical to @FT_New_Face except */ + /* it accepts an FSRef instead of a path. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FSRef( FT_Library library, + const FSRef *ref, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + /* */ + + +FT_END_HEADER + + +#endif /* __FTMAC_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftmm.h b/freetype2/include/ohos/freetype2/ftmm.h new file mode 100644 index 0000000000..2dcfd678df --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftmm.h @@ -0,0 +1,373 @@ +/***************************************************************************/ +/* */ +/* ftmm.h */ +/* */ +/* FreeType Multiple Master font interface (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMM_H__ +#define __FTMM_H__ + + +#include <ft2build.h> +#include FT_TYPE1_TABLES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* multiple_masters */ + /* */ + /* <Title> */ + /* Multiple Masters */ + /* */ + /* <Abstract> */ + /* How to manage Multiple Masters fonts. */ + /* */ + /* <Description> */ + /* The following types and functions are used to manage Multiple */ + /* Master fonts, i.e., the selection of specific design instances by */ + /* setting design axis coordinates. */ + /* */ + /* George Williams has extended this interface to make it work with */ + /* both Type~1 Multiple Masters fonts and GX distortable (var) */ + /* fonts. Some of these routines only work with MM fonts, others */ + /* will work with both types. They are similar enough that a */ + /* consistent interface makes sense. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_MM_Axis */ + /* */ + /* <Description> */ + /* A simple structure used to model a given axis in design space for */ + /* Multiple Masters fonts. */ + /* */ + /* This structure can't be used for GX var fonts. */ + /* */ + /* <Fields> */ + /* name :: The axis's name. */ + /* */ + /* minimum :: The axis's minimum design coordinate. */ + /* */ + /* maximum :: The axis's maximum design coordinate. */ + /* */ + typedef struct FT_MM_Axis_ + { + FT_String* name; + FT_Long minimum; + FT_Long maximum; + + } FT_MM_Axis; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Multi_Master */ + /* */ + /* <Description> */ + /* A structure used to model the axes and space of a Multiple Masters */ + /* font. */ + /* */ + /* This structure can't be used for GX var fonts. */ + /* */ + /* <Fields> */ + /* num_axis :: Number of axes. Cannot exceed~4. */ + /* */ + /* num_designs :: Number of designs; should be normally 2^num_axis */ + /* even though the Type~1 specification strangely */ + /* allows for intermediate designs to be present. This */ + /* number cannot exceed~16. */ + /* */ + /* axis :: A table of axis descriptors. */ + /* */ + typedef struct FT_Multi_Master_ + { + FT_UInt num_axis; + FT_UInt num_designs; + FT_MM_Axis axis[T1_MAX_MM_AXIS]; + + } FT_Multi_Master; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Var_Axis */ + /* */ + /* <Description> */ + /* A simple structure used to model a given axis in design space for */ + /* Multiple Masters and GX var fonts. */ + /* */ + /* <Fields> */ + /* name :: The axis's name. */ + /* Not always meaningful for GX. */ + /* */ + /* minimum :: The axis's minimum design coordinate. */ + /* */ + /* def :: The axis's default design coordinate. */ + /* FreeType computes meaningful default values for MM; it */ + /* is then an integer value, not in 16.16 format. */ + /* */ + /* maximum :: The axis's maximum design coordinate. */ + /* */ + /* tag :: The axis's tag (the GX equivalent to `name'). */ + /* FreeType provides default values for MM if possible. */ + /* */ + /* strid :: The entry in `name' table (another GX version of */ + /* `name'). */ + /* Not meaningful for MM. */ + /* */ + typedef struct FT_Var_Axis_ + { + FT_String* name; + + FT_Fixed minimum; + FT_Fixed def; + FT_Fixed maximum; + + FT_ULong tag; + FT_UInt strid; + + } FT_Var_Axis; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Var_Named_Style */ + /* */ + /* <Description> */ + /* A simple structure used to model a named style in a GX var font. */ + /* */ + /* This structure can't be used for MM fonts. */ + /* */ + /* <Fields> */ + /* coords :: The design coordinates for this style. */ + /* This is an array with one entry for each axis. */ + /* */ + /* strid :: The entry in `name' table identifying this style. */ + /* */ + typedef struct FT_Var_Named_Style_ + { + FT_Fixed* coords; + FT_UInt strid; + + } FT_Var_Named_Style; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_MM_Var */ + /* */ + /* <Description> */ + /* A structure used to model the axes and space of a Multiple Masters */ + /* or GX var distortable font. */ + /* */ + /* Some fields are specific to one format and not to the other. */ + /* */ + /* <Fields> */ + /* num_axis :: The number of axes. The maximum value is~4 for */ + /* MM; no limit in GX. */ + /* */ + /* num_designs :: The number of designs; should be normally */ + /* 2^num_axis for MM fonts. Not meaningful for GX */ + /* (where every glyph could have a different */ + /* number of designs). */ + /* */ + /* num_namedstyles :: The number of named styles; only meaningful for */ + /* GX that allows certain design coordinates to */ + /* have a string ID (in the `name' table) */ + /* associated with them. The font can tell the */ + /* user that, for example, Weight=1.5 is `Bold'. */ + /* */ + /* axis :: A table of axis descriptors. */ + /* GX fonts contain slightly more data than MM. */ + /* */ + /* namedstyles :: A table of named styles. */ + /* Only meaningful with GX. */ + /* */ + typedef struct FT_MM_Var_ + { + FT_UInt num_axis; + FT_UInt num_designs; + FT_UInt num_namedstyles; + FT_Var_Axis* axis; + FT_Var_Named_Style* namedstyle; + + } FT_MM_Var; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Multi_Master */ + /* */ + /* <Description> */ + /* Retrieve the Multiple Master descriptor of a given font. */ + /* */ + /* This function can't be used with GX fonts. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Output> */ + /* amaster :: The Multiple Masters descriptor. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Multi_Master( FT_Face face, + FT_Multi_Master *amaster ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_MM_Var */ + /* */ + /* <Description> */ + /* Retrieve the Multiple Master/GX var descriptor of a given font. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Output> */ + /* amaster :: The Multiple Masters/GX var descriptor. */ + /* Allocates a data structure, which the user must free. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_MM_Var( FT_Face face, + FT_MM_Var* *amaster ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_MM_Design_Coordinates */ + /* */ + /* <Description> */ + /* For Multiple Masters fonts, choose an interpolated font design */ + /* through design coordinates. */ + /* */ + /* This function can't be used with GX fonts. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of design coordinates (must be equal to */ + /* the number of axes in the font). */ + /* */ + /* coords :: An array of design coordinates. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_MM_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Long* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Var_Design_Coordinates */ + /* */ + /* <Description> */ + /* For Multiple Master or GX Var fonts, choose an interpolated font */ + /* design through design coordinates. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of design coordinates (must be equal to */ + /* the number of axes in the font). */ + /* */ + /* coords :: An array of design coordinates. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Var_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_MM_Blend_Coordinates */ + /* */ + /* <Description> */ + /* For Multiple Masters and GX var fonts, choose an interpolated font */ + /* design through normalized blend coordinates. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of design coordinates (must be equal to */ + /* the number of axes in the font). */ + /* */ + /* coords :: The design coordinates array (each element must be */ + /* between 0 and 1.0). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_MM_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Var_Blend_Coordinates */ + /* */ + /* <Description> */ + /* This is another name of @FT_Set_MM_Blend_Coordinates. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Var_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTMM_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftmodapi.h b/freetype2/include/ohos/freetype2/ftmodapi.h new file mode 100644 index 0000000000..980f15d3de --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftmodapi.h @@ -0,0 +1,667 @@ +/***************************************************************************/ +/* */ +/* ftmodapi.h */ +/* */ +/* FreeType modules public interface (specification). */ +/* */ +/* Copyright 1996-2003, 2006, 2008-2010, 2012, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMODAPI_H__ +#define __FTMODAPI_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /* <Title> */ + /* Module Management */ + /* */ + /* <Abstract> */ + /* How to add, upgrade, remove, and control modules from FreeType. */ + /* */ + /* <Description> */ + /* The definitions below are used to manage modules within FreeType. */ + /* Modules can be added, upgraded, and removed at runtime. */ + /* Additionally, some module properties can be controlled also. */ + /* */ + /* Here is a list of possible values of the `module_name' field in */ + /* the @FT_Module_Class structure. */ + /* */ + /* { */ + /* autofitter */ + /* bdf */ + /* cff */ + /* gxvalid */ + /* otvalid */ + /* pcf */ + /* pfr */ + /* psaux */ + /* pshinter */ + /* psnames */ + /* raster1, raster5 */ + /* sfnt */ + /* smooth, smooth-lcd, smooth-lcdv */ + /* truetype */ + /* type1 */ + /* type42 */ + /* t1cid */ + /* winfonts */ + /* } */ + /* */ + /* Note that the FreeType Cache sub-system is not a FreeType module. */ + /* */ + /* <Order> */ + /* FT_Module */ + /* FT_Module_Constructor */ + /* FT_Module_Destructor */ + /* FT_Module_Requester */ + /* FT_Module_Class */ + /* */ + /* FT_Add_Module */ + /* FT_Get_Module */ + /* FT_Remove_Module */ + /* FT_Add_Default_Modules */ + /* */ + /* FT_Property_Set */ + /* FT_Property_Get */ + /* */ + /* FT_New_Library */ + /* FT_Done_Library */ + /* FT_Reference_Library */ + /* */ + /* FT_Renderer */ + /* FT_Renderer_Class */ + /* */ + /* FT_Get_Renderer */ + /* FT_Set_Renderer */ + /* */ + /* FT_Set_Debug_Hook */ + /* */ + /*************************************************************************/ + + + /* module bit flags */ +#define FT_MODULE_FONT_DRIVER 1 /* this module is a font driver */ +#define FT_MODULE_RENDERER 2 /* this module is a renderer */ +#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */ +#define FT_MODULE_STYLER 8 /* this module is a styler */ + +#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */ + /* scalable fonts */ +#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */ + /* support vector outlines */ +#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */ + /* own hinter */ + + + /* deprecated values */ +#define ft_module_font_driver FT_MODULE_FONT_DRIVER +#define ft_module_renderer FT_MODULE_RENDERER +#define ft_module_hinter FT_MODULE_HINTER +#define ft_module_styler FT_MODULE_STYLER + +#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE +#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES +#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER + + + typedef FT_Pointer FT_Module_Interface; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Constructor */ + /* */ + /* <Description> */ + /* A function used to initialize (not create) a new module object. */ + /* */ + /* <Input> */ + /* module :: The module to initialize. */ + /* */ + typedef FT_Error + (*FT_Module_Constructor)( FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Destructor */ + /* */ + /* <Description> */ + /* A function used to finalize (not destroy) a given module object. */ + /* */ + /* <Input> */ + /* module :: The module to finalize. */ + /* */ + typedef void + (*FT_Module_Destructor)( FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Requester */ + /* */ + /* <Description> */ + /* A function used to query a given module for a specific interface. */ + /* */ + /* <Input> */ + /* module :: The module to be searched. */ + /* */ + /* name :: The name of the interface in the module. */ + /* */ + typedef FT_Module_Interface + (*FT_Module_Requester)( FT_Module module, + const char* name ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Module_Class */ + /* */ + /* <Description> */ + /* The module class descriptor. */ + /* */ + /* <Fields> */ + /* module_flags :: Bit flags describing the module. */ + /* */ + /* module_size :: The size of one module object/instance in */ + /* bytes. */ + /* */ + /* module_name :: The name of the module. */ + /* */ + /* module_version :: The version, as a 16.16 fixed number */ + /* (major.minor). */ + /* */ + /* module_requires :: The version of FreeType this module requires, */ + /* as a 16.16 fixed number (major.minor). Starts */ + /* at version 2.0, i.e., 0x20000. */ + /* */ + /* module_init :: The initializing function. */ + /* */ + /* module_done :: The finalizing function. */ + /* */ + /* get_interface :: The interface requesting function. */ + /* */ + typedef struct FT_Module_Class_ + { + FT_ULong module_flags; + FT_Long module_size; + const FT_String* module_name; + FT_Fixed module_version; + FT_Fixed module_requires; + + const void* module_interface; + + FT_Module_Constructor module_init; + FT_Module_Destructor module_done; + FT_Module_Requester get_interface; + + } FT_Module_Class; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Add_Module */ + /* */ + /* <Description> */ + /* Add a new module to a given library instance. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* clazz :: A pointer to class descriptor for the module. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* An error will be returned if a module already exists by that name, */ + /* or if the module requires a version of FreeType that is too great. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Add_Module( FT_Library library, + const FT_Module_Class* clazz ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Module */ + /* */ + /* <Description> */ + /* Find a module by its name. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* module_name :: The module's name (as an ASCII string). */ + /* */ + /* <Return> */ + /* A module handle. 0~if none was found. */ + /* */ + /* <Note> */ + /* FreeType's internal modules aren't documented very well, and you */ + /* should look up the source code for details. */ + /* */ + FT_EXPORT( FT_Module ) + FT_Get_Module( FT_Library library, + const char* module_name ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Remove_Module */ + /* */ + /* <Description> */ + /* Remove a given module from a library instance. */ + /* */ + /* <InOut> */ + /* library :: A handle to a library object. */ + /* */ + /* <Input> */ + /* module :: A handle to a module object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The module object is destroyed by the function in case of success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Remove_Module( FT_Library library, + FT_Module module ); + + + /********************************************************************** + * + * @function: + * FT_Property_Set + * + * @description: + * Set a property for a given module. + * + * @input: + * library :: + * A handle to the library the module is part of. + * + * module_name :: + * The module name. + * + * property_name :: + * The property name. Properties are described in the `Synopsis' + * subsection of the module's documentation. + * + * Note that only a few modules have properties. + * + * value :: + * A generic pointer to a variable or structure that gives the new + * value of the property. The exact definition of `value' is + * dependent on the property; see the `Synopsis' subsection of the + * module's documentation. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `module_name' isn't a valid module name, or `property_name' + * doesn't specify a valid property, or if `value' doesn't represent a + * valid value for the given property, an error is returned. + * + * The following example sets property `bar' (a simple integer) in + * module `foo' to value~1. + * + * { + * FT_UInt bar; + * + * + * bar = 1; + * FT_Property_Set( library, "foo", "bar", &bar ); + * } + * + * Note that the FreeType Cache sub-system doesn't recognize module + * property changes. To avoid glyph lookup confusion within the cache + * you should call @FTC_Manager_Reset to completely flush the cache if + * a module property gets changed after @FTC_Manager_New has been + * called. + * + * It is not possible to set properties of the FreeType Cache + * sub-system itself with FT_Property_Set; use @FTC_Property_Set + * instead. + * + * @since: + * 2.4.11 + * + */ + FT_EXPORT( FT_Error ) + FT_Property_Set( FT_Library library, + const FT_String* module_name, + const FT_String* property_name, + const void* value ); + + + /********************************************************************** + * + * @function: + * FT_Property_Get + * + * @description: + * Get a module's property value. + * + * @input: + * library :: + * A handle to the library the module is part of. + * + * module_name :: + * The module name. + * + * property_name :: + * The property name. Properties are described in the `Synopsis' + * subsection of the module's documentation. + * + * @inout: + * value :: + * A generic pointer to a variable or structure that gives the + * value of the property. The exact definition of `value' is + * dependent on the property; see the `Synopsis' subsection of the + * module's documentation. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `module_name' isn't a valid module name, or `property_name' + * doesn't specify a valid property, or if `value' doesn't represent a + * valid value for the given property, an error is returned. + * + * The following example gets property `baz' (a range) in module `foo'. + * + * { + * typedef range_ + * { + * FT_Int32 min; + * FT_Int32 max; + * + * } range; + * + * range baz; + * + * + * FT_Property_Get( library, "foo", "baz", &baz ); + * } + * + * It is not possible to retrieve properties of the FreeType Cache + * sub-system with FT_Property_Get; use @FTC_Property_Get instead. + * + * @since: + * 2.4.11 + * + */ + FT_EXPORT( FT_Error ) + FT_Property_Get( FT_Library library, + const FT_String* module_name, + const FT_String* property_name, + void* value ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Reference_Library */ + /* */ + /* <Description> */ + /* A counter gets initialized to~1 at the time an @FT_Library */ + /* structure is created. This function increments the counter. */ + /* @FT_Done_Library then only destroys a library if the counter is~1, */ + /* otherwise it simply decrements the counter. */ + /* */ + /* This function helps in managing life-cycles of structures that */ + /* reference @FT_Library objects. */ + /* */ + /* <Input> */ + /* library :: A handle to a target library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.4.2 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Reference_Library( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Library */ + /* */ + /* <Description> */ + /* This function is used to create a new FreeType library instance */ + /* from a given memory object. It is thus possible to use libraries */ + /* with distinct memory allocators within the same program. */ + /* */ + /* Normally, you would call this function (followed by a call to */ + /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */ + /* instead of @FT_Init_FreeType to initialize the FreeType library. */ + /* */ + /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */ + /* library instance. */ + /* */ + /* <Input> */ + /* memory :: A handle to the original memory object. */ + /* */ + /* <Output> */ + /* alibrary :: A pointer to handle of a new library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Library. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Library( FT_Memory memory, + FT_Library *alibrary ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Library */ + /* */ + /* <Description> */ + /* Discard a given library object. This closes all drivers and */ + /* discards all resource objects. */ + /* */ + /* <Input> */ + /* library :: A handle to the target library. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Library. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Library( FT_Library library ); + + /* */ + + typedef void + (*FT_DebugHook_Func)( void* arg ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Debug_Hook */ + /* */ + /* <Description> */ + /* Set a debug hook function for debugging the interpreter of a font */ + /* format. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* hook_index :: The index of the debug hook. You should use the */ + /* values defined in `ftobjs.h', e.g., */ + /* `FT_DEBUG_HOOK_TRUETYPE'. */ + /* */ + /* debug_hook :: The function used to debug the interpreter. */ + /* */ + /* <Note> */ + /* Currently, four debug hook slots are available, but only two (for */ + /* the TrueType and the Type~1 interpreter) are defined. */ + /* */ + /* Since the internal headers of FreeType are no longer installed, */ + /* the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly. */ + /* This is a bug and will be fixed in a forthcoming release. */ + /* */ + FT_EXPORT( void ) + FT_Set_Debug_Hook( FT_Library library, + FT_UInt hook_index, + FT_DebugHook_Func debug_hook ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Add_Default_Modules */ + /* */ + /* <Description> */ + /* Add the set of default drivers to a given library object. */ + /* This is only useful when you create a library object with */ + /* @FT_New_Library (usually to plug a custom memory manager). */ + /* */ + /* <InOut> */ + /* library :: A handle to a new library object. */ + /* */ + FT_EXPORT( void ) + FT_Add_Default_Modules( FT_Library library ); + + + + /************************************************************************** + * + * @section: + * truetype_engine + * + * @title: + * The TrueType Engine + * + * @abstract: + * TrueType bytecode support. + * + * @description: + * This section contains a function used to query the level of TrueType + * bytecode support compiled in this version of the library. + * + */ + + + /************************************************************************** + * + * @enum: + * FT_TrueTypeEngineType + * + * @description: + * A list of values describing which kind of TrueType bytecode + * engine is implemented in a given FT_Library instance. It is used + * by the @FT_Get_TrueType_Engine_Type function. + * + * @values: + * FT_TRUETYPE_ENGINE_TYPE_NONE :: + * The library doesn't implement any kind of bytecode interpreter. + * + * FT_TRUETYPE_ENGINE_TYPE_UNPATENTED :: + * The library implements a bytecode interpreter that doesn't + * support the patented operations of the TrueType virtual machine. + * + * Its main use is to load certain Asian fonts that position and + * scale glyph components with bytecode instructions. It produces + * bad output for most other fonts. + * + * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: + * The library implements a bytecode interpreter that covers + * the full instruction set of the TrueType virtual machine (this + * was governed by patents until May 2010, hence the name). + * + * @since: + * 2.2 + * + */ + typedef enum FT_TrueTypeEngineType_ + { + FT_TRUETYPE_ENGINE_TYPE_NONE = 0, + FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, + FT_TRUETYPE_ENGINE_TYPE_PATENTED + + } FT_TrueTypeEngineType; + + + /************************************************************************** + * + * @func: + * FT_Get_TrueType_Engine_Type + * + * @description: + * Return an @FT_TrueTypeEngineType value to indicate which level of + * the TrueType virtual machine a given library instance supports. + * + * @input: + * library :: + * A library instance. + * + * @return: + * A value indicating which level is supported. + * + * @since: + * 2.2 + * + */ + FT_EXPORT( FT_TrueTypeEngineType ) + FT_Get_TrueType_Engine_Type( FT_Library library ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTMODAPI_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftmoderr.h b/freetype2/include/ohos/freetype2/ftmoderr.h new file mode 100644 index 0000000000..5a27db151a --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftmoderr.h @@ -0,0 +1,194 @@ +/***************************************************************************/ +/* */ +/* ftmoderr.h */ +/* */ +/* FreeType module error offsets (specification). */ +/* */ +/* Copyright 2001-2005, 2010, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is used to define the FreeType module error codes. */ + /* */ + /* If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h' is */ + /* set, the lower byte of an error value identifies the error code as */ + /* usual. In addition, the higher byte identifies the module. For */ + /* example, the error `FT_Err_Invalid_File_Format' has value 0x0003, the */ + /* error `TT_Err_Invalid_File_Format' has value 0x1303, the error */ + /* `T1_Err_Invalid_File_Format' has value 0x1403, etc. */ + /* */ + /* Note that `FT_Err_Ok', `TT_Err_Ok', etc. are always equal to zero, */ + /* including the high byte. */ + /* */ + /* If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of */ + /* an error value is set to zero. */ + /* */ + /* To hide the various `XXX_Err_' prefixes in the source code, FreeType */ + /* provides some macros in `fttypes.h'. */ + /* */ + /* FT_ERR( err ) */ + /* Add current error module prefix (as defined with the */ + /* `FT_ERR_PREFIX' macro) to `err'. For example, in the BDF module */ + /* the line */ + /* */ + /* error = FT_ERR( Invalid_Outline ); */ + /* */ + /* expands to */ + /* */ + /* error = BDF_Err_Invalid_Outline; */ + /* */ + /* For simplicity, you can always use `FT_Err_Ok' directly instead */ + /* of `FT_ERR( Ok )'. */ + /* */ + /* FT_ERR_EQ( errcode, err ) */ + /* FT_ERR_NEQ( errcode, err ) */ + /* Compare error code `errcode' with the error `err' for equality */ + /* and inequality, respectively. Example: */ + /* */ + /* if ( FT_ERR_EQ( error, Invalid_Outline ) ) */ + /* ... */ + /* */ + /* Using this macro you don't have to think about error prefixes. */ + /* Of course, if module errors are not active, the above example is */ + /* the same as */ + /* */ + /* if ( error == FT_Err_Invalid_Outline ) */ + /* ... */ + /* */ + /* FT_ERROR_BASE( errcode ) */ + /* FT_ERROR_MODULE( errcode ) */ + /* Get base error and module error code, respectively. */ + /* */ + /* */ + /* It can also be used to create a module error message table easily */ + /* with something like */ + /* */ + /* { */ + /* #undef __FTMODERR_H__ */ + /* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */ + /* #define FT_MODERR_START_LIST { */ + /* #define FT_MODERR_END_LIST { 0, 0 } }; */ + /* */ + /* const struct */ + /* { */ + /* int mod_err_offset; */ + /* const char* mod_err_msg */ + /* } ft_mod_errors[] = */ + /* */ + /* #include FT_MODULE_ERRORS_H */ + /* } */ + /* */ + /*************************************************************************/ + + +#ifndef __FTMODERR_H__ +#define __FTMODERR_H__ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SETUP MACROS *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#undef FT_NEED_EXTERN_C + +#ifndef FT_MODERRDEF + +#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS +#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v, +#else +#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0, +#endif + +#define FT_MODERR_START_LIST enum { +#define FT_MODERR_END_LIST FT_Mod_Err_Max }; + +#ifdef __cplusplus +#define FT_NEED_EXTERN_C + extern "C" { +#endif + +#endif /* !FT_MODERRDEF */ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** LIST MODULE ERROR BASES *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#ifdef FT_MODERR_START_LIST + FT_MODERR_START_LIST +#endif + + + FT_MODERRDEF( Base, 0x000, "base module" ) + FT_MODERRDEF( Autofit, 0x100, "autofitter module" ) + FT_MODERRDEF( BDF, 0x200, "BDF module" ) + FT_MODERRDEF( Bzip2, 0x300, "Bzip2 module" ) + FT_MODERRDEF( Cache, 0x400, "cache module" ) + FT_MODERRDEF( CFF, 0x500, "CFF module" ) + FT_MODERRDEF( CID, 0x600, "CID module" ) + FT_MODERRDEF( Gzip, 0x700, "Gzip module" ) + FT_MODERRDEF( LZW, 0x800, "LZW module" ) + FT_MODERRDEF( OTvalid, 0x900, "OpenType validation module" ) + FT_MODERRDEF( PCF, 0xA00, "PCF module" ) + FT_MODERRDEF( PFR, 0xB00, "PFR module" ) + FT_MODERRDEF( PSaux, 0xC00, "PS auxiliary module" ) + FT_MODERRDEF( PShinter, 0xD00, "PS hinter module" ) + FT_MODERRDEF( PSnames, 0xE00, "PS names module" ) + FT_MODERRDEF( Raster, 0xF00, "raster module" ) + FT_MODERRDEF( SFNT, 0x1000, "SFNT module" ) + FT_MODERRDEF( Smooth, 0x1100, "smooth raster module" ) + FT_MODERRDEF( TrueType, 0x1200, "TrueType module" ) + FT_MODERRDEF( Type1, 0x1300, "Type 1 module" ) + FT_MODERRDEF( Type42, 0x1400, "Type 42 module" ) + FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" ) + FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" ) + + +#ifdef FT_MODERR_END_LIST + FT_MODERR_END_LIST +#endif + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** CLEANUP *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#ifdef FT_NEED_EXTERN_C + } +#endif + +#undef FT_MODERR_START_LIST +#undef FT_MODERR_END_LIST +#undef FT_MODERRDEF +#undef FT_NEED_EXTERN_C + + +#endif /* __FTMODERR_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftotval.h b/freetype2/include/ohos/freetype2/ftotval.h new file mode 100644 index 0000000000..75ba03ee8e --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftotval.h @@ -0,0 +1,204 @@ +/***************************************************************************/ +/* */ +/* ftotval.h */ +/* */ +/* FreeType API for validating OpenType tables (specification). */ +/* */ +/* Copyright 2004-2007, 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* */ +/* Warning: This module might be moved to a different library in the */ +/* future to avoid a tight dependency between FreeType and the */ +/* OpenType specification. */ +/* */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOTVAL_H__ +#define __FTOTVAL_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* ot_validation */ + /* */ + /* <Title> */ + /* OpenType Validation */ + /* */ + /* <Abstract> */ + /* An API to validate OpenType tables. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions to validate */ + /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */ + /* */ + /* <Order> */ + /* FT_OpenType_Validate */ + /* FT_OpenType_Free */ + /* */ + /* FT_VALIDATE_OTXXX */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_OTXXX + * + * @description: + * A list of bit-field constants used with @FT_OpenType_Validate to + * indicate which OpenType tables should be validated. + * + * @values: + * FT_VALIDATE_BASE :: + * Validate BASE table. + * + * FT_VALIDATE_GDEF :: + * Validate GDEF table. + * + * FT_VALIDATE_GPOS :: + * Validate GPOS table. + * + * FT_VALIDATE_GSUB :: + * Validate GSUB table. + * + * FT_VALIDATE_JSTF :: + * Validate JSTF table. + * + * FT_VALIDATE_MATH :: + * Validate MATH table. + * + * FT_VALIDATE_OT :: + * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). + * + */ +#define FT_VALIDATE_BASE 0x0100 +#define FT_VALIDATE_GDEF 0x0200 +#define FT_VALIDATE_GPOS 0x0400 +#define FT_VALIDATE_GSUB 0x0800 +#define FT_VALIDATE_JSTF 0x1000 +#define FT_VALIDATE_MATH 0x2000 + +#define FT_VALIDATE_OT FT_VALIDATE_BASE | \ + FT_VALIDATE_GDEF | \ + FT_VALIDATE_GPOS | \ + FT_VALIDATE_GSUB | \ + FT_VALIDATE_JSTF | \ + FT_VALIDATE_MATH + + /********************************************************************** + * + * @function: + * FT_OpenType_Validate + * + * @description: + * Validate various OpenType tables to assure that all offsets and + * indices are valid. The idea is that a higher-level library that + * actually does the text layout can access those tables without + * error checking (which can be quite time consuming). + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field that specifies the tables to be validated. See + * @FT_VALIDATE_OTXXX for possible values. + * + * @output: + * BASE_table :: + * A pointer to the BASE table. + * + * GDEF_table :: + * A pointer to the GDEF table. + * + * GPOS_table :: + * A pointer to the GPOS table. + * + * GSUB_table :: + * A pointer to the GSUB table. + * + * JSTF_table :: + * A pointer to the JSTF table. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with OpenType fonts, returning an error + * otherwise. + * + * After use, the application should deallocate the five tables with + * @FT_OpenType_Free. A NULL value indicates that the table either + * doesn't exist in the font, or the application hasn't asked for + * validation. + */ + FT_EXPORT( FT_Error ) + FT_OpenType_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes *BASE_table, + FT_Bytes *GDEF_table, + FT_Bytes *GPOS_table, + FT_Bytes *GSUB_table, + FT_Bytes *JSTF_table ); + + /********************************************************************** + * + * @function: + * FT_OpenType_Free + * + * @description: + * Free the buffer allocated by OpenType validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer that is allocated by + * @FT_OpenType_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_OpenType_Validate only. + */ + FT_EXPORT( void ) + FT_OpenType_Free( FT_Face face, + FT_Bytes table ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTOTVAL_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftoutln.h b/freetype2/include/ohos/freetype2/ftoutln.h new file mode 100644 index 0000000000..d3b8fbd265 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftoutln.h @@ -0,0 +1,574 @@ +/***************************************************************************/ +/* */ +/* ftoutln.h */ +/* */ +/* Support for the FT_Outline type used to store glyph shapes of */ +/* most scalable font formats (specification). */ +/* */ +/* Copyright 1996-2003, 2005-2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOUTLN_H__ +#define __FTOUTLN_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /* <Title> */ + /* Outline Processing */ + /* */ + /* <Abstract> */ + /* Functions to create, transform, and render vectorial glyph images. */ + /* */ + /* <Description> */ + /* This section contains routines used to create and destroy scalable */ + /* glyph images known as `outlines'. These can also be measured, */ + /* transformed, and converted into bitmaps and pixmaps. */ + /* */ + /* <Order> */ + /* FT_Outline */ + /* FT_Outline_New */ + /* FT_Outline_Done */ + /* FT_Outline_Copy */ + /* FT_Outline_Translate */ + /* FT_Outline_Transform */ + /* FT_Outline_Embolden */ + /* FT_Outline_EmboldenXY */ + /* FT_Outline_Reverse */ + /* FT_Outline_Check */ + /* */ + /* FT_Outline_Get_CBox */ + /* FT_Outline_Get_BBox */ + /* */ + /* FT_Outline_Get_Bitmap */ + /* FT_Outline_Render */ + /* FT_Outline_Decompose */ + /* FT_Outline_Funcs */ + /* FT_Outline_MoveToFunc */ + /* FT_Outline_LineToFunc */ + /* FT_Outline_ConicToFunc */ + /* FT_Outline_CubicToFunc */ + /* */ + /* FT_Orientation */ + /* FT_Outline_Get_Orientation */ + /* */ + /* FT_OUTLINE_XXX */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Decompose */ + /* */ + /* <Description> */ + /* Walk over an outline's structure to decompose it into individual */ + /* segments and Bézier arcs. This function also emits `move to' */ + /* operations to indicate the start of new contours in the outline. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source target. */ + /* */ + /* func_interface :: A table of `emitters', i.e., function pointers */ + /* called during decomposition to indicate path */ + /* operations. */ + /* */ + /* <InOut> */ + /* user :: A typeless pointer that is passed to each */ + /* emitter during the decomposition. It can be */ + /* used to store the state during the */ + /* decomposition. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* A contour that contains a single point only is represented by a */ + /* `move to' operation followed by `line to' to the same point. In */ + /* most cases, it is best to filter this out before using the */ + /* outline for stroking purposes (otherwise it would result in a */ + /* visible dot when round caps are used). */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Decompose( FT_Outline* outline, + const FT_Outline_Funcs* func_interface, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_New */ + /* */ + /* <Description> */ + /* Create a new outline of a given size. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object from where the */ + /* outline is allocated. Note however that the new */ + /* outline will *not* necessarily be *freed*, when */ + /* destroying the library, by @FT_Done_FreeType. */ + /* */ + /* numPoints :: The maximum number of points within the outline. */ + /* Must be smaller than or equal to 0xFFFF (65535). */ + /* */ + /* numContours :: The maximum number of contours within the outline. */ + /* This value must be in the range 0 to `numPoints'. */ + /* */ + /* <Output> */ + /* anoutline :: A handle to the new outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The reason why this function takes a `library' parameter is simply */ + /* to use the library's memory allocator. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_New( FT_Library library, + FT_UInt numPoints, + FT_Int numContours, + FT_Outline *anoutline ); + + + FT_EXPORT( FT_Error ) + FT_Outline_New_Internal( FT_Memory memory, + FT_UInt numPoints, + FT_Int numContours, + FT_Outline *anoutline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Done */ + /* */ + /* <Description> */ + /* Destroy an outline created with @FT_Outline_New. */ + /* */ + /* <Input> */ + /* library :: A handle of the library object used to allocate the */ + /* outline. */ + /* */ + /* outline :: A pointer to the outline object to be discarded. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If the outline's `owner' field is not set, only the outline */ + /* descriptor will be released. */ + /* */ + /* The reason why this function takes an `library' parameter is */ + /* simply to use ft_mem_free(). */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Done( FT_Library library, + FT_Outline* outline ); + + + FT_EXPORT( FT_Error ) + FT_Outline_Done_Internal( FT_Memory memory, + FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Check */ + /* */ + /* <Description> */ + /* Check the contents of an outline descriptor. */ + /* */ + /* <Input> */ + /* outline :: A handle to a source outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Check( FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_CBox */ + /* */ + /* <Description> */ + /* Return an outline's `control box'. The control box encloses all */ + /* the outline's points, including Bézier control points. Though it */ + /* coincides with the exact bounding box for most glyphs, it can be */ + /* slightly larger in some situations (like when rotating an outline */ + /* that contains Bézier outside arcs). */ + /* */ + /* Computing the control box is very fast, while getting the bounding */ + /* box can take much more time as it needs to walk over all segments */ + /* and arcs in the outline. To get the latter, you can use the */ + /* `ftbbox' component, which is dedicated to this single task. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <Output> */ + /* acbox :: The outline's control box. */ + /* */ + /* <Note> */ + /* See @FT_Glyph_Get_CBox for a discussion of tricky fonts. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Get_CBox( const FT_Outline* outline, + FT_BBox *acbox ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Translate */ + /* */ + /* <Description> */ + /* Apply a simple translation to the points of an outline. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Input> */ + /* xOffset :: The horizontal offset. */ + /* */ + /* yOffset :: The vertical offset. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Translate( const FT_Outline* outline, + FT_Pos xOffset, + FT_Pos yOffset ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Copy */ + /* */ + /* <Description> */ + /* Copy an outline into another one. Both objects must have the */ + /* same sizes (number of points & number of contours) when this */ + /* function is called. */ + /* */ + /* <Input> */ + /* source :: A handle to the source outline. */ + /* */ + /* <Output> */ + /* target :: A handle to the target outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Copy( const FT_Outline* source, + FT_Outline *target ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Transform */ + /* */ + /* <Description> */ + /* Apply a simple 2x2 matrix to all of an outline's points. Useful */ + /* for applying rotations, slanting, flipping, etc. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the transformation matrix. */ + /* */ + /* <Note> */ + /* You can use @FT_Outline_Translate if you need to translate the */ + /* outline's points. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Transform( const FT_Outline* outline, + const FT_Matrix* matrix ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Embolden */ + /* */ + /* <Description> */ + /* Embolden an outline. The new outline will be at most 4~times */ + /* `strength' pixels wider and higher. You may think of the left and */ + /* bottom borders as unchanged. */ + /* */ + /* Negative `strength' values to reduce the outline thickness are */ + /* possible also. */ + /* */ + /* <InOut> */ + /* outline :: A handle to the target outline. */ + /* */ + /* <Input> */ + /* strength :: How strong the glyph is emboldened. Expressed in */ + /* 26.6 pixel format. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The used algorithm to increase or decrease the thickness of the */ + /* glyph doesn't change the number of points; this means that certain */ + /* situations like acute angles or intersections are sometimes */ + /* handled incorrectly. */ + /* */ + /* If you need `better' metrics values you should call */ + /* @FT_Outline_Get_CBox or @FT_Outline_Get_BBox. */ + /* */ + /* Example call: */ + /* */ + /* { */ + /* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */ + /* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */ + /* FT_Outline_Embolden( &face->slot->outline, strength ); */ + /* } */ + /* */ + /* To get meaningful results, font scaling values must be set with */ + /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Embolden( FT_Outline* outline, + FT_Pos strength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_EmboldenXY */ + /* */ + /* <Description> */ + /* Embolden an outline. The new outline will be `xstrength' pixels */ + /* wider and `ystrength' pixels higher. Otherwise, it is similar to */ + /* @FT_Outline_Embolden, which uses the same strength in both */ + /* directions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_EmboldenXY( FT_Outline* outline, + FT_Pos xstrength, + FT_Pos ystrength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Reverse */ + /* */ + /* <Description> */ + /* Reverse the drawing direction of an outline. This is used to */ + /* ensure consistent fill conventions for mirrored glyphs. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Note> */ + /* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */ + /* the outline's `flags' field. */ + /* */ + /* It shouldn't be used by a normal client application, unless it */ + /* knows what it is doing. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Reverse( FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_Bitmap */ + /* */ + /* <Description> */ + /* Render an outline within a bitmap. The outline's image is simply */ + /* OR-ed to the target bitmap. */ + /* */ + /* <Input> */ + /* library :: A handle to a FreeType library object. */ + /* */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <InOut> */ + /* abitmap :: A pointer to the target bitmap descriptor. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function does NOT CREATE the bitmap, it only renders an */ + /* outline image within the one you pass to it! Consequently, the */ + /* various fields in `abitmap' should be set accordingly. */ + /* */ + /* It will use the raster corresponding to the default glyph format. */ + /* */ + /* The value of the `num_grays' field in `abitmap' is ignored. If */ + /* you select the gray-level rasterizer, and you want less than 256 */ + /* gray levels, you have to use @FT_Outline_Render directly. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Get_Bitmap( FT_Library library, + FT_Outline* outline, + const FT_Bitmap *abitmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Render */ + /* */ + /* <Description> */ + /* Render an outline within a bitmap using the current scan-convert. */ + /* This function uses an @FT_Raster_Params structure as an argument, */ + /* allowing advanced features like direct composition, translucency, */ + /* etc. */ + /* */ + /* <Input> */ + /* library :: A handle to a FreeType library object. */ + /* */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <InOut> */ + /* params :: A pointer to an @FT_Raster_Params structure used to */ + /* describe the rendering operation. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You should know what you are doing and how @FT_Raster_Params works */ + /* to use this function. */ + /* */ + /* The field `params.source' will be set to `outline' before the scan */ + /* converter is called, which means that the value you give to it is */ + /* actually ignored. */ + /* */ + /* The gray-level rasterizer always uses 256 gray levels. If you */ + /* want less gray levels, you have to provide your own span callback. */ + /* See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the */ + /* @FT_Raster_Params structure for more details. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Render( FT_Library library, + FT_Outline* outline, + FT_Raster_Params* params ); + + + /************************************************************************** + * + * @enum: + * FT_Orientation + * + * @description: + * A list of values used to describe an outline's contour orientation. + * + * The TrueType and PostScript specifications use different conventions + * to determine whether outline contours should be filled or unfilled. + * + * @values: + * FT_ORIENTATION_TRUETYPE :: + * According to the TrueType specification, clockwise contours must + * be filled, and counter-clockwise ones must be unfilled. + * + * FT_ORIENTATION_POSTSCRIPT :: + * According to the PostScript specification, counter-clockwise contours + * must be filled, and clockwise ones must be unfilled. + * + * FT_ORIENTATION_FILL_RIGHT :: + * This is identical to @FT_ORIENTATION_TRUETYPE, but is used to + * remember that in TrueType, everything that is to the right of + * the drawing direction of a contour must be filled. + * + * FT_ORIENTATION_FILL_LEFT :: + * This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to + * remember that in PostScript, everything that is to the left of + * the drawing direction of a contour must be filled. + * + * FT_ORIENTATION_NONE :: + * The orientation cannot be determined. That is, different parts of + * the glyph have different orientation. + * + */ + typedef enum FT_Orientation_ + { + FT_ORIENTATION_TRUETYPE = 0, + FT_ORIENTATION_POSTSCRIPT = 1, + FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, + FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT, + FT_ORIENTATION_NONE + + } FT_Orientation; + + + /************************************************************************** + * + * @function: + * FT_Outline_Get_Orientation + * + * @description: + * This function analyzes a glyph outline and tries to compute its + * fill orientation (see @FT_Orientation). This is done by integrating + * the total area covered by the outline. The positive integral + * corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT + * is returned. The negative integral corresponds to the counter-clockwise + * orientation and @FT_ORIENTATION_TRUETYPE is returned. + * + * Note that this will return @FT_ORIENTATION_TRUETYPE for empty + * outlines. + * + * @input: + * outline :: + * A handle to the source outline. + * + * @return: + * The orientation. + * + */ + FT_EXPORT( FT_Orientation ) + FT_Outline_Get_Orientation( FT_Outline* outline ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTOUTLN_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/freetype2/include/ohos/freetype2/ftpfr.h b/freetype2/include/ohos/freetype2/ftpfr.h new file mode 100644 index 0000000000..7d5035396b --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftpfr.h @@ -0,0 +1,172 @@ +/***************************************************************************/ +/* */ +/* ftpfr.h */ +/* */ +/* FreeType API for accessing PFR-specific data (specification only). */ +/* */ +/* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTPFR_H__ +#define __FTPFR_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* pfr_fonts */ + /* */ + /* <Title> */ + /* PFR Fonts */ + /* */ + /* <Abstract> */ + /* PFR/TrueDoc specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of PFR-specific functions. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Metrics + * + * @description: + * Return the outline and metrics resolutions of a given PFR face. + * + * @input: + * face :: Handle to the input face. It can be a non-PFR face. + * + * @output: + * aoutline_resolution :: + * Outline resolution. This is equivalent to `face->units_per_EM' + * for non-PFR fonts. Optional (parameter can be NULL). + * + * ametrics_resolution :: + * Metrics resolution. This is equivalent to `outline_resolution' + * for non-PFR fonts. Optional (parameter can be NULL). + * + * ametrics_x_scale :: + * A 16.16 fixed-point number used to scale distance expressed + * in metrics units to device sub-pixels. This is equivalent to + * `face->size->x_scale', but for metrics only. Optional (parameter + * can be NULL). + * + * ametrics_y_scale :: + * Same as `ametrics_x_scale' but for the vertical direction. + * optional (parameter can be NULL). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If the input face is not a PFR, this function will return an error. + * However, in all cases, it will return valid values. + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Metrics( FT_Face face, + FT_UInt *aoutline_resolution, + FT_UInt *ametrics_resolution, + FT_Fixed *ametrics_x_scale, + FT_Fixed *ametrics_y_scale ); + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Kerning + * + * @description: + * Return the kerning pair corresponding to two glyphs in a PFR face. + * The distance is expressed in metrics units, unlike the result of + * @FT_Get_Kerning. + * + * @input: + * face :: A handle to the input face. + * + * left :: Index of the left glyph. + * + * right :: Index of the right glyph. + * + * @output: + * avector :: A kerning vector. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function always return distances in original PFR metrics + * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED + * mode, which always returns distances converted to outline units. + * + * You can use the value of the `x_scale' and `y_scale' parameters + * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels. + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Kerning( FT_Face face, + FT_UInt left, + FT_UInt right, + FT_Vector *avector ); + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Advance + * + * @description: + * Return a given glyph advance, expressed in original metrics units, + * from a PFR font. + * + * @input: + * face :: A handle to the input face. + * + * gindex :: The glyph index. + * + * @output: + * aadvance :: The glyph advance in metrics units. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics + * to convert the advance to device sub-pixels (i.e., 1/64th of pixels). + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Advance( FT_Face face, + FT_UInt gindex, + FT_Pos *aadvance ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTPFR_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftrender.h b/freetype2/include/ohos/freetype2/ftrender.h new file mode 100644 index 0000000000..e8d36363ca --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftrender.h @@ -0,0 +1,237 @@ +/***************************************************************************/ +/* */ +/* ftrender.h */ +/* */ +/* FreeType renderer modules public interface (specification). */ +/* */ +/* Copyright 1996-2001, 2005, 2006, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTRENDER_H__ +#define __FTRENDER_H__ + + +#include <ft2build.h> +#include FT_MODULE_H +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /*************************************************************************/ + + + /* create a new glyph object */ + typedef FT_Error + (*FT_Glyph_InitFunc)( FT_Glyph glyph, + FT_GlyphSlot slot ); + + /* destroys a given glyph object */ + typedef void + (*FT_Glyph_DoneFunc)( FT_Glyph glyph ); + + typedef void + (*FT_Glyph_TransformFunc)( FT_Glyph glyph, + const FT_Matrix* matrix, + const FT_Vector* delta ); + + typedef void + (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph, + FT_BBox* abbox ); + + typedef FT_Error + (*FT_Glyph_CopyFunc)( FT_Glyph source, + FT_Glyph target ); + + typedef FT_Error + (*FT_Glyph_PrepareFunc)( FT_Glyph glyph, + FT_GlyphSlot slot ); + +/* deprecated */ +#define FT_Glyph_Init_Func FT_Glyph_InitFunc +#define FT_Glyph_Done_Func FT_Glyph_DoneFunc +#define FT_Glyph_Transform_Func FT_Glyph_TransformFunc +#define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc +#define FT_Glyph_Copy_Func FT_Glyph_CopyFunc +#define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc + + + struct FT_Glyph_Class_ + { + FT_Long glyph_size; + FT_Glyph_Format glyph_format; + FT_Glyph_InitFunc glyph_init; + FT_Glyph_DoneFunc glyph_done; + FT_Glyph_CopyFunc glyph_copy; + FT_Glyph_TransformFunc glyph_transform; + FT_Glyph_GetBBoxFunc glyph_bbox; + FT_Glyph_PrepareFunc glyph_prepare; + }; + + + typedef FT_Error + (*FT_Renderer_RenderFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + FT_UInt mode, + const FT_Vector* origin ); + + typedef FT_Error + (*FT_Renderer_TransformFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + const FT_Matrix* matrix, + const FT_Vector* delta ); + + + typedef void + (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + FT_BBox* cbox ); + + + typedef FT_Error + (*FT_Renderer_SetModeFunc)( FT_Renderer renderer, + FT_ULong mode_tag, + FT_Pointer mode_ptr ); + +/* deprecated identifiers */ +#define FTRenderer_render FT_Renderer_RenderFunc +#define FTRenderer_transform FT_Renderer_TransformFunc +#define FTRenderer_getCBox FT_Renderer_GetCBoxFunc +#define FTRenderer_setMode FT_Renderer_SetModeFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Renderer_Class */ + /* */ + /* <Description> */ + /* The renderer module class descriptor. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Module_Class fields. */ + /* */ + /* glyph_format :: The glyph image format this renderer handles. */ + /* */ + /* render_glyph :: A method used to render the image that is in a */ + /* given glyph slot into a bitmap. */ + /* */ + /* transform_glyph :: A method used to transform the image that is in */ + /* a given glyph slot. */ + /* */ + /* get_glyph_cbox :: A method used to access the glyph's cbox. */ + /* */ + /* set_mode :: A method used to pass additional parameters. */ + /* */ + /* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */ + /* This is a pointer to its raster's class. */ + /* */ + typedef struct FT_Renderer_Class_ + { + FT_Module_Class root; + + FT_Glyph_Format glyph_format; + + FT_Renderer_RenderFunc render_glyph; + FT_Renderer_TransformFunc transform_glyph; + FT_Renderer_GetCBoxFunc get_glyph_cbox; + FT_Renderer_SetModeFunc set_mode; + + FT_Raster_Funcs* raster_class; + + } FT_Renderer_Class; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Renderer */ + /* */ + /* <Description> */ + /* Retrieve the current renderer for a given glyph format. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* format :: The glyph format. */ + /* */ + /* <Return> */ + /* A renderer handle. 0~if none found. */ + /* */ + /* <Note> */ + /* An error will be returned if a module already exists by that name, */ + /* or if the module requires a version of FreeType that is too great. */ + /* */ + /* To add a new renderer, simply use @FT_Add_Module. To retrieve a */ + /* renderer by its name, use @FT_Get_Module. */ + /* */ + FT_EXPORT( FT_Renderer ) + FT_Get_Renderer( FT_Library library, + FT_Glyph_Format format ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Renderer */ + /* */ + /* <Description> */ + /* Set the current renderer to use, and set additional mode. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* renderer :: A handle to the renderer object. */ + /* */ + /* num_params :: The number of additional parameters. */ + /* */ + /* parameters :: Additional parameters. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* In case of success, the renderer will be used to convert glyph */ + /* images in the renderer's known format into bitmaps. */ + /* */ + /* This doesn't change the current renderer for other formats. */ + /* */ + /* Currently, only the B/W renderer, if compiled with */ + /* FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels */ + /* anti-aliasing mode; this option must be set directly in */ + /* `ftraster.c' and is undefined by default) accepts a single tag */ + /* `pal5' to set its gray palette as a character string with */ + /* 5~elements. Consequently, the third and fourth argument are zero */ + /* normally. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Renderer( FT_Library library, + FT_Renderer renderer, + FT_UInt num_params, + FT_Parameter* parameters ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTRENDER_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftsizes.h b/freetype2/include/ohos/freetype2/ftsizes.h new file mode 100644 index 0000000000..4167045701 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftsizes.h @@ -0,0 +1,159 @@ +/***************************************************************************/ +/* */ +/* ftsizes.h */ +/* */ +/* FreeType size objects management (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Typical application would normally not need to use these functions. */ + /* However, they have been placed in a public API for the rare cases */ + /* where they are needed. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTSIZES_H__ +#define __FTSIZES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* sizes_management */ + /* */ + /* <Title> */ + /* Size Management */ + /* */ + /* <Abstract> */ + /* Managing multiple sizes per face. */ + /* */ + /* <Description> */ + /* When creating a new face object (e.g., with @FT_New_Face), an */ + /* @FT_Size object is automatically created and used to store all */ + /* pixel-size dependent information, available in the `face->size' */ + /* field. */ + /* */ + /* It is however possible to create more sizes for a given face, */ + /* mostly in order to manage several character pixel sizes of the */ + /* same font family and style. See @FT_New_Size and @FT_Done_Size. */ + /* */ + /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only */ + /* modify the contents of the current `active' size; you thus need */ + /* to use @FT_Activate_Size to change it. */ + /* */ + /* 99% of applications won't need the functions provided here, */ + /* especially if they use the caching sub-system, so be cautious */ + /* when using these. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Size */ + /* */ + /* <Description> */ + /* Create a new size object from a given face object. */ + /* */ + /* <Input> */ + /* face :: A handle to a parent face object. */ + /* */ + /* <Output> */ + /* asize :: A handle to a new size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You need to call @FT_Activate_Size in order to select the new size */ + /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */ + /* @FT_Load_Glyph, @FT_Load_Char, etc. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Size( FT_Face face, + FT_Size* size ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Size */ + /* */ + /* <Description> */ + /* Discard a given size object. Note that @FT_Done_Face */ + /* automatically discards all size objects allocated with */ + /* @FT_New_Size. */ + /* */ + /* <Input> */ + /* size :: A handle to a target size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Size( FT_Size size ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Activate_Size */ + /* */ + /* <Description> */ + /* Even though it is possible to create several size objects for a */ + /* given face (see @FT_New_Size for details), functions like */ + /* @FT_Load_Glyph or @FT_Load_Char only use the one that has been */ + /* activated last to determine the `current character pixel size'. */ + /* */ + /* This function can be used to `activate' a previously created size */ + /* object. */ + /* */ + /* <Input> */ + /* size :: A handle to a target size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If `face' is the size's parent face object, this function changes */ + /* the value of `face->size' to the input size handle. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Activate_Size( FT_Size size ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTSIZES_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftsnames.h b/freetype2/include/ohos/freetype2/ftsnames.h new file mode 100644 index 0000000000..88af440356 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftsnames.h @@ -0,0 +1,200 @@ +/***************************************************************************/ +/* */ +/* ftsnames.h */ +/* */ +/* Simple interface to access SFNT name tables (which are used */ +/* to hold font names, copyright info, notices, etc.) (specification). */ +/* */ +/* This is _not_ used to retrieve glyph names! */ +/* */ +/* Copyright 1996-2003, 2006, 2009, 2010, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FT_SFNT_NAMES_H__ +#define __FT_SFNT_NAMES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* sfnt_names */ + /* */ + /* <Title> */ + /* SFNT Names */ + /* */ + /* <Abstract> */ + /* Access the names embedded in TrueType and OpenType files. */ + /* */ + /* <Description> */ + /* The TrueType and OpenType specifications allow the inclusion of */ + /* a special `names table' in font files. This table contains */ + /* textual (and internationalized) information regarding the font, */ + /* like family name, copyright, version, etc. */ + /* */ + /* The definitions below are used to access them if available. */ + /* */ + /* Note that this has nothing to do with glyph names! */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SfntName */ + /* */ + /* <Description> */ + /* A structure used to model an SFNT `name' table entry. */ + /* */ + /* <Fields> */ + /* platform_id :: The platform ID for `string'. */ + /* */ + /* encoding_id :: The encoding ID for `string'. */ + /* */ + /* language_id :: The language ID for `string'. */ + /* */ + /* name_id :: An identifier for `string'. */ + /* */ + /* string :: The `name' string. Note that its format differs */ + /* depending on the (platform,encoding) pair. It can */ + /* be a Pascal String, a UTF-16 one, etc. */ + /* */ + /* Generally speaking, the string is not */ + /* zero-terminated. Please refer to the TrueType */ + /* specification for details. */ + /* */ + /* string_len :: The length of `string' in bytes. */ + /* */ + /* <Note> */ + /* Possible values for `platform_id', `encoding_id', `language_id', */ + /* and `name_id' are given in the file `ttnameid.h'. For details */ + /* please refer to the TrueType or OpenType specification. */ + /* */ + /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ + /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */ + /* */ + typedef struct FT_SfntName_ + { + FT_UShort platform_id; + FT_UShort encoding_id; + FT_UShort language_id; + FT_UShort name_id; + + FT_Byte* string; /* this string is *not* null-terminated! */ + FT_UInt string_len; /* in bytes */ + + } FT_SfntName; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Name_Count */ + /* */ + /* <Description> */ + /* Retrieve the number of name strings in the SFNT `name' table. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Return> */ + /* The number of strings in the `name' table. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Sfnt_Name_Count( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Name */ + /* */ + /* <Description> */ + /* Retrieve a string of the SFNT `name' table for a given index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* idx :: The index of the `name' string. */ + /* */ + /* <Output> */ + /* aname :: The indexed @FT_SfntName structure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `string' array returned in the `aname' structure is not */ + /* null-terminated. The application should deallocate it if it is no */ + /* longer in use. */ + /* */ + /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */ + /* `name' table entries, then do a loop until you get the right */ + /* platform, encoding, and name ID. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Sfnt_Name( FT_Face face, + FT_UInt idx, + FT_SfntName *aname ); + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY + * + * @description: + * A constant used as the tag of @FT_Parameter structures to make + * FT_Open_Face() ignore preferred family subfamily names in `name' + * table since OpenType version 1.4. For backwards compatibility with + * legacy systems that have a 4-face-per-family restriction. + * + */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY + * + * @description: + * A constant used as the tag of @FT_Parameter structures to make + * FT_Open_Face() ignore preferred subfamily names in `name' table since + * OpenType version 1.4. For backwards compatibility with legacy + * systems that have a 4-face-per-family restriction. + * + */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' ) + + /* */ + + +FT_END_HEADER + +#endif /* __FT_SFNT_NAMES_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftstroke.h b/freetype2/include/ohos/freetype2/ftstroke.h new file mode 100644 index 0000000000..bd311709f3 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftstroke.h @@ -0,0 +1,785 @@ +/***************************************************************************/ +/* */ +/* ftstroke.h */ +/* */ +/* FreeType path stroker (specification). */ +/* */ +/* Copyright 2002-2006, 2008, 2009, 2011-2012, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FT_STROKE_H__ +#define __FT_STROKE_H__ + +#include <ft2build.h> +#include FT_OUTLINE_H +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /************************************************************************ + * + * @section: + * glyph_stroker + * + * @title: + * Glyph Stroker + * + * @abstract: + * Generating bordered and stroked glyphs. + * + * @description: + * This component generates stroked outlines of a given vectorial + * glyph. It also allows you to retrieve the `outside' and/or the + * `inside' borders of the stroke. + * + * This can be useful to generate `bordered' glyph, i.e., glyphs + * displayed with a coloured (and anti-aliased) border around their + * shape. + * + * @order: + * FT_Stroker + * + * FT_Stroker_LineJoin + * FT_Stroker_LineCap + * FT_StrokerBorder + * + * FT_Outline_GetInsideBorder + * FT_Outline_GetOutsideBorder + * + * FT_Glyph_Stroke + * FT_Glyph_StrokeBorder + * + * FT_Stroker_New + * FT_Stroker_Set + * FT_Stroker_Rewind + * FT_Stroker_ParseOutline + * FT_Stroker_Done + * + * FT_Stroker_BeginSubPath + * FT_Stroker_EndSubPath + * + * FT_Stroker_LineTo + * FT_Stroker_ConicTo + * FT_Stroker_CubicTo + * + * FT_Stroker_GetBorderCounts + * FT_Stroker_ExportBorder + * FT_Stroker_GetCounts + * FT_Stroker_Export + * + */ + + + /************************************************************** + * + * @type: + * FT_Stroker + * + * @description: + * Opaque handle to a path stroker object. + */ + typedef struct FT_StrokerRec_* FT_Stroker; + + + /************************************************************** + * + * @enum: + * FT_Stroker_LineJoin + * + * @description: + * These values determine how two joining lines are rendered + * in a stroker. + * + * @values: + * FT_STROKER_LINEJOIN_ROUND :: + * Used to render rounded line joins. Circular arcs are used + * to join two lines smoothly. + * + * FT_STROKER_LINEJOIN_BEVEL :: + * Used to render beveled line joins. The outer corner of + * the joined lines is filled by enclosing the triangular + * region of the corner with a straight line between the + * outer corners of each stroke. + * + * FT_STROKER_LINEJOIN_MITER_FIXED :: + * Used to render mitered line joins, with fixed bevels if the + * miter limit is exceeded. The outer edges of the strokes + * for the two segments are extended until they meet at an + * angle. If the segments meet at too sharp an angle (such + * that the miter would extend from the intersection of the + * segments a distance greater than the product of the miter + * limit value and the border radius), then a bevel join (see + * above) is used instead. This prevents long spikes being + * created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter + * line join as used in PostScript and PDF. + * + * FT_STROKER_LINEJOIN_MITER_VARIABLE :: + * FT_STROKER_LINEJOIN_MITER :: + * Used to render mitered line joins, with variable bevels if + * the miter limit is exceeded. The intersection of the + * strokes is clipped at a line perpendicular to the bisector + * of the angle between the strokes, at the distance from the + * intersection of the segments equal to the product of the + * miter limit value and the border radius. This prevents + * long spikes being created. + * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line + * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias + * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for + * backwards compatibility. + */ + typedef enum FT_Stroker_LineJoin_ + { + FT_STROKER_LINEJOIN_ROUND = 0, + FT_STROKER_LINEJOIN_BEVEL = 1, + FT_STROKER_LINEJOIN_MITER_VARIABLE = 2, + FT_STROKER_LINEJOIN_MITER = FT_STROKER_LINEJOIN_MITER_VARIABLE, + FT_STROKER_LINEJOIN_MITER_FIXED = 3 + + } FT_Stroker_LineJoin; + + + /************************************************************** + * + * @enum: + * FT_Stroker_LineCap + * + * @description: + * These values determine how the end of opened sub-paths are + * rendered in a stroke. + * + * @values: + * FT_STROKER_LINECAP_BUTT :: + * The end of lines is rendered as a full stop on the last + * point itself. + * + * FT_STROKER_LINECAP_ROUND :: + * The end of lines is rendered as a half-circle around the + * last point. + * + * FT_STROKER_LINECAP_SQUARE :: + * The end of lines is rendered as a square around the + * last point. + */ + typedef enum FT_Stroker_LineCap_ + { + FT_STROKER_LINECAP_BUTT = 0, + FT_STROKER_LINECAP_ROUND, + FT_STROKER_LINECAP_SQUARE + + } FT_Stroker_LineCap; + + + /************************************************************** + * + * @enum: + * FT_StrokerBorder + * + * @description: + * These values are used to select a given stroke border + * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder. + * + * @values: + * FT_STROKER_BORDER_LEFT :: + * Select the left border, relative to the drawing direction. + * + * FT_STROKER_BORDER_RIGHT :: + * Select the right border, relative to the drawing direction. + * + * @note: + * Applications are generally interested in the `inside' and `outside' + * borders. However, there is no direct mapping between these and the + * `left' and `right' ones, since this really depends on the glyph's + * drawing orientation, which varies between font formats. + * + * You can however use @FT_Outline_GetInsideBorder and + * @FT_Outline_GetOutsideBorder to get these. + */ + typedef enum FT_StrokerBorder_ + { + FT_STROKER_BORDER_LEFT = 0, + FT_STROKER_BORDER_RIGHT + + } FT_StrokerBorder; + + + /************************************************************** + * + * @function: + * FT_Outline_GetInsideBorder + * + * @description: + * Retrieve the @FT_StrokerBorder value corresponding to the + * `inside' borders of a given outline. + * + * @input: + * outline :: + * The source outline handle. + * + * @return: + * The border index. @FT_STROKER_BORDER_RIGHT for empty or invalid + * outlines. + */ + FT_EXPORT( FT_StrokerBorder ) + FT_Outline_GetInsideBorder( FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Outline_GetOutsideBorder + * + * @description: + * Retrieve the @FT_StrokerBorder value corresponding to the + * `outside' borders of a given outline. + * + * @input: + * outline :: + * The source outline handle. + * + * @return: + * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid + * outlines. + */ + FT_EXPORT( FT_StrokerBorder ) + FT_Outline_GetOutsideBorder( FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_New + * + * @description: + * Create a new stroker object. + * + * @input: + * library :: + * FreeType library handle. + * + * @output: + * astroker :: + * A new stroker object handle. NULL in case of error. + * + * @return: + * FreeType error code. 0~means success. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_New( FT_Library library, + FT_Stroker *astroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Set + * + * @description: + * Reset a stroker object's attributes. + * + * @input: + * stroker :: + * The target stroker handle. + * + * radius :: + * The border radius. + * + * line_cap :: + * The line cap style. + * + * line_join :: + * The line join style. + * + * miter_limit :: + * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and + * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, + * expressed as 16.16 fixed-point value. + * + * @note: + * The radius is expressed in the same units as the outline + * coordinates. + * + * This function calls @FT_Stroker_Rewind automatically. + */ + FT_EXPORT( void ) + FT_Stroker_Set( FT_Stroker stroker, + FT_Fixed radius, + FT_Stroker_LineCap line_cap, + FT_Stroker_LineJoin line_join, + FT_Fixed miter_limit ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Rewind + * + * @description: + * Reset a stroker object without changing its attributes. + * You should call this function before beginning a new + * series of calls to @FT_Stroker_BeginSubPath or + * @FT_Stroker_EndSubPath. + * + * @input: + * stroker :: + * The target stroker handle. + */ + FT_EXPORT( void ) + FT_Stroker_Rewind( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ParseOutline + * + * @description: + * A convenience function used to parse a whole outline with + * the stroker. The resulting outline(s) can be retrieved + * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export. + * + * @input: + * stroker :: + * The target stroker handle. + * + * outline :: + * The source outline. + * + * opened :: + * A boolean. If~1, the outline is treated as an open path instead + * of a closed one. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `opened' is~0 (the default), the outline is treated as a closed + * path, and the stroker generates two distinct `border' outlines. + * + * If `opened' is~1, the outline is processed as an open path, and the + * stroker generates a single `stroke' outline. + * + * This function calls @FT_Stroker_Rewind automatically. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_ParseOutline( FT_Stroker stroker, + FT_Outline* outline, + FT_Bool opened ); + + + /************************************************************** + * + * @function: + * FT_Stroker_BeginSubPath + * + * @description: + * Start a new sub-path in the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * to :: + * A pointer to the start vector. + * + * open :: + * A boolean. If~1, the sub-path is treated as an open one. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function is useful when you need to stroke a path that is + * not stored as an @FT_Outline object. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_BeginSubPath( FT_Stroker stroker, + FT_Vector* to, + FT_Bool open ); + + + /************************************************************** + * + * @function: + * FT_Stroker_EndSubPath + * + * @description: + * Close the current sub-path in the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function after @FT_Stroker_BeginSubPath. + * If the subpath was not `opened', this function `draws' a + * single line segment to the start position when needed. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_EndSubPath( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_LineTo + * + * @description: + * `Draw' a single line segment in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_LineTo( FT_Stroker stroker, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ConicTo + * + * @description: + * `Draw' a single quadratic Bézier in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * control :: + * A pointer to a Bézier control point. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_ConicTo( FT_Stroker stroker, + FT_Vector* control, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_CubicTo + * + * @description: + * `Draw' a single cubic Bézier in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * control1 :: + * A pointer to the first Bézier control point. + * + * control2 :: + * A pointer to second Bézier control point. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_CubicTo( FT_Stroker stroker, + FT_Vector* control1, + FT_Vector* control2, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_GetBorderCounts + * + * @description: + * Call this function once you have finished parsing your paths + * with the stroker. It returns the number of points and + * contours necessary to export one of the `border' or `stroke' + * outlines generated by the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * border :: + * The border index. + * + * @output: + * anum_points :: + * The number of points. + * + * anum_contours :: + * The number of contours. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * When an outline, or a sub-path, is `closed', the stroker generates + * two independent `border' outlines, named `left' and `right'. + * + * When the outline, or a sub-path, is `opened', the stroker merges + * the `border' outlines with caps. The `left' border receives all + * points, while the `right' border becomes empty. + * + * Use the function @FT_Stroker_GetCounts instead if you want to + * retrieve the counts associated to both borders. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_GetBorderCounts( FT_Stroker stroker, + FT_StrokerBorder border, + FT_UInt *anum_points, + FT_UInt *anum_contours ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ExportBorder + * + * @description: + * Call this function after @FT_Stroker_GetBorderCounts to + * export the corresponding border to your own @FT_Outline + * structure. + * + * Note that this function appends the border points and + * contours to your outline, but does not try to resize its + * arrays. + * + * @input: + * stroker :: + * The target stroker handle. + * + * border :: + * The border index. + * + * outline :: + * The target outline handle. + * + * @note: + * Always call this function after @FT_Stroker_GetBorderCounts to + * get sure that there is enough room in your @FT_Outline object to + * receive all new data. + * + * When an outline, or a sub-path, is `closed', the stroker generates + * two independent `border' outlines, named `left' and `right'. + * + * When the outline, or a sub-path, is `opened', the stroker merges + * the `border' outlines with caps. The `left' border receives all + * points, while the `right' border becomes empty. + * + * Use the function @FT_Stroker_Export instead if you want to + * retrieve all borders at once. + */ + FT_EXPORT( void ) + FT_Stroker_ExportBorder( FT_Stroker stroker, + FT_StrokerBorder border, + FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_GetCounts + * + * @description: + * Call this function once you have finished parsing your paths + * with the stroker. It returns the number of points and + * contours necessary to export all points/borders from the stroked + * outline/path. + * + * @input: + * stroker :: + * The target stroker handle. + * + * @output: + * anum_points :: + * The number of points. + * + * anum_contours :: + * The number of contours. + * + * @return: + * FreeType error code. 0~means success. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_GetCounts( FT_Stroker stroker, + FT_UInt *anum_points, + FT_UInt *anum_contours ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Export + * + * @description: + * Call this function after @FT_Stroker_GetBorderCounts to + * export all borders to your own @FT_Outline structure. + * + * Note that this function appends the border points and + * contours to your outline, but does not try to resize its + * arrays. + * + * @input: + * stroker :: + * The target stroker handle. + * + * outline :: + * The target outline handle. + */ + FT_EXPORT( void ) + FT_Stroker_Export( FT_Stroker stroker, + FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Done + * + * @description: + * Destroy a stroker object. + * + * @input: + * stroker :: + * A stroker handle. Can be NULL. + */ + FT_EXPORT( void ) + FT_Stroker_Done( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Glyph_Stroke + * + * @description: + * Stroke a given outline glyph object with a given stroker. + * + * @inout: + * pglyph :: + * Source glyph handle on input, new glyph handle on output. + * + * @input: + * stroker :: + * A stroker handle. + * + * destroy :: + * A Boolean. If~1, the source glyph object is destroyed + * on success. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source glyph is untouched in case of error. + * + * Adding stroke may yield a significantly wider and taller glyph + * depending on how large of a radius was used to stroke the glyph. You + * may need to manually adjust horizontal and vertical advance amounts + * to account for this added size. + */ + FT_EXPORT( FT_Error ) + FT_Glyph_Stroke( FT_Glyph *pglyph, + FT_Stroker stroker, + FT_Bool destroy ); + + + /************************************************************** + * + * @function: + * FT_Glyph_StrokeBorder + * + * @description: + * Stroke a given outline glyph object with a given stroker, but + * only return either its inside or outside border. + * + * @inout: + * pglyph :: + * Source glyph handle on input, new glyph handle on output. + * + * @input: + * stroker :: + * A stroker handle. + * + * inside :: + * A Boolean. If~1, return the inside border, otherwise + * the outside border. + * + * destroy :: + * A Boolean. If~1, the source glyph object is destroyed + * on success. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source glyph is untouched in case of error. + * + * Adding stroke may yield a significantly wider and taller glyph + * depending on how large of a radius was used to stroke the glyph. You + * may need to manually adjust horizontal and vertical advance amounts + * to account for this added size. + */ + FT_EXPORT( FT_Error ) + FT_Glyph_StrokeBorder( FT_Glyph *pglyph, + FT_Stroker stroker, + FT_Bool inside, + FT_Bool destroy ); + + /* */ + +FT_END_HEADER + +#endif /* __FT_STROKE_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/freetype2/include/ohos/freetype2/ftsynth.h b/freetype2/include/ohos/freetype2/ftsynth.h new file mode 100644 index 0000000000..d0ea730874 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftsynth.h @@ -0,0 +1,82 @@ +/***************************************************************************/ +/* */ +/* ftsynth.h */ +/* */ +/* FreeType synthesizing code for emboldening and slanting */ +/* (specification). */ +/* */ +/* Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /********* *********/ + /********* WARNING, THIS IS ALPHA CODE! THIS API *********/ + /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/ + /********* FREETYPE DEVELOPMENT TEAM *********/ + /********* *********/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* Main reason for not lifting the functions in this module to a */ + /* `standard' API is that the used parameters for emboldening and */ + /* slanting are not configurable. Consider the functions as a */ + /* code resource that should be copied into the application and */ + /* adapted to the particular needs. */ + + +#ifndef __FTSYNTH_H__ +#define __FTSYNTH_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /* Embolden a glyph by a `reasonable' value (which is highly a matter of */ + /* taste). This function is actually a convenience function, providing */ + /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ + /* */ + /* For emboldened outlines the height, width, and advance metrics are */ + /* increased by the strength of the emboldening. You can also call */ + /* @FT_Outline_Get_CBox to get precise values. */ + FT_EXPORT( void ) + FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); + + /* Slant an outline glyph to the right by about 12 degrees. */ + FT_EXPORT( void ) + FT_GlyphSlot_Oblique( FT_GlyphSlot slot ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTSYNTH_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftsystem.h b/freetype2/include/ohos/freetype2/ftsystem.h new file mode 100644 index 0000000000..7436ed2678 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftsystem.h @@ -0,0 +1,355 @@ +/***************************************************************************/ +/* */ +/* ftsystem.h */ +/* */ +/* FreeType low-level system interface definition (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2005, 2010, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTSYSTEM_H__ +#define __FTSYSTEM_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* system_interface */ + /* */ + /* <Title> */ + /* System Interface */ + /* */ + /* <Abstract> */ + /* How FreeType manages memory and i/o. */ + /* */ + /* <Description> */ + /* This section contains various definitions related to memory */ + /* management and i/o access. You need to understand this */ + /* information if you want to use a custom memory manager or you own */ + /* i/o streams. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* M E M O R Y M A N A G E M E N T */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Memory + * + * @description: + * A handle to a given memory manager object, defined with an + * @FT_MemoryRec structure. + * + */ + typedef struct FT_MemoryRec_* FT_Memory; + + + /************************************************************************* + * + * @functype: + * FT_Alloc_Func + * + * @description: + * A function used to allocate `size' bytes from `memory'. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * size :: + * The size in bytes to allocate. + * + * @return: + * Address of new memory block. 0~in case of failure. + * + */ + typedef void* + (*FT_Alloc_Func)( FT_Memory memory, + long size ); + + + /************************************************************************* + * + * @functype: + * FT_Free_Func + * + * @description: + * A function used to release a given block of memory. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * block :: + * The address of the target memory block. + * + */ + typedef void + (*FT_Free_Func)( FT_Memory memory, + void* block ); + + + /************************************************************************* + * + * @functype: + * FT_Realloc_Func + * + * @description: + * A function used to re-allocate a given block of memory. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * cur_size :: + * The block's current size in bytes. + * + * new_size :: + * The block's requested new size. + * + * block :: + * The block's current address. + * + * @return: + * New block address. 0~in case of memory shortage. + * + * @note: + * In case of error, the old block must still be available. + * + */ + typedef void* + (*FT_Realloc_Func)( FT_Memory memory, + long cur_size, + long new_size, + void* block ); + + + /************************************************************************* + * + * @struct: + * FT_MemoryRec + * + * @description: + * A structure used to describe a given memory manager to FreeType~2. + * + * @fields: + * user :: + * A generic typeless pointer for user data. + * + * alloc :: + * A pointer type to an allocation function. + * + * free :: + * A pointer type to an memory freeing function. + * + * realloc :: + * A pointer type to a reallocation function. + * + */ + struct FT_MemoryRec_ + { + void* user; + FT_Alloc_Func alloc; + FT_Free_Func free; + FT_Realloc_Func realloc; + }; + + + /*************************************************************************/ + /* */ + /* I / O M A N A G E M E N T */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Stream + * + * @description: + * A handle to an input stream. + * + * @also: + * See @FT_StreamRec for the publicly accessible fields of a given + * stream object. + * + */ + typedef struct FT_StreamRec_* FT_Stream; + + + /************************************************************************* + * + * @struct: + * FT_StreamDesc + * + * @description: + * A union type used to store either a long or a pointer. This is used + * to store a file descriptor or a `FILE*' in an input stream. + * + */ + typedef union FT_StreamDesc_ + { + long value; + void* pointer; + + } FT_StreamDesc; + + + /************************************************************************* + * + * @functype: + * FT_Stream_IoFunc + * + * @description: + * A function used to seek and read data from a given input stream. + * + * @input: + * stream :: + * A handle to the source stream. + * + * offset :: + * The offset of read in stream (always from start). + * + * buffer :: + * The address of the read buffer. + * + * count :: + * The number of bytes to read from the stream. + * + * @return: + * The number of bytes effectively read by the stream. + * + * @note: + * This function might be called to perform a seek or skip operation + * with a `count' of~0. A non-zero return value then indicates an + * error. + * + */ + typedef unsigned long + (*FT_Stream_IoFunc)( FT_Stream stream, + unsigned long offset, + unsigned char* buffer, + unsigned long count ); + + + /************************************************************************* + * + * @functype: + * FT_Stream_CloseFunc + * + * @description: + * A function used to close a given input stream. + * + * @input: + * stream :: + * A handle to the target stream. + * + */ + typedef void + (*FT_Stream_CloseFunc)( FT_Stream stream ); + + + /************************************************************************* + * + * @struct: + * FT_StreamRec + * + * @description: + * A structure used to describe an input stream. + * + * @input: + * base :: + * For memory-based streams, this is the address of the first stream + * byte in memory. This field should always be set to NULL for + * disk-based streams. + * + * size :: + * The stream size in bytes. + * + * In case of compressed streams where the size is unknown before + * actually doing the decompression, the value is set to 0x7FFFFFFF. + * (Note that this size value can occur for normal streams also; it is + * thus just a hint.) + * + * pos :: + * The current position within the stream. + * + * descriptor :: + * This field is a union that can hold an integer or a pointer. It is + * used by stream implementations to store file descriptors or `FILE*' + * pointers. + * + * pathname :: + * This field is completely ignored by FreeType. However, it is often + * useful during debugging to use it to store the stream's filename + * (where available). + * + * read :: + * The stream's input function. + * + * close :: + * The stream's close function. + * + * memory :: + * The memory manager to use to preload frames. This is set + * internally by FreeType and shouldn't be touched by stream + * implementations. + * + * cursor :: + * This field is set and used internally by FreeType when parsing + * frames. + * + * limit :: + * This field is set and used internally by FreeType when parsing + * frames. + * + */ + typedef struct FT_StreamRec_ + { + unsigned char* base; + unsigned long size; + unsigned long pos; + + FT_StreamDesc descriptor; + FT_StreamDesc pathname; + FT_Stream_IoFunc read; + FT_Stream_CloseFunc close; + + FT_Memory memory; + unsigned char* cursor; + unsigned char* limit; + + } FT_StreamRec; + + /* */ + + +FT_END_HEADER + +#endif /* __FTSYSTEM_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/fttrigon.h b/freetype2/include/ohos/freetype2/fttrigon.h new file mode 100644 index 0000000000..9c7b54324e --- /dev/null +++ b/freetype2/include/ohos/freetype2/fttrigon.h @@ -0,0 +1,350 @@ +/***************************************************************************/ +/* */ +/* fttrigon.h */ +/* */ +/* FreeType trigonometric functions (specification). */ +/* */ +/* Copyright 2001, 2003, 2005, 2007, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTTRIGON_H__ +#define __FTTRIGON_H__ + +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Angle + * + * @description: + * This type is used to model angle values in FreeType. Note that the + * angle is a 16.16 fixed-point value expressed in degrees. + * + */ + typedef FT_Fixed FT_Angle; + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI + * + * @description: + * The angle pi expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI ( 180L << 16 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_2PI + * + * @description: + * The angle 2*pi expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI2 + * + * @description: + * The angle pi/2 expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI4 + * + * @description: + * The angle pi/4 expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 ) + + + /************************************************************************* + * + * @function: + * FT_Sin + * + * @description: + * Return the sinus of a given angle in fixed-point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The sinus value. + * + * @note: + * If you need both the sinus and cosinus for a given angle, use the + * function @FT_Vector_Unit. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Sin( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Cos + * + * @description: + * Return the cosinus of a given angle in fixed-point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The cosinus value. + * + * @note: + * If you need both the sinus and cosinus for a given angle, use the + * function @FT_Vector_Unit. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Cos( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Tan + * + * @description: + * Return the tangent of a given angle in fixed-point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The tangent value. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Tan( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Atan2 + * + * @description: + * Return the arc-tangent corresponding to a given vector (x,y) in + * the 2d plane. + * + * @input: + * x :: + * The horizontal vector coordinate. + * + * y :: + * The vertical vector coordinate. + * + * @return: + * The arc-tangent value (i.e. angle). + * + */ + FT_EXPORT( FT_Angle ) + FT_Atan2( FT_Fixed x, + FT_Fixed y ); + + + /************************************************************************* + * + * @function: + * FT_Angle_Diff + * + * @description: + * Return the difference between two angles. The result is always + * constrained to the ]-PI..PI] interval. + * + * @input: + * angle1 :: + * First angle. + * + * angle2 :: + * Second angle. + * + * @return: + * Constrained value of `value2-value1'. + * + */ + FT_EXPORT( FT_Angle ) + FT_Angle_Diff( FT_Angle angle1, + FT_Angle angle2 ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Unit + * + * @description: + * Return the unit vector corresponding to a given angle. After the + * call, the value of `vec.x' will be `sin(angle)', and the value of + * `vec.y' will be `cos(angle)'. + * + * This function is useful to retrieve both the sinus and cosinus of a + * given angle quickly. + * + * @output: + * vec :: + * The address of target vector. + * + * @input: + * angle :: + * The input angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Unit( FT_Vector* vec, + FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Rotate + * + * @description: + * Rotate a vector by a given angle. + * + * @inout: + * vec :: + * The address of target vector. + * + * @input: + * angle :: + * The input angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Rotate( FT_Vector* vec, + FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Length + * + * @description: + * Return the length of a given vector. + * + * @input: + * vec :: + * The address of target vector. + * + * @return: + * The vector length, expressed in the same units that the original + * vector coordinates. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Vector_Length( FT_Vector* vec ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Polarize + * + * @description: + * Compute both the length and angle of a given vector. + * + * @input: + * vec :: + * The address of source vector. + * + * @output: + * length :: + * The vector length. + * + * angle :: + * The vector angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Polarize( FT_Vector* vec, + FT_Fixed *length, + FT_Angle *angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_From_Polar + * + * @description: + * Compute vector coordinates from a length and angle. + * + * @output: + * vec :: + * The address of source vector. + * + * @input: + * length :: + * The vector length. + * + * angle :: + * The vector angle. + * + */ + FT_EXPORT( void ) + FT_Vector_From_Polar( FT_Vector* vec, + FT_Fixed length, + FT_Angle angle ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTTRIGON_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftttdrv.h b/freetype2/include/ohos/freetype2/ftttdrv.h new file mode 100644 index 0000000000..358841397c --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftttdrv.h @@ -0,0 +1,170 @@ +/***************************************************************************/ +/* */ +/* ftttdrv.h */ +/* */ +/* FreeType API for controlling the TrueType driver */ +/* (specification only). */ +/* */ +/* Copyright 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTTTDRV_H__ +#define __FTTTDRV_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * tt_driver + * + * @title: + * The TrueType driver + * + * @abstract: + * Controlling the TrueType driver module. + * + * @description: + * While FreeType's TrueType driver doesn't expose API functions by + * itself, it is possible to control its behaviour with @FT_Property_Set + * and @FT_Property_Get. The following lists the available properties + * together with the necessary macros and structures. + * + * The TrueType driver's module name is `truetype'. + * + */ + + + /************************************************************************** + * + * @property: + * interpreter-version + * + * @description: + * Currently, two versions are available, representing the bytecode + * interpreter with and without subpixel hinting support, + * respectively. The default is subpixel support if + * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel + * support otherwise (since it isn't available then). + * + * If subpixel hinting is on, many TrueType bytecode instructions + * behave differently compared to B/W or grayscale rendering. The + * main idea is to render at a much increased horizontal resolution, + * then sampling down the created output to subpixel precision. + * However, many older fonts are not suited to this and must be + * specially taken care of by applying (hardcoded) font-specific + * tweaks. + * + * Details on subpixel hinting and some of the necessary tweaks can be + * found in Greg Hitchcock's whitepaper at + * `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'. + * + * The following example code demonstrates how to activate subpixel + * hinting (omitting the error handling). + * + * { + * FT_Library library; + * FT_Face face; + * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_38; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "truetype", + * "interpreter-version", + * &interpreter_version ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + */ + + + /************************************************************************** + * + * @enum: + * TT_INTERPRETER_VERSION_XXX + * + * @description: + * A list of constants used for the @interpreter-version property to + * select the hinting engine for Truetype fonts. + * + * The numeric value in the constant names represents the version + * number as returned by the `GETINFO' bytecode instruction. + * + * @values: + * TT_INTERPRETER_VERSION_35 :: + * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in + * Windows~98; only grayscale and B/W rasterizing is supported. + * + * TT_INTERPRETER_VERSION_38 :: + * Version~38 corresponds to MS rasterizer v.1.9; it is roughly + * equivalent to the hinting provided by DirectWrite ClearType (as + * can be found, for example, in the Internet Explorer~9 running on + * Windows~7). + * + * @note: + * This property controls the behaviour of the bytecode interpreter + * and thus how outlines get hinted. It does *not* control how glyph + * get rasterized! In particular, it does not control subpixel color + * filtering. + * + * If FreeType has not been compiled with configuration option + * FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 causes an + * `FT_Err_Unimplemented_Feature' error. + * + * Depending on the graphics framework, Microsoft uses different + * bytecode engines. As a consequence, the version numbers returned by + * a call to the `GETINFO[1]' bytecode instruction are more convoluted + * than desired. + * + * { + * framework Windows version result of GETINFO[1] + * ---------------------------------------------------- + * GDI before XP 35 + * GDI XP and later 37 + * GDI+ old before Vista 37 + * GDI+ old Vista, 7 38 + * GDI+ after 7 40 + * DWrite before 8 39 + * DWrite 8 and later 40 + * } + * + * Since FreeType doesn't provide all capabilities of DWrite ClearType, + * using version~38 seems justified. + * + */ +#define TT_INTERPRETER_VERSION_35 35 +#define TT_INTERPRETER_VERSION_38 38 + + /* */ + + +FT_END_HEADER + + +#endif /* __FTTTDRV_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/fttypes.h b/freetype2/include/ohos/freetype2/fttypes.h new file mode 100644 index 0000000000..2c01e8737c --- /dev/null +++ b/freetype2/include/ohos/freetype2/fttypes.h @@ -0,0 +1,602 @@ +/***************************************************************************/ +/* */ +/* fttypes.h */ +/* */ +/* FreeType simple types definitions (specification only). */ +/* */ +/* Copyright 1996-2002, 2004, 2006-2009, 2012-2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTTYPES_H__ +#define __FTTYPES_H__ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_SYSTEM_H +#include FT_IMAGE_H + +#include <stddef.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /* <Title> */ + /* Basic Data Types */ + /* */ + /* <Abstract> */ + /* The basic data types defined by the library. */ + /* */ + /* <Description> */ + /* This section contains the basic data types defined by FreeType~2, */ + /* ranging from simple scalar types to bitmap descriptors. More */ + /* font-specific structures are defined in a different section. */ + /* */ + /* <Order> */ + /* FT_Byte */ + /* FT_Bytes */ + /* FT_Char */ + /* FT_Int */ + /* FT_UInt */ + /* FT_Int16 */ + /* FT_UInt16 */ + /* FT_Int32 */ + /* FT_UInt32 */ + /* FT_Int64 */ + /* FT_UInt64 */ + /* FT_Short */ + /* FT_UShort */ + /* FT_Long */ + /* FT_ULong */ + /* FT_Bool */ + /* FT_Offset */ + /* FT_PtrDist */ + /* FT_String */ + /* FT_Tag */ + /* FT_Error */ + /* FT_Fixed */ + /* FT_Pointer */ + /* FT_Pos */ + /* FT_Vector */ + /* FT_BBox */ + /* FT_Matrix */ + /* FT_FWord */ + /* FT_UFWord */ + /* FT_F2Dot14 */ + /* FT_UnitVector */ + /* FT_F26Dot6 */ + /* FT_Data */ + /* */ + /* FT_MAKE_TAG */ + /* */ + /* FT_Generic */ + /* FT_Generic_Finalizer */ + /* */ + /* FT_Bitmap */ + /* FT_Pixel_Mode */ + /* FT_Palette_Mode */ + /* FT_Glyph_Format */ + /* FT_IMAGE_TAG */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Bool */ + /* */ + /* <Description> */ + /* A typedef of unsigned char, used for simple booleans. As usual, */ + /* values 1 and~0 represent true and false, respectively. */ + /* */ + typedef unsigned char FT_Bool; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_FWord */ + /* */ + /* <Description> */ + /* A signed 16-bit integer used to store a distance in original font */ + /* units. */ + /* */ + typedef signed short FT_FWord; /* distance in FUnits */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UFWord */ + /* */ + /* <Description> */ + /* An unsigned 16-bit integer used to store a distance in original */ + /* font units. */ + /* */ + typedef unsigned short FT_UFWord; /* unsigned distance */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Char */ + /* */ + /* <Description> */ + /* A simple typedef for the _signed_ char type. */ + /* */ + typedef signed char FT_Char; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Byte */ + /* */ + /* <Description> */ + /* A simple typedef for the _unsigned_ char type. */ + /* */ + typedef unsigned char FT_Byte; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Bytes */ + /* */ + /* <Description> */ + /* A typedef for constant memory areas. */ + /* */ + typedef const FT_Byte* FT_Bytes; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Tag */ + /* */ + /* <Description> */ + /* A typedef for 32-bit tags (as used in the SFNT format). */ + /* */ + typedef FT_UInt32 FT_Tag; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_String */ + /* */ + /* <Description> */ + /* A simple typedef for the char type, usually used for strings. */ + /* */ + typedef char FT_String; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Short */ + /* */ + /* <Description> */ + /* A typedef for signed short. */ + /* */ + typedef signed short FT_Short; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UShort */ + /* */ + /* <Description> */ + /* A typedef for unsigned short. */ + /* */ + typedef unsigned short FT_UShort; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Int */ + /* */ + /* <Description> */ + /* A typedef for the int type. */ + /* */ + typedef signed int FT_Int; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UInt */ + /* */ + /* <Description> */ + /* A typedef for the unsigned int type. */ + /* */ + typedef unsigned int FT_UInt; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Long */ + /* */ + /* <Description> */ + /* A typedef for signed long. */ + /* */ + typedef signed long FT_Long; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ULong */ + /* */ + /* <Description> */ + /* A typedef for unsigned long. */ + /* */ + typedef unsigned long FT_ULong; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F2Dot14 */ + /* */ + /* <Description> */ + /* A signed 2.14 fixed-point type used for unit vectors. */ + /* */ + typedef signed short FT_F2Dot14; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F26Dot6 */ + /* */ + /* <Description> */ + /* A signed 26.6 fixed-point type used for vectorial pixel */ + /* coordinates. */ + /* */ + typedef signed long FT_F26Dot6; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Fixed */ + /* */ + /* <Description> */ + /* This type is used to store 16.16 fixed-point values, like scaling */ + /* values or matrix coefficients. */ + /* */ + typedef signed long FT_Fixed; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Error */ + /* */ + /* <Description> */ + /* The FreeType error code type. A value of~0 is always interpreted */ + /* as a successful operation. */ + /* */ + typedef int FT_Error; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Pointer */ + /* */ + /* <Description> */ + /* A simple typedef for a typeless pointer. */ + /* */ + typedef void* FT_Pointer; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Offset */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI~C `size_t' type, i.e., the largest */ + /* _unsigned_ integer type used to express a file size or position, */ + /* or a memory block size. */ + /* */ + typedef size_t FT_Offset; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_PtrDist */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the */ + /* largest _signed_ integer type used to express the distance */ + /* between two pointers. */ + /* */ + typedef ft_ptrdiff_t FT_PtrDist; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_UnitVector */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2D vector unit vector. Uses */ + /* FT_F2Dot14 types. */ + /* */ + /* <Fields> */ + /* x :: Horizontal coordinate. */ + /* */ + /* y :: Vertical coordinate. */ + /* */ + typedef struct FT_UnitVector_ + { + FT_F2Dot14 x; + FT_F2Dot14 y; + + } FT_UnitVector; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Matrix */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2x2 matrix. Coefficients are */ + /* in 16.16 fixed-point format. The computation performed is: */ + /* */ + /* { */ + /* x' = x*xx + y*xy */ + /* y' = x*yx + y*yy */ + /* } */ + /* */ + /* <Fields> */ + /* xx :: Matrix coefficient. */ + /* */ + /* xy :: Matrix coefficient. */ + /* */ + /* yx :: Matrix coefficient. */ + /* */ + /* yy :: Matrix coefficient. */ + /* */ + typedef struct FT_Matrix_ + { + FT_Fixed xx, xy; + FT_Fixed yx, yy; + + } FT_Matrix; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Data */ + /* */ + /* <Description> */ + /* Read-only binary data represented as a pointer and a length. */ + /* */ + /* <Fields> */ + /* pointer :: The data. */ + /* */ + /* length :: The length of the data in bytes. */ + /* */ + typedef struct FT_Data_ + { + const FT_Byte* pointer; + FT_Int length; + + } FT_Data; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Generic_Finalizer */ + /* */ + /* <Description> */ + /* Describe a function used to destroy the `client' data of any */ + /* FreeType object. See the description of the @FT_Generic type for */ + /* details of usage. */ + /* */ + /* <Input> */ + /* The address of the FreeType object that is under finalization. */ + /* Its client data is accessed through its `generic' field. */ + /* */ + typedef void (*FT_Generic_Finalizer)(void* object); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Generic */ + /* */ + /* <Description> */ + /* Client applications often need to associate their own data to a */ + /* variety of FreeType core objects. For example, a text layout API */ + /* might want to associate a glyph cache to a given size object. */ + /* */ + /* Some FreeType object contains a `generic' field, of type */ + /* FT_Generic, which usage is left to client applications and font */ + /* servers. */ + /* */ + /* It can be used to store a pointer to client-specific data, as well */ + /* as the address of a `finalizer' function, which will be called by */ + /* FreeType when the object is destroyed (for example, the previous */ + /* client example would put the address of the glyph cache destructor */ + /* in the `finalizer' field). */ + /* */ + /* <Fields> */ + /* data :: A typeless pointer to any client-specified data. This */ + /* field is completely ignored by the FreeType library. */ + /* */ + /* finalizer :: A pointer to a `generic finalizer' function, which */ + /* will be called when the object is destroyed. If this */ + /* field is set to NULL, no code will be called. */ + /* */ + typedef struct FT_Generic_ + { + void* data; + FT_Generic_Finalizer finalizer; + + } FT_Generic; + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_MAKE_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags that are used to label */ + /* TrueType tables into an unsigned long, to be used within FreeType. */ + /* */ + /* <Note> */ + /* The produced values *must* be 32-bit integers. Don't redefine */ + /* this macro. */ + /* */ +#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \ + (FT_Tag) \ + ( ( (FT_ULong)_x1 << 24 ) | \ + ( (FT_ULong)_x2 << 16 ) | \ + ( (FT_ULong)_x3 << 8 ) | \ + (FT_ULong)_x4 ) + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* L I S T M A N A G E M E N T */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* list_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ListNode */ + /* */ + /* <Description> */ + /* Many elements and objects in FreeType are listed through an */ + /* @FT_List record (see @FT_ListRec). As its name suggests, an */ + /* FT_ListNode is a handle to a single list element. */ + /* */ + typedef struct FT_ListNodeRec_* FT_ListNode; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_List */ + /* */ + /* <Description> */ + /* A handle to a list record (see @FT_ListRec). */ + /* */ + typedef struct FT_ListRec_* FT_List; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListNodeRec */ + /* */ + /* <Description> */ + /* A structure used to hold a single list element. */ + /* */ + /* <Fields> */ + /* prev :: The previous element in the list. NULL if first. */ + /* */ + /* next :: The next element in the list. NULL if last. */ + /* */ + /* data :: A typeless pointer to the listed object. */ + /* */ + typedef struct FT_ListNodeRec_ + { + FT_ListNode prev; + FT_ListNode next; + void* data; + + } FT_ListNodeRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListRec */ + /* */ + /* <Description> */ + /* A structure used to hold a simple doubly-linked list. These are */ + /* used in many parts of FreeType. */ + /* */ + /* <Fields> */ + /* head :: The head (first element) of doubly-linked list. */ + /* */ + /* tail :: The tail (last element) of doubly-linked list. */ + /* */ + typedef struct FT_ListRec_ + { + FT_ListNode head; + FT_ListNode tail; + + } FT_ListRec; + + /* */ + + +#define FT_IS_EMPTY( list ) ( (list).head == 0 ) +#define FT_BOOL( x ) ( (FT_Bool)( x ) ) + + /* concatenate C tokens */ +#define FT_ERR_XCAT( x, y ) x ## y +#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) + + /* see `ftmoderr.h' for descriptions of the following macros */ + +#define FT_ERR( e ) FT_ERR_CAT( FT_ERR_PREFIX, e ) + +#define FT_ERROR_BASE( x ) ( (x) & 0xFF ) +#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U ) + +#define FT_ERR_EQ( x, e ) \ + ( FT_ERROR_BASE( x ) == FT_ERROR_BASE( FT_ERR( e ) ) ) +#define FT_ERR_NEQ( x, e ) \ + ( FT_ERROR_BASE( x ) != FT_ERROR_BASE( FT_ERR( e ) ) ) + + +FT_END_HEADER + +#endif /* __FTTYPES_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ftwinfnt.h b/freetype2/include/ohos/freetype2/ftwinfnt.h new file mode 100644 index 0000000000..50261581a2 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftwinfnt.h @@ -0,0 +1,275 @@ +/***************************************************************************/ +/* */ +/* ftwinfnt.h */ +/* */ +/* FreeType API for accessing Windows fnt-specific data. */ +/* */ +/* Copyright 2003, 2004, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTWINFNT_H__ +#define __FTWINFNT_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* winfnt_fonts */ + /* */ + /* <Title> */ + /* Window FNT Files */ + /* */ + /* <Abstract> */ + /* Windows FNT specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Windows FNT specific */ + /* functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @enum: + * FT_WinFNT_ID_XXX + * + * @description: + * A list of valid values for the `charset' byte in + * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX + * encodings (except for cp1361) can be found at + * ftp://ftp.unicode.org/public in the MAPPINGS/VENDORS/MICSFT/WINDOWS + * subdirectory. cp1361 is roughly a superset of + * MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT. + * + * @values: + * FT_WinFNT_ID_DEFAULT :: + * This is used for font enumeration and font creation as a + * `don't care' value. Valid font files don't contain this value. + * When querying for information about the character set of the font + * that is currently selected into a specified device context, this + * return value (of the related Windows API) simply denotes failure. + * + * FT_WinFNT_ID_SYMBOL :: + * There is no known mapping table available. + * + * FT_WinFNT_ID_MAC :: + * Mac Roman encoding. + * + * FT_WinFNT_ID_OEM :: + * From Michael Pöttgen <michael@poettgen.de>: + * + * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM + * is used for the charset of vector fonts, like `modern.fon', + * `roman.fon', and `script.fon' on Windows. + * + * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value + * specifies a character set that is operating-system dependent. + * + * The `IFIMETRICS' documentation from the `Windows Driver + * Development Kit' says: This font supports an OEM-specific + * character set. The OEM character set is system dependent. + * + * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the + * second default codepage that most international versions of + * Windows have. It is one of the OEM codepages from + * + * http://www.microsoft.com/globaldev/reference/cphome.mspx, + * + * and is used for the `DOS boxes', to support legacy applications. + * A German Windows version for example usually uses ANSI codepage + * 1252 and OEM codepage 850. + * + * FT_WinFNT_ID_CP874 :: + * A superset of Thai TIS 620 and ISO 8859-11. + * + * FT_WinFNT_ID_CP932 :: + * A superset of Japanese Shift-JIS (with minor deviations). + * + * FT_WinFNT_ID_CP936 :: + * A superset of simplified Chinese GB 2312-1980 (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP949 :: + * A superset of Korean Hangul KS~C 5601-1987 (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP950 :: + * A superset of traditional Chinese Big~5 ETen (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP1250 :: + * A superset of East European ISO 8859-2 (with slightly different + * ordering). + * + * FT_WinFNT_ID_CP1251 :: + * A superset of Russian ISO 8859-5 (with different ordering). + * + * FT_WinFNT_ID_CP1252 :: + * ANSI encoding. A superset of ISO 8859-1. + * + * FT_WinFNT_ID_CP1253 :: + * A superset of Greek ISO 8859-7 (with minor modifications). + * + * FT_WinFNT_ID_CP1254 :: + * A superset of Turkish ISO 8859-9. + * + * FT_WinFNT_ID_CP1255 :: + * A superset of Hebrew ISO 8859-8 (with some modifications). + * + * FT_WinFNT_ID_CP1256 :: + * A superset of Arabic ISO 8859-6 (with different ordering). + * + * FT_WinFNT_ID_CP1257 :: + * A superset of Baltic ISO 8859-13 (with some deviations). + * + * FT_WinFNT_ID_CP1258 :: + * For Vietnamese. This encoding doesn't cover all necessary + * characters. + * + * FT_WinFNT_ID_CP1361 :: + * Korean (Johab). + */ + +#define FT_WinFNT_ID_CP1252 0 +#define FT_WinFNT_ID_DEFAULT 1 +#define FT_WinFNT_ID_SYMBOL 2 +#define FT_WinFNT_ID_MAC 77 +#define FT_WinFNT_ID_CP932 128 +#define FT_WinFNT_ID_CP949 129 +#define FT_WinFNT_ID_CP1361 130 +#define FT_WinFNT_ID_CP936 134 +#define FT_WinFNT_ID_CP950 136 +#define FT_WinFNT_ID_CP1253 161 +#define FT_WinFNT_ID_CP1254 162 +#define FT_WinFNT_ID_CP1258 163 +#define FT_WinFNT_ID_CP1255 177 +#define FT_WinFNT_ID_CP1256 178 +#define FT_WinFNT_ID_CP1257 186 +#define FT_WinFNT_ID_CP1251 204 +#define FT_WinFNT_ID_CP874 222 +#define FT_WinFNT_ID_CP1250 238 +#define FT_WinFNT_ID_OEM 255 + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_WinFNT_HeaderRec */ + /* */ + /* <Description> */ + /* Windows FNT Header info. */ + /* */ + typedef struct FT_WinFNT_HeaderRec_ + { + FT_UShort version; + FT_ULong file_size; + FT_Byte copyright[60]; + FT_UShort file_type; + FT_UShort nominal_point_size; + FT_UShort vertical_resolution; + FT_UShort horizontal_resolution; + FT_UShort ascent; + FT_UShort internal_leading; + FT_UShort external_leading; + FT_Byte italic; + FT_Byte underline; + FT_Byte strike_out; + FT_UShort weight; + FT_Byte charset; + FT_UShort pixel_width; + FT_UShort pixel_height; + FT_Byte pitch_and_family; + FT_UShort avg_width; + FT_UShort max_width; + FT_Byte first_char; + FT_Byte last_char; + FT_Byte default_char; + FT_Byte break_char; + FT_UShort bytes_per_row; + FT_ULong device_offset; + FT_ULong face_name_offset; + FT_ULong bits_pointer; + FT_ULong bits_offset; + FT_Byte reserved; + FT_ULong flags; + FT_UShort A_space; + FT_UShort B_space; + FT_UShort C_space; + FT_UShort color_table_offset; + FT_ULong reserved1[4]; + + } FT_WinFNT_HeaderRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_WinFNT_Header */ + /* */ + /* <Description> */ + /* A handle to an @FT_WinFNT_HeaderRec structure. */ + /* */ + typedef struct FT_WinFNT_HeaderRec_* FT_WinFNT_Header; + + + /********************************************************************** + * + * @function: + * FT_Get_WinFNT_Header + * + * @description: + * Retrieve a Windows FNT font info header. + * + * @input: + * face :: A handle to the input face. + * + * @output: + * aheader :: The WinFNT header. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with Windows FNT faces, returning an error + * otherwise. + */ + FT_EXPORT( FT_Error ) + FT_Get_WinFNT_Header( FT_Face face, + FT_WinFNT_HeaderRec *aheader ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTWINFNT_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/freetype2/include/ohos/freetype2/ftxf86.h b/freetype2/include/ohos/freetype2/ftxf86.h new file mode 100644 index 0000000000..89d1993e1e --- /dev/null +++ b/freetype2/include/ohos/freetype2/ftxf86.h @@ -0,0 +1,84 @@ +/***************************************************************************/ +/* */ +/* ftxf86.h */ +/* */ +/* Support functions for X11. */ +/* */ +/* Copyright 2002-2004, 2006, 2007, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTXF86_H__ +#define __FTXF86_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* font_formats */ + /* */ + /* <Title> */ + /* Font Formats */ + /* */ + /* <Abstract> */ + /* Getting the font format. */ + /* */ + /* <Description> */ + /* The single function in this section can be used to get the font */ + /* format. Note that this information is not needed normally; */ + /* however, there are special cases (like in PDF devices) where it is */ + /* important to differentiate, in spite of FreeType's uniform API. */ + /* */ + /* This function is in the X11/xf86 namespace for historical reasons */ + /* and in no way depends on that windowing system. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_X11_Font_Format */ + /* */ + /* <Description> */ + /* Return a string describing the format of a given face, using values */ + /* that can be used as an X11 FONT_PROPERTY. Possible values are */ + /* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */ + /* `PFR', and `Windows~FNT'. */ + /* */ + /* <Input> */ + /* face :: */ + /* Input face handle. */ + /* */ + /* <Return> */ + /* Font format string. NULL in case of error. */ + /* */ + FT_EXPORT( const char* ) + FT_Get_X11_Font_Format( FT_Face face ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTXF86_H__ */ diff --git a/freetype2/include/ohos/freetype2/t1tables.h b/freetype2/include/ohos/freetype2/t1tables.h new file mode 100644 index 0000000000..61aefdd541 --- /dev/null +++ b/freetype2/include/ohos/freetype2/t1tables.h @@ -0,0 +1,760 @@ +/***************************************************************************/ +/* */ +/* t1tables.h */ +/* */ +/* Basic Type 1/Type 2 tables definitions and interface (specification */ +/* only). */ +/* */ +/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __T1TABLES_H__ +#define __T1TABLES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* type1_tables */ + /* */ + /* <Title> */ + /* Type 1 Tables */ + /* */ + /* <Abstract> */ + /* Type~1 (PostScript) specific font tables. */ + /* */ + /* <Description> */ + /* This section contains the definition of Type 1-specific tables, */ + /* including structures related to other PostScript font formats. */ + /* */ + /* <Order> */ + /* PS_FontInfoRec */ + /* PS_FontInfo */ + /* PS_PrivateRec */ + /* PS_Private */ + /* */ + /* CID_FaceDictRec */ + /* CID_FaceDict */ + /* CID_FaceInfoRec */ + /* CID_FaceInfo */ + /* */ + /* FT_Has_PS_Glyph_Names */ + /* FT_Get_PS_Font_Info */ + /* FT_Get_PS_Font_Private */ + /* FT_Get_PS_Font_Value */ + /* */ + /* T1_Blend_Flags */ + /* T1_EncodingType */ + /* PS_Dict_Keys */ + /* */ + /*************************************************************************/ + + + /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */ + /* structures in order to support Multiple Master fonts. */ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_FontInfoRec */ + /* */ + /* <Description> */ + /* A structure used to model a Type~1 or Type~2 FontInfo dictionary. */ + /* Note that for Multiple Master fonts, each instance has its own */ + /* FontInfo dictionary. */ + /* */ + typedef struct PS_FontInfoRec_ + { + FT_String* version; + FT_String* notice; + FT_String* full_name; + FT_String* family_name; + FT_String* weight; + FT_Long italic_angle; + FT_Bool is_fixed_pitch; + FT_Short underline_position; + FT_UShort underline_thickness; + + } PS_FontInfoRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_FontInfo */ + /* */ + /* <Description> */ + /* A handle to a @PS_FontInfoRec structure. */ + /* */ + typedef struct PS_FontInfoRec_* PS_FontInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_FontInfo */ + /* */ + /* <Description> */ + /* This type is equivalent to @PS_FontInfoRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef PS_FontInfoRec T1_FontInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_PrivateRec */ + /* */ + /* <Description> */ + /* A structure used to model a Type~1 or Type~2 private dictionary. */ + /* Note that for Multiple Master fonts, each instance has its own */ + /* Private dictionary. */ + /* */ + typedef struct PS_PrivateRec_ + { + FT_Int unique_id; + FT_Int lenIV; + + FT_Byte num_blue_values; + FT_Byte num_other_blues; + FT_Byte num_family_blues; + FT_Byte num_family_other_blues; + + FT_Short blue_values[14]; + FT_Short other_blues[10]; + + FT_Short family_blues [14]; + FT_Short family_other_blues[10]; + + FT_Fixed blue_scale; + FT_Int blue_shift; + FT_Int blue_fuzz; + + FT_UShort standard_width[1]; + FT_UShort standard_height[1]; + + FT_Byte num_snap_widths; + FT_Byte num_snap_heights; + FT_Bool force_bold; + FT_Bool round_stem_up; + + FT_Short snap_widths [13]; /* including std width */ + FT_Short snap_heights[13]; /* including std height */ + + FT_Fixed expansion_factor; + + FT_Long language_group; + FT_Long password; + + FT_Short min_feature[2]; + + } PS_PrivateRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_Private */ + /* */ + /* <Description> */ + /* A handle to a @PS_PrivateRec structure. */ + /* */ + typedef struct PS_PrivateRec_* PS_Private; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_Private */ + /* */ + /* <Description> */ + /* This type is equivalent to @PS_PrivateRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef PS_PrivateRec T1_Private; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* T1_Blend_Flags */ + /* */ + /* <Description> */ + /* A set of flags used to indicate which fields are present in a */ + /* given blend dictionary (font info or private). Used to support */ + /* Multiple Masters fonts. */ + /* */ + /* <Values> */ + /* T1_BLEND_UNDERLINE_POSITION :: */ + /* T1_BLEND_UNDERLINE_THICKNESS :: */ + /* T1_BLEND_ITALIC_ANGLE :: */ + /* T1_BLEND_BLUE_VALUES :: */ + /* T1_BLEND_OTHER_BLUES :: */ + /* T1_BLEND_STANDARD_WIDTH :: */ + /* T1_BLEND_STANDARD_HEIGHT :: */ + /* T1_BLEND_STEM_SNAP_WIDTHS :: */ + /* T1_BLEND_STEM_SNAP_HEIGHTS :: */ + /* T1_BLEND_BLUE_SCALE :: */ + /* T1_BLEND_BLUE_SHIFT :: */ + /* T1_BLEND_FAMILY_BLUES :: */ + /* T1_BLEND_FAMILY_OTHER_BLUES :: */ + /* T1_BLEND_FORCE_BOLD :: */ + /* */ + typedef enum T1_Blend_Flags_ + { + /* required fields in a FontInfo blend dictionary */ + T1_BLEND_UNDERLINE_POSITION = 0, + T1_BLEND_UNDERLINE_THICKNESS, + T1_BLEND_ITALIC_ANGLE, + + /* required fields in a Private blend dictionary */ + T1_BLEND_BLUE_VALUES, + T1_BLEND_OTHER_BLUES, + T1_BLEND_STANDARD_WIDTH, + T1_BLEND_STANDARD_HEIGHT, + T1_BLEND_STEM_SNAP_WIDTHS, + T1_BLEND_STEM_SNAP_HEIGHTS, + T1_BLEND_BLUE_SCALE, + T1_BLEND_BLUE_SHIFT, + T1_BLEND_FAMILY_BLUES, + T1_BLEND_FAMILY_OTHER_BLUES, + T1_BLEND_FORCE_BOLD, + + T1_BLEND_MAX /* do not remove */ + + } T1_Blend_Flags; + + + /* these constants are deprecated; use the corresponding */ + /* `T1_Blend_Flags' values instead */ +#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION +#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS +#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE +#define t1_blend_blue_values T1_BLEND_BLUE_VALUES +#define t1_blend_other_blues T1_BLEND_OTHER_BLUES +#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH +#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT +#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS +#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS +#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE +#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT +#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES +#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES +#define t1_blend_force_bold T1_BLEND_FORCE_BOLD +#define t1_blend_max T1_BLEND_MAX + + /* */ + + + /* maximum number of Multiple Masters designs, as defined in the spec */ +#define T1_MAX_MM_DESIGNS 16 + + /* maximum number of Multiple Masters axes, as defined in the spec */ +#define T1_MAX_MM_AXIS 4 + + /* maximum number of elements in a design map */ +#define T1_MAX_MM_MAP_POINTS 20 + + + /* this structure is used to store the BlendDesignMap entry for an axis */ + typedef struct PS_DesignMap_ + { + FT_Byte num_points; + FT_Long* design_points; + FT_Fixed* blend_points; + + } PS_DesignMapRec, *PS_DesignMap; + + /* backwards-compatible definition */ + typedef PS_DesignMapRec T1_DesignMap; + + + typedef struct PS_BlendRec_ + { + FT_UInt num_designs; + FT_UInt num_axis; + + FT_String* axis_names[T1_MAX_MM_AXIS]; + FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; + PS_DesignMapRec design_map[T1_MAX_MM_AXIS]; + + FT_Fixed* weight_vector; + FT_Fixed* default_weight_vector; + + PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1]; + PS_Private privates [T1_MAX_MM_DESIGNS + 1]; + + FT_ULong blend_bitflags; + + FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1]; + + /* since 2.3.0 */ + + /* undocumented, optional: the default design instance; */ + /* corresponds to default_weight_vector -- */ + /* num_default_design_vector == 0 means it is not present */ + /* in the font and associated metrics files */ + FT_UInt default_design_vector[T1_MAX_MM_DESIGNS]; + FT_UInt num_default_design_vector; + + } PS_BlendRec, *PS_Blend; + + + /* backwards-compatible definition */ + typedef PS_BlendRec T1_Blend; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceDictRec */ + /* */ + /* <Description> */ + /* A structure used to represent data in a CID top-level dictionary. */ + /* */ + typedef struct CID_FaceDictRec_ + { + PS_PrivateRec private_dict; + + FT_UInt len_buildchar; + FT_Fixed forcebold_threshold; + FT_Pos stroke_width; + FT_Fixed expansion_factor; + + FT_Byte paint_type; + FT_Byte font_type; + FT_Matrix font_matrix; + FT_Vector font_offset; + + FT_UInt num_subrs; + FT_ULong subrmap_offset; + FT_Int sd_bytes; + + } CID_FaceDictRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceDict */ + /* */ + /* <Description> */ + /* A handle to a @CID_FaceDictRec structure. */ + /* */ + typedef struct CID_FaceDictRec_* CID_FaceDict; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FontDict */ + /* */ + /* <Description> */ + /* This type is equivalent to @CID_FaceDictRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef CID_FaceDictRec CID_FontDict; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceInfoRec */ + /* */ + /* <Description> */ + /* A structure used to represent CID Face information. */ + /* */ + typedef struct CID_FaceInfoRec_ + { + FT_String* cid_font_name; + FT_Fixed cid_version; + FT_Int cid_font_type; + + FT_String* registry; + FT_String* ordering; + FT_Int supplement; + + PS_FontInfoRec font_info; + FT_BBox font_bbox; + FT_ULong uid_base; + + FT_Int num_xuid; + FT_ULong xuid[16]; + + FT_ULong cidmap_offset; + FT_Int fd_bytes; + FT_Int gd_bytes; + FT_ULong cid_count; + + FT_Int num_dicts; + CID_FaceDict font_dicts; + + FT_ULong data_offset; + + } CID_FaceInfoRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceInfo */ + /* */ + /* <Description> */ + /* A handle to a @CID_FaceInfoRec structure. */ + /* */ + typedef struct CID_FaceInfoRec_* CID_FaceInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_Info */ + /* */ + /* <Description> */ + /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef CID_FaceInfoRec CID_Info; + + + /************************************************************************ + * + * @function: + * FT_Has_PS_Glyph_Names + * + * @description: + * Return true if a given face provides reliable PostScript glyph + * names. This is similar to using the @FT_HAS_GLYPH_NAMES macro, + * except that certain fonts (mostly TrueType) contain incorrect + * glyph name tables. + * + * When this function returns true, the caller is sure that the glyph + * names returned by @FT_Get_Glyph_Name are reliable. + * + * @input: + * face :: + * face handle + * + * @return: + * Boolean. True if glyph names are reliable. + * + */ + FT_EXPORT( FT_Int ) + FT_Has_PS_Glyph_Names( FT_Face face ); + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Info + * + * @description: + * Retrieve the @PS_FontInfoRec structure corresponding to a given + * PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * @output: + * afont_info :: + * Output font info structure pointer. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The string pointers within the font info structure are owned by + * the face and don't need to be freed by the caller. + * + * If the font's format is not PostScript-based, this function will + * return the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_PS_Font_Info( FT_Face face, + PS_FontInfo afont_info ); + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Private + * + * @description: + * Retrieve the @PS_PrivateRec structure corresponding to a given + * PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * @output: + * afont_private :: + * Output private dictionary structure pointer. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The string pointers within the @PS_PrivateRec structure are owned by + * the face and don't need to be freed by the caller. + * + * If the font's format is not PostScript-based, this function returns + * the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_PS_Font_Private( FT_Face face, + PS_Private afont_private ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* T1_EncodingType */ + /* */ + /* <Description> */ + /* An enumeration describing the `Encoding' entry in a Type 1 */ + /* dictionary. */ + /* */ + /* <Values> */ + /* T1_ENCODING_TYPE_NONE :: */ + /* T1_ENCODING_TYPE_ARRAY :: */ + /* T1_ENCODING_TYPE_STANDARD :: */ + /* T1_ENCODING_TYPE_ISOLATIN1 :: */ + /* T1_ENCODING_TYPE_EXPERT :: */ + /* */ + typedef enum T1_EncodingType_ + { + T1_ENCODING_TYPE_NONE = 0, + T1_ENCODING_TYPE_ARRAY, + T1_ENCODING_TYPE_STANDARD, + T1_ENCODING_TYPE_ISOLATIN1, + T1_ENCODING_TYPE_EXPERT + + } T1_EncodingType; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* PS_Dict_Keys */ + /* */ + /* <Description> */ + /* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */ + /* the Type~1 dictionary entry to retrieve. */ + /* */ + /* <Values> */ + /* PS_DICT_FONT_TYPE :: */ + /* PS_DICT_FONT_MATRIX :: */ + /* PS_DICT_FONT_BBOX :: */ + /* PS_DICT_PAINT_TYPE :: */ + /* PS_DICT_FONT_NAME :: */ + /* PS_DICT_UNIQUE_ID :: */ + /* PS_DICT_NUM_CHAR_STRINGS :: */ + /* PS_DICT_CHAR_STRING_KEY :: */ + /* PS_DICT_CHAR_STRING :: */ + /* PS_DICT_ENCODING_TYPE :: */ + /* PS_DICT_ENCODING_ENTRY :: */ + /* PS_DICT_NUM_SUBRS :: */ + /* PS_DICT_SUBR :: */ + /* PS_DICT_STD_HW :: */ + /* PS_DICT_STD_VW :: */ + /* PS_DICT_NUM_BLUE_VALUES :: */ + /* PS_DICT_BLUE_VALUE :: */ + /* PS_DICT_BLUE_FUZZ :: */ + /* PS_DICT_NUM_OTHER_BLUES :: */ + /* PS_DICT_OTHER_BLUE :: */ + /* PS_DICT_NUM_FAMILY_BLUES :: */ + /* PS_DICT_FAMILY_BLUE :: */ + /* PS_DICT_NUM_FAMILY_OTHER_BLUES :: */ + /* PS_DICT_FAMILY_OTHER_BLUE :: */ + /* PS_DICT_BLUE_SCALE :: */ + /* PS_DICT_BLUE_SHIFT :: */ + /* PS_DICT_NUM_STEM_SNAP_H :: */ + /* PS_DICT_STEM_SNAP_H :: */ + /* PS_DICT_NUM_STEM_SNAP_V :: */ + /* PS_DICT_STEM_SNAP_V :: */ + /* PS_DICT_FORCE_BOLD :: */ + /* PS_DICT_RND_STEM_UP :: */ + /* PS_DICT_MIN_FEATURE :: */ + /* PS_DICT_LEN_IV :: */ + /* PS_DICT_PASSWORD :: */ + /* PS_DICT_LANGUAGE_GROUP :: */ + /* PS_DICT_VERSION :: */ + /* PS_DICT_NOTICE :: */ + /* PS_DICT_FULL_NAME :: */ + /* PS_DICT_FAMILY_NAME :: */ + /* PS_DICT_WEIGHT :: */ + /* PS_DICT_IS_FIXED_PITCH :: */ + /* PS_DICT_UNDERLINE_POSITION :: */ + /* PS_DICT_UNDERLINE_THICKNESS :: */ + /* PS_DICT_FS_TYPE :: */ + /* PS_DICT_ITALIC_ANGLE :: */ + /* */ + typedef enum PS_Dict_Keys_ + { + /* conventionally in the font dictionary */ + PS_DICT_FONT_TYPE, /* FT_Byte */ + PS_DICT_FONT_MATRIX, /* FT_Fixed */ + PS_DICT_FONT_BBOX, /* FT_Fixed */ + PS_DICT_PAINT_TYPE, /* FT_Byte */ + PS_DICT_FONT_NAME, /* FT_String* */ + PS_DICT_UNIQUE_ID, /* FT_Int */ + PS_DICT_NUM_CHAR_STRINGS, /* FT_Int */ + PS_DICT_CHAR_STRING_KEY, /* FT_String* */ + PS_DICT_CHAR_STRING, /* FT_String* */ + PS_DICT_ENCODING_TYPE, /* T1_EncodingType */ + PS_DICT_ENCODING_ENTRY, /* FT_String* */ + + /* conventionally in the font Private dictionary */ + PS_DICT_NUM_SUBRS, /* FT_Int */ + PS_DICT_SUBR, /* FT_String* */ + PS_DICT_STD_HW, /* FT_UShort */ + PS_DICT_STD_VW, /* FT_UShort */ + PS_DICT_NUM_BLUE_VALUES, /* FT_Byte */ + PS_DICT_BLUE_VALUE, /* FT_Short */ + PS_DICT_BLUE_FUZZ, /* FT_Int */ + PS_DICT_NUM_OTHER_BLUES, /* FT_Byte */ + PS_DICT_OTHER_BLUE, /* FT_Short */ + PS_DICT_NUM_FAMILY_BLUES, /* FT_Byte */ + PS_DICT_FAMILY_BLUE, /* FT_Short */ + PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte */ + PS_DICT_FAMILY_OTHER_BLUE, /* FT_Short */ + PS_DICT_BLUE_SCALE, /* FT_Fixed */ + PS_DICT_BLUE_SHIFT, /* FT_Int */ + PS_DICT_NUM_STEM_SNAP_H, /* FT_Byte */ + PS_DICT_STEM_SNAP_H, /* FT_Short */ + PS_DICT_NUM_STEM_SNAP_V, /* FT_Byte */ + PS_DICT_STEM_SNAP_V, /* FT_Short */ + PS_DICT_FORCE_BOLD, /* FT_Bool */ + PS_DICT_RND_STEM_UP, /* FT_Bool */ + PS_DICT_MIN_FEATURE, /* FT_Short */ + PS_DICT_LEN_IV, /* FT_Int */ + PS_DICT_PASSWORD, /* FT_Long */ + PS_DICT_LANGUAGE_GROUP, /* FT_Long */ + + /* conventionally in the font FontInfo dictionary */ + PS_DICT_VERSION, /* FT_String* */ + PS_DICT_NOTICE, /* FT_String* */ + PS_DICT_FULL_NAME, /* FT_String* */ + PS_DICT_FAMILY_NAME, /* FT_String* */ + PS_DICT_WEIGHT, /* FT_String* */ + PS_DICT_IS_FIXED_PITCH, /* FT_Bool */ + PS_DICT_UNDERLINE_POSITION, /* FT_Short */ + PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */ + PS_DICT_FS_TYPE, /* FT_UShort */ + PS_DICT_ITALIC_ANGLE, /* FT_Long */ + + PS_DICT_MAX = PS_DICT_ITALIC_ANGLE + + } PS_Dict_Keys; + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Value + * + * @description: + * Retrieve the value for the supplied key from a PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * key :: + * An enumeration value representing the dictionary key to retrieve. + * + * idx :: + * For array values, this specifies the index to be returned. + * + * value :: + * A pointer to memory into which to write the value. + * + * valen_len :: + * The size, in bytes, of the memory supplied for the value. + * + * @output: + * value :: + * The value matching the above key, if it exists. + * + * @return: + * The amount of memory (in bytes) required to hold the requested + * value (if it exists, -1 otherwise). + * + * @note: + * The values returned are not pointers into the internal structures of + * the face, but are `fresh' copies, so that the memory containing them + * belongs to the calling application. This also enforces the + * `read-only' nature of these values, i.e., this function cannot be + * used to manipulate the face. + * + * `value' is a void pointer because the values returned can be of + * various types. + * + * If either `value' is NULL or `value_len' is too small, just the + * required memory size for the requested entry is returned. + * + * The `idx' parameter is used, not only to retrieve elements of, for + * example, the FontMatrix or FontBBox, but also to retrieve name keys + * from the CharStrings dictionary, and the charstrings themselves. It + * is ignored for atomic values. + * + * PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To + * get the value as in the font stream, you need to divide by + * 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale). + * + * IMPORTANT: Only key/value pairs read by the FreeType interpreter can + * be retrieved. So, for example, PostScript procedures such as NP, + * ND, and RD are not available. Arbitrary keys are, obviously, not be + * available either. + * + * If the font's format is not PostScript-based, this function returns + * the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Long ) + FT_Get_PS_Font_Value( FT_Face face, + PS_Dict_Keys key, + FT_UInt idx, + void *value, + FT_Long value_len ); + + /* */ + +FT_END_HEADER + +#endif /* __T1TABLES_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ttnameid.h b/freetype2/include/ohos/freetype2/ttnameid.h new file mode 100644 index 0000000000..e65b558127 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ttnameid.h @@ -0,0 +1,1237 @@ +/***************************************************************************/ +/* */ +/* ttnameid.h */ +/* */ +/* TrueType name ID definitions (specification only). */ +/* */ +/* Copyright 1996-2004, 2006-2008, 2012-2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTNAMEID_H__ +#define __TTNAMEID_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* truetype_tables */ + /* */ + + + /*************************************************************************/ + /* */ + /* Possible values for the `platform' identifier code in the name */ + /* records of the TTF `name' table. */ + /* */ + /*************************************************************************/ + + + /*********************************************************************** + * + * @enum: + * TT_PLATFORM_XXX + * + * @description: + * A list of valid values for the `platform_id' identifier code in + * @FT_CharMapRec and @FT_SfntName structures. + * + * @values: + * TT_PLATFORM_APPLE_UNICODE :: + * Used by Apple to indicate a Unicode character map and/or name entry. + * See @TT_APPLE_ID_XXX for corresponding `encoding_id' values. Note + * that name entries in this format are coded as big-endian UCS-2 + * character codes _only_. + * + * TT_PLATFORM_MACINTOSH :: + * Used by Apple to indicate a MacOS-specific charmap and/or name entry. + * See @TT_MAC_ID_XXX for corresponding `encoding_id' values. Note that + * most TrueType fonts contain an Apple roman charmap to be usable on + * MacOS systems (even if they contain a Microsoft charmap as well). + * + * TT_PLATFORM_ISO :: + * This value was used to specify ISO/IEC 10646 charmaps. It is however + * now deprecated. See @TT_ISO_ID_XXX for a list of corresponding + * `encoding_id' values. + * + * TT_PLATFORM_MICROSOFT :: + * Used by Microsoft to indicate Windows-specific charmaps. See + * @TT_MS_ID_XXX for a list of corresponding `encoding_id' values. + * Note that most fonts contain a Unicode charmap using + * (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS). + * + * TT_PLATFORM_CUSTOM :: + * Used to indicate application-specific charmaps. + * + * TT_PLATFORM_ADOBE :: + * This value isn't part of any font format specification, but is used + * by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec + * structure. See @TT_ADOBE_ID_XXX. + */ + +#define TT_PLATFORM_APPLE_UNICODE 0 +#define TT_PLATFORM_MACINTOSH 1 +#define TT_PLATFORM_ISO 2 /* deprecated */ +#define TT_PLATFORM_MICROSOFT 3 +#define TT_PLATFORM_CUSTOM 4 +#define TT_PLATFORM_ADOBE 7 /* artificial */ + + + /*********************************************************************** + * + * @enum: + * TT_APPLE_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries. + * + * @values: + * TT_APPLE_ID_DEFAULT :: + * Unicode version 1.0. + * + * TT_APPLE_ID_UNICODE_1_1 :: + * Unicode 1.1; specifies Hangul characters starting at U+34xx. + * + * TT_APPLE_ID_ISO_10646 :: + * Deprecated (identical to preceding). + * + * TT_APPLE_ID_UNICODE_2_0 :: + * Unicode 2.0 and beyond (UTF-16 BMP only). + * + * TT_APPLE_ID_UNICODE_32 :: + * Unicode 3.1 and beyond, using UTF-32. + * + * TT_APPLE_ID_VARIANT_SELECTOR :: + * From Adobe, not Apple. Not a normal cmap. Specifies variations + * on a real cmap. + */ + +#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ +#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ +#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ +#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ +#define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */ +#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ + + + /*********************************************************************** + * + * @enum: + * TT_MAC_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_MACINTOSH charmaps and name entries. + * + * @values: + * TT_MAC_ID_ROMAN :: + * TT_MAC_ID_JAPANESE :: + * TT_MAC_ID_TRADITIONAL_CHINESE :: + * TT_MAC_ID_KOREAN :: + * TT_MAC_ID_ARABIC :: + * TT_MAC_ID_HEBREW :: + * TT_MAC_ID_GREEK :: + * TT_MAC_ID_RUSSIAN :: + * TT_MAC_ID_RSYMBOL :: + * TT_MAC_ID_DEVANAGARI :: + * TT_MAC_ID_GURMUKHI :: + * TT_MAC_ID_GUJARATI :: + * TT_MAC_ID_ORIYA :: + * TT_MAC_ID_BENGALI :: + * TT_MAC_ID_TAMIL :: + * TT_MAC_ID_TELUGU :: + * TT_MAC_ID_KANNADA :: + * TT_MAC_ID_MALAYALAM :: + * TT_MAC_ID_SINHALESE :: + * TT_MAC_ID_BURMESE :: + * TT_MAC_ID_KHMER :: + * TT_MAC_ID_THAI :: + * TT_MAC_ID_LAOTIAN :: + * TT_MAC_ID_GEORGIAN :: + * TT_MAC_ID_ARMENIAN :: + * TT_MAC_ID_MALDIVIAN :: + * TT_MAC_ID_SIMPLIFIED_CHINESE :: + * TT_MAC_ID_TIBETAN :: + * TT_MAC_ID_MONGOLIAN :: + * TT_MAC_ID_GEEZ :: + * TT_MAC_ID_SLAVIC :: + * TT_MAC_ID_VIETNAMESE :: + * TT_MAC_ID_SINDHI :: + * TT_MAC_ID_UNINTERP :: + */ + +#define TT_MAC_ID_ROMAN 0 +#define TT_MAC_ID_JAPANESE 1 +#define TT_MAC_ID_TRADITIONAL_CHINESE 2 +#define TT_MAC_ID_KOREAN 3 +#define TT_MAC_ID_ARABIC 4 +#define TT_MAC_ID_HEBREW 5 +#define TT_MAC_ID_GREEK 6 +#define TT_MAC_ID_RUSSIAN 7 +#define TT_MAC_ID_RSYMBOL 8 +#define TT_MAC_ID_DEVANAGARI 9 +#define TT_MAC_ID_GURMUKHI 10 +#define TT_MAC_ID_GUJARATI 11 +#define TT_MAC_ID_ORIYA 12 +#define TT_MAC_ID_BENGALI 13 +#define TT_MAC_ID_TAMIL 14 +#define TT_MAC_ID_TELUGU 15 +#define TT_MAC_ID_KANNADA 16 +#define TT_MAC_ID_MALAYALAM 17 +#define TT_MAC_ID_SINHALESE 18 +#define TT_MAC_ID_BURMESE 19 +#define TT_MAC_ID_KHMER 20 +#define TT_MAC_ID_THAI 21 +#define TT_MAC_ID_LAOTIAN 22 +#define TT_MAC_ID_GEORGIAN 23 +#define TT_MAC_ID_ARMENIAN 24 +#define TT_MAC_ID_MALDIVIAN 25 +#define TT_MAC_ID_SIMPLIFIED_CHINESE 25 +#define TT_MAC_ID_TIBETAN 26 +#define TT_MAC_ID_MONGOLIAN 27 +#define TT_MAC_ID_GEEZ 28 +#define TT_MAC_ID_SLAVIC 29 +#define TT_MAC_ID_VIETNAMESE 30 +#define TT_MAC_ID_SINDHI 31 +#define TT_MAC_ID_UNINTERP 32 + + + /*********************************************************************** + * + * @enum: + * TT_ISO_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_ISO charmaps and name entries. + * + * Their use is now deprecated. + * + * @values: + * TT_ISO_ID_7BIT_ASCII :: + * ASCII. + * TT_ISO_ID_10646 :: + * ISO/10646. + * TT_ISO_ID_8859_1 :: + * Also known as Latin-1. + */ + +#define TT_ISO_ID_7BIT_ASCII 0 +#define TT_ISO_ID_10646 1 +#define TT_ISO_ID_8859_1 2 + + + /*********************************************************************** + * + * @enum: + * TT_MS_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_MICROSOFT charmaps and name entries. + * + * @values: + * TT_MS_ID_SYMBOL_CS :: + * Corresponds to Microsoft symbol encoding. See + * @FT_ENCODING_MS_SYMBOL. + * + * TT_MS_ID_UNICODE_CS :: + * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See + * @FT_ENCODING_UNICODE. + * + * TT_MS_ID_SJIS :: + * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS. + * + * TT_MS_ID_GB2312 :: + * Corresponds to Simplified Chinese as used in Mainland China. See + * @FT_ENCODING_GB2312. + * + * TT_MS_ID_BIG_5 :: + * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. + * See @FT_ENCODING_BIG5. + * + * TT_MS_ID_WANSUNG :: + * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG. + * + * TT_MS_ID_JOHAB :: + * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB. + * + * TT_MS_ID_UCS_4 :: + * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to + * the OpenType specification version 1.4 (mid-2001.) + */ + +#define TT_MS_ID_SYMBOL_CS 0 +#define TT_MS_ID_UNICODE_CS 1 +#define TT_MS_ID_SJIS 2 +#define TT_MS_ID_GB2312 3 +#define TT_MS_ID_BIG_5 4 +#define TT_MS_ID_WANSUNG 5 +#define TT_MS_ID_JOHAB 6 +#define TT_MS_ID_UCS_4 10 + + + /*********************************************************************** + * + * @enum: + * TT_ADOBE_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension! + * + * @values: + * TT_ADOBE_ID_STANDARD :: + * Adobe standard encoding. + * TT_ADOBE_ID_EXPERT :: + * Adobe expert encoding. + * TT_ADOBE_ID_CUSTOM :: + * Adobe custom encoding. + * TT_ADOBE_ID_LATIN_1 :: + * Adobe Latin~1 encoding. + */ + +#define TT_ADOBE_ID_STANDARD 0 +#define TT_ADOBE_ID_EXPERT 1 +#define TT_ADOBE_ID_CUSTOM 2 +#define TT_ADOBE_ID_LATIN_1 3 + + + /*************************************************************************/ + /* */ + /* Possible values of the language identifier field in the name records */ + /* of the TTF `name' table if the `platform' identifier code is */ + /* TT_PLATFORM_MACINTOSH. These values are also used as return values */ + /* for function @FT_Get_CMap_Language_ID. */ + /* */ + /* The canonical source for the Apple assigned Language ID's is at */ + /* */ + /* https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html */ + /* */ +#define TT_MAC_LANGID_ENGLISH 0 +#define TT_MAC_LANGID_FRENCH 1 +#define TT_MAC_LANGID_GERMAN 2 +#define TT_MAC_LANGID_ITALIAN 3 +#define TT_MAC_LANGID_DUTCH 4 +#define TT_MAC_LANGID_SWEDISH 5 +#define TT_MAC_LANGID_SPANISH 6 +#define TT_MAC_LANGID_DANISH 7 +#define TT_MAC_LANGID_PORTUGUESE 8 +#define TT_MAC_LANGID_NORWEGIAN 9 +#define TT_MAC_LANGID_HEBREW 10 +#define TT_MAC_LANGID_JAPANESE 11 +#define TT_MAC_LANGID_ARABIC 12 +#define TT_MAC_LANGID_FINNISH 13 +#define TT_MAC_LANGID_GREEK 14 +#define TT_MAC_LANGID_ICELANDIC 15 +#define TT_MAC_LANGID_MALTESE 16 +#define TT_MAC_LANGID_TURKISH 17 +#define TT_MAC_LANGID_CROATIAN 18 +#define TT_MAC_LANGID_CHINESE_TRADITIONAL 19 +#define TT_MAC_LANGID_URDU 20 +#define TT_MAC_LANGID_HINDI 21 +#define TT_MAC_LANGID_THAI 22 +#define TT_MAC_LANGID_KOREAN 23 +#define TT_MAC_LANGID_LITHUANIAN 24 +#define TT_MAC_LANGID_POLISH 25 +#define TT_MAC_LANGID_HUNGARIAN 26 +#define TT_MAC_LANGID_ESTONIAN 27 +#define TT_MAC_LANGID_LETTISH 28 +#define TT_MAC_LANGID_SAAMISK 29 +#define TT_MAC_LANGID_FAEROESE 30 +#define TT_MAC_LANGID_FARSI 31 +#define TT_MAC_LANGID_RUSSIAN 32 +#define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33 +#define TT_MAC_LANGID_FLEMISH 34 +#define TT_MAC_LANGID_IRISH 35 +#define TT_MAC_LANGID_ALBANIAN 36 +#define TT_MAC_LANGID_ROMANIAN 37 +#define TT_MAC_LANGID_CZECH 38 +#define TT_MAC_LANGID_SLOVAK 39 +#define TT_MAC_LANGID_SLOVENIAN 40 +#define TT_MAC_LANGID_YIDDISH 41 +#define TT_MAC_LANGID_SERBIAN 42 +#define TT_MAC_LANGID_MACEDONIAN 43 +#define TT_MAC_LANGID_BULGARIAN 44 +#define TT_MAC_LANGID_UKRAINIAN 45 +#define TT_MAC_LANGID_BYELORUSSIAN 46 +#define TT_MAC_LANGID_UZBEK 47 +#define TT_MAC_LANGID_KAZAKH 48 +#define TT_MAC_LANGID_AZERBAIJANI 49 +#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT 49 +#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50 +#define TT_MAC_LANGID_ARMENIAN 51 +#define TT_MAC_LANGID_GEORGIAN 52 +#define TT_MAC_LANGID_MOLDAVIAN 53 +#define TT_MAC_LANGID_KIRGHIZ 54 +#define TT_MAC_LANGID_TAJIKI 55 +#define TT_MAC_LANGID_TURKMEN 56 +#define TT_MAC_LANGID_MONGOLIAN 57 +#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT 57 +#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58 +#define TT_MAC_LANGID_PASHTO 59 +#define TT_MAC_LANGID_KURDISH 60 +#define TT_MAC_LANGID_KASHMIRI 61 +#define TT_MAC_LANGID_SINDHI 62 +#define TT_MAC_LANGID_TIBETAN 63 +#define TT_MAC_LANGID_NEPALI 64 +#define TT_MAC_LANGID_SANSKRIT 65 +#define TT_MAC_LANGID_MARATHI 66 +#define TT_MAC_LANGID_BENGALI 67 +#define TT_MAC_LANGID_ASSAMESE 68 +#define TT_MAC_LANGID_GUJARATI 69 +#define TT_MAC_LANGID_PUNJABI 70 +#define TT_MAC_LANGID_ORIYA 71 +#define TT_MAC_LANGID_MALAYALAM 72 +#define TT_MAC_LANGID_KANNADA 73 +#define TT_MAC_LANGID_TAMIL 74 +#define TT_MAC_LANGID_TELUGU 75 +#define TT_MAC_LANGID_SINHALESE 76 +#define TT_MAC_LANGID_BURMESE 77 +#define TT_MAC_LANGID_KHMER 78 +#define TT_MAC_LANGID_LAO 79 +#define TT_MAC_LANGID_VIETNAMESE 80 +#define TT_MAC_LANGID_INDONESIAN 81 +#define TT_MAC_LANGID_TAGALOG 82 +#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83 +#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84 +#define TT_MAC_LANGID_AMHARIC 85 +#define TT_MAC_LANGID_TIGRINYA 86 +#define TT_MAC_LANGID_GALLA 87 +#define TT_MAC_LANGID_SOMALI 88 +#define TT_MAC_LANGID_SWAHILI 89 +#define TT_MAC_LANGID_RUANDA 90 +#define TT_MAC_LANGID_RUNDI 91 +#define TT_MAC_LANGID_CHEWA 92 +#define TT_MAC_LANGID_MALAGASY 93 +#define TT_MAC_LANGID_ESPERANTO 94 +#define TT_MAC_LANGID_WELSH 128 +#define TT_MAC_LANGID_BASQUE 129 +#define TT_MAC_LANGID_CATALAN 130 +#define TT_MAC_LANGID_LATIN 131 +#define TT_MAC_LANGID_QUECHUA 132 +#define TT_MAC_LANGID_GUARANI 133 +#define TT_MAC_LANGID_AYMARA 134 +#define TT_MAC_LANGID_TATAR 135 +#define TT_MAC_LANGID_UIGHUR 136 +#define TT_MAC_LANGID_DZONGKHA 137 +#define TT_MAC_LANGID_JAVANESE 138 +#define TT_MAC_LANGID_SUNDANESE 139 + + +#if 0 /* these seem to be errors that have been dropped */ + +#define TT_MAC_LANGID_SCOTTISH_GAELIC 140 +#define TT_MAC_LANGID_IRISH_GAELIC 141 + +#endif + + + /* The following codes are new as of 2000-03-10 */ +#define TT_MAC_LANGID_GALICIAN 140 +#define TT_MAC_LANGID_AFRIKAANS 141 +#define TT_MAC_LANGID_BRETON 142 +#define TT_MAC_LANGID_INUKTITUT 143 +#define TT_MAC_LANGID_SCOTTISH_GAELIC 144 +#define TT_MAC_LANGID_MANX_GAELIC 145 +#define TT_MAC_LANGID_IRISH_GAELIC 146 +#define TT_MAC_LANGID_TONGAN 147 +#define TT_MAC_LANGID_GREEK_POLYTONIC 148 +#define TT_MAC_LANGID_GREELANDIC 149 +#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150 + + + /*************************************************************************/ + /* */ + /* Possible values of the language identifier field in the name records */ + /* of the TTF `name' table if the `platform' identifier code is */ + /* TT_PLATFORM_MICROSOFT. */ + /* */ + /* The canonical source for the MS assigned LCIDs is */ + /* */ + /* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */ + /* */ + +#define TT_MS_LANGID_ARABIC_GENERAL 0x0001 +#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 +#define TT_MS_LANGID_ARABIC_IRAQ 0x0801 +#define TT_MS_LANGID_ARABIC_EGYPT 0x0C01 +#define TT_MS_LANGID_ARABIC_LIBYA 0x1001 +#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 +#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 +#define TT_MS_LANGID_ARABIC_TUNISIA 0x1C01 +#define TT_MS_LANGID_ARABIC_OMAN 0x2001 +#define TT_MS_LANGID_ARABIC_YEMEN 0x2401 +#define TT_MS_LANGID_ARABIC_SYRIA 0x2801 +#define TT_MS_LANGID_ARABIC_JORDAN 0x2C01 +#define TT_MS_LANGID_ARABIC_LEBANON 0x3001 +#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 +#define TT_MS_LANGID_ARABIC_UAE 0x3801 +#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01 +#define TT_MS_LANGID_ARABIC_QATAR 0x4001 +#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 +#define TT_MS_LANGID_CATALAN_SPAIN 0x0403 +#define TT_MS_LANGID_CHINESE_GENERAL 0x0004 +#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 +#define TT_MS_LANGID_CHINESE_PRC 0x0804 +#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04 +#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 + +#if 1 /* this looks like the correct value */ +#define TT_MS_LANGID_CHINESE_MACAU 0x1404 +#else /* but beware, Microsoft may change its mind... + the most recent Word reference has the following: */ +#define TT_MS_LANGID_CHINESE_MACAU TT_MS_LANGID_CHINESE_HONG_KONG +#endif + +#if 0 /* used only with .NET `cultures'; commented out */ +#define TT_MS_LANGID_CHINESE_TRADITIONAL 0x7C04 +#endif + +#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 +#define TT_MS_LANGID_DANISH_DENMARK 0x0406 +#define TT_MS_LANGID_GERMAN_GERMANY 0x0407 +#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 +#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07 +#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 +#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 +#define TT_MS_LANGID_GREEK_GREECE 0x0408 + + /* don't ask what this one means... It is commented out currently. */ +#if 0 +#define TT_MS_LANGID_GREEK_GREECE2 0x2008 +#endif + +#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 +#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 +#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 +#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09 +#define TT_MS_LANGID_ENGLISH_CANADA 0x1009 +#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 +#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 +#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1C09 +#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 +#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 +#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 +#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09 +#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 +#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 +#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 +#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09 +#define TT_MS_LANGID_ENGLISH_INDIA 0x4009 +#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409 +#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809 +#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A +#define TT_MS_LANGID_SPANISH_MEXICO 0x080A +#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0C0A +#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A +#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A +#define TT_MS_LANGID_SPANISH_PANAMA 0x180A +#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1C0A +#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200A +#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240A +#define TT_MS_LANGID_SPANISH_PERU 0x280A +#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2C0A +#define TT_MS_LANGID_SPANISH_ECUADOR 0x300A +#define TT_MS_LANGID_SPANISH_CHILE 0x340A +#define TT_MS_LANGID_SPANISH_URUGUAY 0x380A +#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3C0A +#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400A +#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440A +#define TT_MS_LANGID_SPANISH_HONDURAS 0x480A +#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A +#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A +#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A + /* The following ID blatantly violate MS specs by using a */ + /* sublanguage > 0x1F. */ +#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU +#define TT_MS_LANGID_FINNISH_FINLAND 0x040B +#define TT_MS_LANGID_FRENCH_FRANCE 0x040C +#define TT_MS_LANGID_FRENCH_BELGIUM 0x080C +#define TT_MS_LANGID_FRENCH_CANADA 0x0C0C +#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C +#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C +#define TT_MS_LANGID_FRENCH_MONACO 0x180C +#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C +#define TT_MS_LANGID_FRENCH_REUNION 0x200C +#define TT_MS_LANGID_FRENCH_CONGO 0x240C + /* which was formerly: */ +#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO +#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C +#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C +#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C +#define TT_MS_LANGID_FRENCH_MALI 0x340C +#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C +#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C + /* and another violation of the spec (see 0xE40AU) */ +#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU +#define TT_MS_LANGID_HEBREW_ISRAEL 0x040D +#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E +#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F +#define TT_MS_LANGID_ITALIAN_ITALY 0x0410 +#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 +#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 +#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 +#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 +#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 +#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814 +#define TT_MS_LANGID_POLISH_POLAND 0x0415 +#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 +#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 +#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 +#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 +#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 +#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 +#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 +#define TT_MS_LANGID_CROATIAN_CROATIA 0x041A +#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A +#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A + +#if 0 /* this used to be this value, but it looks like we were wrong */ +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101A +#else /* current sources say */ +#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A + /* and XPsp2 Platform SDK added (2004-07-26) */ + /* Names are shortened to be significant within 40 chars. */ +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181A +#endif + +#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B +#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C +#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D +#define TT_MS_LANGID_SWEDISH_FINLAND 0x081D +#define TT_MS_LANGID_THAI_THAILAND 0x041E +#define TT_MS_LANGID_TURKISH_TURKEY 0x041F +#define TT_MS_LANGID_URDU_PAKISTAN 0x0420 +#define TT_MS_LANGID_URDU_INDIA 0x0820 +#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 +#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 +#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 +#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 +#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 +#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 +#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 +#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 +#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428 +#define TT_MS_LANGID_FARSI_IRAN 0x0429 +#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A +#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B +#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C +#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C +#define TT_MS_LANGID_BASQUE_SPAIN 0x042D +#define TT_MS_LANGID_SORBIAN_GERMANY 0x042E +#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F +#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 +#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 +#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 +#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 +#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 +#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 +#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 +#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 +#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 +#define TT_MS_LANGID_HINDI_INDIA 0x0439 +#define TT_MS_LANGID_MALTESE_MALTA 0x043A + /* Added by XPsp2 Platform SDK (2004-07-26) */ +#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B +#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B +#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B +#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103B +#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143B +#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183B +#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B +#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B +#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B + /* ... and we also keep our old identifier... */ +#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B + +#if 0 /* this seems to be a previous inversion */ +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C +#else +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C +#endif + +#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D +#define TT_MS_LANGID_MALAY_MALAYSIA 0x043E +#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E +#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043F +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440 + /* alias declared in Windows 2000 */ +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ + TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN + +#define TT_MS_LANGID_SWAHILI_KENYA 0x0441 +#define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 +#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 +#define TT_MS_LANGID_BENGALI_INDIA 0x0445 +#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845 +#define TT_MS_LANGID_PUNJABI_INDIA 0x0446 +#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 +#define TT_MS_LANGID_GUJARATI_INDIA 0x0447 +#define TT_MS_LANGID_ORIYA_INDIA 0x0448 +#define TT_MS_LANGID_TAMIL_INDIA 0x0449 +#define TT_MS_LANGID_TELUGU_INDIA 0x044A +#define TT_MS_LANGID_KANNADA_INDIA 0x044B +#define TT_MS_LANGID_MALAYALAM_INDIA 0x044C +#define TT_MS_LANGID_ASSAMESE_INDIA 0x044D +#define TT_MS_LANGID_MARATHI_INDIA 0x044E +#define TT_MS_LANGID_SANSKRIT_INDIA 0x044F +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450 +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850 +#define TT_MS_LANGID_TIBETAN_CHINA 0x0451 + /* Don't use the next constant! It has */ + /* (1) the wrong spelling (Dzonghka) */ + /* (2) Microsoft doesn't officially define it -- */ + /* at least it is not in the List of Local */ + /* ID Values. */ + /* (3) Dzongkha is not the same language as */ + /* Tibetan, so merging it is wrong anyway. */ + /* */ + /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW. */ +#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 + +#if 0 + /* the following used to be defined */ +#define TT_MS_LANGID_TIBETAN_BHUTAN 0x0451 + /* ... but it was changed; */ +#else + /* So we will continue to #define it, but with the correct value */ +#define TT_MS_LANGID_TIBETAN_BHUTAN TT_MS_LANGID_DZONGHKA_BHUTAN +#endif + +#define TT_MS_LANGID_WELSH_WALES 0x0452 +#define TT_MS_LANGID_KHMER_CAMBODIA 0x0453 +#define TT_MS_LANGID_LAO_LAOS 0x0454 +#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 +#define TT_MS_LANGID_GALICIAN_SPAIN 0x0456 +#define TT_MS_LANGID_KONKANI_INDIA 0x0457 +#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 +#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 +#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 + /* Missing a LCID for Sindhi in Devanagari script */ +#define TT_MS_LANGID_SYRIAC_SYRIA 0x045A +#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045B +#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C +#define TT_MS_LANGID_INUKTITUT_CANADA 0x045D +#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085F + /* Missing a LCID for Tifinagh script */ +#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 + /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */ + /* script is yet unclear... might be Arabic, Nagari or Sharada */ +#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 + /* ... and aliased (by MS) for compatibility reasons. */ +#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA +#define TT_MS_LANGID_NEPALI_NEPAL 0x0461 +#define TT_MS_LANGID_NEPALI_INDIA 0x0861 +#define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462 +#define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463 +#define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464 +#define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465 + /* alias declared in Windows 2000 */ +#define TT_MS_LANGID_DIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES +#define TT_MS_LANGID_EDO_NIGERIA 0x0466 +#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 +#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468 +#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 +#define TT_MS_LANGID_YORUBA_NIGERIA 0x046A +#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B +#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B +#define TT_MS_LANGID_QUECHUA_PERU 0x0C6B +#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046C + /* Also spelled by XPsp2 Platform SDK (2004-07-26) */ +#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ + TT_MS_LANGID_SEPEDI_SOUTH_AFRICA + /* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */ +#define TT_MS_LANGID_IGBO_NIGERIA 0x0470 +#define TT_MS_LANGID_KANURI_NIGERIA 0x0471 +#define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472 +#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473 +#define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873 + /* also spelled in the `Passport SDK' list as: */ +#define TT_MS_LANGID_TIGRIGNA_ERYTREA TT_MS_LANGID_TIGRIGNA_ERYTHREA +#define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474 +#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475 +#define TT_MS_LANGID_LATIN 0x0476 +#define TT_MS_LANGID_SOMALI_SOMALIA 0x0477 + /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */ + /* not written (but OTOH the peculiar writing system is worth */ + /* studying). */ +#define TT_MS_LANGID_YI_CHINA 0x0478 +#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479 + /* language codes from 0x047A to 0x047F are (still) unknown. */ +#define TT_MS_LANGID_UIGHUR_CHINA 0x0480 +#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 + +#if 0 /* not deemed useful for fonts */ +#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04FF +#endif + + + /*************************************************************************/ + /* */ + /* Possible values of the `name' identifier field in the name records of */ + /* the TTF `name' table. These values are platform independent. */ + /* */ +#define TT_NAME_ID_COPYRIGHT 0 +#define TT_NAME_ID_FONT_FAMILY 1 +#define TT_NAME_ID_FONT_SUBFAMILY 2 +#define TT_NAME_ID_UNIQUE_ID 3 +#define TT_NAME_ID_FULL_NAME 4 +#define TT_NAME_ID_VERSION_STRING 5 +#define TT_NAME_ID_PS_NAME 6 +#define TT_NAME_ID_TRADEMARK 7 + + /* the following values are from the OpenType spec */ +#define TT_NAME_ID_MANUFACTURER 8 +#define TT_NAME_ID_DESIGNER 9 +#define TT_NAME_ID_DESCRIPTION 10 +#define TT_NAME_ID_VENDOR_URL 11 +#define TT_NAME_ID_DESIGNER_URL 12 +#define TT_NAME_ID_LICENSE 13 +#define TT_NAME_ID_LICENSE_URL 14 + /* number 15 is reserved */ +#define TT_NAME_ID_PREFERRED_FAMILY 16 +#define TT_NAME_ID_PREFERRED_SUBFAMILY 17 +#define TT_NAME_ID_MAC_FULL_NAME 18 + + /* The following code is new as of 2000-01-21 */ +#define TT_NAME_ID_SAMPLE_TEXT 19 + + /* This is new in OpenType 1.3 */ +#define TT_NAME_ID_CID_FINDFONT_NAME 20 + + /* This is new in OpenType 1.5 */ +#define TT_NAME_ID_WWS_FAMILY 21 +#define TT_NAME_ID_WWS_SUBFAMILY 22 + + + /*************************************************************************/ + /* */ + /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */ + /* */ + /* Updated 08-Nov-2008. */ + /* */ + + /* Bit 0 Basic Latin */ +#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */ + /* Bit 1 C1 Controls and Latin-1 Supplement */ +#define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ + /* Bit 2 Latin Extended-A */ +#define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ + /* Bit 3 Latin Extended-B */ +#define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ + /* Bit 4 IPA Extensions */ + /* Phonetic Extensions */ + /* Phonetic Extensions Supplement */ +#define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ + /* U+1D00-U+1D7F */ + /* U+1D80-U+1DBF */ + /* Bit 5 Spacing Modifier Letters */ + /* Modifier Tone Letters */ +#define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ + /* U+A700-U+A71F */ + /* Bit 6 Combining Diacritical Marks */ + /* Combining Diacritical Marks Supplement */ +#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ + /* U+1DC0-U+1DFF */ + /* Bit 7 Greek and Coptic */ +#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ + /* Bit 8 Coptic */ +#define TT_UCR_COPTIC (1L << 8) /* U+2C80-U+2CFF */ + /* Bit 9 Cyrillic */ + /* Cyrillic Supplement */ + /* Cyrillic Extended-A */ + /* Cyrillic Extended-B */ +#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ + /* U+0500-U+052F */ + /* U+2DE0-U+2DFF */ + /* U+A640-U+A69F */ + /* Bit 10 Armenian */ +#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ + /* Bit 11 Hebrew */ +#define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ + /* Bit 12 Vai */ +#define TT_UCR_VAI (1L << 12) /* U+A500-U+A63F */ + /* Bit 13 Arabic */ + /* Arabic Supplement */ +#define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ + /* U+0750-U+077F */ + /* Bit 14 NKo */ +#define TT_UCR_NKO (1L << 14) /* U+07C0-U+07FF */ + /* Bit 15 Devanagari */ +#define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ + /* Bit 16 Bengali */ +#define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ + /* Bit 17 Gurmukhi */ +#define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ + /* Bit 18 Gujarati */ +#define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ + /* Bit 19 Oriya */ +#define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ + /* Bit 20 Tamil */ +#define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ + /* Bit 21 Telugu */ +#define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ + /* Bit 22 Kannada */ +#define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ + /* Bit 23 Malayalam */ +#define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ + /* Bit 24 Thai */ +#define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ + /* Bit 25 Lao */ +#define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ + /* Bit 26 Georgian */ + /* Georgian Supplement */ +#define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ + /* U+2D00-U+2D2F */ + /* Bit 27 Balinese */ +#define TT_UCR_BALINESE (1L << 27) /* U+1B00-U+1B7F */ + /* Bit 28 Hangul Jamo */ +#define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ + /* Bit 29 Latin Extended Additional */ + /* Latin Extended-C */ + /* Latin Extended-D */ +#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ + /* U+2C60-U+2C7F */ + /* U+A720-U+A7FF */ + /* Bit 30 Greek Extended */ +#define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ + /* Bit 31 General Punctuation */ + /* Supplemental Punctuation */ +#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ + /* U+2E00-U+2E7F */ + /* Bit 32 Superscripts And Subscripts */ +#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ + /* Bit 33 Currency Symbols */ +#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ + /* Bit 34 Combining Diacritical Marks For Symbols */ +#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ + /* Bit 35 Letterlike Symbols */ +#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ + /* Bit 36 Number Forms */ +#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ + /* Bit 37 Arrows */ + /* Supplemental Arrows-A */ + /* Supplemental Arrows-B */ + /* Miscellaneous Symbols and Arrows */ +#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ + /* U+27F0-U+27FF */ + /* U+2900-U+297F */ + /* U+2B00-U+2BFF */ + /* Bit 38 Mathematical Operators */ + /* Supplemental Mathematical Operators */ + /* Miscellaneous Mathematical Symbols-A */ + /* Miscellaneous Mathematical Symbols-B */ +#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ + /* U+2A00-U+2AFF */ + /* U+27C0-U+27EF */ + /* U+2980-U+29FF */ + /* Bit 39 Miscellaneous Technical */ +#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ + /* Bit 40 Control Pictures */ +#define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ + /* Bit 41 Optical Character Recognition */ +#define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ + /* Bit 42 Enclosed Alphanumerics */ +#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ + /* Bit 43 Box Drawing */ +#define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ + /* Bit 44 Block Elements */ +#define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ + /* Bit 45 Geometric Shapes */ +#define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ + /* Bit 46 Miscellaneous Symbols */ +#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ + /* Bit 47 Dingbats */ +#define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ + /* Bit 48 CJK Symbols and Punctuation */ +#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ + /* Bit 49 Hiragana */ +#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ + /* Bit 50 Katakana */ + /* Katakana Phonetic Extensions */ +#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ + /* U+31F0-U+31FF */ + /* Bit 51 Bopomofo */ + /* Bopomofo Extended */ +#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ + /* U+31A0-U+31BF */ + /* Bit 52 Hangul Compatibility Jamo */ +#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ + /* Bit 53 Phags-Pa */ +#define TT_UCR_CJK_MISC (1L << 21) /* U+A840-U+A87F */ +#define TT_UCR_KANBUN TT_UCR_CJK_MISC /* deprecated */ +#define TT_UCR_PHAGSPA + /* Bit 54 Enclosed CJK Letters and Months */ +#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ + /* Bit 55 CJK Compatibility */ +#define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ + /* Bit 56 Hangul Syllables */ +#define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ + /* Bit 57 High Surrogates */ + /* High Private Use Surrogates */ + /* Low Surrogates */ + /* */ + /* According to OpenType specs v.1.3+, */ + /* setting bit 57 implies that there is */ + /* at least one codepoint beyond the */ + /* Basic Multilingual Plane that is */ + /* supported by this font. So it really */ + /* means >= U+10000 */ +#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ + /* U+DB80-U+DBFF */ + /* U+DC00-U+DFFF */ +#define TT_UCR_NON_PLANE_0 TT_UCR_SURROGATES + /* Bit 58 Phoenician */ +#define TT_UCR_PHOENICIAN (1L << 26) /*U+10900-U+1091F*/ + /* Bit 59 CJK Unified Ideographs */ + /* CJK Radicals Supplement */ + /* Kangxi Radicals */ + /* Ideographic Description Characters */ + /* CJK Unified Ideographs Extension A */ + /* CJK Unified Ideographs Extension B */ + /* Kanbun */ +#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ + /* U+2E80-U+2EFF */ + /* U+2F00-U+2FDF */ + /* U+2FF0-U+2FFF */ + /* U+3400-U+4DB5 */ + /*U+20000-U+2A6DF*/ + /* U+3190-U+319F */ + /* Bit 60 Private Use */ +#define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ + /* Bit 61 CJK Strokes */ + /* CJK Compatibility Ideographs */ + /* CJK Compatibility Ideographs Supplement */ +#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+31C0-U+31EF */ + /* U+F900-U+FAFF */ + /*U+2F800-U+2FA1F*/ + /* Bit 62 Alphabetic Presentation Forms */ +#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ + /* Bit 63 Arabic Presentation Forms-A */ +#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FDFF */ + /* Bit 64 Combining Half Marks */ +#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ + /* Bit 65 Vertical forms */ + /* CJK Compatibility Forms */ +#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE10-U+FE1F */ + /* U+FE30-U+FE4F */ + /* Bit 66 Small Form Variants */ +#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ + /* Bit 67 Arabic Presentation Forms-B */ +#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFE */ + /* Bit 68 Halfwidth and Fullwidth Forms */ +#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ + /* Bit 69 Specials */ +#define TT_UCR_SPECIALS (1L << 5) /* U+FFF0-U+FFFD */ + /* Bit 70 Tibetan */ +#define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FFF */ + /* Bit 71 Syriac */ +#define TT_UCR_SYRIAC (1L << 7) /* U+0700-U+074F */ + /* Bit 72 Thaana */ +#define TT_UCR_THAANA (1L << 8) /* U+0780-U+07BF */ + /* Bit 73 Sinhala */ +#define TT_UCR_SINHALA (1L << 9) /* U+0D80-U+0DFF */ + /* Bit 74 Myanmar */ +#define TT_UCR_MYANMAR (1L << 10) /* U+1000-U+109F */ + /* Bit 75 Ethiopic */ + /* Ethiopic Supplement */ + /* Ethiopic Extended */ +#define TT_UCR_ETHIOPIC (1L << 11) /* U+1200-U+137F */ + /* U+1380-U+139F */ + /* U+2D80-U+2DDF */ + /* Bit 76 Cherokee */ +#define TT_UCR_CHEROKEE (1L << 12) /* U+13A0-U+13FF */ + /* Bit 77 Unified Canadian Aboriginal Syllabics */ +#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS (1L << 13) /* U+1400-U+167F */ + /* Bit 78 Ogham */ +#define TT_UCR_OGHAM (1L << 14) /* U+1680-U+169F */ + /* Bit 79 Runic */ +#define TT_UCR_RUNIC (1L << 15) /* U+16A0-U+16FF */ + /* Bit 80 Khmer */ + /* Khmer Symbols */ +#define TT_UCR_KHMER (1L << 16) /* U+1780-U+17FF */ + /* U+19E0-U+19FF */ + /* Bit 81 Mongolian */ +#define TT_UCR_MONGOLIAN (1L << 17) /* U+1800-U+18AF */ + /* Bit 82 Braille Patterns */ +#define TT_UCR_BRAILLE (1L << 18) /* U+2800-U+28FF */ + /* Bit 83 Yi Syllables */ + /* Yi Radicals */ +#define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */ + /* U+A490-U+A4CF */ + /* Bit 84 Tagalog */ + /* Hanunoo */ + /* Buhid */ + /* Tagbanwa */ +#define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */ + /* U+1720-U+173F */ + /* U+1740-U+175F */ + /* U+1760-U+177F */ + /* Bit 85 Old Italic */ +#define TT_UCR_OLD_ITALIC (1L << 21) /*U+10300-U+1032F*/ + /* Bit 86 Gothic */ +#define TT_UCR_GOTHIC (1L << 22) /*U+10330-U+1034F*/ + /* Bit 87 Deseret */ +#define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/ + /* Bit 88 Byzantine Musical Symbols */ + /* Musical Symbols */ + /* Ancient Greek Musical Notation */ +#define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/ + /*U+1D100-U+1D1FF*/ + /*U+1D200-U+1D24F*/ + /* Bit 89 Mathematical Alphanumeric Symbols */ +#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/ + /* Bit 90 Private Use (plane 15) */ + /* Private Use (plane 16) */ +#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/ + /*U+100000-U+10FFFD*/ + /* Bit 91 Variation Selectors */ + /* Variation Selectors Supplement */ +#define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */ + /*U+E0100-U+E01EF*/ + /* Bit 92 Tags */ +#define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/ + /* Bit 93 Limbu */ +#define TT_UCR_LIMBU (1L << 29) /* U+1900-U+194F */ + /* Bit 94 Tai Le */ +#define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ + /* Bit 95 New Tai Lue */ +#define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ + /* Bit 96 Buginese */ +#define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ + /* Bit 97 Glagolitic */ +#define TT_UCR_GLAGOLITIC (1L << 1) /* U+2C00-U+2C5F */ + /* Bit 98 Tifinagh */ +#define TT_UCR_TIFINAGH (1L << 2) /* U+2D30-U+2D7F */ + /* Bit 99 Yijing Hexagram Symbols */ +#define TT_UCR_YIJING (1L << 3) /* U+4DC0-U+4DFF */ + /* Bit 100 Syloti Nagri */ +#define TT_UCR_SYLOTI_NAGRI (1L << 4) /* U+A800-U+A82F */ + /* Bit 101 Linear B Syllabary */ + /* Linear B Ideograms */ + /* Aegean Numbers */ +#define TT_UCR_LINEAR_B (1L << 5) /*U+10000-U+1007F*/ + /*U+10080-U+100FF*/ + /*U+10100-U+1013F*/ + /* Bit 102 Ancient Greek Numbers */ +#define TT_UCR_ANCIENT_GREEK_NUMBERS (1L << 6) /*U+10140-U+1018F*/ + /* Bit 103 Ugaritic */ +#define TT_UCR_UGARITIC (1L << 7) /*U+10380-U+1039F*/ + /* Bit 104 Old Persian */ +#define TT_UCR_OLD_PERSIAN (1L << 8) /*U+103A0-U+103DF*/ + /* Bit 105 Shavian */ +#define TT_UCR_SHAVIAN (1L << 9) /*U+10450-U+1047F*/ + /* Bit 106 Osmanya */ +#define TT_UCR_OSMANYA (1L << 10) /*U+10480-U+104AF*/ + /* Bit 107 Cypriot Syllabary */ +#define TT_UCR_CYPRIOT_SYLLABARY (1L << 11) /*U+10800-U+1083F*/ + /* Bit 108 Kharoshthi */ +#define TT_UCR_KHAROSHTHI (1L << 12) /*U+10A00-U+10A5F*/ + /* Bit 109 Tai Xuan Jing Symbols */ +#define TT_UCR_TAI_XUAN_JING (1L << 13) /*U+1D300-U+1D35F*/ + /* Bit 110 Cuneiform */ + /* Cuneiform Numbers and Punctuation */ +#define TT_UCR_CUNEIFORM (1L << 14) /*U+12000-U+123FF*/ + /*U+12400-U+1247F*/ + /* Bit 111 Counting Rod Numerals */ +#define TT_UCR_COUNTING_ROD_NUMERALS (1L << 15) /*U+1D360-U+1D37F*/ + /* Bit 112 Sundanese */ +#define TT_UCR_SUNDANESE (1L << 16) /* U+1B80-U+1BBF */ + /* Bit 113 Lepcha */ +#define TT_UCR_LEPCHA (1L << 17) /* U+1C00-U+1C4F */ + /* Bit 114 Ol Chiki */ +#define TT_UCR_OL_CHIKI (1L << 18) /* U+1C50-U+1C7F */ + /* Bit 115 Saurashtra */ +#define TT_UCR_SAURASHTRA (1L << 19) /* U+A880-U+A8DF */ + /* Bit 116 Kayah Li */ +#define TT_UCR_KAYAH_LI (1L << 20) /* U+A900-U+A92F */ + /* Bit 117 Rejang */ +#define TT_UCR_REJANG (1L << 21) /* U+A930-U+A95F */ + /* Bit 118 Cham */ +#define TT_UCR_CHAM (1L << 22) /* U+AA00-U+AA5F */ + /* Bit 119 Ancient Symbols */ +#define TT_UCR_ANCIENT_SYMBOLS (1L << 23) /*U+10190-U+101CF*/ + /* Bit 120 Phaistos Disc */ +#define TT_UCR_PHAISTOS_DISC (1L << 24) /*U+101D0-U+101FF*/ + /* Bit 121 Carian */ + /* Lycian */ + /* Lydian */ +#define TT_UCR_OLD_ANATOLIAN (1L << 25) /*U+102A0-U+102DF*/ + /*U+10280-U+1029F*/ + /*U+10920-U+1093F*/ + /* Bit 122 Domino Tiles */ + /* Mahjong Tiles */ +#define TT_UCR_GAME_TILES (1L << 26) /*U+1F030-U+1F09F*/ + /*U+1F000-U+1F02F*/ + /* Bit 123-127 Reserved for process-internal usage */ + + + /*************************************************************************/ + /* */ + /* Some compilers have a very limited length of identifiers. */ + /* */ +#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) +#define HAVE_LIMIT_ON_IDENTS +#endif + + +#ifndef HAVE_LIMIT_ON_IDENTS + + + /*************************************************************************/ + /* */ + /* Here some alias #defines in order to be clearer. */ + /* */ + /* These are not always #defined to stay within the 31~character limit, */ + /* which some compilers have. */ + /* */ + /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */ + /* Borland compilers (read: from BC++ 3.1 on) can increase this limit. */ + /* If you get a warning with such a compiler, use the -i40 switch. */ + /* */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ + TT_UCR_ARABIC_PRESENTATIONS_A +#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ + TT_UCR_ARABIC_PRESENTATIONS_B + +#define TT_UCR_COMBINING_DIACRITICAL_MARKS \ + TT_UCR_COMBINING_DIACRITICS +#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ + TT_UCR_COMBINING_DIACRITICS_SYMB + + +#endif /* !HAVE_LIMIT_ON_IDENTS */ + + +FT_END_HEADER + +#endif /* __TTNAMEID_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/tttables.h b/freetype2/include/ohos/freetype2/tttables.h new file mode 100644 index 0000000000..e1d8b05e79 --- /dev/null +++ b/freetype2/include/ohos/freetype2/tttables.h @@ -0,0 +1,829 @@ +/***************************************************************************/ +/* */ +/* tttables.h */ +/* */ +/* Basic SFNT/TrueType tables definitions and interface */ +/* (specification only). */ +/* */ +/* Copyright 1996-2005, 2008-2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTTABLES_H__ +#define __TTTABLES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* truetype_tables */ + /* */ + /* <Title> */ + /* TrueType Tables */ + /* */ + /* <Abstract> */ + /* TrueType specific table types and functions. */ + /* */ + /* <Description> */ + /* This section contains the definition of TrueType-specific tables */ + /* as well as some routines used to access and process them. */ + /* */ + /* <Order> */ + /* TT_Header */ + /* TT_HoriHeader */ + /* TT_VertHeader */ + /* TT_OS2 */ + /* TT_Postscript */ + /* TT_PCLT */ + /* TT_MaxProfile */ + /* */ + /* FT_Sfnt_Tag */ + /* FT_Get_Sfnt_Table */ + /* FT_Load_Sfnt_Table */ + /* FT_Sfnt_Table_Info */ + /* */ + /* FT_Get_CMap_Language_ID */ + /* FT_Get_CMap_Format */ + /* */ + /* FT_PARAM_TAG_UNPATENTED_HINTING */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Header */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType font header table. All */ + /* fields follow the TrueType specification. */ + /* */ + typedef struct TT_Header_ + { + FT_Fixed Table_Version; + FT_Fixed Font_Revision; + + FT_Long CheckSum_Adjust; + FT_Long Magic_Number; + + FT_UShort Flags; + FT_UShort Units_Per_EM; + + FT_Long Created [2]; + FT_Long Modified[2]; + + FT_Short xMin; + FT_Short yMin; + FT_Short xMax; + FT_Short yMax; + + FT_UShort Mac_Style; + FT_UShort Lowest_Rec_PPEM; + + FT_Short Font_Direction; + FT_Short Index_To_Loc_Format; + FT_Short Glyph_Data_Format; + + } TT_Header; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_HoriHeader */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType horizontal header, the `hhea' */ + /* table, as well as the corresponding horizontal metrics table, */ + /* i.e., the `hmtx' table. */ + /* */ + /* <Fields> */ + /* Version :: The table version. */ + /* */ + /* Ascender :: The font's ascender, i.e., the distance */ + /* from the baseline to the top-most of all */ + /* glyph points found in the font. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of the */ + /* glyphs found in the font (maybe ASCII). */ + /* */ + /* You should use the `sTypoAscender' field */ + /* of the OS/2 table instead if you want */ + /* the correct one. */ + /* */ + /* Descender :: The font's descender, i.e., the distance */ + /* from the baseline to the bottom-most of */ + /* all glyph points found in the font. It */ + /* is negative. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of the */ + /* glyphs found in the font (maybe ASCII). */ + /* */ + /* You should use the `sTypoDescender' */ + /* field of the OS/2 table instead if you */ + /* want the correct one. */ + /* */ + /* Line_Gap :: The font's line gap, i.e., the distance */ + /* to add to the ascender and descender to */ + /* get the BTB, i.e., the */ + /* baseline-to-baseline distance for the */ + /* font. */ + /* */ + /* advance_Width_Max :: This field is the maximum of all advance */ + /* widths found in the font. It can be */ + /* used to compute the maximum width of an */ + /* arbitrary string of text. */ + /* */ + /* min_Left_Side_Bearing :: The minimum left side bearing of all */ + /* glyphs within the font. */ + /* */ + /* min_Right_Side_Bearing :: The minimum right side bearing of all */ + /* glyphs within the font. */ + /* */ + /* xMax_Extent :: The maximum horizontal extent (i.e., the */ + /* `width' of a glyph's bounding box) for */ + /* all glyphs in the font. */ + /* */ + /* caret_Slope_Rise :: The rise coefficient of the cursor's */ + /* slope of the cursor (slope=rise/run). */ + /* */ + /* caret_Slope_Run :: The run coefficient of the cursor's */ + /* slope. */ + /* */ + /* Reserved :: 8~reserved bytes. */ + /* */ + /* metric_Data_Format :: Always~0. */ + /* */ + /* number_Of_HMetrics :: Number of HMetrics entries in the `hmtx' */ + /* table -- this value can be smaller than */ + /* the total number of glyphs in the font. */ + /* */ + /* long_metrics :: A pointer into the `hmtx' table. */ + /* */ + /* short_metrics :: A pointer into the `hmtx' table. */ + /* */ + /* <Note> */ + /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ + /* be identical except for the names of their fields, */ + /* which are different. */ + /* */ + /* This ensures that a single function in the `ttload' */ + /* module is able to read both the horizontal and vertical */ + /* headers. */ + /* */ + typedef struct TT_HoriHeader_ + { + FT_Fixed Version; + FT_Short Ascender; + FT_Short Descender; + FT_Short Line_Gap; + + FT_UShort advance_Width_Max; /* advance width maximum */ + + FT_Short min_Left_Side_Bearing; /* minimum left-sb */ + FT_Short min_Right_Side_Bearing; /* minimum right-sb */ + FT_Short xMax_Extent; /* xmax extents */ + FT_Short caret_Slope_Rise; + FT_Short caret_Slope_Run; + FT_Short caret_Offset; + + FT_Short Reserved[4]; + + FT_Short metric_Data_Format; + FT_UShort number_Of_HMetrics; + + /* The following fields are not defined by the TrueType specification */ + /* but they are used to connect the metrics header to the relevant */ + /* `HMTX' table. */ + + void* long_metrics; + void* short_metrics; + + } TT_HoriHeader; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_VertHeader */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType vertical header, the `vhea' */ + /* table, as well as the corresponding vertical metrics table, i.e., */ + /* the `vmtx' table. */ + /* */ + /* <Fields> */ + /* Version :: The table version. */ + /* */ + /* Ascender :: The font's ascender, i.e., the distance */ + /* from the baseline to the top-most of */ + /* all glyph points found in the font. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of */ + /* the glyphs found in the font (maybe */ + /* ASCII). */ + /* */ + /* You should use the `sTypoAscender' */ + /* field of the OS/2 table instead if you */ + /* want the correct one. */ + /* */ + /* Descender :: The font's descender, i.e., the */ + /* distance from the baseline to the */ + /* bottom-most of all glyph points found */ + /* in the font. It is negative. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of */ + /* the glyphs found in the font (maybe */ + /* ASCII). */ + /* */ + /* You should use the `sTypoDescender' */ + /* field of the OS/2 table instead if you */ + /* want the correct one. */ + /* */ + /* Line_Gap :: The font's line gap, i.e., the distance */ + /* to add to the ascender and descender to */ + /* get the BTB, i.e., the */ + /* baseline-to-baseline distance for the */ + /* font. */ + /* */ + /* advance_Height_Max :: This field is the maximum of all */ + /* advance heights found in the font. It */ + /* can be used to compute the maximum */ + /* height of an arbitrary string of text. */ + /* */ + /* min_Top_Side_Bearing :: The minimum top side bearing of all */ + /* glyphs within the font. */ + /* */ + /* min_Bottom_Side_Bearing :: The minimum bottom side bearing of all */ + /* glyphs within the font. */ + /* */ + /* yMax_Extent :: The maximum vertical extent (i.e., the */ + /* `height' of a glyph's bounding box) for */ + /* all glyphs in the font. */ + /* */ + /* caret_Slope_Rise :: The rise coefficient of the cursor's */ + /* slope of the cursor (slope=rise/run). */ + /* */ + /* caret_Slope_Run :: The run coefficient of the cursor's */ + /* slope. */ + /* */ + /* caret_Offset :: The cursor's offset for slanted fonts. */ + /* This value is `reserved' in vmtx */ + /* version 1.0. */ + /* */ + /* Reserved :: 8~reserved bytes. */ + /* */ + /* metric_Data_Format :: Always~0. */ + /* */ + /* number_Of_HMetrics :: Number of VMetrics entries in the */ + /* `vmtx' table -- this value can be */ + /* smaller than the total number of glyphs */ + /* in the font. */ + /* */ + /* long_metrics :: A pointer into the `vmtx' table. */ + /* */ + /* short_metrics :: A pointer into the `vmtx' table. */ + /* */ + /* <Note> */ + /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ + /* be identical except for the names of their fields, */ + /* which are different. */ + /* */ + /* This ensures that a single function in the `ttload' */ + /* module is able to read both the horizontal and vertical */ + /* headers. */ + /* */ + typedef struct TT_VertHeader_ + { + FT_Fixed Version; + FT_Short Ascender; + FT_Short Descender; + FT_Short Line_Gap; + + FT_UShort advance_Height_Max; /* advance height maximum */ + + FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */ + FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ + FT_Short yMax_Extent; /* xmax or ymax extents */ + FT_Short caret_Slope_Rise; + FT_Short caret_Slope_Run; + FT_Short caret_Offset; + + FT_Short Reserved[4]; + + FT_Short metric_Data_Format; + FT_UShort number_Of_VMetrics; + + /* The following fields are not defined by the TrueType specification */ + /* but they're used to connect the metrics header to the relevant */ + /* `HMTX' or `VMTX' table. */ + + void* long_metrics; + void* short_metrics; + + } TT_VertHeader; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_OS2 */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType OS/2 table. All fields */ + /* comply to the OpenType specification. */ + /* */ + /* Note that we now support old Mac fonts that do not include an OS/2 */ + /* table. In this case, the `version' field is always set to 0xFFFF. */ + /* */ + typedef struct TT_OS2_ + { + FT_UShort version; /* 0x0001 - more or 0xFFFF */ + FT_Short xAvgCharWidth; + FT_UShort usWeightClass; + FT_UShort usWidthClass; + FT_Short fsType; + FT_Short ySubscriptXSize; + FT_Short ySubscriptYSize; + FT_Short ySubscriptXOffset; + FT_Short ySubscriptYOffset; + FT_Short ySuperscriptXSize; + FT_Short ySuperscriptYSize; + FT_Short ySuperscriptXOffset; + FT_Short ySuperscriptYOffset; + FT_Short yStrikeoutSize; + FT_Short yStrikeoutPosition; + FT_Short sFamilyClass; + + FT_Byte panose[10]; + + FT_ULong ulUnicodeRange1; /* Bits 0-31 */ + FT_ULong ulUnicodeRange2; /* Bits 32-63 */ + FT_ULong ulUnicodeRange3; /* Bits 64-95 */ + FT_ULong ulUnicodeRange4; /* Bits 96-127 */ + + FT_Char achVendID[4]; + + FT_UShort fsSelection; + FT_UShort usFirstCharIndex; + FT_UShort usLastCharIndex; + FT_Short sTypoAscender; + FT_Short sTypoDescender; + FT_Short sTypoLineGap; + FT_UShort usWinAscent; + FT_UShort usWinDescent; + + /* only version 1 and higher: */ + + FT_ULong ulCodePageRange1; /* Bits 0-31 */ + FT_ULong ulCodePageRange2; /* Bits 32-63 */ + + /* only version 2 and higher: */ + + FT_Short sxHeight; + FT_Short sCapHeight; + FT_UShort usDefaultChar; + FT_UShort usBreakChar; + FT_UShort usMaxContext; + + /* only version 5 and higher: */ + + FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */ + FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */ + + } TT_OS2; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Postscript */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType PostScript table. All fields */ + /* comply to the TrueType specification. This structure does not */ + /* reference the PostScript glyph names, which can be nevertheless */ + /* accessed with the `ttpost' module. */ + /* */ + typedef struct TT_Postscript_ + { + FT_Fixed FormatType; + FT_Fixed italicAngle; + FT_Short underlinePosition; + FT_Short underlineThickness; + FT_ULong isFixedPitch; + FT_ULong minMemType42; + FT_ULong maxMemType42; + FT_ULong minMemType1; + FT_ULong maxMemType1; + + /* Glyph names follow in the file, but we don't */ + /* load them by default. See the ttpost.c file. */ + + } TT_Postscript; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_PCLT */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType PCLT table. All fields */ + /* comply to the TrueType specification. */ + /* */ + typedef struct TT_PCLT_ + { + FT_Fixed Version; + FT_ULong FontNumber; + FT_UShort Pitch; + FT_UShort xHeight; + FT_UShort Style; + FT_UShort TypeFamily; + FT_UShort CapHeight; + FT_UShort SymbolSet; + FT_Char TypeFace[16]; + FT_Char CharacterComplement[8]; + FT_Char FileName[6]; + FT_Char StrokeWeight; + FT_Char WidthType; + FT_Byte SerifStyle; + FT_Byte Reserved; + + } TT_PCLT; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_MaxProfile */ + /* */ + /* <Description> */ + /* The maximum profile is a table containing many max values, which */ + /* can be used to pre-allocate arrays. This ensures that no memory */ + /* allocation occurs during a glyph load. */ + /* */ + /* <Fields> */ + /* version :: The version number. */ + /* */ + /* numGlyphs :: The number of glyphs in this TrueType */ + /* font. */ + /* */ + /* maxPoints :: The maximum number of points in a */ + /* non-composite TrueType glyph. See also */ + /* the structure element */ + /* `maxCompositePoints'. */ + /* */ + /* maxContours :: The maximum number of contours in a */ + /* non-composite TrueType glyph. See also */ + /* the structure element */ + /* `maxCompositeContours'. */ + /* */ + /* maxCompositePoints :: The maximum number of points in a */ + /* composite TrueType glyph. See also the */ + /* structure element `maxPoints'. */ + /* */ + /* maxCompositeContours :: The maximum number of contours in a */ + /* composite TrueType glyph. See also the */ + /* structure element `maxContours'. */ + /* */ + /* maxZones :: The maximum number of zones used for */ + /* glyph hinting. */ + /* */ + /* maxTwilightPoints :: The maximum number of points in the */ + /* twilight zone used for glyph hinting. */ + /* */ + /* maxStorage :: The maximum number of elements in the */ + /* storage area used for glyph hinting. */ + /* */ + /* maxFunctionDefs :: The maximum number of function */ + /* definitions in the TrueType bytecode for */ + /* this font. */ + /* */ + /* maxInstructionDefs :: The maximum number of instruction */ + /* definitions in the TrueType bytecode for */ + /* this font. */ + /* */ + /* maxStackElements :: The maximum number of stack elements used */ + /* during bytecode interpretation. */ + /* */ + /* maxSizeOfInstructions :: The maximum number of TrueType opcodes */ + /* used for glyph hinting. */ + /* */ + /* maxComponentElements :: The maximum number of simple (i.e., non- */ + /* composite) glyphs in a composite glyph. */ + /* */ + /* maxComponentDepth :: The maximum nesting depth of composite */ + /* glyphs. */ + /* */ + /* <Note> */ + /* This structure is only used during font loading. */ + /* */ + typedef struct TT_MaxProfile_ + { + FT_Fixed version; + FT_UShort numGlyphs; + FT_UShort maxPoints; + FT_UShort maxContours; + FT_UShort maxCompositePoints; + FT_UShort maxCompositeContours; + FT_UShort maxZones; + FT_UShort maxTwilightPoints; + FT_UShort maxStorage; + FT_UShort maxFunctionDefs; + FT_UShort maxInstructionDefs; + FT_UShort maxStackElements; + FT_UShort maxSizeOfInstructions; + FT_UShort maxComponentElements; + FT_UShort maxComponentDepth; + + } TT_MaxProfile; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Sfnt_Tag */ + /* */ + /* <Description> */ + /* An enumeration used to specify the index of an SFNT table. */ + /* Used in the @FT_Get_Sfnt_Table API function. */ + /* */ + /* <Values> */ + /* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */ + /* */ + /* FT_SFNT_MAXP :: To access the font's @TT_MaxProfile structure. */ + /* */ + /* FT_SFNT_OS2 :: To access the font's @TT_OS2 structure. */ + /* */ + /* FT_SFNT_HHEA :: To access the font's @TT_HoriHeader structure. */ + /* */ + /* FT_SFNT_VHEA :: To access the font's @TT_VertHeader struture. */ + /* */ + /* FT_SFNT_POST :: To access the font's @TT_Postscript structure. */ + /* */ + /* FT_SFNT_PCLT :: To access the font's @TT_PCLT structure. */ + /* */ + typedef enum FT_Sfnt_Tag_ + { + FT_SFNT_HEAD, + FT_SFNT_MAXP, + FT_SFNT_OS2, + FT_SFNT_HHEA, + FT_SFNT_VHEA, + FT_SFNT_POST, + FT_SFNT_PCLT, + + FT_SFNT_MAX + + } FT_Sfnt_Tag; + + /* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */ + /* values instead */ +#define ft_sfnt_head FT_SFNT_HEAD +#define ft_sfnt_maxp FT_SFNT_MAXP +#define ft_sfnt_os2 FT_SFNT_OS2 +#define ft_sfnt_hhea FT_SFNT_HHEA +#define ft_sfnt_vhea FT_SFNT_VHEA +#define ft_sfnt_post FT_SFNT_POST +#define ft_sfnt_pclt FT_SFNT_PCLT + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Table */ + /* */ + /* <Description> */ + /* Return a pointer to a given SFNT table within a face. */ + /* */ + /* <Input> */ + /* face :: A handle to the source. */ + /* */ + /* tag :: The index of the SFNT table. */ + /* */ + /* <Return> */ + /* A type-less pointer to the table. This will be~0 in case of */ + /* error, or if the corresponding table was not found *OR* loaded */ + /* from the file. */ + /* */ + /* Use a typecast according to `tag' to access the structure */ + /* elements. */ + /* */ + /* <Note> */ + /* The table is owned by the face object and disappears with it. */ + /* */ + /* This function is only useful to access SFNT tables that are loaded */ + /* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */ + /* a list. */ + /* */ + /* Here an example how to access the `vhea' table: */ + /* */ + /* { */ + /* TT_VertHeader* vert_header; */ + /* */ + /* */ + /* vert_header = */ + /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); */ + /* } */ + /* */ + FT_EXPORT( void* ) + FT_Get_Sfnt_Table( FT_Face face, + FT_Sfnt_Tag tag ); + + + /************************************************************************** + * + * @function: + * FT_Load_Sfnt_Table + * + * @description: + * Load any font table into client memory. + * + * @input: + * face :: + * A handle to the source face. + * + * tag :: + * The four-byte tag of the table to load. Use the value~0 if you want + * to access the whole font file. Otherwise, you can use one of the + * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new + * one with @FT_MAKE_TAG. + * + * offset :: + * The starting offset in the table (or file if tag == 0). + * + * @output: + * buffer :: + * The target buffer address. The client must ensure that the memory + * array is big enough to hold the data. + * + * @inout: + * length :: + * If the `length' parameter is NULL, then try to load the whole table. + * Return an error code if it fails. + * + * Else, if `*length' is~0, exit immediately while returning the + * table's (or file) full size in it. + * + * Else the number of bytes to read from the table or file, from the + * starting offset. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If you need to determine the table's length you should first call this + * function with `*length' set to~0, as in the following example: + * + * { + * FT_ULong length = 0; + * + * + * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); + * if ( error ) { ... table does not exist ... } + * + * buffer = malloc( length ); + * if ( buffer == NULL ) { ... not enough memory ... } + * + * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); + * if ( error ) { ... could not load table ... } + * } + * + * Note that structures like @TT_Header or @TT_OS2 can't be used with + * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that + * those structures depend on the processor architecture, with varying + * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian). + * + */ + FT_EXPORT( FT_Error ) + FT_Load_Sfnt_Table( FT_Face face, + FT_ULong tag, + FT_Long offset, + FT_Byte* buffer, + FT_ULong* length ); + + + /************************************************************************** + * + * @function: + * FT_Sfnt_Table_Info + * + * @description: + * Return information on an SFNT table. + * + * @input: + * face :: + * A handle to the source face. + * + * table_index :: + * The index of an SFNT table. The function returns + * FT_Err_Table_Missing for an invalid value. + * + * @inout: + * tag :: + * The name tag of the SFNT table. If the value is NULL, `table_index' + * is ignored, and `length' returns the number of SFNT tables in the + * font. + * + * @output: + * length :: + * The length of the SFNT table (or the number of SFNT tables, depending + * on `tag'). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * While parsing fonts, FreeType handles SFNT tables with length zero as + * missing. + * + */ + FT_EXPORT( FT_Error ) + FT_Sfnt_Table_Info( FT_Face face, + FT_UInt table_index, + FT_ULong *tag, + FT_ULong *length ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_CMap_Language_ID */ + /* */ + /* <Description> */ + /* Return TrueType/sfnt specific cmap language ID. Definitions of */ + /* language ID values are in `ttnameid.h'. */ + /* */ + /* <Input> */ + /* charmap :: */ + /* The target charmap. */ + /* */ + /* <Return> */ + /* The language ID of `charmap'. If `charmap' doesn't belong to a */ + /* TrueType/sfnt face, just return~0 as the default value. */ + /* */ + /* For a format~14 cmap (to access Unicode IVS), the return value is */ + /* 0xFFFFFFFF. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_CMap_Language_ID( FT_CharMap charmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_CMap_Format */ + /* */ + /* <Description> */ + /* Return TrueType/sfnt specific cmap format. */ + /* */ + /* <Input> */ + /* charmap :: */ + /* The target charmap. */ + /* */ + /* <Return> */ + /* The format of `charmap'. If `charmap' doesn't belong to a */ + /* TrueType/sfnt face, return -1. */ + /* */ + FT_EXPORT( FT_Long ) + FT_Get_CMap_Format( FT_CharMap charmap ); + + /* */ + + +FT_END_HEADER + +#endif /* __TTTABLES_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/tttags.h b/freetype2/include/ohos/freetype2/tttags.h new file mode 100644 index 0000000000..d59aa19a33 --- /dev/null +++ b/freetype2/include/ohos/freetype2/tttags.h @@ -0,0 +1,111 @@ +/***************************************************************************/ +/* */ +/* tttags.h */ +/* */ +/* Tags for TrueType and OpenType tables (specification only). */ +/* */ +/* Copyright 1996-2001, 2004, 2005, 2007, 2008, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTAGS_H__ +#define __TTAGS_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + +#define TTAG_avar FT_MAKE_TAG( 'a', 'v', 'a', 'r' ) +#define TTAG_BASE FT_MAKE_TAG( 'B', 'A', 'S', 'E' ) +#define TTAG_bdat FT_MAKE_TAG( 'b', 'd', 'a', 't' ) +#define TTAG_BDF FT_MAKE_TAG( 'B', 'D', 'F', ' ' ) +#define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' ) +#define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' ) +#define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) +#define TTAG_CBDT FT_MAKE_TAG( 'C', 'B', 'D', 'T' ) +#define TTAG_CBLC FT_MAKE_TAG( 'C', 'B', 'L', 'C' ) +#define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) +#define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) +#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) +#define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' ) +#define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' ) +#define TTAG_DSIG FT_MAKE_TAG( 'D', 'S', 'I', 'G' ) +#define TTAG_EBDT FT_MAKE_TAG( 'E', 'B', 'D', 'T' ) +#define TTAG_EBLC FT_MAKE_TAG( 'E', 'B', 'L', 'C' ) +#define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' ) +#define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' ) +#define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' ) +#define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' ) +#define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' ) +#define TTAG_gasp FT_MAKE_TAG( 'g', 'a', 's', 'p' ) +#define TTAG_GDEF FT_MAKE_TAG( 'G', 'D', 'E', 'F' ) +#define TTAG_glyf FT_MAKE_TAG( 'g', 'l', 'y', 'f' ) +#define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' ) +#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' ) +#define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' ) +#define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' ) +#define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' ) +#define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' ) +#define TTAG_hmtx FT_MAKE_TAG( 'h', 'm', 't', 'x' ) +#define TTAG_JSTF FT_MAKE_TAG( 'J', 'S', 'T', 'F' ) +#define TTAG_just FT_MAKE_TAG( 'j', 'u', 's', 't' ) +#define TTAG_kern FT_MAKE_TAG( 'k', 'e', 'r', 'n' ) +#define TTAG_lcar FT_MAKE_TAG( 'l', 'c', 'a', 'r' ) +#define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' ) +#define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' ) +#define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' ) +#define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' ) +#define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' ) +#define TTAG_META FT_MAKE_TAG( 'M', 'E', 'T', 'A' ) +#define TTAG_MMFX FT_MAKE_TAG( 'M', 'M', 'F', 'X' ) +#define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' ) +#define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' ) +#define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' ) +#define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' ) +#define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' ) +#define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' ) +#define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) +#define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' ) +#define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' ) +#define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) +#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) +#define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) +#define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' ) +#define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) +#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) +#define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) +#define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' ) +#define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) +#define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' ) +#define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' ) +#define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' ) +#define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) +#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) +#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' ) +#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' ) + + +FT_END_HEADER + +#endif /* __TTAGS_H__ */ + + +/* END */ diff --git a/freetype2/include/ohos/freetype2/ttunpat.h b/freetype2/include/ohos/freetype2/ttunpat.h new file mode 100644 index 0000000000..bf53ddd528 --- /dev/null +++ b/freetype2/include/ohos/freetype2/ttunpat.h @@ -0,0 +1,60 @@ +/***************************************************************************/ +/* */ +/* ttunpat.h */ +/* */ +/* Definitions for the unpatented TrueType hinting system */ +/* */ +/* Copyright 2003, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* Written by Graham Asher <graham.asher@btinternet.com> */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTUNPAT_H__ +#define __TTUNPAT_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_UNPATENTED_HINTING + * + * @description: + * A constant used as the tag of an @FT_Parameter structure to indicate + * that unpatented methods only should be used by the TrueType bytecode + * interpreter for a typeface opened by @FT_Open_Face. + * + */ +#define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) + + /* */ + + +FT_END_HEADER + + +#endif /* __TTUNPAT_H__ */ + + +/* END */ diff --git a/freetype2/prebuilt/ohos/libfreetype.a b/freetype2/prebuilt/ohos/libfreetype.a new file mode 100644 index 0000000000..e03eead2b8 Binary files /dev/null and b/freetype2/prebuilt/ohos/libfreetype.a differ diff --git a/jpeg/include/ohos/jconfig.h b/jpeg/include/ohos/jconfig.h new file mode 100644 index 0000000000..2d05a3b090 --- /dev/null +++ b/jpeg/include/ohos/jconfig.h @@ -0,0 +1,60 @@ +/* jconfig.h. Generated from jconfig.cfg by configure. */ +/* jconfig.cfg --- source file edited by configure script */ +/* see jconfig.txt for explanations */ + +#define HAVE_PROTOTYPES 1 +#define HAVE_UNSIGNED_CHAR 1 +#define HAVE_UNSIGNED_SHORT 1 +/* #undef void */ +/* #undef const */ +/* #undef CHAR_IS_UNSIGNED */ +#define HAVE_STDDEF_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_LOCALE_H 1 +/* #undef NEED_BSD_STRINGS */ +/* #undef NEED_SYS_TYPES_H */ +/* #undef NEED_FAR_POINTERS */ +/* #undef NEED_SHORT_EXTERNAL_NAMES */ +/* Define this if you get warnings about undefined structures. */ +/* #undef INCOMPLETE_TYPES_BROKEN */ + +/* Define "boolean" as unsigned char, not enum, on Windows systems. */ +#ifdef _WIN32 +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ +#endif + +#ifdef JPEG_INTERNALS + +/* #undef RIGHT_SHIFT_IS_UNSIGNED */ +#define INLINE __inline__ +/* These are for configuring the JPEG memory manager. */ +/* #undef DEFAULT_MAX_MEM */ +/* #undef NO_MKTEMP */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +/* #undef RLE_SUPPORTED */ +#define TARGA_SUPPORTED /* Targa image file format */ + +/* #undef TWO_FILE_COMMANDLINE */ +/* #undef NEED_SIGNAL_CATCHER */ +/* #undef DONT_USE_B_MODE */ + +/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ +/* #undef PROGRESS_REPORT */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/jpeg/include/ohos/jerror.h b/jpeg/include/ohos/jerror.h new file mode 100644 index 0000000000..a4b661f716 --- /dev/null +++ b/jpeg/include/ohos/jerror.h @@ -0,0 +1,304 @@ +/* + * jerror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 1997-2012 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the JPEG library. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + * A set of error-reporting macros are defined too. Some applications using + * the JPEG library may wish to include this file to get the error codes + * and/or the macros. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef JERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* JERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ + +/* For maintenance convenience, list is alphabetical by message code name */ +JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") +JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") +JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") +JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") +JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") +JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") +JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported") +JMESSAGE(JERR_BAD_DROP_SAMPLING, + "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") +JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") +JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") +JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") +JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") +JMESSAGE(JERR_BAD_LIB_VERSION, + "Wrong JPEG library version: library is %d, caller expects %d") +JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") +JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") +JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") +JMESSAGE(JERR_BAD_PROGRESSION, + "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") +JMESSAGE(JERR_BAD_PROG_SCRIPT, + "Invalid progressive parameters at scan script entry %d") +JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") +JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") +JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") +JMESSAGE(JERR_BAD_STRUCT_SIZE, + "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") +JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") +JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") +JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") +JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") +JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") +JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") +JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") +JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") +JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") +JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") +JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") +JMESSAGE(JERR_EMS_READ, "Read from EMS failed") +JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") +JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") +JMESSAGE(JERR_FILE_READ, "Input file read error") +JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") +JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") +JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") +JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") +JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") +JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") +JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") +JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, + "Cannot transcode due to multiple use of quantization table %d") +JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") +JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") +JMESSAGE(JERR_NOTIMPL, "Not implemented yet") +JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") +JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") +JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") +JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") +JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") +JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") +JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") +JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") +JMESSAGE(JERR_QUANT_COMPONENTS, + "Cannot quantize more than %d color components") +JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") +JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") +JMESSAGE(JERR_SOF_BEFORE, "Invalid JPEG file structure: %s before SOF") +JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") +JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") +JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") +JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") +JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") +JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") +JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") +JMESSAGE(JERR_TFILE_WRITE, + "Write failed on temporary file --- out of disk space?") +JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") +JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") +JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") +JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") +JMESSAGE(JERR_XMS_READ, "Read from XMS failed") +JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") +JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) +JMESSAGE(JMSG_VERSION, JVERSION) +JMESSAGE(JTRC_16BIT_TABLES, + "Caution: quantization tables are too coarse for baseline JPEG") +JMESSAGE(JTRC_ADOBE, + "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") +JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") +JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") +JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") +JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") +JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") +JMESSAGE(JTRC_DRI, "Define Restart Interval %u") +JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") +JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") +JMESSAGE(JTRC_EOI, "End Of Image") +JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") +JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") +JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, + "Warning: thumbnail image size does not match data length %u") +JMESSAGE(JTRC_JFIF_EXTENSION, + "JFIF extension marker: type 0x%02x, length %u") +JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") +JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") +JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") +JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") +JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") +JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") +JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") +JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") +JMESSAGE(JTRC_RST, "RST%d") +JMESSAGE(JTRC_SMOOTH_NOTIMPL, + "Smoothing not supported with nonstandard sampling ratios") +JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") +JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") +JMESSAGE(JTRC_SOI, "Start of Image") +JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") +JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") +JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") +JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") +JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") +JMESSAGE(JTRC_THUMB_JPEG, + "JFIF extension marker: JPEG-compressed thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_PALETTE, + "JFIF extension marker: palette thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_RGB, + "JFIF extension marker: RGB thumbnail image, length %u") +JMESSAGE(JTRC_UNKNOWN_IDS, + "Unrecognized component IDs %d %d %d, assuming YCbCr") +JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") +JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") +JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") +JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") +JMESSAGE(JWRN_BOGUS_PROGRESSION, + "Inconsistent progression sequence for component %d coefficient %d") +JMESSAGE(JWRN_EXTRANEOUS_DATA, + "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") +JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") +JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") +JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") +JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") +JMESSAGE(JWRN_MUST_RESYNC, + "Corrupt JPEG data: found marker 0x%02x instead of RST%d") +JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") +JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTMSGCODE +} J_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE + + +#ifndef JERROR_H +#define JERROR_H + +/* Macros to simplify using the error and trace message stuff */ +/* The first parameter is either type of cinfo pointer */ + +/* Fatal errors (print message and exit) */ +#define ERREXIT(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT3(cinfo,code,p1,p2,p3) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (cinfo)->err->msg_parm.i[4] = (p5), \ + (cinfo)->err->msg_parm.i[5] = (p6), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXITS(cinfo,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) + +#define MAKESTMT(stuff) do { stuff } while (0) + +/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ +#define WARNMS(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) + +/* Informational/debugging messages */ +#define TRACEMS(cinfo,lvl,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS1(cinfo,lvl,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS2(cinfo,lvl,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMSS(cinfo,lvl,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) + +#endif /* JERROR_H */ diff --git a/jpeg/include/ohos/jmorecfg.h b/jpeg/include/ohos/jmorecfg.h new file mode 100644 index 0000000000..679d68bdc5 --- /dev/null +++ b/jpeg/include/ohos/jmorecfg.h @@ -0,0 +1,446 @@ +/* + * jmorecfg.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 1997-2013 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Define BITS_IN_JSAMPLE as either + * 8 for 8-bit sample values (the usual setting) + * 9 for 9-bit sample values + * 10 for 10-bit sample values + * 11 for 11-bit sample values + * 12 for 12-bit sample values + * Only 8, 9, 10, 11, and 12 bits sample data precision are supported for + * full-feature DCT processing. Further depths up to 16-bit may be added + * later for the lossless modes of operation. + * Run-time selection and conversion of data precision will be added later + * and are currently not supported, sorry. + * Exception: The transcoding part (jpegtran) supports all settings in a + * single instance, since it operates on the level of DCT coefficients and + * not sample values. The DCT coefficients are of the same type (16 bits) + * in all cases (see below). + */ + +#define BITS_IN_JSAMPLE 8 /* use 8, 9, 10, 11, or 12 */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of the JPEG spec, set this to 255. However, darn + * few applications need more than 4 channels (maybe 5 for CMYK + alpha + * mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +#if BITS_IN_JSAMPLE == 8 +/* JSAMPLE should be the smallest type that will hold the values 0..255. + * You can use a signed char by having GETJSAMPLE mask it with 0xFF. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JSAMPLE; +#ifdef CHAR_IS_UNSIGNED +#define GETJSAMPLE(value) ((int) (value)) +#else +#define GETJSAMPLE(value) ((int) (value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + +#endif /* BITS_IN_JSAMPLE == 8 */ + + +#if BITS_IN_JSAMPLE == 9 +/* JSAMPLE should be the smallest type that will hold the values 0..511. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 511 +#define CENTERJSAMPLE 256 + +#endif /* BITS_IN_JSAMPLE == 9 */ + + +#if BITS_IN_JSAMPLE == 10 +/* JSAMPLE should be the smallest type that will hold the values 0..1023. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 1023 +#define CENTERJSAMPLE 512 + +#endif /* BITS_IN_JSAMPLE == 10 */ + + +#if BITS_IN_JSAMPLE == 11 +/* JSAMPLE should be the smallest type that will hold the values 0..2047. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 2047 +#define CENTERJSAMPLE 1024 + +#endif /* BITS_IN_JSAMPLE == 11 */ + + +#if BITS_IN_JSAMPLE == 12 +/* JSAMPLE should be the smallest type that will hold the values 0..4095. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 4095 +#define CENTERJSAMPLE 2048 + +#endif /* BITS_IN_JSAMPLE == 12 */ + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JOCTET; +#ifdef CHAR_IS_UNSIGNED +#define GETJOCTET(value) (value) +#else +#define GETJOCTET(value) ((value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char UINT8; +#else /* not HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char UINT8; +#else /* not CHAR_IS_UNSIGNED */ +typedef short UINT8; +#endif /* CHAR_IS_UNSIGNED */ +#endif /* HAVE_UNSIGNED_CHAR */ + +/* UINT16 must hold at least the values 0..65535. */ + +#ifdef HAVE_UNSIGNED_SHORT +typedef unsigned short UINT16; +#else /* not HAVE_UNSIGNED_SHORT */ +typedef unsigned int UINT16; +#endif /* HAVE_UNSIGNED_SHORT */ + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ +#ifndef _BASETSD_H /* MinGW is slightly different */ +#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ +typedef long INT32; +#endif +#endif +#endif +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* This macro is used to declare a "method", that is, a function pointer. + * We want to supply prototype parameters if the compiler can cope. + * Note that the arglist parameter must be parenthesized! + * Again, you can customize this if you need special linkage keywords. + */ + +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type,methodname,arglist) type (*methodname) arglist +#else +#define JMETHOD(type,methodname,arglist) type (*methodname) () +#endif + + +/* The noreturn type identifier is used to declare functions + * which cannot return. + * Compilers can thus create more optimized code and perform + * better checks for warnings and errors. + * Static analyzer tools can make improved inferences about + * execution paths and are prevented from giving false alerts. + * + * Unfortunately, the proposed specifications of corresponding + * extensions in the Dec 2011 ISO C standard revision (C11), + * GCC, MSVC, etc. are not viable. + * Thus we introduce a user defined type to declare noreturn + * functions at least for clarity. A proper compiler would + * have a suitable noreturn type to match in place of void. + */ + +#ifndef HAVE_NORETURN_T +typedef void noreturn_t; +#endif + + +/* Here is the pseudo-keyword for declaring pointers that must be "far" + * on 80x86 machines. Most of the specialized coding for 80x86 is handled + * by just saying "FAR *" where such a pointer is needed. In a few places + * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. + */ + +#ifndef FAR +#ifdef NEED_FAR_POINTERS +#define FAR far +#else +#define FAR +#endif +#endif + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +#if defined FALSE || defined TRUE || defined QGLOBAL_H +/* Qt3 defines FALSE and TRUE as "const" variables in qglobal.h */ +typedef int boolean; +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#else +typedef enum { FALSE = 0, TRUE = 1 } boolean; +#endif +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ +#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ +#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ + +/* Encoder capability options: */ + +#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected more than 8-bit data precision, it is dangerous to + * turn off ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only + * good for 8-bit precision, so arithmetic coding is recommended for higher + * precision. The Huffman encoder normally uses entropy optimization to + * compute usable tables for higher precision. Otherwise, you'll have to + * supply different default Huffman tables. + * The exact same statements apply for progressive JPEG: the default tables + * don't work for progressive mode. (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? (Requires DCT_ISLOW)*/ +#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * Ordering of RGB data in scanlines passed to or from the application. + * If your application wants to deal with data in the order B,G,R, just + * change these macros. You can also deal with formats such as R,G,B,X + * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing + * the offsets will also change the order in which colormap data is organized. + * RESTRICTIONS: + * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. + * 2. The color quantizer modules will not behave desirably if RGB_PIXELSIZE + * is not 3 (they don't understand about dummy color components!). So you + * can't use color quantization if you change that value. + */ + +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ + + +/* Definitions for speed-related optimizations. */ + + +/* If your compiler supports inline functions, define INLINE + * as the inline keyword; otherwise define it as empty. + */ + +#ifndef INLINE +#ifdef __GNUC__ /* for instance, GNU C knows about inline */ +#define INLINE __inline__ +#endif +#ifndef INLINE +#define INLINE /* default is to define it as empty */ +#endif +#endif + + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#define MULTIPLIER int /* type for fastest integer multiply */ +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + * Typically, float is faster in ANSI C compilers, while double is faster in + * pre-ANSI compilers (because they insist on converting to double anyway). + * The code below therefore chooses float if we have ANSI-style prototypes. + */ + +#ifndef FAST_FLOAT +#ifdef HAVE_PROTOTYPES +#define FAST_FLOAT float +#else +#define FAST_FLOAT double +#endif +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/jpeg/include/ohos/jpeglib.h b/jpeg/include/ohos/jpeglib.h new file mode 100644 index 0000000000..939b50be58 --- /dev/null +++ b/jpeg/include/ohos/jpeglib.h @@ -0,0 +1,1180 @@ +/* + * jpeglib.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2002-2015 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +extern "C" { +#endif +#endif + +/* Version IDs for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 90". + */ + +#define JPEG_LIB_VERSION 90 /* Compatibility version 9.0 */ +#define JPEG_LIB_VERSION_MAJOR 9 +#define JPEG_LIB_VERSION_MINOR 2 + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, + * so don't change them if you want to be compatible. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 coefficients */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + * On 80x86 machines, the image arrays are too big for near pointers, + * but the pointer arrays can fit in near memory. + */ + +typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in DCT blocks. + * Any dummy blocks added to complete an MCU are not counted; therefore + * these values do not depend on whether a scan is interleaved or not. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a DCT block in samples, + * reflecting any scaling we choose to apply during the DCT step. + * Values from 1 to 16 are supported. + * Note that different components may receive different DCT scalings. + */ + int DCT_h_scaled_size; + int DCT_v_scaled_size; + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface); + * DCT scaling is included, so + * downsampled_width = + * ceil(image_width * Hi/Hmax * DCT_h_scaled_size/block_size) + * and similarly for height. + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* For decompression, in cases where some of the components will be + * ignored (eg grayscale output from YCbCr image), we can skip most + * computations for the unused components. + * For compression, some of the components will need further quantization + * scale by factor of 2 after DCT (eg BG_YCC output from normal RGB input). + * The field is first set TRUE for decompression, FALSE for compression + * in initial_setup, and then adapted in color conversion setup. + */ + boolean component_needed; + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of blocks per MCU, horizontally */ + int MCU_height; /* number of blocks per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples: MCU_width * DCT_h_scaled_size */ + int last_col_width; /* # of non-dummy blocks across in last MCU */ + int last_row_height; /* # of non-dummy blocks down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL * quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void * dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms */ + int Ah, Al; /* progressive JPEG successive approx. parms */ +} jpeg_scan_info; + +/* The decompressor can save APPn and COM markers in a list of these: */ + +typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; + +struct jpeg_marker_struct { + jpeg_saved_marker_ptr next; /* next in list, or NULL */ + UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ + unsigned int original_length; /* # bytes of data in the file */ + unsigned int data_length; /* # bytes of data saved at data[] */ + JOCTET FAR * data; /* the data contained in the marker */ + /* the marker length word is not counted in data_length or original_length */ +}; + +/* Known color spaces. */ + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue, standard RGB (sRGB) */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV), standard YCC */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK, /* Y/Cb/Cr/K */ + JCS_BG_RGB, /* big gamut red/green/blue, bg-sRGB */ + JCS_BG_YCC /* big gamut Y/Cb/Cr, bg-sYCC */ +} J_COLOR_SPACE; + +/* Supported color transforms. */ + +typedef enum { + JCT_NONE = 0, + JCT_SUBTRACT_GREEN = 1 +} J_COLOR_TRANSFORM; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* slow but accurate integer algorithm */ + JDCT_IFAST, /* faster, less accurate integer method */ + JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr * err; /* Error handler module */\ + struct jpeg_memory_mgr * mem; /* Memory manager module */\ + struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ + void * client_data; /* Available for use by application */\ + boolean is_decompressor; /* So common code can tell which is which */\ + int global_state /* For checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct * j_common_ptr; +typedef struct jpeg_compress_struct * j_compress_ptr; +typedef struct jpeg_decompress_struct * j_decompress_ptr; + + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr * dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + JDIMENSION jpeg_width; /* scaled JPEG image width */ + JDIMENSION jpeg_height; /* scaled JPEG image height */ + /* Dimensions of actual JPEG image that will be written to file, + * derived from input dimensions by scaling factors above. + * These fields are computed by jpeg_start_compress(). + * You can also use jpeg_calc_jpeg_dimensions() to determine these values + * in advance of calling jpeg_start_compress(). + */ + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + int q_scale_factor[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined, + * and corresponding scale factors (percentage, initialized 100). + */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + boolean write_JFIF_header; /* should a JFIF marker be written? */ + UINT8 JFIF_major_version; /* What to write for the JFIF version number */ + UINT8 JFIF_minor_version; + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + J_COLOR_TRANSFORM color_transform; + /* Color transform identifier, writes LSE marker if nonzero */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ + /* The coefficient controller receives data in units of MCU rows as defined + * for fully interleaved scans (whether the JPEG file is interleaved or not). + * There are v_samp_factor * DCTSIZE sample rows of each component in an + * "iMCU" (interleaved MCU) row. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + int block_size; /* the basic DCT block size: 1..16 */ + const int * natural_order; /* natural-order position array */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) */ + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master * master; + struct jpeg_c_main_controller * main; + struct jpeg_c_prep_controller * prep; + struct jpeg_c_coef_controller * coef; + struct jpeg_marker_writer * marker; + struct jpeg_color_converter * cconvert; + struct jpeg_downsampler * downsample; + struct jpeg_forward_dct * fdct; + struct jpeg_entropy_encoder * entropy; + jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ + int script_space_size; +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr * src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + boolean buffered_image; /* TRUE=multiple output passes */ + boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + boolean enable_external_quant;/* enable future use of external colormap */ + boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ + boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ + UINT8 JFIF_major_version; /* JFIF version number */ + UINT8 JFIF_minor_version; + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + J_COLOR_TRANSFORM color_transform; + /* Color transform identifier derived from LSE marker, otherwise zero */ + + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Aside from the specific data retained from APPn markers known to the + * library, the uninterpreted contents of any or all APPn and COM markers + * can be saved in a list for examination by the application. + */ + jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient controller's input and output progress is measured in + * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows + * in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. We define an iMCU row as v_samp_factor DCT block + * rows of each component. Therefore, the IDCT output contains + * v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row. + */ + + JSAMPLE * sample_range_limit; /* table for fast range-limiting */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* These fields are derived from Se of first SOS marker. + */ + int block_size; /* the basic DCT block size: 1..16 */ + const int * natural_order; /* natural-order position array for entropy decode */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */ + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; + + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master * master; + struct jpeg_d_main_controller * main; + struct jpeg_d_coef_controller * coef; + struct jpeg_d_post_controller * post; + struct jpeg_input_controller * inputctl; + struct jpeg_marker_reader * marker; + struct jpeg_entropy_decoder * entropy; + struct jpeg_inverse_dct * idct; + struct jpeg_upsampler * upsample; + struct jpeg_color_deconverter * cconvert; + struct jpeg_color_quantizer * cquantize; +}; + + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + JMETHOD(noreturn_t, error_exit, (j_common_ptr cinfo)); + /* Conditionally emit a trace or warning message */ + JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); + /* Routine that actually outputs a trace or error message */ + JMETHOD(void, output_message, (j_common_ptr cinfo)); + /* Format a message string for the most recent JPEG error or message */ + JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char * const * jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char * const * addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + JMETHOD(void, init_destination, (j_compress_ptr cinfo)); + JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); + JMETHOD(void, term_destination, (j_compress_ptr cinfo)); +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET * next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + + JMETHOD(void, init_source, (j_decompress_ptr cinfo)); + JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); + JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); + JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); + JMETHOD(void, term_source, (j_decompress_ptr cinfo)); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control * jvirt_sarray_ptr; +typedef struct jvirt_barray_control * jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, + JDIMENSION numrows)); + JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, + JDIMENSION numrows)); + JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); + JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, + jvirt_sarray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, + jvirt_barray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); + JMETHOD(void, self_destruct, (j_common_ptr cinfo)); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; + + /* Maximum allocation request accepted by alloc_large. */ + long max_alloc_chunk; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); + + +/* Declarations for routines called by application. + * The JPP macro hides prototype parameters from compilers that can't cope. + * Note JPP requires double parentheses. + */ + +#ifdef HAVE_PROTOTYPES +#define JPP(arglist) arglist +#else +#define JPP(arglist) () +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. + * We shorten external names to be unique in the first six letters, which + * is good enough for all known systems. + * (If your compiler itself needs names to be unique in less than 15 + * characters, you are out of luck. Get a better compiler.) + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_error jStdError +#define jpeg_CreateCompress jCreaCompress +#define jpeg_CreateDecompress jCreaDecompress +#define jpeg_destroy_compress jDestCompress +#define jpeg_destroy_decompress jDestDecompress +#define jpeg_stdio_dest jStdDest +#define jpeg_stdio_src jStdSrc +#define jpeg_mem_dest jMemDest +#define jpeg_mem_src jMemSrc +#define jpeg_set_defaults jSetDefaults +#define jpeg_set_colorspace jSetColorspace +#define jpeg_default_colorspace jDefColorspace +#define jpeg_set_quality jSetQuality +#define jpeg_set_linear_quality jSetLQuality +#define jpeg_default_qtables jDefQTables +#define jpeg_add_quant_table jAddQuantTable +#define jpeg_quality_scaling jQualityScaling +#define jpeg_simple_progression jSimProgress +#define jpeg_suppress_tables jSuppressTables +#define jpeg_alloc_quant_table jAlcQTable +#define jpeg_alloc_huff_table jAlcHTable +#define jpeg_start_compress jStrtCompress +#define jpeg_write_scanlines jWrtScanlines +#define jpeg_finish_compress jFinCompress +#define jpeg_calc_jpeg_dimensions jCjpegDimensions +#define jpeg_write_raw_data jWrtRawData +#define jpeg_write_marker jWrtMarker +#define jpeg_write_m_header jWrtMHeader +#define jpeg_write_m_byte jWrtMByte +#define jpeg_write_tables jWrtTables +#define jpeg_read_header jReadHeader +#define jpeg_start_decompress jStrtDecompress +#define jpeg_read_scanlines jReadScanlines +#define jpeg_finish_decompress jFinDecompress +#define jpeg_read_raw_data jReadRawData +#define jpeg_has_multiple_scans jHasMultScn +#define jpeg_start_output jStrtOutput +#define jpeg_finish_output jFinOutput +#define jpeg_input_complete jInComplete +#define jpeg_new_colormap jNewCMap +#define jpeg_consume_input jConsumeInput +#define jpeg_core_output_dimensions jCoreDimensions +#define jpeg_calc_output_dimensions jCalcDimensions +#define jpeg_save_markers jSaveMarkers +#define jpeg_set_marker_processor jSetMarker +#define jpeg_read_coefficients jReadCoefs +#define jpeg_write_coefficients jWrtCoefs +#define jpeg_copy_critical_parameters jCopyCrit +#define jpeg_abort_compress jAbrtCompress +#define jpeg_abort_decompress jAbrtDecompress +#define jpeg_abort jAbort +#define jpeg_destroy jDestroy +#define jpeg_resync_to_restart jResyncRestart +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error + JPP((struct jpeg_error_mgr * err)); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_decompress_struct)) +EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, + int version, size_t structsize)); +EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, + int version, size_t structsize)); +/* Destruction of JPEG compression objects */ +EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); +EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* Data source and destination managers: memory buffers. */ +EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo, + unsigned char ** outbuffer, + unsigned long * outsize)); +EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo, + const unsigned char * inbuffer, + unsigned long insize)); + +/* Default parameter setup for compression */ +EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); +/* Compression parameter setup aids */ +EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, + J_COLOR_SPACE colorspace)); +EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, + boolean force_baseline)); +EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, + int scale_factor, + boolean force_baseline)); +EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo, + boolean force_baseline)); +EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, + boolean force_baseline)); +EXTERN(int) jpeg_quality_scaling JPP((int quality)); +EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, + boolean suppress)); +EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); +EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); + +/* Main entry points for compression */ +EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, + boolean write_all_tables)); +EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION num_lines)); +EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); + +/* Precalculate JPEG dimensions for current compression parameters. */ +EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo)); + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION num_lines)); + +/* Write a special marker. See libjpeg.txt concerning safe usage. */ +EXTERN(void) jpeg_write_marker + JPP((j_compress_ptr cinfo, int marker, + const JOCTET * dataptr, unsigned int datalen)); +/* Same, but piecemeal. */ +EXTERN(void) jpeg_write_m_header + JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); +EXTERN(void) jpeg_write_m_byte + JPP((j_compress_ptr cinfo, int val)); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, + boolean require_image)); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION max_lines)); +EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION max_lines)); + +/* Additional entry points for buffered-image mode. */ +EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, + int scan_number)); +EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); +EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); + +/* Control saving of COM and APPn markers into marker_list. */ +EXTERN(void) jpeg_save_markers + JPP((j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit)); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor + JPP((j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine)); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays)); +EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, + j_compress_ptr dstinfo)); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, + int desired)); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +struct jpeg_comp_master { long dummy; }; +struct jpeg_c_main_controller { long dummy; }; +struct jpeg_c_prep_controller { long dummy; }; +struct jpeg_c_coef_controller { long dummy; }; +struct jpeg_marker_writer { long dummy; }; +struct jpeg_color_converter { long dummy; }; +struct jpeg_downsampler { long dummy; }; +struct jpeg_forward_dct { long dummy; }; +struct jpeg_entropy_encoder { long dummy; }; +struct jpeg_decomp_master { long dummy; }; +struct jpeg_d_main_controller { long dummy; }; +struct jpeg_d_coef_controller { long dummy; }; +struct jpeg_d_post_controller { long dummy; }; +struct jpeg_input_controller { long dummy; }; +struct jpeg_marker_reader { long dummy; }; +struct jpeg_entropy_decoder { long dummy; }; +struct jpeg_inverse_dct { long dummy; }; +struct jpeg_upsampler { long dummy; }; +struct jpeg_color_deconverter { long dummy; }; +struct jpeg_color_quantizer { long dummy; }; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +} +#endif +#endif + +#endif /* JPEGLIB_H */ diff --git a/jpeg/prebuilt/ohos/libjpeg.a b/jpeg/prebuilt/ohos/libjpeg.a new file mode 100644 index 0000000000..9bcecdc0c7 Binary files /dev/null and b/jpeg/prebuilt/ohos/libjpeg.a differ diff --git a/lua/luajit/prebuilt/ohos/libluajit.a b/lua/luajit/prebuilt/ohos/libluajit.a new file mode 100644 index 0000000000..647b022d0f Binary files /dev/null and b/lua/luajit/prebuilt/ohos/libluajit.a differ diff --git a/ohos-specific/pvmp3dec/CMakeLists.txt b/ohos-specific/pvmp3dec/CMakeLists.txt new file mode 100644 index 0000000000..f16be7660d --- /dev/null +++ b/ohos-specific/pvmp3dec/CMakeLists.txt @@ -0,0 +1,52 @@ +cmake_minimum_required(VERSION 3.6) + +set(lib_name pvmp3dec) +set(target_name ext_${lib_name}) + +project(${lib_name}) + +set(${target_name}_src + ./src/pvmp3_normalize.cpp + ./src/pvmp3_alias_reduction.cpp + ./src/pvmp3_crc.cpp + ./src/pvmp3_decode_header.cpp + ./src/pvmp3_decode_huff_cw.cpp + ./src/pvmp3_getbits.cpp + ./src/pvmp3_dequantize_sample.cpp + ./src/pvmp3_framedecoder.cpp + ./src/pvmp3_get_main_data_size.cpp + ./src/pvmp3_get_side_info.cpp + ./src/pvmp3_get_scale_factors.cpp + ./src/pvmp3_mpeg2_get_scale_data.cpp + ./src/pvmp3_mpeg2_get_scale_factors.cpp + ./src/pvmp3_mpeg2_stereo_proc.cpp + ./src/pvmp3_huffman_decoding.cpp + ./src/pvmp3_huffman_parsing.cpp + ./src/pvmp3_tables.cpp + ./src/pvmp3_imdct_synth.cpp + ./src/pvmp3_mdct_6.cpp + ./src/pvmp3_dct_6.cpp + ./src/pvmp3_poly_phase_synthesis.cpp + ./src/pvmp3_equalizer.cpp + ./src/pvmp3_seek_synch.cpp + ./src/pvmp3_stereo_proc.cpp + ./src/pvmp3_reorder.cpp + ./src/pvmp3_polyphase_filter_window.cpp + ./src/pvmp3_mdct_18.cpp + ./src/pvmp3_dct_9.cpp + ./src/pvmp3_dct_16.cpp +) + +add_library(${target_name} STATIC + ${${target_name}_src} +) + +target_include_directories(${target_name} PUBLIC include) +target_include_directories(${target_name} PUBLIC src) +set_target_properties(${target_name} + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + FOLDER "External" +) + diff --git a/ohos-specific/pvmp3dec/include/mp3_decoder_selection.h b/ohos-specific/pvmp3dec/include/mp3_decoder_selection.h new file mode 100644 index 0000000000..e287433dd7 --- /dev/null +++ b/ohos-specific/pvmp3dec/include/mp3_decoder_selection.h @@ -0,0 +1,30 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/*! \file mp3_decoder_selection.h + * \brief select mp3 decoder + * + */ + +#ifndef MP3_DECODER_SELECTION_H +#define MP3_DECODER_SELECTION_H + + +#define NEW_PV_MP3_DECODER 1 // 1 == PV mp3 decoder + +#endif + diff --git a/ohos-specific/pvmp3dec/include/pvmp3_audio_type_defs.h b/ohos-specific/pvmp3dec/include/pvmp3_audio_type_defs.h new file mode 100644 index 0000000000..2d94384fbd --- /dev/null +++ b/ohos-specific/pvmp3dec/include/pvmp3_audio_type_defs.h @@ -0,0 +1,77 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_audio_type_defs.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This file was derived from a number of standards bodies. The type + definitions below were created from some of the best practices observed + in the standards bodies. + + This file is dependent on limits.h for defining the bit widths. In an + ANSI C environment limits.h is expected to always be present and contain + the following definitions: + + SCHAR_MIN + SCHAR_MAX + UCHAR_MAX + + INT_MAX + INT_MIN + UINT_MAX + + SHRT_MIN + SHRT_MAX + USHRT_MAX + + LONG_MIN + LONG_MAX + ULONG_MAX + +------------------------------------------------------------------------------ +*/ + +#ifndef PVMP3_AUDIO_TYPE_DEFS_H +#define PVMP3_AUDIO_TYPE_DEFS_H + +#include <stdint.h> + +typedef int8_t int8; +typedef uint8_t uint8; +typedef int16_t int16; +typedef uint16_t uint16; +typedef int32_t int32; +typedef uint32_t uint32; +typedef int64_t int64; +typedef uint64_t uint64; + +typedef int32_t Int32; + +#endif /* PVMP3_AUDIO_TYPE_DEFS_H */ diff --git a/ohos-specific/pvmp3dec/include/pvmp3decoder_api.h b/ohos-specific/pvmp3dec/include/pvmp3decoder_api.h new file mode 100644 index 0000000000..1568e7c1dd --- /dev/null +++ b/ohos-specific/pvmp3dec/include/pvmp3decoder_api.h @@ -0,0 +1,259 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3decoder_api.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This include file defines the structure tPVMP3DecoderExternal + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3DECODER_API_H +#define PVMP3DECODER_API_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" +#include "pvmp3_dec_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + /*---------------------------------------------------------------------------- + ; DEFINES + ; Include all pre-processor statements here. + ----------------------------------------------------------------------------*/ + + /*---------------------------------------------------------------------------- + ; EXTERNAL VARIABLES REFERENCES + ; Declare variables used in this module but defined elsewhere + ----------------------------------------------------------------------------*/ + + /*---------------------------------------------------------------------------- + ; SIMPLE TYPEDEF'S + ----------------------------------------------------------------------------*/ + + /*---------------------------------------------------------------------------- + ; ENUMERATED TYPEDEF'S + ----------------------------------------------------------------------------*/ + typedef enum + { + flat = 0, + bass_boost = 1, + rock = 2, + pop = 3, + jazz = 4, + classical = 5, + talk = 6, + flat_ = 7 + + } e_equalization; + + + + typedef enum ERROR_CODE + { + NO_DECODING_ERROR = 0, + UNSUPPORTED_LAYER = 1, + UNSUPPORTED_FREE_BITRATE = 2, + FILE_OPEN_ERROR = 3, /* error opening file */ + CHANNEL_CONFIG_ERROR = 4, /* error in channel configuration */ + SYNTHESIS_WINDOW_ERROR = 5, /* error in synthesis window table */ + READ_FILE_ERROR = 6, /* error reading input file */ + SIDE_INFO_ERROR = 7, /* error in side info */ + HUFFMAN_TABLE_ERROR = 8, /* error in Huffman table */ + COMMAND_LINE_ERROR = 9, /* error in command line */ + MEMORY_ALLOCATION_ERROR = 10, /* error allocating memory */ + NO_ENOUGH_MAIN_DATA_ERROR = 11, + SYNCH_LOST_ERROR = 12, + OUTPUT_BUFFER_TOO_SMALL = 13 /* output buffer can't hold output */ + } ERROR_CODE; + + /*---------------------------------------------------------------------------- + ; STRUCTURES TYPEDEF'S + ----------------------------------------------------------------------------*/ + + typedef struct +#ifdef __cplusplus + tPVMP3DecoderExternal +#endif + { + + /* + * INPUT: + * Pointer to the input buffer that contains the encoded bistream data. + * The data is filled in such that the first bit transmitted is + * the most-significant bit (MSB) of the first array element. + * The buffer is accessed in a linear fashion for speed, and the number of + * bytes consumed varies frame to frame. + * The calling environment can change what is pointed to between calls to + * the decode function, library, as long as the inputBufferCurrentLength, + * and inputBufferUsedLength are updated too. Also, any remaining bits in + * the old buffer must be put at the beginning of the new buffer. + */ + uint8 *pInputBuffer; + + /* + * INPUT: + * Number of valid bytes in the input buffer, set by the calling + * function. After decoding the bitstream the library checks to + * see if it when past this value; it would be to prohibitive to + * check after every read operation. This value is not modified by + * the MP3 library. + */ + int32 inputBufferCurrentLength; + + /* + * INPUT/OUTPUT: + * Number of elements used by the library, initially set to zero by + * the function pvmp3_resetDecoder(), and modified by each + * call to pvmp3_framedecoder(). + */ + int32 inputBufferUsedLength; + + /* + * OUTPUT: + * holds the predicted frame size. It used on the test console, for parsing + * purposes. + */ + uint32 CurrentFrameLength; + + /* + * INPUT: + * This variable holds the type of equalization used + * + * + */ + e_equalization equalizerType; + + + /* + * INPUT: + * The actual size of the buffer. + * This variable is not used by the library, but is used by the + * console test application. This parameter could be deleted + * if this value was passed into these function. + */ + int32 inputBufferMaxLength; + + /* + * OUTPUT: + * The number of channels decoded from the bitstream. + */ + int16 num_channels; + + /* + * OUTPUT: + * The number of channels decoded from the bitstream. + */ + int16 version; + + /* + * OUTPUT: + * The sampling rate decoded from the bitstream, in units of + * samples/second. + */ + int32 samplingRate; + + /* + * OUTPUT: + * This value is the bitrate in units of bits/second. IT + * is calculated using the number of bits consumed for the current frame, + * and then multiplying by the sampling_rate, divided by points in a frame. + * This value can changes frame to frame. + */ + int32 bitRate; + + /* + * INPUT/OUTPUT: + * In: Inform decoder how much more room is available in the output buffer in int16 samples + * Out: Size of the output frame in 16-bit words, This value depends on the mp3 version + */ + int32 outputFrameSize; + + /* + * INPUT: + * Flag to enable/disable crc error checking + */ + int32 crcEnabled; + + /* + * OUTPUT: + * This value is used to accumulate bit processed and compute an estimate of the + * bitrate. For debugging purposes only, as it will overflow for very long clips + */ + uint32 totalNumberOfBitsUsed; + + + /* + * INPUT: (but what is pointed to is an output) + * Pointer to the output buffer to hold the 16-bit PCM audio samples. + * If the output is stereo, both left and right channels will be stored + * in this one buffer. + */ + + int16 *pOutputBuffer; + + } tPVMP3DecoderExternal; + +uint32 pvmp3_decoderMemRequirements(void); + +void pvmp3_InitDecoder(tPVMP3DecoderExternal *pExt, + void *pMem); + +void pvmp3_resetDecoder(void *pMem); + +ERROR_CODE pvmp3_framedecoder(tPVMP3DecoderExternal *pExt, + void *pMem); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + + diff --git a/ohos-specific/pvmp3dec/src/asm/pvmp3_dct_16_gcc.s b/ohos-specific/pvmp3dec/src/asm/pvmp3_dct_16_gcc.s new file mode 100644 index 0000000000..e61c8d3d04 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/asm/pvmp3_dct_16_gcc.s @@ -0,0 +1,476 @@ +@ ------------------------------------------------------------------ +@ Copyright (C) 1998-2009 PacketVideo +@ +@ Licensed under the Apache License, Version 2.0 (the "License"); +@ you may not use this file except in compliance with the License. +@ You may obtain a copy of the License at +@ +@ http://www.apache.org/licenses/LICENSE-2.0 +@ +@ Unless required by applicable law or agreed to in writing, software +@ distributed under the License is distributed on an "AS IS" BASIS, +@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +@ express or implied. +@ See the License for the specific language governing permissions +@ and limitations under the License. +@ ------------------------------------------------------------------- + +@ +@ +@ Filename: pvmp3_dct_16_gcc.s +@ +@ +@------------------------------------------------------------------------------ +@ REVISION HISTORY +@ +@ +@ Who: Date: MM/DD/YYYY +@ Description: +@ +@------------------------------------------------------------------------------ + +.arm + +.align 4 + +.text + +.extern pvmp3_dct_16 +.extern pvmp3_merge_in_place_N32 +.extern pvmp3_split + + + +@------------------------------------------------------------------------------ + +.global pvmp3_dct_16 + +pvmp3_dct_16: + stmfd sp!,{r0,r1,r4-r11,lr} + ldr r1,[r0] + ldr r3,[r0,#0x3c] + ldr r12,constant1 + sub r2,r1,r3 + smull lr,r2,r12,r2 + sub sp,sp,#0x1c + str r2,[sp,#0x14] + ldr r2,[r0,#0x1c] + ldr r12,[r0,#0x20] + add r1,r1,r3 + sub r3,r2,r12 + ldr lr,constant2 + mov r3,r3,lsl #3 + smull r4,r3,lr,r3 + ldr r6,constant5 + str r3,[sp] + add r3,r2,r12 + sub r2,r1,r3 + ldr r12,constant3 + add r3,r1,r3 + smull lr,r2,r12,r2 + ldr r12,[r0,#0x38] + ldr r1,[r0,#4] + ldr lr,constant4 + sub r4,r1,r12 + add r1,r1,r12 + ldr r12,[r0,#0x18] + smull r4,r5,lr,r4 + ldr lr,[r0,#0x24] + ldr r10,constant10 + sub r4,r12,lr + mov r4,r4,lsl #1 + smull r7,r4,r6,r4 + add r12,r12,lr + add r7,r1,r12 + sub r12,r1,r12 + ldr r1,constant6 + str r4,[sp,#4] + smull r12,r4,r1,r12 + ldr r1,[r0,#8] + ldr r12,[r0,#0x34] + ldr r6,constant7 + sub lr,r1,r12 + smull r8,lr,r6,lr + add r1,r1,r12 + str lr,[sp,#0x10] + ldr r12,[r0,#0x14] + ldr lr,[r0,#0x28] + ldr r8,constant8 + sub r6,r12,lr + mov r6,r6,lsl #1 + smull r9,r6,r8,r6 + add r12,r12,lr + ldr r9,constant9 + add r8,r1,r12 + sub r12,r1,r12 + smull r12,lr,r9,r12 + ldr r12,[r0,#0x30] + ldr r1,[r0,#0xc] + sub r9,r1,r12 + smull r11,r9,r10,r9 + add r12,r1,r12 + str r9,[sp,#0xc] + ldr r9,[r0,#0x10] + ldr r10,constant11 + str r9,[sp,#0x18] + ldr r1,[r0,#0x2c] + sub r9,r9,r1 + smull r11,r9,r10,r9 + ldr r10,constant12 + str r9,[sp,#8] + ldr r9,[sp,#0x18] + ldr r11,constant14 + add r9,r9,r1 + add r1,r12,r9 + sub r12,r12,r9 + mov r12,r12,lsl #2 + smull r9,r12,r10,r12 + ldr r10,constant13 + add r9,r3,r1 + sub r1,r3,r1 + smull r1,r3,r10,r1 + sub r1,r7,r8 + mov r1,r1,lsl #1 + smull r1,r10,r11,r1 + add r1,r7,r8 + add r8,r9,r1 + sub r7,r9,r1 + mov r8,r8,asr #1 + ldr r1,constant15 + str r8,[r0] + smull r7,r8,r1,r7 + sub r7,r3,r10 + str r8,[r0,#0x20] + mov r7,r7,lsl #1 + smull r8,r7,r1,r7 + add r3,r3,r10 + add r3,r3,r7 + str r3,[r0,#0x10] + sub r3,r2,r12 + str r7,[r0,#0x30] + add r2,r2,r12 + ldr r7,constant13 + sub r12,r4,lr + mov r3,r3,lsl #1 + smull r8,r3,r7,r3 + add lr,r4,lr + sub r4,r2,lr + mov r12,r12,lsl #2 + smull r7,r12,r11,r12 + add lr,lr,r2 + sub r2,r3,r12 + mov r2,r2,lsl #1 + smull r7,r2,r1,r2 + mov r4,r4,lsl #1 + add r12,r12,r2 + add r3,r12,r3 + smull r7,r4,r1,r4 + add r12,r3,lr + add r3,r3,r4 + str r3,[r0,#0x18] + add r3,r2,r4 + str r2,[r0,#0x38] + str r3,[r0,#0x28] + str r12,[r0,#8] + ldr r2,[sp,#0x14] + ldr r3,[sp,#0] + ldr lr,[sp,#4] + sub r2,r2,r3 + ldr r3,constant3 + mov r2,r2,lsl #1 + smull r12,r2,r3,r2 + ldr r3,[sp,#0x14] + ldr r12,[sp,#0] + ldr r4,constant6 + add r12,r3,r12 + ldr r3,[sp,#4] + sub lr,r5,lr + mov lr,lr,lsl #1 + add r3,r5,r3 + smull r5,lr,r4,lr + ldr r4,[sp,#0x10] + ldr r5,[sp,#0x10] + add r4,r4,r6 + sub r5,r5,r6 + ldr r6,constant9 + mov r5,r5,lsl #1 + smull r7,r5,r6,r5 + ldr r6,[sp,#8] + ldr r9,[sp,#0xc] + ldr r10,constant12 + sub r6,r9,r6 + mov r6,r6,lsl #3 + smull r7,r6,r10,r6 + ldr r8,[sp,#0x20] + ldr r7,[sp,#8] + cmp r8,#0 + add r7,r9,r7 + + bne no_flag_proc + rsb r12,r12,#0 + rsb r2,r2,#0 + rsb r3,r3,#0 + rsb lr,lr,#0 + rsb r4,r4,#0 + rsb r5,r5,#0 + rsb r7,r7,#0 + rsb r6,r6,#0 +no_flag_proc: + + sub r8,r2,r6 + add r2,r6,r2 + sub r6,r12,r7 + ldr r9,constant13 + add r12,r12,r7 + sub r7,r3,r4 + mov r6,r6,lsl #1 + mov r8,r8,lsl #1 + smull r10,r8,r9,r8 + add r3,r3,r4 + smull r10,r6,r9,r6 + sub r4,lr,r5 + mov r7,r7,lsl #2 + smull r9,r7,r11,r7 + add lr,lr,r5 + sub r5,r6,r7 + add r6,r6,r7 + sub r7,r12,r3 + add r3,r12,r3 + sub r12,r2,lr + mov r4,r4,lsl #2 + smull r9,r4,r11,r4 + add lr,r2,lr + sub r2,r8,r4 + mov r2,r2,lsl #1 + mov r5,r5,lsl #1 + mov r12,r12,lsl #1 + mov r7,r7,lsl #1 + smull r9,r5,r1,r5 + smull r9,r2,r1,r2 + add r6,r6,r5 + smull r9,r7,r1,r7 + smull r9,r12,r1,r12 + add r1,r4,r2 + add r1,r1,r8 + add lr,lr,r1 + add r3,r3,lr + str r3,[r0,#4] + add r3,r6,lr + str r3,[r0,#0xc] + add r1,r1,r12 + add r3,r6,r1 + add r1,r7,r1 + str r1,[r0,#0x1c] + str r3,[r0,#0x14] + add r1,r12,r2 + add r3,r7,r1 + add r1,r5,r1 + str r1,[r0,#0x2c] + str r3,[r0,#0x24]! + add r1,r5,r2 + str r1,[r0,#0x10] + str r2,[r0,#0x18] + add sp,sp,#0x24 + ldmfd sp!,{r4-r11,pc} + + + +@------------------------------------------------------------------------------ + +.global pvmp3_merge_in_place_N32 + + + +pvmp3_merge_in_place_N32: + stmfd sp!,{r4,lr} + ldr r1,[r0,#0x1c] + ldr r2,[r0,#0x38] + str r1,[r0,#0x38] + ldr r1,[r0,#0x18] + ldr r3,[r0,#0x30] + str r1,[r0,#0x30] + ldr r12,[r0,#0x14] + ldr r1,[r0,#0x28] + str r12,[r0,#0x28] + ldr r12,[r0,#0x10] + ldr lr,[r0,#0x20] + str r12,[r0,#0x20] + ldr r12,[r0,#0xc] + str r12,[r0,#0x18] + ldr r12,[r0,#8] + str r12,[r0,#0x10] + ldr r12,[r0,#4] + str r12,[r0,#8] + ldr r4,[r0,#0x40] + ldr r12,[r0,#0x44] + add r4,r4,r12 + str r4,[r0,#4] + str lr,[r0,#0x40] + ldr lr,[r0,#0x48] + add r12,lr,r12 + str r12,[r0,#0xc] + ldr r12,[r0,#0x4c] + add lr,r12,lr + str lr,[r0,#0x14] + ldr lr,[r0,#0x24] + str lr,[r0,#0x48] + ldr lr,[r0,#0x50] + add r12,lr,r12 + str r12,[r0,#0x1c] + ldr r12,[r0,#0x54] + str r1,[r0,#0x50] + add lr,r12,lr + str lr,[r0,#0x24] + ldr r1,[r0,#0x58] + ldr r4,[r0,#0x2c] + ldr lr,[r0,#0x34] + add r12,r1,r12 + str r12,[r0,#0x2c] + ldr r12,[r0,#0x5c] + add r1,r12,r1 + str r1,[r0,#0x34] + str r4,[r0,#0x58] + ldr r1,[r0,#0x60] + ldr r4,[r0,#0x3c] + add r12,r1,r12 + str r12,[r0,#0x3c] + ldr r12,[r0,#0x64] + add r1,r12,r1 + str r1,[r0,#0x44] + ldr r1,[r0,#0x68] + add r12,r1,r12 + str r12,[r0,#0x4c] + ldr r12,[r0,#0x6c] + add r1,r12,r1 + str r1,[r0,#0x54] + ldr r1,[r0,#0x70] + str r3,[r0,#0x60] + add r12,r1,r12 + str r12,[r0,#0x5c] + ldr r3,[r0,#0x74] + add r1,r3,r1 + str r1,[r0,#0x64] + str lr,[r0,#0x68] + ldr r1,[r0,#0x78] + str r2,[r0,#0x70] + add r3,r1,r3 + str r3,[r0,#0x6c] + ldr r2,[r0,#0x7c] + add r1,r1,r2 + str r1,[r0,#0x74] + str r4,[r0,#0x78] + ldmfd sp!,{r4,pc} + + +@------------------------------------------------------------------------------ + +.global pvmp3_split + + +pvmp3_split: + stmfd sp!,{r4,r5,lr} + adr r1,constant16 + ldr r2,[r1] + add r2,r1 + sub r1,r0,#4 + mov r3,#3 +loop1: + ldr r12,[r0] + ldr lr,[r1] + ldr r4,[r2],#-4 + add r5,lr,r12 + sub r12,lr,r12 + smull r12,lr,r4,r12 + str r5,[r1],#-4 + mov r12,r12,lsr #27 + add r12,r12,lr,lsl #5 + str r12,[r0],#4 + ldr r12,[r0] + ldr lr,[r1] + ldr r4,[r2],#-4 + add r5,lr,r12 + sub r12,lr,r12 + smull r12,lr,r4,r12 + str r5,[r1],#-4 + mov r12,r12,lsr #27 + add r12,r12,lr,lsl #5 + str r12,[r0],#4 + subs r3,r3,#1 + bne loop1 + mov r3,#5 +loop2: + ldr r12,[r0] + ldr lr,[r1] + ldr r4,[r2],#-4 + add r5,lr,r12 + sub r12,lr,r12 + mov r12,r12,lsl #1 + smull lr,r12,r4,r12 + str r5,[r1],#-4 + str r12,[r0],#4 + ldr r12,[r0] + ldr lr,[r1] + ldr r4,[r2],#-4 + add r5,lr,r12 + sub r12,lr,r12 + mov r12,r12,lsl #1 + smull lr,r12,r4,r12 + str r5,[r1],#-4 + str r12,[r0],#4 + subs r3,r3,#1 + bne loop2 + ldmfd sp!,{r4,r5,pc} +constant1: + .word 0x404f4680 +constant2: + .word 0x519e4e00 +constant3: + .word 0x4140fb80 +constant4: + .word 0x42e13c00 +constant5: + .word 0x6e3c9300 +constant6: + .word 0x4cf8de80 +constant7: + .word 0x48919f80 +constant8: + .word 0x43e22480 +constant9: + .word 0x73326b80 +constant10: + .word 0x52cb0e80 +constant11: + .word 0x64e24000 +constant12: + .word 0x52036780 +constant13: + .word 0x4545ea00 +constant14: + .word 0x539eba80 +constant15: + .word 0x5a827980 +constant16: + .word (CosTable_dct32 + 60)-constant16 + + + +CosTable_dct32: + .word 0x4013c280 + .word 0x40b34580 + .word 0x41fa2d80 + .word 0x43f93400 + .word 0x46cc1c00 + .word 0x4a9d9d00 + .word 0x4fae3700 + .word 0x56601e80 + .word 0x5f4cf700 + .word 0x6b6fcf00 + .word 0x07c7d1d8 + .word 0x095b0350 + .word 0x0bdf91b0 + .word 0x107655e0 + .word 0x1b42c840 + .word 0x51852300 + + diff --git a/ohos-specific/pvmp3dec/src/asm/pvmp3_dct_9_gcc.s b/ohos-specific/pvmp3dec/src/asm/pvmp3_dct_9_gcc.s new file mode 100644 index 0000000000..618c50e253 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/asm/pvmp3_dct_9_gcc.s @@ -0,0 +1,193 @@ +@ ------------------------------------------------------------------ +@ Copyright (C) 1998-2009 PacketVideo +@ +@ Licensed under the Apache License, Version 2.0 (the "License"); +@ you may not use this file except in compliance with the License. +@ You may obtain a copy of the License at +@ +@ http://www.apache.org/licenses/LICENSE-2.0 +@ +@ Unless required by applicable law or agreed to in writing, software +@ distributed under the License is distributed on an "AS IS" BASIS, +@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +@ express or implied. +@ See the License for the specific language governing permissions +@ and limitations under the License. +@ ------------------------------------------------------------------- + +@ +@ +@ Filename: pvmp3_dct_9_gcc.s +@ +@------------------------------------------------------------------------------ +@ REVISION HISTORY +@ +@ +@ Who: Date: MM/DD/YYYY +@ Description: +@ +@------------------------------------------------------------------------------ + +.arm + +.align 4 + +.text + + +@------------------------------------------------------------------------------ + +.global pvmp3_dct_9 + +pvmp3_dct_9: + stmfd sp!,{r4-r11,lr} + ldr r2, [r0, #0x20] + ldr r3, [r0, #0] + ldr r12,[r0, #4] + add r1,r2,r3 + sub lr,r2,r3 + ldr r3,[r0, #0x1c] + ldr r4,[r0, #0x18] + add r2,r3,r12 + ldr r5,[r0,#8] + sub r3,r3,r12 + add r12,r4,r5 + sub r4,r4,r5 + ldr r5,[r0, #0x14] + ldr r7,[r0, #0xc] + ldr r9,[r0, #0x10] + add r6,r5,r7 + sub r5,r5,r7 + add r7,r1,r12 + add r8,r9,r2 + add r7,r7,r6 + add r10,r7,r8 + rsb r7,r8,r7,asr #1 + str r7,[r0, #0x18] + rsb r2,r9,r2,asr #1 + str r10,[r0,#0] + ldr r11,cos_2pi_9 + rsb r7,r2,#0 + + ldr r10,cos_4pi_9 + mov r9,r1,lsl #1 + mov r8,r7 + +@ vec[4] = fxp_mac32_Q32( vec[4], tmp0<<1, cos_2pi_9)@ + + smlal r1,r8,r11,r9 + ldr r11,cos_pi_9 + mov r1,r9 @@@@@@ !!!!!! + +@ vec[8] = fxp_mac32_Q32( vec[8], tmp0<<1, cos_4pi_9)@ + + smlal r1,r7,r10,r9 + + mov r1,r12,lsl #1 + + +@ vec[2] = fxp_mac32_Q32( vec[2], tmp0<<1, cos_pi_9)@ + + smlal r9,r2,r11,r9 + rsb r9,r10,#0 + ldr r11,cos_5pi_9 + + smlal r12,r2,r9,r1 + + + +@ vec[2] = fxp_mac32_Q32( vec[2], tmp2<<1, cos_5pi_9)@ + + ldr r9,cos_2pi_9 + mov r12,r1 @@@@@@ !!!!!! + smlal r12,r8,r11,r1 + + +@ vec[8] = fxp_mac32_Q32( vec[8], tmp2<<1, cos_2pi_9)@ + + smlal r1,r7,r9,r1 + mov r1,r6,lsl #1 + smlal r12,r7,r11,r1 + and r6,r10,r11,asr #14 + smlal r12,r8,r6,r1 + ldr r10,cos_11pi_18 + add r12,r11,r6 + smlal r1,r2,r12,r1 + ldr r9,cos_8pi_9 + str r2,[r0,#8] + mov r1,r5,lsl #1 + +@ vec[8] = fxp_mac32_Q32( vec[8], tmp3<<1, cos_8pi_9)@ + + smull r2,r6,r9,r1 + str r7,[r0,#0x20] + mov r2,r4,lsl #1 + ldr r7,cos_13pi_18 + smlal r12,r6,r10,r2 + + mov r3,r3,lsl #1 + +@ vec[5] = fxp_mac32_Q32( vec[5], tmp8<<1, cos_13pi_18)@ + + smlal r12,r6,r7,r3 + add r4,r5,r4 + mov r12,lr,lsl #1 + sub lr,r4,lr + ldr r7,cos_17pi_18 + str r8,[r0, #0x10] + ldr r4,cos_pi_6 + + mov lr,lr,lsl #1 + +@ vec[1] = fxp_mac32_Q32( vec[1], tmp8<<1, cos_17pi_18)@ + + smlal r8,r6,r7,r12 + +@ vec[3] = fxp_mul32_Q32((tmp5 + tmp6 - tmp8)<<1, cos_pi_6)@ + + smull r5,lr,r4,lr + str r6,[r0, #4] + str lr,[r0, #0xc] + + +@ vec[5] = fxp_mul32_Q32(tmp5<<1, cos_17pi_18)@ + smull r5,lr,r7,r1 + rsb r6,r9,#0 +@ vec[5] = fxp_mac32_Q32( vec[5], tmp6<<1, cos_7pi_18)@ + smlal r5,lr,r6,r2 +@ vec[5] = fxp_mac32_Q32( vec[5], tmp7<<1, cos_pi_6)@ + smlal r5,lr,r4,r3 +@ vec[5] = fxp_mac32_Q32( vec[5], tmp8<<1, cos_13pi_18)@ + smlal r5,lr,r10,r12 + str lr,[r0, #0x14] + rsb lr,r10,#0 + +@ vec[7] = fxp_mul32_Q32(tmp5<<1, cos_5pi_18)@ + smull r5,r1,lr,r1 +@ vec[7] = fxp_mac32_Q32( vec[7], tmp6<<1, cos_17pi_18)@ + smlal r2,r1,r7,r2 +@ vec[7] = fxp_mac32_Q32( vec[7], tmp7<<1, cos_pi_6)@ + smlal r3,r1,r4,r3 +@ vec[7] = fxp_mac32_Q32( vec[7], tmp8<<1, cos_11pi_18)@ + smlal r12,r1,r9,r12 + str r1,[r0, #0x1c] + ldmfd sp!,{r4-r11,pc} +cos_2pi_9: + .word 0x620dbe80 +cos_4pi_9: + .word 0x163a1a80 +cos_pi_9: + .word 0x7847d900 +cos_5pi_9: + .word 0x87b82700 +cos_8pi_9: + .word 0xd438af00 +cos_11pi_18: + .word 0xadb92280 +cos_13pi_18: + .word 0x91261480 +cos_17pi_18: + .word 0x81f1d200 +cos_pi_6: + .word 0x6ed9eb80 + diff --git a/ohos-specific/pvmp3dec/src/asm/pvmp3_mdct_18_gcc.s b/ohos-specific/pvmp3dec/src/asm/pvmp3_mdct_18_gcc.s new file mode 100644 index 0000000000..575acd69f7 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/asm/pvmp3_mdct_18_gcc.s @@ -0,0 +1,357 @@ +@ ------------------------------------------------------------------ +@ Copyright (C) 1998-2009 PacketVideo +@ +@ Licensed under the Apache License, Version 2.0 (the "License"); +@ you may not use this file except in compliance with the License. +@ You may obtain a copy of the License at +@ +@ http://www.apache.org/licenses/LICENSE-2.0 +@ +@ Unless required by applicable law or agreed to in writing, software +@ distributed under the License is distributed on an "AS IS" BASIS, +@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +@ express or implied. +@ See the License for the specific language governing permissions +@ and limitations under the License. +@ ------------------------------------------------------------------- + +@ +@ +@ Filename: pvmp3_dct_18_gcc.s +@ +@------------------------------------------------------------------------------ +@ REVISION HISTORY +@ +@ +@ Who: Date: MM/DD/YYYY +@ Description: +@ +@------------------------------------------------------------------------------ + +.arm + +.align 4 + +.text + +.extern pvmp3_dct_9 + +@------------------------------------------------------------------------------ + +.global pvmp3_mdct_18 + +pvmp3_mdct_18: + stmfd sp!,{r4-r11,lr} + mov r7,r2 + adr r2,constdata$1 + mov r6,r1 + add r3,r2,#0x24 + add r12,r3,#0x44 + add r1,r0,#0x44 + mov r5,r0 + +@ for ( i=9@ i!=0@ i--) +@ { + + mov r4,#9 +Loop_1: + +@ tmp = *(pt_vec) +@ tmp1 = *(pt_vec_o) + + ldr lr,[r0] @@ tmp == lr + ldr r8,[r3],#4 @@ tmp1 == r8 + +@ tmp = fxp_mul32_Q32( tmp<<1, *(pt_cos++ )) +@ tmp1 = fxp_mul32_Q27( tmp1, *(pt_cos_x--)) + + mov lr,lr,lsl #1 + smull r10,lr,r8,lr + ldr r8,[r12],#-4 + ldr r9,[r1] + subs r4,r4,#1 + smull r9,r10,r8,r9 + mov r8,r9,lsr #27 + add r8,r8,r10,lsl #5 + +@ *(pt_vec++) = tmp + tmp1 +@ *(pt_vec_o--) = fxp_mul32_Q28( (tmp - tmp1), *(pt_cos_split++)) + + add r9,lr,r8 + sub r8,lr,r8 + ldr lr,[r2],#4 + str r9,[r0],#4 + smull r8,r9,lr,r8 + mov lr,r8,lsr #28 + add lr,lr,r9,lsl #4 + str lr,[r1],#-4 + bne Loop_1 + +@ } + + mov r0,r5 @@ r0 = vec + bl pvmp3_dct_9 + add r0,r5,#0x24 @@ r0 = &vec[9] + bl pvmp3_dct_9 + + ldr r0,[r5,#0x20] + ldr r2,[r5,#0x40] + str r0,[r5,#0x40] + ldr r0,[r5,#0x1c] + ldr r3,[r5,#0x38] + str r0,[r5,#0x38] + ldr r1,[r5,#0x18] + ldr r0,[r5,#0x30] + str r1,[r5,#0x30] + ldr r12,[r5,#0x14] + ldr r1,[r5,#0x28] + str r12,[r5,#0x28] + ldr r12,[r5,#0x10] + str r12,[r5,#0x20] + ldr r12,[r5,#0xc] + str r12,[r5,#0x18] + ldr r12,[r5,#8] + str r12,[r5,#0x10] + ldr r12,[r5,#4] + str r12,[r5,#8] + ldr r12,[r5,#0x24] + sub r12,r12,r1 + str r12,[r5,#4] + ldr r12,[r5,#0x2c] + sub r1,r12,r1 + str r1,[r5,#0xc] + sub r1,r12,r0 + str r1,[r5,#0x14] + ldr r1,[r5,#0x34] + sub r0,r1,r0 + str r0,[r5,#0x1c] + sub r0,r1,r3 + str r0,[r5,#0x24] + ldr r1,[r5,#0x3c] + sub r3,r1,r3 + sub r1,r1,r2 + str r1,[r5,#0x34] + str r3,[r5,#0x2c] + ldr r1,[r5,#0x44] + sub r1,r1,r2 + str r1,[r5,#0x3c] + ldr r12,[r5,#0] + +Loop_2: + add r1,r5,r4,lsl #2 + ldr r2,[r1,#0x28] + ldr r3,[r6,r4,lsl #2] + add r0,r0,r2 + str r0,[r1,#0x28] + ldr lr,[r7,r4,lsl #2] + ldr r1,[r1,#4] + smlal r0,r3,lr,r0 + mov r0,r2 + add r2,r12,r1 + rsb r2,r2,#0 + str r3,[r5,r4,lsl #2] + str r2,[r6,r4,lsl #2] + add r4,r4,#1 + cmp r4,#6 + mov r12,r1 + + blt Loop_2 + + ldr r1,[r5,#0x40] + ldr r2,[r6,#0x18] + add r3,r0,r1 + str r3,[r5,#0x40] + ldr lr,[r7,r4,lsl #2] + mov r3,r3,lsl #1 + ldr r0,[r5,#0x1c] + smlal r3,r2,lr,r3 + add r3,r12,r0 + str r2,[r5,#0x18] + ldr r2,[r6,#0x1c] + rsb r3,r3,#0 + str r3,[r6,#0x18] + ldr r3,[r5,#0x20] + add r0,r3,r0 + rsb r0,r0,#0 + str r0,[r6,#0x1c] + ldr r3,[r5,#0x44] + ldr r0,[r6,#0x20] + add r3,r3,r1 + mov r1,r2 + ldr r10,[r7,#0x1c] + mov r2,r3,lsl #1 + smlal r12,r1,r10,r2 + str r1,[r5,#0x1c] + ldr r1,[r5,#0x20] + ldr r3,[r5,#0x24] + add r1,r1,r3 + rsb r1,r1,#0 + str r1,[r6,#0x20] + ldr r1,[r5,#0x44] + ldr r3,[r7,#0x20] + mov r1,r1,lsl #1 + smlal r12,r0,r3,r1 + ldr lr,[r7,#0x24] + ldr r3,[r6,#0x24] + str r0,[r5,#0x20] + smlal r1,r3,lr,r1 + ldr r0,[r6,#0x40] + ldr r12,[r6,#0x44] + str r3,[r5,#0x24] + ldr r1,[r5,#0x28] + ldr r3,[r7,#0x44] + mov r1,r1,lsl #1 + smlal r1,r12,r3,r1 + ldr r1,[r5,#0x40] + str r12,[r5,#0x44] + rsb r8,r1,#0 + str r8,[r5,#0x28] + ldr r1,[r5,#0x2c] + ldr r3,[r7,#0x40] + mov r1,r1,lsl #1 + smlal r1,r0,r3,r1 + str r0,[r5,#0x40] + ldr r0,[r5,#0x3c] + ldr r1,[r6,#0x38] + ldr r3,[r6,#0x3c] + rsb r9,r0,#0 + str r9,[r5,#0x2c] + ldr r0,[r5,#0x30] + ldr r12,[r7,#0x3c] + mov r0,r0,lsl #1 + smlal r0,r3,r12,r0 + str r3,[r5,#0x3c] + ldr r0,[r5,#0x38] + rsb r0,r0,#0 + str r0,[r5,#0x30] + ldr r3,[r5,#0x34] + ldr r12,[r7,#0x38] + mov r3,r3,lsl #1 + smlal r3,r1,r12,r3 + mov r0,r0,lsl #1 + str r1,[r5,#0x38] + ldr r4,[r7,#0x34] + ldr r1,[r6,#0x34] + ldr r3,[r6,#0x30] + smlal r0,r1,r4,r0 + ldr r12,[r6,#0x2c] + ldr lr,[r6,#0x28] + str r1,[r5,#0x34] + ldr r1,[r7,#0x30] + mov r0,r9,lsl #1 + smlal r0,r3,r1,r0 + mov r0,r8,lsl #1 + ldr r1,[r7,#0x2c] + str r3,[r5,#0x30] + smlal r0,r12,r1,r0 + ldr r0,[r7,#0x28] + str r12,[r5,#0x2c] + smlal r2,lr,r0,r2 + str lr,[r5,#0x28] + ldr r1,[r6,#4] + ldr r12,[r7,#0x48] + mov r2,r1,lsl #1 + ldr r1,[r6,#0x20] + ldr r0,[r6,#0] + mov r1,r1,lsl #1 + smull r4,lr,r12,r1 + ldr r3,[r6,#0x1c] + str lr,[r6,#0] + ldr r12,[r7,#0x4c] + mov r3,r3,lsl #1 + smull r4,lr,r12,r3 + mov r0,r0,lsl #1 + ldr r12,[r7,#0x64] + str lr,[r6,#4] + smull r4,lr,r12,r2 + ldr r12,[r7,#0x68] + str lr,[r6,#0x1c] + smull r4,lr,r12,r0 + ldr r12,[r7,#0x6c] + str lr,[r6,#0x20] + smull lr,r0,r12,r0 + ldr r12,[r7,#0x70] + str r0,[r6,#0x24] + smull r0,r2,r12,r2 + ldr r0,[r7,#0x88] + str r2,[r6,#0x28] + smull r3,r2,r0,r3 + ldr r0,[r7,#0x8c] + str r2,[r6,#0x40] + smull r2,r1,r0,r1 + str r1,[r6,#0x44] + ldr r0,[r6,#0x18] + ldr lr,[r7,#0x50] + mov r1,r0,lsl #1 + ldr r0,[r6,#0x14] + smull r5,r4,lr,r1 + mov r3,r0,lsl #1 + ldr r0,[r6,#0x10] + mov r12,r0,lsl #1 + ldr r0,[r6,#0xc] + mov r2,r0,lsl #1 + ldr r0,[r6,#8] + str r4,[r6,#8] + ldr lr,[r7,#0x54] + mov r0,r0,lsl #1 + smull r5,r4,lr,r3 + ldr lr,[r7,#0x58] + str r4,[r6,#0xc] + smull r5,r4,lr,r12 + ldr lr,[r7,#0x5c] + str r4,[r6,#0x10] + smull r5,r4,lr,r2 + ldr lr,[r7,#0x60] + str r4,[r6,#0x14] + smull r5,r4,lr,r0 + ldr lr,[r7,#0x74] + str r4,[r6,#0x18] + smull r4,r0,lr,r0 + ldr lr,[r7,#0x78] + str r0,[r6,#0x2c] + smull r0,r2,lr,r2 + ldr r0,[r7,#0x7c] + str r2,[r6,#0x30] + smull r12,r2,r0,r12 + ldr r0,[r7,#0x80] + str r2,[r6,#0x34] + smull r3,r2,r0,r3 + ldr r0,[r7,#0x84] + str r2,[r6,#0x38] + smull r2,r1,r0,r1 + str r1,[r6,#0x3c] + ldmfd sp!,{r4-r11,pc} + +@------------------------------------------------------------------------------ + +constdata$1: +cosTerms_dct18: + .word 0x0807d2b0 + .word 0x08483ee0 + .word 0x08d3b7d0 + .word 0x09c42570 + .word 0x0b504f30 + .word 0x0df29440 + .word 0x12edfb20 + .word 0x1ee8dd40 + .word 0x5bca2a00 +cosTerms_1_ov_cos_phi: + .word 0x400f9c00 + .word 0x408d6080 + .word 0x418dcb80 + .word 0x431b1a00 + .word 0x4545ea00 + .word 0x48270680 + .word 0x4be25480 + .word 0x50ab9480 + .word 0x56ce4d80 + .word 0x05ebb630 + .word 0x06921a98 + .word 0x0771d3a8 + .word 0x08a9a830 + .word 0x0a73d750 + .word 0x0d4d5260 + .word 0x127b1ca0 + .word 0x1ea52b40 + .word 0x5bb3cc80 + diff --git a/ohos-specific/pvmp3dec/src/asm/pvmp3_polyphase_filter_window_gcc.s b/ohos-specific/pvmp3dec/src/asm/pvmp3_polyphase_filter_window_gcc.s new file mode 100644 index 0000000000..1140ed75ea --- /dev/null +++ b/ohos-specific/pvmp3dec/src/asm/pvmp3_polyphase_filter_window_gcc.s @@ -0,0 +1,233 @@ +@ ------------------------------------------------------------------ +@ Copyright (C) 1998-2009 PacketVideo +@ +@ Licensed under the Apache License, Version 2.0 (the "License"); +@ you may not use this file except in compliance with the License. +@ You may obtain a copy of the License at +@ +@ http://www.apache.org/licenses/LICENSE-2.0 +@ +@ Unless required by applicable law or agreed to in writing, software +@ distributed under the License is distributed on an "AS IS" BASIS, +@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +@ express or implied. +@ See the License for the specific language governing permissions +@ and limitations under the License. +@ ------------------------------------------------------------------- + +@ +@ +@ Filename: pvmp3_polyphase_filter_window.s +@ +@------------------------------------------------------------------------------ +@ REVISION HISTORY +@ +@ +@ Who: Date: MM/DD/YYYY +@ Description: +@ +@------------------------------------------------------------------------------ + +.arm + +.align 4 + +.text + +.extern pqmfSynthWin +.hidden pqmfSynthWin + + + +@------------------------------------------------------------------------------ + +.global pvmp3_polyphase_filter_window + +pvmp3_polyphase_filter_window: + stmfd sp!,{r0-r2,r4-r11,lr} + + sub sp,sp,#4 + adr r2,PolyPh_filter_coeff + ldr r1,[r2] + add r1,r2 + ldr r2,[sp,#0xc] + + sub r2,r2,#1 + mov r10,#1 + str r2,[sp] + +@ Accumulators r9, r11::> Initialization + +Loop_j: + mov r9, #0x20 + mov r11, #0x20 + mov r4, #0x10 +Loop_i: + add r2,r4,r10 + add r3,r0,r2,lsl #2 + sub r2,r4,r10 + ldr r5,[r3] + ldr lr,[r1] + add r12,r0,r2,lsl #2 + ldr r6,[r12,#0x780] + smlal r2,r9,lr,r5 + smlal r2,r11,lr,r6 + ldr r2,[r1,#4] + ldr r7,[r12,#0x80] + smlal r5,r11,r2,r5 + smull r6,r5,r2,r6 + sub r9,r9,r5 + ldr r5,[r1,#8] + ldr r8,[r3,#0x700] + add r4,r4,#0x200 + smlal r6,r9,r5,r7 + smull r6,r2,r5,r8 + ldr r5,[r1,#0xc] + sub r11,r11,r2 + smlal r8,r9,r5,r8 + smlal r7,r11,r5,r7 + ldr r5,[r3,#0x100] + ldr r2,[r1,#0x10] + ldr r6,[r12,#0x680] + smlal lr,r9,r2,r5 + smlal lr,r11,r2,r6 + ldr r2,[r1,#0x14] + ldr r7,[r12,#0x180] + smlal r5,r11,r2,r5 + smull r6,r5,r2,r6 + ldr r6,[r1,#0x18] + ldr r8,[r3,#0x600] + sub r9,r9,r5 + smlal r5,r9,r6,r7 + smull r2,r5,r6,r8 + ldr r6,[r1,#0x1c] + sub r11,r11,r5 + smlal r8,r9,r6,r8 + ldr r2,[r1,#0x20] + ldr r5,[r3,#0x200] + smlal r7,r11,r6,r7 + ldr r6,[r12,#0x580] + smlal lr,r9,r2,r5 + smlal lr,r11,r2,r6 + ldr r2,[r1,#0x24] + ldr r7,[r12,#0x280] + smlal r5,r11,r2,r5 + smull r6,r5,r2,r6 + ldr r6,[r1,#0x28] + ldr r8,[r3,#0x500] + sub r9,r9,r5 + smlal r5,r9,r6,r7 + smull r2,r5,r6,r8 + ldr r6,[r1,#0x2c] + sub r11,r11,r5 + + smlal r8,r9,r6,r8 + smlal r7,r11,r6,r7 + ldr r5,[r3,#0x300] + ldr r8,[r1,#0x30] + ldr r6,[r12,#0x480] + smlal r7,r9,r8,r5 + smlal r7,r11,r8,r6 + ldr r8,[r1,#0x34] + ldr r12,[r12,#0x380] + smlal r5,r11,r8,r5 + smull r6,r5,r8,r6 + ldr r6,[r1,#0x38] + + + ldr r3,[r3,#0x400] + sub r9,r9,r5 + smlal r7,r9,r6,r12 + smull r8,r7,r6,r3 + cmp r4,#0x210 + sub r11,r11,r7 + + ldr r2,[r1,#0x3c] + add r1,r1,#0x40 + smlal r3,r9,r2,r3 + smlal r12,r11,r2,r12 + + blt Loop_i + + mov r3,r9, asr #6 + mov r4,r3, asr #15 + teq r4,r3, asr #31 + ldr r12,LOW_16BITS + ldr r2,[sp] + eorne r3,r12,r3,asr #31 + ldr r4,[sp,#8] + mov r2,r10,lsl r2 + add r4,r4,r2,lsl #1 + strh r3,[r4] + + mov r3,r11,asr #6 + mov r4,r3,asr #15 + teq r4,r3,asr #31 + eorne r3,r12,r3,asr #31 + ldr r12,[sp,#0xc] + ldr r11,[sp,#8] + rsb r2,r2,r12,lsl #5 + add r2,r11,r2,lsl #1 + strh r3,[r2] + + add r10,r10,#1 + cmp r10,#0x10 + blt Loop_j + +@ Accumulators r4, r5 Initialization + + mov r4,#0x20 + mov r5,#0x20 + mov r3,#0x10 +PolyPh_filter_loop2: + add r2,r0,r3,lsl #2 + ldr r12,[r2] + ldr r8,[r1] + ldr r6,[r2,#0x80] + smlal r12,r4,r8,r12 + ldr r12,[r1,#4] + ldr r7,[r2,#0x40] + smlal r6,r4,r12,r6 + + ldr r12,[r1,#8] + ldr r6,[r2,#0x180] + smlal r7,r5,r12,r7 + ldr r12,[r2,#0x100] + ldr r7,[r1,#0xc] + ldr r2,[r2,#0x140] + smlal r12,r4,r7,r12 + ldr r12,[r1,#0x10] + add r3,r3,#0x80 + smlal r6,r4,r12,r6 + ldr r6,[r1,#0x14] + cmp r3,#0x210 + smlal r2,r5,r6,r2 + add r1,r1,#0x18 + + blt PolyPh_filter_loop2 + mov r0,r4,asr #6 + mov r2,r0,asr #15 + teq r2,r0,asr #31 + ldrne r12,LOW_16BITS + ldr r1,[sp,#8] + eorne r0,r12,r0,asr #31 + strh r0,[r1,#0] + mov r0,r5,asr #6 + mov r2,r0,asr #15 + teq r2,r0,asr #31 + ldrne r12,LOW_16BITS + ldr r2,[sp] + mov r1,#0x10 + eorne r0,r12,r0,asr #31 + ldr r12,[sp,#8] + mov r1,r1,lsl r2 + add r1,r12,r1,lsl #1 + strh r0,[r1] + add sp,sp,#0x10 + ldmfd sp!,{r4-r11,pc} + +PolyPh_filter_coeff: + .word pqmfSynthWin-PolyPh_filter_coeff +LOW_16BITS: + .word 0x00007fff + diff --git a/ohos-specific/pvmp3dec/src/mp3_mem_funcs.h b/ohos-specific/pvmp3dec/src/mp3_mem_funcs.h new file mode 100644 index 0000000000..46e8022319 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/mp3_mem_funcs.h @@ -0,0 +1,81 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: mp3_mem_funcs.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: +------------------------------------------------------------------------------ + + +---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ + +#ifndef MP3_MEM_FUNCS_H +#define MP3_MEM_FUNCS_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include <string.h> + +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES AND SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + + +#define pv_memset(to, c, n) memset(to, c, n) + + +#define pv_memcpy(to, from, n) memcpy(to, from, n) +#define pv_memmove(to, from, n) memmove(to, from, n) +#define pv_memcmp(p, q, n) memcmp(p, q, n) + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + + +#endif diff --git a/ohos-specific/pvmp3dec/src/pv_mp3_huffman.h b/ohos-specific/pvmp3dec/src/pv_mp3_huffman.h new file mode 100644 index 0000000000..31102ea0bb --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pv_mp3_huffman.h @@ -0,0 +1,115 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pv_mp3_huffman.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ +*/ +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ + +#ifndef PV_MP3_HUFFMAN_H +#define PV_MP3_HUFFMAN_H + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" +#include "s_mp3bits.h" +#include "s_tmp3dec_file.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES AND SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + int32 pvmp3_huffman_parsing(int32 is[SUBBANDS_NUMBER*FILTERBANK_BANDS], + granuleInfo *grInfo, + tmp3dec_file *pVars, + int32 part2_start, + mp3Header *info); + + + void pvmp3_huffman_quad_decoding(struct huffcodetab *h, + int32 *is, + tmp3Bits *pMainData); + + void pvmp3_huffman_pair_decoding(struct huffcodetab *h, + int32 *is, + tmp3Bits *pMainData); + + + void pvmp3_huffman_pair_decoding_linbits(struct huffcodetab *h, + int32 *is, + tmp3Bits *pMainData); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + + + diff --git a/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op.h b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op.h new file mode 100644 index 0000000000..f14e2de717 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op.h @@ -0,0 +1,84 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pv_mp3dec_fxd_op.h + + Date: 09/21/2007 + + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This file select the associated fixed point functions with the OS/ARCH. + + + +------------------------------------------------------------------------------ +*/ + +#ifndef PV_MP3DEC_FXD_OP_H +#define PV_MP3DEC_FXD_OP_H + +#include "pvmp3_audio_type_defs.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#if (defined(PV_ARM_V5)||defined(PV_ARM_V4)) + +#include "pv_mp3dec_fxd_op_arm.h" + +#elif (defined(PV_ARM_GCC_V5)||defined(PV_ARM_GCC_V4)) + +#include "pv_mp3dec_fxd_op_arm_gcc.h" + +#elif (defined(PV_ARM_MSC_EVC_V5)||defined(PV_ARM_MSC_EVC_V4)) + +#include "pv_mp3dec_fxd_op_msc_evc.h" + +#else + +#ifndef C_EQUIVALENT +#define C_EQUIVALENT +#endif + +#include "pv_mp3dec_fxd_op_c_equivalent.h" + +#endif + + +#ifdef __cplusplus +} +#endif + + + +#endif /* PV_MP3DEC_FXD_OP_H */ diff --git a/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_arm.h b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_arm.h new file mode 100644 index 0000000000..76a8229aa8 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_arm.h @@ -0,0 +1,203 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Pathname: ./cpp/include/pv_mp3dec_fxd_op_arm.h + + Date: 08/20/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This file select the associated fixed point functions with the OS/ARCH. + + +------------------------------------------------------------------------------ +*/ + +#ifndef PV_MP3DEC_FXD_OP_ARM +#define PV_MP3DEC_FXD_OP_ARM + + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "pvmp3_audio_type_defs.h" + + +#if (defined(PV_ARM_V5)||defined(PV_ARM_V4)) + + + __inline Int32 fxp_mul32_Q30(const Int32 L_var1, const Int32 L_var2) + { + + Int32 result64_hi; + Int32 result64_lo; + __asm + { + smull result64_lo, result64_hi, L_var2, L_var1 + mov result64_lo, result64_lo, lsr #30 + add result64_hi, result64_lo, result64_hi, asl #2 + } + return (result64_hi); + } + + __inline Int32 fxp_mac32_Q30(const Int32 L_var1, const Int32 L_var2, Int32 L_add) + { + Int32 result64_hi; + Int32 result64_lo; + __asm + { + smull result64_lo, result64_hi, L_var2, L_var1 + add L_add, L_add, result64_hi, asl #2 + add L_add, L_add, result64_lo, lsr #30 + } + return (L_add); + } + + + +#define Qfmt_31(a) (Int32)(a*0x7FFFFFFF + (a>=0?0.5F:-0.5F)) + + + + __inline Int32 fxp_mul32_Q32(Int32 L_var1, const Int32 L_var2) + { + Int32 result64_hi; + __asm + { + smull L_var1, result64_hi, L_var2, L_var1 + } + return (result64_hi); + } + + __inline Int32 fxp_mul32_Q28(const Int32 L_var1, const Int32 L_var2) + { + + Int32 result64_hi; + Int32 result64_lo; + __asm + { + smull result64_lo, result64_hi, L_var2, L_var1 + mov result64_lo, result64_lo, lsr #28 + add result64_hi, result64_lo, result64_hi, asl #4 + } + return (result64_hi); + } + + + __inline Int32 fxp_mul32_Q27(const Int32 L_var1, const Int32 L_var2) + { + + Int32 result64_hi; + Int32 result64_lo; + __asm + { + smull result64_lo, result64_hi, L_var2, L_var1 + mov result64_lo, result64_lo, lsr #27 + add result64_hi, result64_lo, result64_hi, asl #5 + } + return (result64_hi); + } + + + __inline Int32 fxp_mul32_Q26(Int32 L_var1, Int32 L_var2) + { + + Int32 result64_hi; + Int32 result64_lo; + __asm + { + smull result64_lo, result64_hi, L_var2, L_var1 + mov result64_lo, result64_lo, lsr #26 + add result64_hi, result64_lo, result64_hi, asl #6 + } + return (result64_hi); + } + + + + __inline Int32 fxp_mac32_Q32(Int32 L_add, Int32 L_var1, const Int32 L_var2) + { + __asm + { + smlal L_var1, L_add, L_var2, L_var1 + } + return L_add; + } + + + __inline Int32 fxp_msb32_Q32(Int32 L_sub, Int32 L_var1, Int32 L_var2) + { + + __asm + { + smull L_var2, L_var1, L_var2, L_var1 + sub L_sub, L_sub, L_var1 + } + return L_sub; + } + + + __inline Int32 fxp_mul32_Q29(const Int32 L_var1, const Int32 L_var2) + { + Int32 result64_hi; + Int32 result64_lo; + __asm + { + smull result64_lo, result64_hi, L_var2, L_var1 + mov result64_lo, result64_lo, lsr #29 + add result64_hi, result64_lo, result64_hi, asl #3 + } + return (result64_hi); + } + + + __inline int32 pv_abs(int32 a) + { + Int32 b; + /* + b = a - (a<0); + a = b ^ sign(b) + */ + __asm + { + sub b, a, a, lsr #31 + eor a, b, b, asr #31 + } + return (a); + } + +#endif + +#ifdef __cplusplus +} +#endif + + +#endif /* PV_MP3DEC_FXD_OP_ARM */ + diff --git a/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_arm_gcc.h b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_arm_gcc.h new file mode 100644 index 0000000000..71fbd20860 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_arm_gcc.h @@ -0,0 +1,252 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Pathname: ./cpp/include/pv_mp3dec_fxd_op_arm_gcc.h + + Date: 08/20/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This file select the associated fixed point functions with the OS/ARCH. + + +------------------------------------------------------------------------------ +*/ + +#ifndef PV_MP3DEC_FXD_OP_ARM_GCC_H +#define PV_MP3DEC_FXD_OP_ARM_GCC_H + + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "pvmp3_audio_type_defs.h" + + +#if (defined(PV_ARM_GCC_V5)||defined(PV_ARM_GCC_V4)) + +#define Qfmt_31(a) (int32)(a*0x7FFFFFFF + (a>=0?0.5F:-0.5F)) + +#define Qfmt15(x) (Int16)(x*((int32)1<<15) + (x>=0?0.5F:-0.5F)) + + static inline int32 fxp_mul32_Q30(const int32 a, const int32 b) + { + int32 result64_hi; + int32 result64_lo; + register int32 ra = (int32)a; + register int32 rb = (int32)b; + asm volatile("smull %1, %0, %2, %3\n\t" + "mov %1, %1, lsr #30\n\t" + "add %0, %1, %0, asl #2" + : "=&r*i"(result64_hi), + "=&r*i"(result64_lo) + : "r"(ra), + "r"(rb)); + return (result64_hi); + } + + + static inline int32 fxp_mac32_Q30(const int32 a, const int32 b, int32 L_add) +{ + int32 result64_hi; + int32 result64_lo; + register int32 ra = (int32)a; + register int32 rb = (int32)b; + register int32 rc = (int32)L_add; + + asm volatile("smull %1, %0, %2, %3\n\t" + "add %4, %4, %0, asl #2\n\t" + "add %0, %4, %1, lsr #30" + : "=&r*i"(result64_hi), + "=&r*i"(result64_lo) + : "r"(ra), + "r"(rb), + "r"(rc)); + + return (result64_hi); + } + + + + static inline int32 fxp_mul32_Q32(const int32 a, const int32 b) +{ + int32 result64_hi; + int32 result64_lo; + register int32 ra = (int32)a; + register int32 rb = (int32)b; + asm volatile( + "smull %1, %0, %2, %3" + : "=&r*i"(result64_hi), + "=&r*i"(result64_lo) + : "r"(ra), + "r"(rb)); + + return (result64_hi); + } + + + static inline int32 fxp_mul32_Q29(const int32 a, const int32 b) +{ + int32 result64_hi; + int32 result64_lo; + register int32 ra = (int32)a; + register int32 rb = (int32)b; + asm volatile("smull %1, %0, %2, %3\n\t" + "mov %1, %1, lsr #29\n\t" + "add %0, %1, %0, asl #3" + : "=&r*i"(result64_hi), + "=&r*i"(result64_lo) + : "r"(ra), + "r"(rb)); + return (result64_hi); + + } + + static inline int32 fxp_mul32_Q28(const int32 a, const int32 b) +{ + + int32 result64_hi; + int32 result64_lo; + register int32 ra = (int32)a; + register int32 rb = (int32)b; + asm volatile("smull %1, %0, %2, %3\n\t" + "mov %1, %1, lsr #28\n\t" + "add %0, %1, %0, asl #4" + : "=&r*i"(result64_hi), + "=&r*i"(result64_lo) + : "r"(ra), + "r"(rb)); + return (result64_hi); + + } + + + static inline int32 fxp_mul32_Q27(const int32 a, const int32 b) +{ + int32 result64_hi; + int32 result64_lo; + register int32 ra = (int32)a; + register int32 rb = (int32)b; + asm volatile("smull %1, %0, %2, %3\n\t" + "mov %1, %1, lsr #27\n\t" + "add %0, %1, %0, asl #5" + : "=&r*i"(result64_hi), + "=&r*i"(result64_lo) + : "r"(ra), + "r"(rb)); + return (result64_hi); + + } + + + static inline int32 fxp_mul32_Q26(const int32 a, const int32 b) +{ + int32 result64_hi; + int32 result64_lo; + register int32 ra = (int32)a; + register int32 rb = (int32)b; + asm volatile("smull %1, %0, %2, %3\n\t" + "mov %1, %1, lsr #26\n\t" + "add %0, %1, %0, asl #6" + : "=&r*i"(result64_hi), + "=&r*i"(result64_lo) + : "r"(ra), + "r"(rb)); + return (result64_hi); + + } + + + + static inline int32 fxp_mac32_Q32(int32 L_add, const int32 a, const int32 b) +{ + + int32 result64_hi; + int32 result64_lo; + register int32 ra = (int32)a; + register int32 rb = (int32)b; + register int32 rc = (int32)L_add; + + asm volatile("smull %1, %0, %2, %3\n\t" + "add %0, %0, %4" + : "=&r*i"(result64_hi), + "=&r*i"(result64_lo) + : "r"(ra), + "r"(rb), + "r"(rc)); + + return (result64_hi); + } + + static inline int32 fxp_msb32_Q32(int32 L_sub, const int32 a, const int32 b) +{ + int32 result64_hi; + int32 result64_lo; + register int32 ra = (int32)a; + register int32 rb = (int32)b; + register int32 rc = (int32)L_sub; + + asm volatile("smull %1, %0, %2, %3\n\t" + "sub %0, %4, %0" + : "=&r*i"(result64_hi), + "=&r*i"(result64_lo) + : "r"(ra), + "r"(rb), + "r"(rc)); + + + return (result64_hi); + } + + + __inline int32 pv_abs(int32 x) +{ + register int32 z; + register int32 y; + register int32 ra = x; + asm volatile( + "sub %0, %2, %2, lsr #31\n\t" + "eor %1, %0, %0, asr #31" + : "=&r*i"(z), + "=&r*i"(y) + : "r"(ra)); + + return (y); + } + + +#endif + +#ifdef __cplusplus +} +#endif + + +#endif /* PV_MP3DEC_FXD_OP_ARM_GCC_H */ + diff --git a/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_c_equivalent.h b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_c_equivalent.h new file mode 100644 index 0000000000..ba438206d8 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_c_equivalent.h @@ -0,0 +1,123 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Pathname: ./cpp/include/pv_mp3dec_fxd_op_c_equivalent.h + + Date: 12/06/2005 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +#ifndef PV_MP3DEC_FXD_OP_C_EQUIVALENT +#define PV_MP3DEC_FXD_OP_C_EQUIVALENT + + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "pvmp3_audio_type_defs.h" +#define Qfmt_31(a) (Int32)((float)a*0x7FFFFFFF) + +#define Qfmt15(x) (Int16)(x*((Int32)1<<15) + (x>=0?0.5F:-0.5F)) + + + + __inline int32 pv_abs(int32 a) + { + int32 b = (a < 0) ? -a : a; + return b; + } + + + + + __inline Int32 fxp_mul32_Q30(const Int32 a, const Int32 b) + { + return (Int32)(((int64)(a) * b) >> 30); + } + + __inline Int32 fxp_mac32_Q30(const Int32 a, const Int32 b, Int32 L_add) + { + return (L_add + (Int32)(((int64)(a) * b) >> 30)); + } + + __inline Int32 fxp_mul32_Q32(const Int32 a, const Int32 b) + { + return (Int32)(((int64)(a) * b) >> 32); + } + + + __inline Int32 fxp_mul32_Q28(const Int32 a, const Int32 b) + { + return (Int32)(((int64)(a) * b) >> 28); + } + + __inline Int32 fxp_mul32_Q27(const Int32 a, const Int32 b) + { + return (Int32)(((int64)(a) * b) >> 27); + } + + __inline Int32 fxp_mul32_Q26(const Int32 a, const Int32 b) + { + return (Int32)(((int64)(a) * b) >> 26); + } + + + __inline Int32 fxp_mac32_Q32(Int32 L_add, const Int32 a, const Int32 b) + { + return (L_add + (Int32)(((int64)(a) * b) >> 32)); + } + + __inline Int32 fxp_msb32_Q32(Int32 L_sub, const Int32 a, const Int32 b) + { + return (L_sub - ((Int32)(((int64)(a) * b) >> 32))); + } + + + __inline Int32 fxp_mul32_Q29(const Int32 a, const Int32 b) + { + return (Int32)(((int64)(a) * b) >> 29); + } + + + + + + +#ifdef __cplusplus +} +#endif + + +#endif /* PV_MP3DEC_FXD_OP_C_EQUIVALENT */ + + + diff --git a/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_msc_evc.h b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_msc_evc.h new file mode 100644 index 0000000000..271e6b740d --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pv_mp3dec_fxd_op_msc_evc.h @@ -0,0 +1,132 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Pathname: ./cpp/include/pv_mp3dec_fxd_op_msc_evc.h + + Date: 08/20/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This file select the associated fixed point functions with the OS/ARCH. + + +------------------------------------------------------------------------------ +*/ + +#ifndef PV_MP3DEC_FXD_OP_MSC_EVC_H +#define PV_MP3DEC_FXD_OP_MSC_EVC_H + + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "pvmp3_audio_type_defs.h" + + +#if (defined(PV_ARM_MSC_EVC_V5)||defined(PV_ARM_MSC_EVC_V4)) +#include "armintr.h" +#include "cmnintrin.h" + + + __inline int32 fxp_mul32_Q30(const int32 a, const int32 b) + { + return (int32)(((int64)(a) * b) >> 30); + } + + + __inline int32 fxp_mac32_Q30(const int32 a, const int32 b, int32 L_add) + { + return (L_add + (int32)(((int64)(a) * b) >> 30)); + } + + +#define Qfmt_31(a) (int32)(a*0x7FFFFFFF + (a>=0?0.5F:-0.5F)) + +#define Qfmt15(x) (Int16)(x*((int32)1<<15) + (x>=0?0.5F:-0.5F)) + +#define fxp_mul32_Q32( a, b) _MulHigh( b, a) + + + + __inline int32 fxp_mul32_Q28(const int32 a, const int32 b) + { + return (int32)(((int64)(a) * b) >> 28); + } + + + __inline int32 fxp_mul32_Q27(const int32 a, const int32 b) + { + return (int32)(((int64)(a) * b) >> 27); + } + + + + __inline int32 fxp_mul32_Q26(const int32 a, const int32 b) + { + return (int32)(((int64)(a) * b) >> 26); + } + + + __inline int32 fxp_mac32_Q32(int32 L_add, const int32 a, const int32 b) + { + return (L_add + _MulHigh(b, a)); + } + + + __inline int32 fxp_msb32_Q32(int32 L_sub, const int32 a, const int32 b) + { + return (L_sub - _MulHigh(b, a)); + } + + + + __inline int32 fxp_mul32_Q29(const int32 a, const int32 b) + { + return (int32)(((int64)(a) * b) >> 29); + } + + + + __inline int32 pv_abs(int32 a) + { + int32 b = (a < 0) ? -a : a; + return b; + } + + + +#endif + +#ifdef __cplusplus +} +#endif + + +#endif /* PV_MP3DEC_FXD_OP_MSC_EVC_H */ + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_alias_reduction.cpp b/ohos-specific/pvmp3dec/src/pvmp3_alias_reduction.cpp new file mode 100644 index 0000000000..32c76c66d9 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_alias_reduction.cpp @@ -0,0 +1,261 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_alias_reduction.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + int32 *input_buffer, Ptr to fequency lines of current channel + struct gr_info_s *gr_info, structure with granuke information for the + input + mp3Header *info mp3 header information + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + Alias Reduction + + + + Alias reduction before processing by the IMDCT + + Csi + + >---------0---------0--------> + \ / - + Cai \ / + \ / + \ / + \ + / \ + Cai / \ + / \ + + >--------0---------0----------> + Csi + + + Aliasing Butterfly + Alias reduction is not applied to short blocks + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + 1 ci + csi = ---------------- csi = ---------------- + sqrt( 1 + (ci^2)) sqrt( 1 + (ci^2)) + + + ci = -0.6, -0.535, -0.33, -0.185, -0.095, -0.041, -0.0142, -0.0037 + + ------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_alias_reduction.h" +#include "pv_mp3dec_fxd_op.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define NUM_BUTTERFLIES 8 + +#define Q31_fmt(a) (int32(double(0x7FFFFFFF)*a)) + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ +const int32 c_signal [ NUM_BUTTERFLIES ] = +{ + + Q31_fmt(0.85749292571254f), Q31_fmt(0.88174199731771f), + Q31_fmt(0.94962864910273f), Q31_fmt(0.98331459249179f), + Q31_fmt(0.99551781606759f), Q31_fmt(0.99916055817815f), + Q31_fmt(0.99989919524445f), Q31_fmt(0.99999315507028f) + +}; + + +const int32 c_alias [ NUM_BUTTERFLIES ] = +{ + + Q31_fmt(-0.51449575542753f), Q31_fmt(-0.47173196856497f), + Q31_fmt(-0.31337745420390f), Q31_fmt(-0.18191319961098f), + Q31_fmt(-0.09457419252642f), Q31_fmt(-0.04096558288530f), + Q31_fmt(-0.01419856857247f), Q31_fmt(-0.00369997467376f) +}; + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_alias_reduction(int32 *input_buffer, /* Ptr to spec values of current channel */ + granuleInfo *gr_info, + int32 *used_freq_lines, + mp3Header *info) +{ + int32 *ptr1; + int32 *ptr2; + int32 *ptr3; + int32 *ptr4; + const int32 *ptr_csi; + const int32 *ptr_csa; + int32 sblim; + + int32 i, j; + + *used_freq_lines = fxp_mul32_Q32(*used_freq_lines << 16, (int32)(0x7FFFFFFF / (float)18 - 1.0f)) >> 15; + + + if (gr_info->window_switching_flag && gr_info->block_type == 2) + { + if (gr_info->mixed_block_flag) + { + sblim = ((info->version_x == MPEG_2_5) && (info->sampling_frequency == 2)) ? 3 : 1; + } + else + { + return; /* illegal parameter */ + } + } + else + { + sblim = *used_freq_lines + 1; + + if (sblim > SUBBANDS_NUMBER - 1) + { + sblim = SUBBANDS_NUMBER - 1; /* default */ + } + + } + + + ptr3 = &input_buffer[17]; + ptr4 = &input_buffer[18]; + ptr_csi = c_signal; + ptr_csa = c_alias; + + /* NUM_BUTTERFLIES (=8) butterflies between each pair of sub-bands*/ + + for (i = NUM_BUTTERFLIES >> 1; i != 0; i--) + { + int32 csi1 = *ptr_csi++; + int32 csi2 = *ptr_csi++; + int32 csa1 = *ptr_csa++; + int32 csa2 = *ptr_csa++; + + ptr1 = ptr3; + ptr3 -= 2; + ptr2 = ptr4; + ptr4 += 2; + + /* + * "sblim" alias-reduction operations between each + * pair of sub-bands + */ + + for (j = sblim >> 1; j != 0; j--) + { + int32 y = *ptr2; + int32 x = *ptr1 << 1; + *ptr1-- = fxp_msb32_Q32(fxp_mul32_Q32(x, csi1), y << 1, csa1); + *ptr2++ = fxp_mac32_Q32(fxp_mul32_Q32(y << 1, csi1), x, csa1); + y = *ptr2; + x = *ptr1 << 1; + *ptr1 = fxp_msb32_Q32(fxp_mul32_Q32(x, csi2), y << 1, csa2); + *ptr2 = fxp_mac32_Q32(fxp_mul32_Q32(y << 1, csi2), x, csa2); + ptr1 += 19; + ptr2 += 17; + y = *ptr2; + x = *ptr1 << 1; + *ptr1-- = fxp_msb32_Q32(fxp_mul32_Q32(x, csi1), y << 1, csa1); + *ptr2++ = fxp_mac32_Q32(fxp_mul32_Q32(y << 1, csi1), x, csa1); + y = *ptr2; + x = *ptr1 << 1; + *ptr1 = fxp_msb32_Q32(fxp_mul32_Q32(x, csi2), y << 1, csa2); + *ptr2 = fxp_mac32_Q32(fxp_mul32_Q32(y << 1, csi2), x, csa2); + ptr1 += 19; + ptr2 += 17; + + } + + if (sblim & 1) + { + int32 x = *ptr1 << 1; + int32 y = *ptr2; + *ptr1-- = fxp_msb32_Q32(fxp_mul32_Q32(x, csi1), y << 1, csa1); + *ptr2++ = fxp_mac32_Q32(fxp_mul32_Q32(y << 1, csi1), x, csa1); + + x = *ptr1 << 1; + y = *ptr2; + *ptr1 = fxp_msb32_Q32(fxp_mul32_Q32(x, csi2), y << 1, csa2); + *ptr2 = fxp_mac32_Q32(fxp_mul32_Q32(y << 1, csi2), x, csa2); + } + } + +} diff --git a/ohos-specific/pvmp3dec/src/pvmp3_alias_reduction.h b/ohos-specific/pvmp3dec/src/pvmp3_alias_reduction.h new file mode 100644 index 0000000000..2292d5f6aa --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_alias_reduction.h @@ -0,0 +1,100 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_alias_reduction.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_ALIAS_REDUCTION_H +#define PVMP3_ALIAS_REDUCTION_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_alias_reduction(int32 *input_buffer, + granuleInfo *gr_info, + int32 *used_freq_lines, + mp3Header *info); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_crc.cpp b/ohos-specific/pvmp3dec/src/pvmp3_crc.cpp new file mode 100644 index 0000000000..20d0d8291f --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_crc.cpp @@ -0,0 +1,161 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_crc.cpp + + Functions: + getbits_crc + calculate_crc + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +getbits_crc + +Input + tbits *inputStream, bit stream structure + int32 neededBits, number of bits to read from the bit stream + uint32 *crc, memory location holding calculated crc value + uint32 crc_enabled flag to enable/disable crc checking + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +calculate_crc + +Input + uint32 data, data vector + uint32 length, number of element upon the crc will be calculated + uint32 *crc, memory location holding calculated crc value + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + + ------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_getbits.h" +#include "pvmp3_crc.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +uint32 getbits_crc(tmp3Bits *inputStream, /* bit stream structure */ + int32 neededBits, /* number of bits to read from the bit stream */ + uint32 *crc, + uint32 crc_enabled) +{ + uint32 bits = getNbits(inputStream, neededBits); + + if (crc_enabled) + { + calculate_crc(bits, neededBits, crc); + } + return(bits); +} + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void calculate_crc(uint32 data, + uint32 length, + uint32 *crc) +{ + uint32 carry; + uint32 masking = 1 << length; + + while ((masking >>= 1)) + { + carry = *crc & 0x8000; + *crc <<= 1; + if (!carry ^ !(data & masking)) + { + *crc ^= CRC16_POLYNOMIAL; + } + } + *crc &= 0xffff; +} + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_crc.h b/ohos-specific/pvmp3dec/src/pvmp3_crc.h new file mode 100644 index 0000000000..b7c277adfb --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_crc.h @@ -0,0 +1,110 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_crc.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_CRC_H +#define PVMP3_CRC_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" +#include "s_mp3bits.h" +#include "pvmp3decoder_api.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ +#define CRC16_POLYNOMIAL 0x8005 + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + uint32 getbits_crc(tmp3Bits *inputStream, + int32 neededBits, + uint32 *crc, + uint32 crc_enabled); + + + void calculate_crc(uint32 data, + uint32 length, + uint32 *crc); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_dct_16.cpp b/ohos-specific/pvmp3dec/src/pvmp3_dct_16.cpp new file mode 100644 index 0000000000..a71efc4b4f --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_dct_16.cpp @@ -0,0 +1,410 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_dct_16.cpp + + Functions: + dct_16 + pv_merge_in_place_N32 + pv_split + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + dct_16 + +Input + int32 vec[], input vector length 16 + Int flag processing direction: forward (1), backward ( 0) + Returns + + int32 vec[], dct length 16 + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + pv_merge_in_place_N32 + +Input + int32 vec[], input vector length 16 + + Returns + + int32 vec[], merged output of two dct 16 to create a dct 32 + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + pv_split + +Input + int32 vec[], input vector length 16 + + Returns + + int32 vec[], splitted even/odd and pre processing rotation + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + dct 16 and tools to assemble a dct32 output + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + +#if ( !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) ) +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dct_16.h" +#include "pv_mp3dec_fxd_op.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define Qfmt(a) (int32)(a*((int32)1<<27)) + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ +const int32 CosTable_dct32[16] = +{ + Qfmt_31(0.50060299823520F) , Qfmt_31(0.50547095989754F) , + Qfmt_31(0.51544730992262F) , Qfmt_31(0.53104259108978F) , + Qfmt_31(0.55310389603444F) , Qfmt_31(0.58293496820613F) , + Qfmt_31(0.62250412303566F) , Qfmt_31(0.67480834145501F) , + Qfmt_31(0.74453627100230F) , Qfmt_31(0.83934964541553F) , + + Qfmt(0.97256823786196F) , Qfmt(1.16943993343288F) , + Qfmt(1.48416461631417F) , Qfmt(2.05778100995341F) , + Qfmt(3.40760841846872F) , Qfmt(10.19000812354803F) +}; + + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_dct_16(int32 vec[], int32 flag) +{ + int32 tmp0; + int32 tmp1; + int32 tmp2; + int32 tmp3; + int32 tmp4; + int32 tmp5; + int32 tmp6; + int32 tmp7; + int32 tmp_o0; + int32 tmp_o1; + int32 tmp_o2; + int32 tmp_o3; + int32 tmp_o4; + int32 tmp_o5; + int32 tmp_o6; + int32 tmp_o7; + int32 itmp_e0; + int32 itmp_e1; + int32 itmp_e2; + + /* split input vector */ + + tmp_o0 = fxp_mul32_Q32((vec[ 0] - vec[15]), Qfmt_31(0.50241928618816F)); + tmp0 = vec[ 0] + vec[15]; + + tmp_o7 = fxp_mul32_Q32((vec[ 7] - vec[ 8]) << 3, Qfmt_31(0.63764357733614F)); + tmp7 = vec[ 7] + vec[ 8]; + + itmp_e0 = fxp_mul32_Q32((tmp0 - tmp7), Qfmt_31(0.50979557910416F)); + tmp7 = (tmp0 + tmp7); + + tmp_o1 = fxp_mul32_Q32((vec[ 1] - vec[14]), Qfmt_31(0.52249861493969F)); + tmp1 = vec[ 1] + vec[14]; + + tmp_o6 = fxp_mul32_Q32((vec[ 6] - vec[ 9]) << 1, Qfmt_31(0.86122354911916F)); + tmp6 = vec[ 6] + vec[ 9]; + + + + itmp_e1 = (tmp1 + tmp6); + tmp6 = fxp_mul32_Q32((tmp1 - tmp6), Qfmt_31(0.60134488693505F)); + + + + tmp_o2 = fxp_mul32_Q32((vec[ 2] - vec[13]), Qfmt_31(0.56694403481636F)); + tmp2 = vec[ 2] + vec[13]; + tmp_o5 = fxp_mul32_Q32((vec[ 5] - vec[10]) << 1, Qfmt_31(0.53033884299517F)); + tmp5 = vec[ 5] + vec[10]; + + itmp_e2 = (tmp2 + tmp5); + tmp5 = fxp_mul32_Q32((tmp2 - tmp5), Qfmt_31(0.89997622313642F)); + + tmp_o3 = fxp_mul32_Q32((vec[ 3] - vec[12]), Qfmt_31(0.64682178335999F)); + tmp3 = vec[ 3] + vec[12]; + tmp_o4 = fxp_mul32_Q32((vec[ 4] - vec[11]), Qfmt_31(0.78815462345125F)); + tmp4 = vec[ 4] + vec[11]; + + tmp1 = (tmp3 + tmp4); + tmp4 = fxp_mul32_Q32((tmp3 - tmp4) << 2, Qfmt_31(0.64072886193538F)); + + /* split even part of tmp_e */ + + tmp0 = (tmp7 + tmp1); + tmp1 = fxp_mul32_Q32((tmp7 - tmp1), Qfmt_31(0.54119610014620F)); + + tmp3 = fxp_mul32_Q32((itmp_e1 - itmp_e2) << 1, Qfmt_31(0.65328148243819F)); + tmp7 = (itmp_e1 + itmp_e2); + + vec[ 0] = (tmp0 + tmp7) >> 1; + vec[ 8] = fxp_mul32_Q32((tmp0 - tmp7), Qfmt_31(0.70710678118655F)); + tmp0 = fxp_mul32_Q32((tmp1 - tmp3) << 1, Qfmt_31(0.70710678118655F)); + vec[ 4] = tmp1 + tmp3 + tmp0; + vec[12] = tmp0; + + /* split odd part of tmp_e */ + + tmp1 = fxp_mul32_Q32((itmp_e0 - tmp4) << 1, Qfmt_31(0.54119610014620F)); + tmp7 = itmp_e0 + tmp4; + + tmp3 = fxp_mul32_Q32((tmp6 - tmp5) << 2, Qfmt_31(0.65328148243819F)); + tmp6 += tmp5; + + tmp4 = fxp_mul32_Q32((tmp7 - tmp6) << 1, Qfmt_31(0.70710678118655F)); + tmp6 += tmp7; + tmp7 = fxp_mul32_Q32((tmp1 - tmp3) << 1, Qfmt_31(0.70710678118655F)); + + tmp1 += tmp3 + tmp7; + vec[ 2] = tmp1 + tmp6; + vec[ 6] = tmp1 + tmp4; + vec[10] = tmp7 + tmp4; + vec[14] = tmp7; + + + // dct8; + + tmp1 = fxp_mul32_Q32((tmp_o0 - tmp_o7) << 1, Qfmt_31(0.50979557910416F)); + tmp7 = tmp_o0 + tmp_o7; + + tmp6 = tmp_o1 + tmp_o6; + tmp_o1 = fxp_mul32_Q32((tmp_o1 - tmp_o6) << 1, Qfmt_31(0.60134488693505F)); + + tmp5 = tmp_o2 + tmp_o5; + tmp_o5 = fxp_mul32_Q32((tmp_o2 - tmp_o5) << 1, Qfmt_31(0.89997622313642F)); + + tmp0 = fxp_mul32_Q32((tmp_o3 - tmp_o4) << 3, Qfmt_31(0.6407288619354F)); + tmp4 = tmp_o3 + tmp_o4; + + if (!flag) + { + tmp7 = -tmp7; + tmp1 = -tmp1; + tmp6 = -tmp6; + tmp_o1 = -tmp_o1; + tmp5 = -tmp5; + tmp_o5 = -tmp_o5; + tmp4 = -tmp4; + tmp0 = -tmp0; + } + + + tmp2 = fxp_mul32_Q32((tmp1 - tmp0) << 1, Qfmt_31(0.54119610014620F)); + tmp0 += tmp1; + tmp1 = fxp_mul32_Q32((tmp7 - tmp4) << 1, Qfmt_31(0.54119610014620F)); + tmp7 += tmp4; + tmp4 = fxp_mul32_Q32((tmp6 - tmp5) << 2, Qfmt_31(0.65328148243819F)); + tmp6 += tmp5; + tmp5 = fxp_mul32_Q32((tmp_o1 - tmp_o5) << 2, Qfmt_31(0.65328148243819F)); + tmp_o1 += tmp_o5; + + + vec[13] = fxp_mul32_Q32((tmp1 - tmp4) << 1, Qfmt_31(0.70710678118655F)); + vec[ 5] = tmp1 + tmp4 + vec[13]; + + vec[ 9] = fxp_mul32_Q32((tmp7 - tmp6) << 1, Qfmt_31(0.70710678118655F)); + vec[ 1] = tmp7 + tmp6; + + tmp4 = fxp_mul32_Q32((tmp0 - tmp_o1) << 1, Qfmt_31(0.70710678118655F)); + tmp0 += tmp_o1; + tmp6 = fxp_mul32_Q32((tmp2 - tmp5) << 1, Qfmt_31(0.70710678118655F)); + tmp2 += tmp5 + tmp6; + tmp0 += tmp2; + + vec[ 1] += tmp0; + vec[ 3] = tmp0 + vec[ 5]; + tmp2 += tmp4; + vec[ 5] = tmp2 + vec[ 5]; + vec[ 7] = tmp2 + vec[ 9]; + tmp4 += tmp6; + vec[ 9] = tmp4 + vec[ 9]; + vec[11] = tmp4 + vec[13]; + vec[13] = tmp6 + vec[13]; + vec[15] = tmp6; + +} +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +void pvmp3_merge_in_place_N32(int32 vec[]) +{ + + + int32 temp0; + int32 temp1; + int32 temp2; + int32 temp3; + + temp0 = vec[14]; + vec[14] = vec[ 7]; + temp1 = vec[12]; + vec[12] = vec[ 6]; + temp2 = vec[10]; + vec[10] = vec[ 5]; + temp3 = vec[ 8]; + vec[ 8] = vec[ 4]; + vec[ 6] = vec[ 3]; + vec[ 4] = vec[ 2]; + vec[ 2] = vec[ 1]; + + vec[ 1] = (vec[16] + vec[17]); + vec[16] = temp3; + vec[ 3] = (vec[18] + vec[17]); + vec[ 5] = (vec[19] + vec[18]); + vec[18] = vec[9]; + + vec[ 7] = (vec[20] + vec[19]); + vec[ 9] = (vec[21] + vec[20]); + vec[20] = temp2; + temp2 = vec[13]; + temp3 = vec[11]; + vec[11] = (vec[22] + vec[21]); + vec[13] = (vec[23] + vec[22]); + vec[22] = temp3; + temp3 = vec[15]; + + vec[15] = (vec[24] + vec[23]); + vec[17] = (vec[25] + vec[24]); + vec[19] = (vec[26] + vec[25]); + vec[21] = (vec[27] + vec[26]); + vec[23] = (vec[28] + vec[27]); + vec[24] = temp1; + vec[25] = (vec[29] + vec[28]); + vec[26] = temp2; + vec[27] = (vec[30] + vec[29]); + vec[28] = temp0; + vec[29] = (vec[30] + vec[31]); + vec[30] = temp3; +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + + + +void pvmp3_split(int32 *vect) +{ + + int32 i; + const int32 *pt_cosTerms = &CosTable_dct32[15]; + int32 *pt_vect = vect; + int32 *pt_vect_2 = pt_vect - 1; + + for (i = 3; i != 0; i--) + { + int32 tmp2 = *(pt_vect); + int32 tmp1 = *(pt_vect_2); + int32 cosx = *(pt_cosTerms--); + *(pt_vect_2--) = (tmp1 + tmp2); + *(pt_vect++) = fxp_mul32_Q27((tmp1 - tmp2), cosx); + + tmp2 = *(pt_vect); + tmp1 = *(pt_vect_2); + cosx = *(pt_cosTerms--); + *(pt_vect_2--) = (tmp1 + tmp2); + *(pt_vect++) = fxp_mul32_Q27((tmp1 - tmp2), cosx); + + } + + for (i = 5; i != 0; i--) + { + int32 tmp2 = *(pt_vect); + int32 tmp1 = *(pt_vect_2); + int32 cosx = *(pt_cosTerms--); + *(pt_vect_2--) = (tmp1 + tmp2); + *(pt_vect++) = fxp_mul32_Q32((tmp1 - tmp2) << 1, cosx); + + tmp2 = *(pt_vect); + tmp1 = *(pt_vect_2); + cosx = *(pt_cosTerms--); + *(pt_vect_2--) = (tmp1 + tmp2); + *(pt_vect++) = fxp_mul32_Q32((tmp1 - tmp2) << 1, cosx); + } + +} + +#endif diff --git a/ohos-specific/pvmp3dec/src/pvmp3_dct_16.h b/ohos-specific/pvmp3dec/src/pvmp3_dct_16.h new file mode 100644 index 0000000000..e8bf76ed35 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_dct_16.h @@ -0,0 +1,102 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_dct_16.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_DCT_16_H +#define PVMP3_DCT_16_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_dct_16(int32 vec[], int32 flag); + + void pvmp3_merge_in_place_N32(int32 vec[]); + + void pvmp3_split(int32 *vect); + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_dct_6.cpp b/ohos-specific/pvmp3dec/src/pvmp3_dct_6.cpp new file mode 100644 index 0000000000..4c5fb0300c --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_dct_6.cpp @@ -0,0 +1,152 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_dct6.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + Int32 vec[] vector of 6 32-bit integers +Returns + Int32 vec[] dct computation in-place + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + Returns the dct of length 6 of the input vector + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_mdct_6.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define Qfmt30(a) (Int32)(a*((Int32)1<<30) + (a>=0?0.5F:-0.5F)) + +#define cos_pi_6 Qfmt30( 0.86602540378444f) +#define cos_2_pi_6 Qfmt30( 0.5f) +#define cos_7_pi_12 Qfmt30( -0.25881904510252f) +#define cos_3_pi_12 Qfmt30( 0.70710678118655f) +#define cos_11_pi_12 Qfmt30( -0.96592582628907f) + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_dct_6(int32 vec[]) +{ + + Int32 tmp0; + Int32 tmp1; + Int32 tmp2; + Int32 tmp3; + Int32 tmp4; + Int32 tmp5; + + + /* split input vector */ + + tmp0 = vec[5] + vec[0]; + tmp5 = vec[5] - vec[0]; + tmp1 = vec[4] + vec[1]; + tmp4 = vec[4] - vec[1]; + tmp2 = vec[3] + vec[2]; + tmp3 = vec[3] - vec[2]; + + vec[0] = tmp0 + tmp2 ; + vec[2] = fxp_mul32_Q30(tmp0 - tmp2, cos_pi_6); + vec[4] = (vec[0] >> 1) - tmp1; + vec[0] += tmp1; + + tmp0 = fxp_mul32_Q30(tmp3, cos_7_pi_12); + tmp0 = fxp_mac32_Q30(tmp4, -cos_3_pi_12, tmp0); + vec[1] = fxp_mac32_Q30(tmp5, cos_11_pi_12, tmp0); + + vec[3] = fxp_mul32_Q30((tmp3 + tmp4 - tmp5), cos_3_pi_12); + tmp0 = fxp_mul32_Q30(tmp3, cos_11_pi_12); + tmp0 = fxp_mac32_Q30(tmp4, cos_3_pi_12, tmp0); + vec[5] = fxp_mac32_Q30(tmp5, cos_7_pi_12, tmp0); + +} + + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_dct_9.cpp b/ohos-specific/pvmp3dec/src/pvmp3_dct_9.cpp new file mode 100644 index 0000000000..ce3ec64a64 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_dct_9.cpp @@ -0,0 +1,167 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_dct_9.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + int32 vec[] vector of 9 32-bit integers +Returns + int32 vec[] dct computation in-place + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + Returns the dct of length 9 of the input vector + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + +#if ( !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) && !defined(PV_ARM_V5) && !defined(PV_ARM_V4) ) +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_mdct_18.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define Qfmt31(a) (int32)(a*(0x7FFFFFFF)) + +#define cos_pi_9 Qfmt31( 0.93969262078591f) +#define cos_2pi_9 Qfmt31( 0.76604444311898f) +#define cos_4pi_9 Qfmt31( 0.17364817766693f) +#define cos_5pi_9 Qfmt31(-0.17364817766693f) +#define cos_7pi_9 Qfmt31(-0.76604444311898f) +#define cos_8pi_9 Qfmt31(-0.93969262078591f) +#define cos_pi_6 Qfmt31( 0.86602540378444f) +#define cos_5pi_6 Qfmt31(-0.86602540378444f) +#define cos_5pi_18 Qfmt31( 0.64278760968654f) +#define cos_7pi_18 Qfmt31( 0.34202014332567f) +#define cos_11pi_18 Qfmt31(-0.34202014332567f) +#define cos_13pi_18 Qfmt31(-0.64278760968654f) +#define cos_17pi_18 Qfmt31(-0.98480775301221f) + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_dct_9(int32 vec[]) +{ + + /* split input vector */ + + int32 tmp0 = vec[8] + vec[0]; + int32 tmp8 = vec[8] - vec[0]; + int32 tmp1 = vec[7] + vec[1]; + int32 tmp7 = vec[7] - vec[1]; + int32 tmp2 = vec[6] + vec[2]; + int32 tmp6 = vec[6] - vec[2]; + int32 tmp3 = vec[5] + vec[3]; + int32 tmp5 = vec[5] - vec[3]; + + vec[0] = (tmp0 + tmp2 + tmp3) + (tmp1 + vec[4]); + vec[6] = ((tmp0 + tmp2 + tmp3) >> 1) - (tmp1 + vec[4]); + vec[2] = (tmp1 >> 1) - vec[4]; + vec[4] = -vec[2]; + vec[8] = -vec[2]; + vec[4] = fxp_mac32_Q32(vec[4], tmp0 << 1, cos_2pi_9); + vec[8] = fxp_mac32_Q32(vec[8], tmp0 << 1, cos_4pi_9); + vec[2] = fxp_mac32_Q32(vec[2], tmp0 << 1, cos_pi_9); + vec[2] = fxp_mac32_Q32(vec[2], tmp2 << 1, cos_5pi_9); + vec[4] = fxp_mac32_Q32(vec[4], tmp2 << 1, cos_8pi_9); + vec[8] = fxp_mac32_Q32(vec[8], tmp2 << 1, cos_2pi_9); + vec[8] = fxp_mac32_Q32(vec[8], tmp3 << 1, cos_8pi_9); + vec[4] = fxp_mac32_Q32(vec[4], tmp3 << 1, cos_4pi_9); + vec[2] = fxp_mac32_Q32(vec[2], tmp3 << 1, cos_7pi_9); + + vec[1] = fxp_mul32_Q32(tmp5 << 1, cos_11pi_18); + vec[1] = fxp_mac32_Q32(vec[1], tmp6 << 1, cos_13pi_18); + vec[1] = fxp_mac32_Q32(vec[1], tmp7 << 1, cos_5pi_6); + vec[1] = fxp_mac32_Q32(vec[1], tmp8 << 1, cos_17pi_18); + vec[3] = fxp_mul32_Q32((tmp5 + tmp6 - tmp8) << 1, cos_pi_6); + vec[5] = fxp_mul32_Q32(tmp5 << 1, cos_17pi_18); + vec[5] = fxp_mac32_Q32(vec[5], tmp6 << 1, cos_7pi_18); + vec[5] = fxp_mac32_Q32(vec[5], tmp7 << 1, cos_pi_6); + vec[5] = fxp_mac32_Q32(vec[5], tmp8 << 1, cos_13pi_18); + vec[7] = fxp_mul32_Q32(tmp5 << 1, cos_5pi_18); + vec[7] = fxp_mac32_Q32(vec[7], tmp6 << 1, cos_17pi_18); + vec[7] = fxp_mac32_Q32(vec[7], tmp7 << 1, cos_pi_6); + vec[7] = fxp_mac32_Q32(vec[7], tmp8 << 1, cos_11pi_18); + +} + + + +#endif // If not assembly diff --git a/ohos-specific/pvmp3dec/src/pvmp3_dec_defs.h b/ohos-specific/pvmp3dec/src/pvmp3_dec_defs.h new file mode 100644 index 0000000000..d3f160931e --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_dec_defs.h @@ -0,0 +1,200 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_dec_defs.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This include file has the mp3 decoder common defines. + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_DEC_DEFS_H +#define PVMP3_DEC_DEFS_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" +#include "pvmp3decoder_api.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ +#define module(x, POW2) ((x)&(POW2-1)) +#define OSCL_UNUSED_ARG(x) (void)(x) + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ +#define BUFSIZE 8192 // big enough to hold 4608 bytes == biggest mp3 frame + +#define CHAN 2 +#define GRAN 2 + + +#define SUBBANDS_NUMBER 32 +#define FILTERBANK_BANDS 18 +#define HAN_SIZE 512 + + +/* MPEG Header Definitions - ID Bit Values */ + +#define MPEG_1 0 +#define MPEG_2 1 +#define MPEG_2_5 2 +#define INVALID_VERSION -1 + +/* MPEG Header Definitions - Mode Values */ + +#define MPG_MD_STEREO 0 +#define MPG_MD_JOINT_STEREO 1 +#define MPG_MD_DUAL_CHANNEL 2 +#define MPG_MD_MONO 3 + + + +#define LEFT 0 +#define RIGHT 1 + + +#define SYNC_WORD (int32)0x7ff +#define SYNC_WORD_LNGTH 11 + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + /*---------------------------------------------------------------------------- + ; STRUCTURES TYPEDEF'S + ----------------------------------------------------------------------------*/ + + /* Header Information Structure */ + + typedef struct + { + int32 version_x; + int32 layer_description; + int32 error_protection; + int32 bitrate_index; + int32 sampling_frequency; + int32 padding; + int32 extension; + int32 mode; + int32 mode_ext; + int32 copyright; + int32 original; + int32 emphasis; + } mp3Header; + + + /* Layer III side information. */ + + typedef struct + { + uint32 part2_3_length; + uint32 big_values; + int32 global_gain; + uint32 scalefac_compress; + uint32 window_switching_flag; + uint32 block_type; + uint32 mixed_block_flag; + uint32 table_select[3]; + uint32 subblock_gain[3]; + uint32 region0_count; + uint32 region1_count; + uint32 preflag; + uint32 scalefac_scale; + uint32 count1table_select; + + } granuleInfo; + + typedef struct + { + uint32 scfsi[4]; + granuleInfo gran[2]; + + } channelInfo; + + /* Layer III side info. */ + + typedef struct + { + uint32 main_data_begin; + uint32 private_bits; + channelInfo ch[2]; + + } mp3SideInfo; + + /* Layer III scale factors. */ + typedef struct + { + int32 l[23]; /* [cb] */ + int32 s[3][13]; /* [window][cb] */ + + } mp3ScaleFactors; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_decode_header.cpp b/ohos-specific/pvmp3dec/src/pvmp3_decode_header.cpp new file mode 100644 index 0000000000..d443b7ccfe --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_decode_header.cpp @@ -0,0 +1,194 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_decode_header.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + tbits *inputStream, bit stream + mp3Header *info, + uint32 *crc + Returns + + mp3Header *info, structure holding the parsed mp3 header info + uint32 *crc initialized crc computation + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + gets mp3 header information + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_decode_header.h" +#include "pvmp3_crc.h" +#include "pvmp3_getbits.h" +#include "pvmp3_seek_synch.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +ERROR_CODE pvmp3_decode_header(tmp3Bits *inputStream, + mp3Header *info, + uint32 *crc) +{ + + ERROR_CODE err = NO_DECODING_ERROR; + uint32 temp; + + /* + * Verify that at least the header is complete + * Note that SYNC_WORD_LNGTH is in unit of bits, but inputBufferCurrentLength + * is in unit of bytes. + */ + if (inputStream->inputBufferCurrentLength < ((SYNC_WORD_LNGTH + 21) >> 3)) + { + return NO_ENOUGH_MAIN_DATA_ERROR; + } + + /* + * MPEG Audio Version ID + */ + temp = getUpTo17bits(inputStream, SYNC_WORD_LNGTH); + if ((temp & SYNC_WORD) != SYNC_WORD) + { + err = pvmp3_header_sync(inputStream); + + if (err != NO_DECODING_ERROR) + { + return err; + } + } + + temp = getNbits(inputStream, 21); // to avoid multiple bitstream accesses + + + switch (temp >> 19) /* 2 */ + { + case 0: + info->version_x = MPEG_2_5; + break; + case 2: + info->version_x = MPEG_2; + break; + case 3: + info->version_x = MPEG_1; + break; + default: + info->version_x = INVALID_VERSION; + err = UNSUPPORTED_LAYER; + break; + } + + info->layer_description = 4 - ((temp << 13) >> 30); /* 2 */ + info->error_protection = !((temp << 15) >> 31); /* 1 */ + + if (info->error_protection) + { + *crc = 0xffff; /* CRC start value */ + calculate_crc((temp << 16) >> 16, 16, crc); + } + + info->bitrate_index = (temp << 16) >> 28; /* 4 */ + info->sampling_frequency = (temp << 20) >> 30; /* 2 */ + info->padding = (temp << 22) >> 31; /* 1 */ + info->extension = (temp << 23) >> 31; /* 1 */ + info->mode = (temp << 24) >> 30; /* 2 */ + info->mode_ext = (temp << 26) >> 30; /* 2 */ + info->copyright = (temp << 27) >> 31; /* 1 */ + info->original = (temp << 28) >> 31; /* 1 */ + info->emphasis = (temp << 30) >> 30; /* 2 */ + + + if (!info->bitrate_index || info->sampling_frequency == 3) + { + err = UNSUPPORTED_FREE_BITRATE; + } + + return(err); +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_decode_header.h b/ohos-specific/pvmp3dec/src/pvmp3_decode_header.h new file mode 100644 index 0000000000..2c2e89e4e7 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_decode_header.h @@ -0,0 +1,101 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_decode_header.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_DECODE_HEADER_H +#define PVMP3_DECODE_HEADER_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" +#include "pvmp3_dec_defs.h" +#include "s_mp3bits.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + ERROR_CODE pvmp3_decode_header(tmp3Bits *inputStream, + mp3Header *info, + uint32 *crc); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_decode_huff_cw.cpp b/ohos-specific/pvmp3dec/src/pvmp3_decode_huff_cw.cpp new file mode 100644 index 0000000000..6e45a18a83 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_decode_huff_cw.cpp @@ -0,0 +1,758 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_decode_huff_cw.cpp + + Funtions: + pvmp3_decode_huff_cw_tab0 + pvmp3_decode_huff_cw_tab1 + pvmp3_decode_huff_cw_tab2 + pvmp3_decode_huff_cw_tab3 + pvmp3_decode_huff_cw_tab5 + pvmp3_decode_huff_cw_tab6 + pvmp3_decode_huff_cw_tab7 + pvmp3_decode_huff_cw_tab8 + pvmp3_decode_huff_cw_tab9 + pvmp3_decode_huff_cw_tab10 + pvmp3_decode_huff_cw_tab11 + pvmp3_decode_huff_cw_tab12 + pvmp3_decode_huff_cw_tab13 + pvmp3_decode_huff_cw_tab15 + pvmp3_decode_huff_cw_tab16 + pvmp3_decode_huff_cw_tab24 + pvmp3_decode_huff_cw_tab32 + pvmp3_decode_huff_cw_tab33 + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Inputs: + BITS *pMainData = pointer to input mp3 Main data bit stream + + + Outputs: + cw = bit field extracted from a leaf entry of packed mp3 Huffman Tables + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + These functions are used to decode huffman codewords from the input + bitstream using combined binary search and look-up table approach. + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + + [2] Introduction to Algorithms, + Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest. + The MIT press, 1990 + + [3] "Selecting an Optimal Huffman Decoder for AAC", + Vladimir Z. Mesarovic, et al. + AES 111th Convention, September 21-24, 2001, New York, USA + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_tables.h" +#include "pvmp3_getbits.h" +#include "pvmp3_decode_huff_cw.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +uint16 pvmp3_decode_huff_cw_tab0(tmp3Bits *pMainData) +{ + OSCL_UNUSED_ARG(pMainData); + return(0); + +} + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab1(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo9bits(pMainData, 3); /* hufftable1 */ + + cw = *(huffTable_1 + tmp); + pMainData->usedBits -= (3 - (cw & 0xFF)); + return(cw >> 8); + +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab2(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo9bits(pMainData, 6); /* huffTable_2,3 */ + + if (tmp >> 3) + { + tmp = (tmp >> 3) - 1; + } + else + { + tmp = tmp + 7; + } + + cw = *(huffTable_2 + tmp); + pMainData->usedBits -= (6 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab3(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo9bits(pMainData, 6); /* huffTable_2,3 */ + + if (tmp >> 3) + { + tmp = (tmp >> 3) - 1; + } + else + { + tmp = tmp + 7; + } + + cw = *(huffTable_3 + tmp); + pMainData->usedBits -= (6 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab5(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo9bits(pMainData, 8); /* huffTable_5 */ + + if ((tmp >> 5)) + { + tmp = (tmp >> 5) - 1; + } + else if ((tmp >> 1) >= 2) + { + tmp = (tmp >> 1) - 2 + 7; + } + else + { + tmp = (tmp & 3) + 21; + } + + cw = *(huffTable_5 + tmp); + pMainData->usedBits -= (8 - (cw & 0xFF)); + + return(cw >> 8); +} + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab6(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo9bits(pMainData, 7); /* huffTable_6 */ + if ((tmp >> 3) >= 3) + { + tmp = (tmp >> 3) - 3; + } + else if (tmp >> 1) + { + tmp = (tmp >> 1) - 1 + 13; + } + else + { + tmp = tmp + 24; + } + + cw = *(huffTable_6 + tmp); + pMainData->usedBits -= (7 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab7(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo17bits(pMainData, 10); /* huffTable_7 */ + if ((tmp >> 7) >= 2) + { + tmp = (tmp >> 7) - 2; + } + else if ((tmp >> 4) >= 7) + { + tmp = (tmp >> 4) - 7 + 6; + } + else if ((tmp >> 1) >= 2) + { + tmp = (tmp >> 1) - 2 + 15; + } + else + { + tmp = (tmp & 3) + 69; + } + + cw = *(huffTable_7 + tmp); + pMainData->usedBits -= (10 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab8(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo17bits(pMainData, 11); /* huffTable_8 */ + if ((tmp >> 7) >= 2) + { + tmp = (tmp >> 7) - 2; + } + else if ((tmp >> 5) >= 5) + { + tmp = (tmp >> 5) - 5 + 14; + } + else if ((tmp >> 2) >= 3) + { + tmp = (tmp >> 2) - 3 + 17; + } + else + { + tmp = (tmp) + 54; + } + + cw = *(huffTable_8 + tmp); + pMainData->usedBits -= (11 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab9(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo9bits(pMainData, 9); /* huffTable_9 */ + if ((tmp >> 5) >= 5) + { + tmp = (tmp >> 5) - 5; + } + else if ((tmp >> 3) >= 6) + { + tmp = (tmp >> 3) - 6 + 11; + } + else if ((tmp >> 1) >= 4) + { + tmp = (tmp >> 1) - 4 + 25; + } + else + { + tmp = tmp + 45; + } + + cw = *(huffTable_9 + tmp); + pMainData->usedBits -= (9 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab10(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo17bits(pMainData, 11); /* huffTable_10 */ + if (tmp >> 10) + { + tmp = (tmp >> 10) - 1; + } + else if ((tmp >> 7) >= 3) + { + tmp = (tmp >> 7) - 3 + 1; + } + else if ((tmp >> 5) >= 8) + { + tmp = (tmp >> 5) - 8 + 6; + } + else if ((tmp >> 3) >= 18) + { + tmp = (tmp >> 3) - 18 + 10; + } + else if ((tmp >> 2) >= 24) + { + tmp = (tmp >> 2) - 24 + 24; + } + else if ((tmp >> 1) >= 12) + { + tmp = (tmp >> 1) - 12 + 36; + } + else + { + tmp = (tmp) + 72; + } + + cw = *(huffTable_10 + tmp); + pMainData->usedBits -= (11 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab11(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo17bits(pMainData, 11); /* huffTable_11 */ + if ((tmp >> 8) >= 3) + { + tmp = (tmp >> 8) - 3; + } + else if ((tmp >> 6) >= 7) + { + tmp = (tmp >> 6) - 7 + 5; + } + else if ((tmp >> 3) >= 32) + { + tmp = (tmp >> 3) - 32 + 10; + } + else if ((tmp >> 2) >= 10) + { + tmp = (tmp >> 2) - 10 + 34; + } + else if ((tmp >> 1) >= 8) + { + tmp = (tmp >> 1) - 8 + 88; + } + else + { + tmp = (tmp & 0xFF) + 100; + } + cw = *(huffTable_11 + tmp); + pMainData->usedBits -= (11 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab12(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo17bits(pMainData, 10); /* huffTable_12 */ + if ((tmp >> 7) >= 5) + { + tmp = (tmp >> 7) - 5; + } + else if ((tmp >> 5) >= 12) + { + tmp = (tmp >> 5) - 12 + 3; + } + else if ((tmp >> 4) >= 17) + { + tmp = (tmp >> 4) - 17 + 11; + } + else if ((tmp >> 2) >= 32) + { + tmp = (tmp >> 2) - 32 + 18; + } + else if ((tmp >> 1) >= 16) + { + tmp = (tmp >> 1) - 16 + 54; + } + else + { + tmp = (tmp & 0x1F) + 102; + + } + cw = *(huffTable_12 + tmp); + pMainData->usedBits -= (10 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab13(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getNbits(pMainData, 19); /* huffTable_13 */ + if (tmp >> 18) + { + tmp = 0; + } + else if ((tmp >> 15) >= 4) + { + tmp = (tmp >> 15) - 4 + 1; + } + else if ((tmp >> 11) >= 32) + { + tmp = (tmp >> 11) - 32 + 5; + } + else if ((tmp >> 9) >= 64) + { + tmp = (tmp >> 9) - 64 + 37; + } + else if ((tmp >> 8) >= 64) + { + tmp = (tmp >> 8) - 64 + 101; + } + else if ((tmp >> 7) >= 64) + { + tmp = (tmp >> 7) - 64 + 165; + } + else if ((tmp >> 6) >= 32) + { + tmp = (tmp >> 6) - 32 + 229; + } + else if ((tmp >> 5) >= 32) + { + tmp = (tmp >> 5) - 32 + 325; + } + else if ((tmp >> 4) >= 32) + { + tmp = (tmp >> 4) - 32 + 357; + } + else if ((tmp >> 3) >= 32) + { + tmp = (tmp >> 3) - 32 + 389; + } + else if ((tmp >> 2) >= 2) + { + tmp = (tmp >> 2) - 2 + 421; + } + else + { + tmp = (tmp & 0x7) + 483; + } + + cw = *(huffTable_13 + tmp); + pMainData->usedBits -= (19 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab15(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo17bits(pMainData, 13); /* huffTable_15 */ + if ((tmp >> 9) >= 10) + { + tmp = (tmp >> 9) - 10; + } + else if ((tmp >> 6) >= 39) + { + tmp = (tmp >> 6) - 39 + 6; + } + else if ((tmp >> 4) >= 62) + { + tmp = (tmp >> 4) - 62 + 47; + } + else if ((tmp >> 3) >= 60) + { + tmp = (tmp >> 3) - 60 + 141; + } + else if ((tmp >> 2) >= 64) + { + tmp = (tmp >> 2) - 64 + 205; + } + else if ((tmp >> 1) >= 32) + { + tmp = (tmp >> 1) - 32 + 261; + } + else + { + tmp = (tmp & 0x3f) + 357; + } + + cw = *(huffTable_15 + tmp); + pMainData->usedBits -= (13 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab16(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo17bits(pMainData, 17); /* huffTable_16 */ + if (tmp >> 16) + { + tmp = 0; + } + else if ((tmp >> 13) >= 4) + { + tmp = (tmp >> 13) - 4 + 1; + } + else if ((tmp >> 9) >= 38) + { + tmp = (tmp >> 9) - 38 + 5; + } + else if ((tmp >> 7) >= 94) + { + tmp = (tmp >> 7) - 94 + 31; + } + else if ((tmp >> 5) >= 214) + { + tmp = (tmp >> 5) - 214 + 89; + } + else if ((tmp >> 3) >= 704) + { + if ((tmp >> 4) >= 384) + { + tmp = (tmp >> 4) - 384 + 315; + } + else + { + tmp = (tmp >> 3) - 704 + 251; + } + } + else if ((tmp >> 8) >= 14) + { + tmp = (tmp >> 8) - 14 + 359; + } + else if ((tmp) >= 3456) + { + if ((tmp >> 2) >= 868) + { + tmp = (tmp >> 2) - 868 + 383; + } + else + { + tmp = (tmp) - 3456 + 367; + } + } + else + { + tmp = ((tmp >> 6) & 0x3f) + 411; + } + + cw = *(huffTable_16 + tmp); + pMainData->usedBits -= (17 - (cw & 0xFF)); + + return(cw >> 8); +} + + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab24(tmp3Bits *pMainData) +{ + uint32 tmp; + uint16 cw; + + tmp = getUpTo17bits(pMainData, 12); /* huffTable_24 */ + if ((tmp >> 6) >= 41) + { + tmp = (tmp >> 6) - 41; + } + else if ((tmp >> 3) >= 218) + { + tmp = (tmp >> 3) - 218 + 23; + } + else if ((tmp >> 2) >= 336) + { + tmp = (tmp >> 2) - 336 + 133; + } + else if ((tmp >> 1) >= 520) + { + tmp = (tmp >> 1) - 520 + 233; + } + else if ((tmp) >= 1024) + { + tmp = (tmp) - 1024 + 385; + } + else if ((tmp >> 1) >= 352) + { + if ((tmp >> 8) == 3) + { + tmp = (tmp >> 8) - 3 + 433; + } + else + { + tmp = (tmp >> 1) - 352 + 401; + } + } + else + { + tmp = ((tmp >> 4) & 0x3f) + 434; + } + + cw = *(huffTable_24 + tmp); + pMainData->usedBits -= (12 - (cw & 0xFF)); + + return(cw >> 8); +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +uint16 pvmp3_decode_huff_cw_tab32(tmp3Bits *pMainData) +{ + uint32 tmp = getUpTo9bits(pMainData, 6); /* huffTable_32 */ + if ((tmp >> 5)) + { + pMainData->usedBits -= 5; + return(0); + } + else + { + uint16 cw = *(huffTable_32 + (tmp & 0x1f)); + pMainData->usedBits -= (6 - (cw & 0xFF)); + + return(cw >> 8); + } + +} + + +uint16 pvmp3_decode_huff_cw_tab33(tmp3Bits *pMainData) +{ + + uint16 tmp = getUpTo9bits(pMainData, 4); /* huffTable_33 */ + + return((0x0f - tmp)); +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_decode_huff_cw.h b/ohos-specific/pvmp3dec/src/pvmp3_decode_huff_cw.h new file mode 100644 index 0000000000..941ca6d839 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_decode_huff_cw.h @@ -0,0 +1,114 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_decode_huff_cw.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_DECODE_HUFF_CW_H +#define PVMP3_DECODE_HUFF_CW_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" +#include "pvmp3_dec_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + uint16 pvmp3_decode_huff_cw_tab0(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab1(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab2(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab3(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab5(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab6(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab7(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab8(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab9(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab10(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab11(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab12(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab13(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab15(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab16(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab24(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab32(tmp3Bits *); + uint16 pvmp3_decode_huff_cw_tab33(tmp3Bits *); +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_dequantize_sample.cpp b/ohos-specific/pvmp3dec/src/pvmp3_dequantize_sample.cpp new file mode 100644 index 0000000000..69e1987778 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_dequantize_sample.cpp @@ -0,0 +1,452 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_dequantize_sample.cpp + + Functions: + power_1_third + pvmp3_dequantize_sample + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +power_1_third +int32 power_1_third( int32 xx) + +Input + int32 xx, int32 in the [0, 8192] range + + Returns + + int32 xx^(1/3) int32 Q26 number representing + the 1/3 power of the input + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +pvmp3_dequantize_sample + +Input + int32 is[SUBBANDS_NUMBER*FILTERBANK_BANDS], + mp3ScaleFactors *scalefac, scale factor structure + struct gr_info_s *gr_info, granule structure informatiom + mp3Header *info mp3 header info + + Returns + + int32 is[SUBBANDS_NUMBER*FILTERBANK_BANDS], dequantize output as (.)^(4/3) + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + dequantize sample + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_dec_defs.h" +#include "pvmp3_dequantize_sample.h" +#include "pvmp3_normalize.h" +#include "mp3_mem_funcs.h" +#include "pvmp3_tables.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define Q30_fmt(a)(int32(double(0x40000000)*a)) +#define Q29_fmt(a)(int32(double(0x20000000)*a)) + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ +const int32 pretab[22] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0}; + +const int32 pow_2_1_fourth[4] = +{ + Q30_fmt(1.0), Q30_fmt(1.18920711500272), + Q30_fmt(1.41421356237310), Q30_fmt(1.68179283050743) +}; + +const int32 two_cubic_roots[7] = +{ + Q29_fmt(0), Q29_fmt(1.25992104989487), + Q29_fmt(1.58740105196820), Q29_fmt(2.00000000000000), + Q29_fmt(2.51984209978975), Q29_fmt(3.17480210393640), + Q29_fmt(3.99999999999999) +}; + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + + +int32 power_1_third(int32 xx) +{ + + if (xx <= 512) + { + return (power_one_third[xx] >> 1); + } + else + { + if (xx >> 15) + { + return 0x7FFFFFFF; /* saturate any value over 32767 */ + } + else + { + int32 x = xx; + int32 m = 22 - pvmp3_normalize(xx); + + xx >>= m; + xx = (power_one_third[xx]) + (((power_one_third[xx+1] - power_one_third[xx]) >> m) * (x & ((1 << m) - 1))); + return (fxp_mul32_Q30(xx, two_cubic_roots[m])); + } + + } +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + + + +void pvmp3_dequantize_sample(int32 is[SUBBANDS_NUMBER*FILTERBANK_BANDS], + mp3ScaleFactors *scalefac, + granuleInfo *gr_info, + int32 used_freq_lines, + mp3Header *info) +{ + int32 ss; + int32 cb = 0; + int32 global_gain; + int32 sfreq = info->sampling_frequency + info->version_x + (info->version_x << 1); + + /* apply formula per block type */ + + if (gr_info->window_switching_flag && (gr_info->block_type == 2)) + { + int32 next_cb_boundary; + int32 cb_begin = 0; + int32 cb_width = 0; + int32 mixstart = 8; /* added 2003/08/21 efs */ + + if (info->version_x != MPEG_1) + { + mixstart = 6; /* different value in MPEG2 LSF */ + } + + if (gr_info->mixed_block_flag) + { + next_cb_boundary = mp3_sfBandIndex[sfreq].l[1]; /* LONG blocks: 0,1,3 */ + } + else + { + next_cb_boundary = mp3_sfBandIndex[sfreq].s[1] * 3; /* pure SHORT block */ + cb_width = 0; + } + + global_gain = gr_info->global_gain; + int32 two_raise_one_fourth = pow_2_1_fourth[global_gain&0x3]; + global_gain = 12 + (global_gain >> 2); + + for (ss = 0 ; ss < used_freq_lines ; ss++) + { + if (ss == next_cb_boundary) + { + cb++; /* critical band counter */ + if (gr_info->mixed_block_flag) + { + if (next_cb_boundary == mp3_sfBandIndex[sfreq].l[mixstart]) + { + next_cb_boundary = mp3_sfBandIndex[sfreq].s[4] * 3; + + cb_begin = mp3_sfBandIndex[sfreq].s[3] * 3; + cb_width = 3; + cb = 3; + } + else if (ss < mp3_sfBandIndex[sfreq].l[mixstart]) + { + next_cb_boundary = mp3_sfBandIndex[sfreq].l[cb+1]; + } + else + { + next_cb_boundary = mp3_sfBandIndex[sfreq].s[cb+1] * 3; + + cb_width = cb; + cb_begin = mp3_sfBandIndex[sfreq].s[cb] * 3; + } + + if (ss < 2*FILTERBANK_BANDS) + { /* 1st 2 subbands of switched blocks */ + global_gain = (gr_info->global_gain); + global_gain -= (1 + gr_info->scalefac_scale) * + (scalefac->l[cb] + gr_info->preflag * pretab[cb]) << 1; + + two_raise_one_fourth = pow_2_1_fourth[global_gain&0x3]; + global_gain = 12 + (global_gain >> 2); + } + } + else + { + next_cb_boundary = mp3_sfBandIndex[sfreq].s[cb+1] * 3; + cb_width = cb; + cb_begin = mp3_sfBandIndex[sfreq].s[cb] * 3; + } + + } /* end-if ( ss == next_cb_boundary) */ + + /* Do long/short dependent scaling operations. */ + if ((gr_info->mixed_block_flag == 0) || (gr_info->mixed_block_flag && (ss >= 2*FILTERBANK_BANDS))) + { + int32 temp2 = fxp_mul32_Q32((ss - cb_begin) << 16, mp3_shortwindBandWidths[sfreq][cb_width]); + temp2 = (temp2 + 1) >> 15; + + global_gain = (gr_info->global_gain); + global_gain -= gr_info->subblock_gain[temp2] << 3; + global_gain -= (1 + gr_info->scalefac_scale) * (scalefac->s[temp2][cb] << 1); + + two_raise_one_fourth = pow_2_1_fourth[global_gain&0x3]; + global_gain = 12 + (global_gain >> 2); + + } + + + /* + * xr[sb][ss] = 2^(global_gain/4) + */ + + /* Scale quantized value. */ + + /* 0 < abs(is[ss]) < 8192 */ + + int32 tmp = fxp_mul32_Q30((is[ss] << 16), power_1_third(pv_abs(is[ ss]))); + + tmp = fxp_mul32_Q30(tmp, two_raise_one_fourth); + + if (global_gain < 0) + { + int32 temp = - global_gain; + if (temp < 32) + { + is[ss] = (tmp >> temp); + } + else + { + is[ss] = 0; + } + } + else + { + is[ss] = (tmp << global_gain); + } + + } /* for (ss=0 ; ss < used_freq_lines ; ss++) */ + + } + else + { + + for (cb = 0 ; cb < 22 ; cb++) + { + + /* Compute overall (global) scaling. */ + + global_gain = (gr_info->global_gain); + + global_gain -= (1 + gr_info->scalefac_scale) * + (scalefac->l[cb] + gr_info->preflag * pretab[cb]) << 1; + + + int32 two_raise_one_fourth = pow_2_1_fourth[global_gain&0x3]; + global_gain = 12 + (global_gain >> 2); + + /* + * xr[sb][ss] = 2^(global_gain/4) + */ + + /* Scale quantized value. */ + + if (used_freq_lines >= mp3_sfBandIndex[sfreq].l[cb+1]) + { + if (global_gain <= 0) + { + global_gain = - global_gain; + if (global_gain < 32) + { + for (ss = mp3_sfBandIndex[sfreq].l[cb]; ss < mp3_sfBandIndex[sfreq].l[cb+1]; ss += 2) + { + int32 tmp = is[ss]; + if (tmp) + { + tmp = fxp_mul32_Q30((tmp << 16), power_1_third(pv_abs(tmp))); + is[ss] = fxp_mul32_Q30(tmp, two_raise_one_fourth) >> global_gain; + } + tmp = is[ss+1]; + if (tmp) + { + tmp = fxp_mul32_Q30((tmp << 16), power_1_third(pv_abs(tmp))); + is[ss+1] = fxp_mul32_Q30(tmp, two_raise_one_fourth) >> global_gain; + } + } + } + else + { + pv_memset(&is[ mp3_sfBandIndex[sfreq].l[cb]], + 0, + (mp3_sfBandIndex[sfreq].l[cb+1] - mp3_sfBandIndex[sfreq].l[cb])*sizeof(*is)); + } + } + else + { + for (ss = mp3_sfBandIndex[sfreq].l[cb]; ss < mp3_sfBandIndex[sfreq].l[cb+1]; ss += 2) + { + int32 tmp = is[ss]; + if (tmp) + { + tmp = fxp_mul32_Q30((tmp << 16), power_1_third(pv_abs(tmp))); + is[ss] = fxp_mul32_Q30(tmp, two_raise_one_fourth) << global_gain; + } + + tmp = is[ss+1]; + if (tmp) + { + tmp = fxp_mul32_Q30((tmp << 16), power_1_third(pv_abs(tmp))); + is[ss+1] = fxp_mul32_Q30(tmp, two_raise_one_fourth) << global_gain; + } + } + } + } + else + { + if (global_gain <= 0) + { + global_gain = - global_gain; + if (global_gain < 32) + { + for (ss = mp3_sfBandIndex[sfreq].l[cb]; ss < used_freq_lines; ss += 2) + { + int32 tmp = is[ss]; + if (tmp) + { + tmp = fxp_mul32_Q30((tmp << 16), power_1_third(pv_abs(tmp))); + is[ss] = fxp_mul32_Q30(tmp, two_raise_one_fourth) >> global_gain; + } + tmp = is[ss+1]; + if (tmp) + { + tmp = fxp_mul32_Q30((tmp << 16), power_1_third(pv_abs(tmp))); + is[ss+1] = fxp_mul32_Q30(tmp, two_raise_one_fourth) >> global_gain; + } + } + + } + else + { + pv_memset(&is[ mp3_sfBandIndex[sfreq].l[cb]], + 0, + (mp3_sfBandIndex[sfreq].l[cb+1] - mp3_sfBandIndex[sfreq].l[cb])*sizeof(*is)); + } + } + else + { + for (ss = mp3_sfBandIndex[sfreq].l[cb]; ss < used_freq_lines; ss++) + { + int32 tmp = is[ss]; + + if (tmp) + { + tmp = fxp_mul32_Q30((tmp << 16), power_1_third(pv_abs(tmp))); + is[ss] = fxp_mul32_Q30(tmp, two_raise_one_fourth) << global_gain; + } + } + } + + cb = 22; // force breaking out of the loop + + } /* if ( used_freq_lines >= mp3_sfBandIndex[sfreq].l[cb+1]) */ + + } /* for (cb=0 ; cb < 22 ; cb++) */ + + } /* if (gr_info->window_switching_flag && (gr_info->block_type == 2)) */ + + + pv_memset(&is[used_freq_lines], + 0, + (FILTERBANK_BANDS*SUBBANDS_NUMBER - used_freq_lines)*sizeof(*is)); + +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_dequantize_sample.h b/ohos-specific/pvmp3dec/src/pvmp3_dequantize_sample.h new file mode 100644 index 0000000000..9393eb1187 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_dequantize_sample.h @@ -0,0 +1,106 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_dequantize_sample.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_DEQUANTIZE_SAMPLE_H +#define PVMP3_DEQUANTIZE_SAMPLE_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + int32 power_1_third(int32 xx); + + void pvmp3_dequantize_sample(int32 is[SUBBANDS_NUMBER*FILTERBANK_BANDS], + mp3ScaleFactors *scalefac, + granuleInfo *gr_info, + int32 num_lines, + mp3Header *info); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_equalizer.cpp b/ohos-specific/pvmp3dec/src/pvmp3_equalizer.cpp new file mode 100644 index 0000000000..f4a4efb15b --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_equalizer.cpp @@ -0,0 +1,415 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_equalizer.cpp + + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Input + int32 *inData, pointer to the spectrum frequency-line + e_equalization equalizerType, equalization mode + int32 *pt_work_buff + + Output + int32 *pt_work_buff pointer to the equalized frequency-line + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + Equalizer + Each subband sample is scaled according to a spectrum shape setting + defined by "equalizerType" + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_equalizer.h" +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_dec_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define LEVEL__0__dB 0.999999970f +#define LEVEL__1_5dB 0.841395142f +#define LEVEL__3__dB 0.707106781f +#define LEVEL__4_5dB 0.595662143f +#define LEVEL__6__dB 0.500000000f +#define LEVEL__7_5dB 0.421696503f +#define LEVEL__9__dB 0.353553393f +#define LEVEL_12__dB 0.250000000f +#define LEVEL_15__dB 0.176776695f +#define LEVEL_18__dB 0.125000000f +#define LEVEL_21__dB 0.088388347f +#define LEVEL_30__dB 0.031250000f +#define LEVEL_45__dB 0.005524271f +#define LEVEL_60__dB 0.000976562f + +#define Qmf31( x) (int32)(x*(float)0x7FFFFFFF) + + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +const int32 equalizerTbl[8][SUBBANDS_NUMBER] = +{ + /* FLAT */ + { + Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB) + }, + /* BASS BOOST */ + { + Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__1_5dB), Qmf31(LEVEL__3__dB), + + Qmf31(LEVEL__4_5dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB) + }, + /* ROCK */ + { + Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__1_5dB), Qmf31(LEVEL__3__dB), + + Qmf31(LEVEL__4_5dB), Qmf31(LEVEL__6__dB), + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__1_5dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB) + }, + /* POP */ + { + Qmf31(LEVEL__6__dB), + + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + + Qmf31(LEVEL__1_5dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB) + }, + /* JAZZ */ + { + Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__1_5dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB) + }, + /* CLASSICAL */ + { + Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + Qmf31(LEVEL__9__dB), Qmf31(LEVEL__9__dB), + + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__1_5dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB) + }, + /* TALK */ + { + Qmf31(LEVEL__9__dB), + + Qmf31(LEVEL__6__dB), Qmf31(LEVEL__6__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__1_5dB), + + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB), Qmf31(LEVEL__3__dB), + Qmf31(LEVEL__3__dB) + }, + /* FLAT */ + { + Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB), Qmf31(LEVEL__0__dB), + Qmf31(LEVEL__0__dB) + } +}; + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_equalizer(int32 *circ_buffer, + e_equalization equalizerType, + int32 *work_buff) +{ + + if (equalizerType == flat) + { + for (int32 band = 0; band < FILTERBANK_BANDS; band += 2) + { + + int32 *pt_work_buff = &work_buff[band]; + int32 *inData = &circ_buffer[544 - (band<<5)]; + + int32 i; + for (i = 0; i < SUBBANDS_NUMBER*FILTERBANK_BANDS; i += FILTERBANK_BANDS << 2) + { + int32 temp1 = (pt_work_buff[ i ]); + int32 temp2 = (pt_work_buff[ i + FILTERBANK_BANDS ]); + int32 temp3 = (pt_work_buff[ i + 2*FILTERBANK_BANDS ]); + int32 temp4 = (pt_work_buff[ i + 3*FILTERBANK_BANDS ]); + *(inData++) = temp1; + *(inData++) = temp2; + *(inData++) = temp3; + *(inData++) = temp4; + } + + inData -= SUBBANDS_NUMBER << 1; + pt_work_buff++; + + for (i = 0; i < SUBBANDS_NUMBER*FILTERBANK_BANDS; i += FILTERBANK_BANDS << 2) + { + int32 temp1 = (pt_work_buff[ i ]); + int32 temp2 = (pt_work_buff[ i + FILTERBANK_BANDS ]); + int32 temp3 = (pt_work_buff[ i + 2*FILTERBANK_BANDS ]); + int32 temp4 = (pt_work_buff[ i + 3*FILTERBANK_BANDS ]); + *(inData++) = temp1; + *(inData++) = temp2; + *(inData++) = temp3; + *(inData++) = temp4; + } + } + } + else + { + const int32 *pt_equalizer = equalizerTbl[equalizerType&7]; + + + for (int32 band = 0; band < FILTERBANK_BANDS; band += 3) + { + int32 *inData = &circ_buffer[544 - (band<<5)]; + + int32 *pt_work_buff = &work_buff[band]; + int32 i; + + for (i = 0; i < SUBBANDS_NUMBER*FILTERBANK_BANDS; i += FILTERBANK_BANDS << 2) + { + int32 temp1 = (pt_work_buff[ i ]); + int32 temp2 = (pt_work_buff[ i + FILTERBANK_BANDS ]); + int32 temp3 = (pt_work_buff[ i + 2*FILTERBANK_BANDS ]); + int32 temp4 = (pt_work_buff[ i + 3*FILTERBANK_BANDS ]); + *(inData++) = fxp_mul32_Q32(temp1 << 1, *(pt_equalizer++)); + *(inData++) = fxp_mul32_Q32(temp2 << 1, *(pt_equalizer++)); + *(inData++) = fxp_mul32_Q32(temp3 << 1, *(pt_equalizer++)); + *(inData++) = fxp_mul32_Q32(temp4 << 1, *(pt_equalizer++)); + } + + pt_equalizer -= SUBBANDS_NUMBER; + + inData -= SUBBANDS_NUMBER << 1; + pt_work_buff++; + + for (i = 0; i < SUBBANDS_NUMBER*FILTERBANK_BANDS; i += FILTERBANK_BANDS << 2) + { + int32 temp1 = (pt_work_buff[ i ]); + int32 temp2 = (pt_work_buff[ i + FILTERBANK_BANDS ]); + int32 temp3 = (pt_work_buff[ i + 2*FILTERBANK_BANDS ]); + int32 temp4 = (pt_work_buff[ i + 3*FILTERBANK_BANDS ]); + *(inData++) = fxp_mul32_Q32(temp1 << 1, *(pt_equalizer++)); + *(inData++) = fxp_mul32_Q32(temp2 << 1, *(pt_equalizer++)); + *(inData++) = fxp_mul32_Q32(temp3 << 1, *(pt_equalizer++)); + *(inData++) = fxp_mul32_Q32(temp4 << 1, *(pt_equalizer++)); + } + pt_equalizer -= SUBBANDS_NUMBER; + + } + } +} + + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_equalizer.h b/ohos-specific/pvmp3dec/src/pvmp3_equalizer.h new file mode 100644 index 0000000000..bbf134fbfb --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_equalizer.h @@ -0,0 +1,101 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_equalizer.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_EQUALIZER_H +#define PVMP3_EQUALIZER_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" +#include "pvmp3decoder_api.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_equalizer(int32 *inData, + e_equalization equalizerType, + int32 *pt_work_buff); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_framedecoder.cpp b/ohos-specific/pvmp3dec/src/pvmp3_framedecoder.cpp new file mode 100644 index 0000000000..26bc25cd2d --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_framedecoder.cpp @@ -0,0 +1,834 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_framedecoder.cpp + + Functions: + pvmp3_framedecoder + pvmp3_InitDecoder + pvmp3_resetDecoder + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + pExt = pointer to the external interface structure. See the file + pvmp3decoder_api.h for a description of each field. + Data type of pointer to a tPVMP3DecoderExternal + structure. + + pMem = void pointer to hide the internal implementation of the library + It is cast back to a tmp3dec_file structure. This structure + contains information that needs to persist between calls to + this function, or is too big to be placed on the stack, even + though the data is only needed during execution of this function + Data type void pointer, internally pointer to a tmp3dec_file + structure. + + + Outputs: + status = ERROR condition. see structure ERROR_CODE + + Pointers and Buffers Modified: + pMem contents are modified. + pExt: (more detail in the file pvmp3decoder_api.h) + inputBufferUsedLength - number of array elements used up by the stream. + samplingRate - sampling rate in samples per sec + bitRate - bit rate in bits per second, varies frame to frame. + + + +------------------------------------------------------------------------------ + FUNCTIONS DESCRIPTION + + pvmp3_framedecoder + frame decoder library driver + pvmp3_InitDecoder + Decoder Initialization + pvmp3_resetDecoder + Reset Decoder + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + + +#include "pvmp3_framedecoder.h" +#include "pvmp3_dec_defs.h" +#include "pvmp3_poly_phase_synthesis.h" +#include "pvmp3_tables.h" +#include "pvmp3_imdct_synth.h" +#include "pvmp3_alias_reduction.h" +#include "pvmp3_reorder.h" +#include "pvmp3_dequantize_sample.h" +#include "pvmp3_stereo_proc.h" +#include "pvmp3_mpeg2_stereo_proc.h" +#include "pvmp3_get_side_info.h" +#include "pvmp3_get_scale_factors.h" +#include "pvmp3_mpeg2_get_scale_factors.h" +#include "pvmp3_decode_header.h" +#include "pvmp3_get_main_data_size.h" +#include "s_tmp3dec_file.h" +#include "pvmp3_getbits.h" +#include "mp3_mem_funcs.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +ERROR_CODE pvmp3_framedecoder(tPVMP3DecoderExternal *pExt, + void *pMem) +{ + + ERROR_CODE errorCode = NO_DECODING_ERROR; + + int32 crc_error_count = 0; + uint32 sent_crc = 0; + uint32 computed_crc = 0; + + tmp3dec_chan *pChVars[CHAN]; + tmp3dec_file *pVars = (tmp3dec_file *)pMem; + + mp3Header info_data; + mp3Header *info = &info_data; + + pVars->inputStream.pBuffer = pExt->pInputBuffer; + + + pVars->inputStream.usedBits = pExt->inputBufferUsedLength << 3; + pVars->inputStream.inputBufferCurrentLength = pExt->inputBufferCurrentLength; + + + errorCode = pvmp3_decode_header(&pVars->inputStream, + info, + &computed_crc); + + if (errorCode != NO_DECODING_ERROR) + { + pExt->outputFrameSize = 0; + return errorCode; + } + + pVars->num_channels = (info->mode == MPG_MD_MONO) ? 1 : 2; + pExt->num_channels = pVars->num_channels; + + int32 outputFrameSize = (info->version_x == MPEG_1) ? + 2 * SUBBANDS_NUMBER * FILTERBANK_BANDS : + SUBBANDS_NUMBER * FILTERBANK_BANDS; + + outputFrameSize = (info->mode == MPG_MD_MONO) ? outputFrameSize : outputFrameSize << 1; + + + /* + * Check if output buffer has enough room to hold output PCM + */ + if (pExt->outputFrameSize >= outputFrameSize) + { + pExt->outputFrameSize = outputFrameSize; + } + else + { + pExt->outputFrameSize = 0; + return OUTPUT_BUFFER_TOO_SMALL; + } + + + pChVars[ LEFT] = &pVars->perChan[ LEFT]; + pChVars[RIGHT] = &pVars->perChan[RIGHT]; + + + + + if (info->error_protection) + { + /* + * Get crc content + */ + sent_crc = getUpTo17bits(&pVars->inputStream, 16); + } + + + if (info->layer_description == 3) + { + int32 gr; + int32 ch; + uint32 main_data_end; + int32 bytes_to_discard; + int16 *ptrOutBuffer = pExt->pOutputBuffer; + + /* + * Side Information must be extracted from the bitstream and store for use + * during the decoded of the associated frame + */ + + errorCode = pvmp3_get_side_info(&pVars->inputStream, + &pVars->sideInfo, + info, + &computed_crc); + + if (errorCode != NO_DECODING_ERROR) + { + pExt->outputFrameSize = 0; + return errorCode; + } + + /* + * If CRC was sent, check that matches the one got while parsing data + * disable crc if this is the desired mode + */ + if (info->error_protection) + { + if ((computed_crc != sent_crc) && pExt->crcEnabled) + { + crc_error_count++; + } + } + + /* + * main data (scalefactors, Huffman coded, etc,) are not necessarily located + * adjacent to the side-info. Beginning of main data is located using + * field "main_data_begin" of the current frame. The length does not include + * header and side info. + * "main_data_begin" points to the first bit of main data of a frame. It is a negative + * offset in bytes from the first byte of the sync word + * main_data_begin = 0 <===> main data start rigth after side info. + */ + + int32 temp = pvmp3_get_main_data_size(info, pVars); + + + /* + * Check if available data holds a full frame, if not flag an error + */ + + if ((uint32)pVars->predicted_frame_size > pVars->inputStream.inputBufferCurrentLength) + { + pExt->outputFrameSize = 0; + return NO_ENOUGH_MAIN_DATA_ERROR; + } + + /* + * Fill in internal circular buffer + */ + fillMainDataBuf(pVars, temp); + + + main_data_end = pVars->mainDataStream.usedBits >> 3; /* in bytes */ + if ((main_data_end << 3) < pVars->mainDataStream.usedBits) + { + main_data_end++; + pVars->mainDataStream.usedBits = main_data_end << 3; + } + + + bytes_to_discard = pVars->frame_start - pVars->sideInfo.main_data_begin - main_data_end; + + + if (main_data_end > BUFSIZE) /* check overflow on the buffer */ + { + pVars->frame_start -= BUFSIZE; + + pVars->mainDataStream.usedBits -= (BUFSIZE << 3); + } + + pVars->frame_start += temp; + + + if (bytes_to_discard < 0 || crc_error_count) + { + /* + * Not enough data to decode, then we should avoid reading this + * data ( getting/ignoring sido info and scale data) + * Main data could be located in the previous frame, so an unaccounted + * frame can cause incorrect processing + * Just run the polyphase filter to "clean" the history buffer + */ + errorCode = NO_ENOUGH_MAIN_DATA_ERROR; + + /* + * Clear the input to these filters + */ + + pv_memset((void*)pChVars[RIGHT]->work_buf_int32, + 0, + SUBBANDS_NUMBER*FILTERBANK_BANDS*sizeof(pChVars[RIGHT]->work_buf_int32[0])); + + pv_memset((void*)pChVars[LEFT]->work_buf_int32, + 0, + SUBBANDS_NUMBER*FILTERBANK_BANDS*sizeof(pChVars[LEFT]->work_buf_int32[0])); + + /* clear circular buffers, to avoid any glitch */ + pv_memset((void*)&pChVars[ LEFT]->circ_buffer[576], + 0, + 480*sizeof(pChVars[ LEFT]->circ_buffer[0])); + pv_memset((void*)&pChVars[RIGHT]->circ_buffer[576], + 0, + 480*sizeof(pChVars[RIGHT]->circ_buffer[0])); + + pChVars[ LEFT]->used_freq_lines = 575; + pChVars[RIGHT]->used_freq_lines = 575; + + } + else + { + pVars->mainDataStream.usedBits += (bytes_to_discard << 3); + } + + /* + * if (fr_ps->header->version_x == MPEG_1), use 2 granules, otherwise just 1 + */ + for (gr = 0; gr < (1 + !(info->version_x)); gr++) + { + if (errorCode != NO_ENOUGH_MAIN_DATA_ERROR) + { + for (ch = 0; ch < pVars->num_channels; ch++) + { + int32 part2_start = pVars->mainDataStream.usedBits; + + if (info->version_x == MPEG_1) + { + + pvmp3_get_scale_factors(&pVars->scaleFactors[ch], + &pVars->sideInfo, + gr, + ch, + &pVars->mainDataStream); + } + else + { + int32 * tmp = pVars->Scratch_mem; + pvmp3_mpeg2_get_scale_factors(&pVars->scaleFactors[ch], + &pVars->sideInfo, + gr, + ch, + info, + (uint32 *)tmp, + &pVars->mainDataStream); + } + + pChVars[ch]->used_freq_lines = pvmp3_huffman_parsing(pChVars[ch]->work_buf_int32, + &pVars->sideInfo.ch[ch].gran[gr], + pVars, + part2_start, + info); + + + pvmp3_dequantize_sample(pChVars[ch]->work_buf_int32, + &pVars->scaleFactors[ch], + &pVars->sideInfo.ch[ch].gran[gr], + pChVars[ch]->used_freq_lines, + info); + + + + + } /* for (ch=0; ch<stereo; ch++) */ + + if (pVars->num_channels == 2) + { + + int32 used_freq_lines = (pChVars[ LEFT]->used_freq_lines > + pChVars[RIGHT]->used_freq_lines) ? + pChVars[ LEFT]->used_freq_lines : + pChVars[RIGHT]->used_freq_lines; + + pChVars[ LEFT]->used_freq_lines = used_freq_lines; + pChVars[RIGHT]->used_freq_lines = used_freq_lines; + + if (info->version_x == MPEG_1) + { + pvmp3_stereo_proc(pChVars[ LEFT]->work_buf_int32, + pChVars[RIGHT]->work_buf_int32, + &pVars->scaleFactors[RIGHT], + &pVars->sideInfo.ch[LEFT].gran[gr], + used_freq_lines, + info); + } + else + { + int32 * tmp = pVars->Scratch_mem; + pvmp3_mpeg2_stereo_proc(pChVars[ LEFT]->work_buf_int32, + pChVars[RIGHT]->work_buf_int32, + &pVars->scaleFactors[RIGHT], + &pVars->sideInfo.ch[ LEFT].gran[gr], + &pVars->sideInfo.ch[RIGHT].gran[gr], + (uint32 *)tmp, + used_freq_lines, + info); + } + } + + } /* if ( errorCode != NO_ENOUGH_MAIN_DATA_ERROR) */ + + for (ch = 0; ch < pVars->num_channels; ch++) + { + + pvmp3_reorder(pChVars[ch]->work_buf_int32, + &pVars->sideInfo.ch[ch].gran[gr], + &pChVars[ ch]->used_freq_lines, + info, + pVars->Scratch_mem); + + pvmp3_alias_reduction(pChVars[ch]->work_buf_int32, + &pVars->sideInfo.ch[ch].gran[gr], + &pChVars[ ch]->used_freq_lines, + info); + + + /* + * IMDCT + */ + /* set mxposition + * In case of mixed blocks, # of bands with long + * blocks (2 or 4) else 0 + */ + uint16 mixedBlocksLongBlocks = 0; /* 0 = long or short, 2=mixed, 4=mixed 2.5@8000 */ + if (pVars->sideInfo.ch[ch].gran[gr].mixed_block_flag && + pVars->sideInfo.ch[ch].gran[gr].window_switching_flag) + { + if ((info->version_x == MPEG_2_5) && (info->sampling_frequency == 2)) + { + mixedBlocksLongBlocks = 4; /* mpeg2.5 @ 8 KHz */ + } + else + { + mixedBlocksLongBlocks = 2; + } + } + + pvmp3_imdct_synth(pChVars[ch]->work_buf_int32, + pChVars[ch]->overlap, + pVars->sideInfo.ch[ch].gran[gr].block_type, + mixedBlocksLongBlocks, + pChVars[ ch]->used_freq_lines, + pVars->Scratch_mem); + + + /* + * Polyphase synthesis + */ + + pvmp3_poly_phase_synthesis(pChVars[ch], + pVars->num_channels, + pExt->equalizerType, + &ptrOutBuffer[ch]); + + + }/* end ch loop */ + + ptrOutBuffer += pVars->num_channels * SUBBANDS_NUMBER * FILTERBANK_BANDS; + } /* for (gr=0;gr<Max_gr;gr++) */ + + /* skip ancillary data */ + if (info->bitrate_index > 0) + { /* if not free-format */ + + int32 ancillary_data_lenght = pVars->predicted_frame_size << 3; + + ancillary_data_lenght -= pVars->inputStream.usedBits; + + /* skip ancillary data */ + if (ancillary_data_lenght > 0) + { + pVars->inputStream.usedBits += ancillary_data_lenght; + } + + } + + /* + * This overrides a possible NO_ENOUGH_MAIN_DATA_ERROR + */ + errorCode = NO_DECODING_ERROR; + + } + else + { + /* + * The info on the header leads to an unsupported layer, more data + * will not fix this, so this is a bad frame, + */ + + pExt->outputFrameSize = 0; + return UNSUPPORTED_LAYER; + } + + pExt->inputBufferUsedLength = pVars->inputStream.usedBits >> 3; + pExt->totalNumberOfBitsUsed += pVars->inputStream.usedBits; + pExt->version = info->version_x; + pExt->samplingRate = mp3_s_freq[info->version_x][info->sampling_frequency]; + pExt->bitRate = mp3_bitrate[pExt->version][info->bitrate_index]; + + + /* + * Always verify buffer overrun condition + */ + + if (pExt->inputBufferUsedLength > pExt->inputBufferCurrentLength) + { + pExt->outputFrameSize = 0; + errorCode = NO_ENOUGH_MAIN_DATA_ERROR; + } + + return errorCode; + +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +__inline void fillDataBuf(tmp3Bits *pMainData, + uint32 val) /* val to write into the buffer */ +{ + pMainData->pBuffer[module(pMainData->offset++, BUFSIZE)] = (uint8)val; +} + + +void fillMainDataBuf(void *pMem, int32 temp) +{ + tmp3dec_file *pVars = (tmp3dec_file *)pMem; + + + int32 offset = (pVars->inputStream.usedBits) >> INBUF_ARRAY_INDEX_SHIFT; + + /* + * Check if input circular buffer boundaries need to be enforced + */ + if ((offset + temp) < BUFSIZE) + { + uint8 * ptr = pVars->inputStream.pBuffer + offset; + + offset = pVars->mainDataStream.offset; + + /* + * Check if main data circular buffer boundaries need to be enforced + */ + if ((offset + temp) < BUFSIZE) + { + pv_memcpy((pVars->mainDataStream.pBuffer + offset), ptr, temp*sizeof(uint8)); + pVars->mainDataStream.offset += temp; + } + else + { + int32 tmp1 = *(ptr++); + for (int32 nBytes = temp >> 1; nBytes != 0; nBytes--) /* read main data. */ + { + int32 tmp2 = *(ptr++); + fillDataBuf(&pVars->mainDataStream, tmp1); + fillDataBuf(&pVars->mainDataStream, tmp2); + tmp1 = *(ptr++); + } + + if (temp&1) + { + fillDataBuf(&pVars->mainDataStream, tmp1); + } + + /* adjust circular buffer counter */ + pVars->mainDataStream.offset = module(pVars->mainDataStream.offset, BUFSIZE); + } + } + else + { + for (int32 nBytes = temp >> 1; nBytes != 0; nBytes--) /* read main data. */ + { + fillDataBuf(&pVars->mainDataStream, *(pVars->inputStream.pBuffer + module(offset++ , BUFSIZE))); + fillDataBuf(&pVars->mainDataStream, *(pVars->inputStream.pBuffer + module(offset++ , BUFSIZE))); + } + if (temp&1) + { + fillDataBuf(&pVars->mainDataStream, *(pVars->inputStream.pBuffer + module(offset , BUFSIZE))); + } + } + + + pVars->inputStream.usedBits += (temp) << INBUF_ARRAY_INDEX_SHIFT; +} + + + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +uint32 pvmp3_decoderMemRequirements(void) +{ + uint32 size; + + size = (uint32) sizeof(tmp3dec_file); + return (size); +} + + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +#include "pvmp3_decode_huff_cw.h" + +void pvmp3_InitDecoder(tPVMP3DecoderExternal *pExt, + void *pMem) +{ + + tmp3dec_file *pVars; + huffcodetab *pHuff; + + pVars = (tmp3dec_file *)pMem; + + pVars->num_channels = 0; + + pExt->totalNumberOfBitsUsed = 0; + pExt->inputBufferCurrentLength = 0; + pExt->inputBufferUsedLength = 0; + + pVars->mainDataStream.offset = 0; + + pv_memset((void*)pVars->mainDataBuffer, + 0, + BUFSIZE*sizeof(*pVars->mainDataBuffer)); + + + pVars->inputStream.pBuffer = pExt->pInputBuffer; + + /* + * Initialize huffman decoding table + */ + + pHuff = pVars->ht; + pHuff[0].linbits = 0; + pHuff[0].pdec_huff_tab = pvmp3_decode_huff_cw_tab0; + pHuff[1].linbits = 0; + pHuff[1].pdec_huff_tab = pvmp3_decode_huff_cw_tab1; + pHuff[2].linbits = 0; + pHuff[2].pdec_huff_tab = pvmp3_decode_huff_cw_tab2; + pHuff[3].linbits = 0; + pHuff[3].pdec_huff_tab = pvmp3_decode_huff_cw_tab3; + pHuff[4].linbits = 0; + pHuff[4].pdec_huff_tab = pvmp3_decode_huff_cw_tab0; /* tbl 4 is not used */ + pHuff[5].linbits = 4; + pHuff[5].pdec_huff_tab = pvmp3_decode_huff_cw_tab5; + pHuff[6].linbits = 0; + pHuff[6].pdec_huff_tab = pvmp3_decode_huff_cw_tab6; + pHuff[7].linbits = 0; + pHuff[7].pdec_huff_tab = pvmp3_decode_huff_cw_tab7; + pHuff[8].linbits = 0; + pHuff[8].pdec_huff_tab = pvmp3_decode_huff_cw_tab8; + pHuff[9].linbits = 0; + pHuff[9].pdec_huff_tab = pvmp3_decode_huff_cw_tab9; + pHuff[10].linbits = 0; + pHuff[10].pdec_huff_tab = pvmp3_decode_huff_cw_tab10; + pHuff[11].linbits = 0; + pHuff[11].pdec_huff_tab = pvmp3_decode_huff_cw_tab11; + pHuff[12].linbits = 0; + pHuff[12].pdec_huff_tab = pvmp3_decode_huff_cw_tab12; + pHuff[13].linbits = 0; + pHuff[13].pdec_huff_tab = pvmp3_decode_huff_cw_tab13; + pHuff[14].linbits = 0; + pHuff[14].pdec_huff_tab = pvmp3_decode_huff_cw_tab0; /* tbl 14 is not used */ + pHuff[15].linbits = 0; + pHuff[15].pdec_huff_tab = pvmp3_decode_huff_cw_tab15; + pHuff[16].linbits = 1; + pHuff[16].pdec_huff_tab = pvmp3_decode_huff_cw_tab16; + pHuff[17].linbits = 2; + pHuff[17].pdec_huff_tab = pvmp3_decode_huff_cw_tab16; + pHuff[18].linbits = 3; + pHuff[18].pdec_huff_tab = pvmp3_decode_huff_cw_tab16; + pHuff[19].linbits = 4; + pHuff[19].pdec_huff_tab = pvmp3_decode_huff_cw_tab16; + pHuff[20].linbits = 6; + pHuff[20].pdec_huff_tab = pvmp3_decode_huff_cw_tab16; + pHuff[21].linbits = 8; + pHuff[21].pdec_huff_tab = pvmp3_decode_huff_cw_tab16; + pHuff[22].linbits = 10; + pHuff[22].pdec_huff_tab = pvmp3_decode_huff_cw_tab16; + pHuff[23].linbits = 13; + pHuff[23].pdec_huff_tab = pvmp3_decode_huff_cw_tab16; + pHuff[24].linbits = 4; + pHuff[24].pdec_huff_tab = pvmp3_decode_huff_cw_tab24; + pHuff[25].linbits = 5; + pHuff[25].pdec_huff_tab = pvmp3_decode_huff_cw_tab24; + pHuff[26].linbits = 6; + pHuff[26].pdec_huff_tab = pvmp3_decode_huff_cw_tab24; + pHuff[27].linbits = 7; + pHuff[27].pdec_huff_tab = pvmp3_decode_huff_cw_tab24; + pHuff[28].linbits = 8; + pHuff[28].pdec_huff_tab = pvmp3_decode_huff_cw_tab24; + pHuff[29].linbits = 9; + pHuff[29].pdec_huff_tab = pvmp3_decode_huff_cw_tab24; + pHuff[30].linbits = 11; + pHuff[30].pdec_huff_tab = pvmp3_decode_huff_cw_tab24; + pHuff[31].linbits = 13; + pHuff[31].pdec_huff_tab = pvmp3_decode_huff_cw_tab24; + pHuff[32].linbits = 0; + pHuff[32].pdec_huff_tab = pvmp3_decode_huff_cw_tab32; + pHuff[33].linbits = 0; + pHuff[33].pdec_huff_tab = pvmp3_decode_huff_cw_tab33; + + /* + * Initialize polysynthesis circular buffer mechanism + */ + /* clear buffers */ + + pvmp3_resetDecoder(pMem); + +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + + +void pvmp3_resetDecoder(void *pMem) +{ + + tmp3dec_file *pVars; + tmp3dec_chan *pChVars[CHAN]; + + pVars = (tmp3dec_file *)pMem; + pChVars[ LEFT] = &pVars->perChan[ LEFT]; + pChVars[RIGHT] = &pVars->perChan[RIGHT]; + + pVars->frame_start = 0; + + pVars->mainDataStream.offset = 0; + + pVars->mainDataStream.pBuffer = pVars->mainDataBuffer; + pVars->mainDataStream.usedBits = 0; + + + pVars->inputStream.usedBits = 0; // in bits + + + pChVars[ LEFT]->used_freq_lines = 575; + pChVars[RIGHT]->used_freq_lines = 575; + + + /* + * Initialize polysynthesis circular buffer mechanism + */ + + pv_memset((void*)&pChVars[ LEFT]->circ_buffer[576], + 0, + 480*sizeof(pChVars[ LEFT]->circ_buffer[0])); + pv_memset((void*)&pChVars[RIGHT]->circ_buffer[576], + 0, + 480*sizeof(pChVars[RIGHT]->circ_buffer[0])); + + + pv_memset((void*)pChVars[ LEFT]->overlap, + 0, + SUBBANDS_NUMBER*FILTERBANK_BANDS*sizeof(pChVars[ LEFT]->overlap[0])); + + + pv_memset((void*)pChVars[ RIGHT]->overlap, + 0, + SUBBANDS_NUMBER*FILTERBANK_BANDS*sizeof(pChVars[ RIGHT]->overlap[0])); + + + + + + /* + * Clear all the structures + */ + + + pv_memset((void*)&pVars->scaleFactors[RIGHT], + 0, + sizeof(mp3ScaleFactors)); + + pv_memset((void*)&pVars->scaleFactors[LEFT], + 0, + sizeof(mp3ScaleFactors)); + + pv_memset((void*)&pVars->sideInfo, + 0, + sizeof(mp3SideInfo)); + + pv_memset((void*)&pVars->sideInfo, + 0, + sizeof(mp3SideInfo)); + +} diff --git a/ohos-specific/pvmp3dec/src/pvmp3_framedecoder.h b/ohos-specific/pvmp3dec/src/pvmp3_framedecoder.h new file mode 100644 index 0000000000..f6d4a3505c --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_framedecoder.h @@ -0,0 +1,115 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_framedecoder.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_FRAMEDECODER_H +#define PVMP3_FRAMEDECODER_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" +#include "pvmp3decoder_api.h" +#include "s_mp3bits.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + + ERROR_CODE pvmp3_framedecoder(tPVMP3DecoderExternal *pExt, + void *pMem); + + + + uint32 pvmp3_decoderMemRequirements(void); + + void pvmp3_InitDecoder(tPVMP3DecoderExternal *pExt, + void *pMem); + + + void pvmp3_resetDecoder(void *pMem); + + + void fillMainDataBuf(void *pMem, int32 temp); + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_get_main_data_size.cpp b/ohos-specific/pvmp3dec/src/pvmp3_get_main_data_size.cpp new file mode 100644 index 0000000000..423a7b1283 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_get_main_data_size.cpp @@ -0,0 +1,180 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_get_main_data_size.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Input + mp3Header *info, pointer to mp3 header info structure + tmp3dec_file *pVars + contains information that needs to persist + between calls to this function, or is too big to + be placed on the stack, even though the data is + only needed during execution of this function + + Returns + + main data frame size + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + get main data frame size + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_tables.h" +#include "pvmp3_get_main_data_size.h" +#include "pv_mp3dec_fxd_op.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +int32 pvmp3_get_main_data_size(mp3Header *info, + tmp3dec_file *pVars) +{ + + + int32 numBytes = fxp_mul32_Q28(mp3_bitrate[info->version_x][info->bitrate_index] << 20, + inv_sfreq[info->sampling_frequency]); + + + numBytes >>= (20 - info->version_x); + + /* + * Remove the size of the side information from the main data total + */ + if (info->version_x == MPEG_1) + { + pVars->predicted_frame_size = numBytes; + if (info->mode == MPG_MD_MONO) + { + numBytes -= 17; + } + else + { + numBytes -= 32; + } + } + else + { + numBytes >>= 1; + pVars->predicted_frame_size = numBytes; + + if (info->mode == MPG_MD_MONO) + { + numBytes -= 9; + } + else + { + numBytes -= 17; + } + } + + if (info->padding) + { + numBytes++; + pVars->predicted_frame_size++; + } + + if (info->error_protection) + { + numBytes -= 6; + } + else + { + numBytes -= 4; + } + + + if (numBytes < 0) + { + numBytes = 0; + } + + return(numBytes); +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_get_main_data_size.h b/ohos-specific/pvmp3dec/src/pvmp3_get_main_data_size.h new file mode 100644 index 0000000000..8e9eaa8a59 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_get_main_data_size.h @@ -0,0 +1,101 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_get_main_data_size.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_GET_MAIN_DATA_SIZE_H +#define PVMP3_GET_MAIN_DATA_SIZE_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" +#include "s_tmp3dec_file.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + int32 pvmp3_get_main_data_size(mp3Header *info, + tmp3dec_file *pVars); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_get_scale_factors.cpp b/ohos-specific/pvmp3dec/src/pvmp3_get_scale_factors.cpp new file mode 100644 index 0000000000..f1a3ff8c05 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_get_scale_factors.cpp @@ -0,0 +1,226 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_get_scale_factors.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Input + mp3ScaleFactors *scalefac, + mp3SideInfo *si, side info + int32 gr, granule + int32 ch, channel + tbits *pMainData bit stream + + Returns + + mp3ScaleFactors *scalefac, scale factors + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + get scale factors + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_get_scale_factors.h" +#include "pvmp3_getbits.h" +#include "mp3_mem_funcs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define Qfmt_28(a)(int32(double(0x10000000)*a)) + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ +const int32 slen[2][16] = +{ + {0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4}, + {0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3} +}; + +const struct +{ + int32 l[5]; + int32 s[3]; +} sfbtable = +{ + {0, 6, 11, 16, 21}, + {0, 6, 12} +}; + +const int32 long_sfbtable[4] = { 6, 5, 5, 5}; + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_get_scale_factors(mp3ScaleFactors *scalefac, + mp3SideInfo *si, + int32 gr, + int32 ch, + tmp3Bits *pMainData) +{ + int32 sfb; + int32 i; + int32 window; + granuleInfo *gr_info = &(si->ch[ch].gran[gr]); + + if (gr_info->window_switching_flag && (gr_info->block_type == 2)) + { + if (gr_info->mixed_block_flag) + { /* MIXED */ + for (sfb = 0; sfb < 8; sfb++) + { + scalefac->l[sfb] = getNbits(pMainData, slen[0][gr_info->scalefac_compress]); + } + + for (sfb = 3; sfb < 6; sfb++) + { + for (window = 0; window < 3; window++) + { + scalefac->s[window][sfb] = getNbits(pMainData, slen[0][gr_info->scalefac_compress]); + } + } + for (sfb = 6; sfb < 12; sfb++) + { + for (window = 0; window < 3; window++) + { + scalefac->s[window][sfb] = getNbits(pMainData, slen[1][gr_info->scalefac_compress]); + } + } + } + else + { /* SHORT*/ + for (i = 0; i < 2; i++) + { + for (sfb = sfbtable.s[i]; sfb < sfbtable.s[i+1]; sfb++) + { + for (window = 0; window < 3; window++) + { + scalefac->s[window][sfb] = getNbits(pMainData, slen[i][gr_info->scalefac_compress]); + } + } + } + } + + scalefac->s[0][12] = 0; /* sfb = 12 win= 0 */ + scalefac->s[1][12] = 0; /* sfb = 12 win= 1 */ + scalefac->s[2][12] = 0; /* sfb = 12 win= 2 */ + } + else + { /* LONG types 0,1,3 */ + + int32 *ptr = &scalefac->l[0]; + + for (i = 0; i < 4; i++) + { + int32 tmp4 = long_sfbtable[i]; + + if ((si->ch[ch].scfsi[i] == 0) || (gr == 0)) + { + int32 tmp1 = slen[(i>>1)][gr_info->scalefac_compress]; + + if (tmp1) + { + int32 tmp2 = tmp1 * tmp4; + uint32 tmp3 = getNbits(pMainData, tmp2); + tmp4 = 32 - tmp1; + for (; tmp2 > 0; tmp2 -= tmp1) + { + *(ptr++) = (tmp3 << (32 - tmp2)) >> tmp4; + } + } + else + { + for (sfb = tmp4; sfb != 0; sfb--) + { + *(ptr++) = 0; + } + + } + } + else + { + ptr += tmp4; + } + } + scalefac->l[21] = 0; + scalefac->l[22] = 0; + } +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_get_scale_factors.h b/ohos-specific/pvmp3dec/src/pvmp3_get_scale_factors.h new file mode 100644 index 0000000000..d4f262bf49 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_get_scale_factors.h @@ -0,0 +1,104 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_get_scale_factors.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_GET_SCALE_FACTORS_H +#define PVMP3_GET_SCALE_FACTORS_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" +#include "s_mp3bits.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_get_scale_factors(mp3ScaleFactors *scalefac, + mp3SideInfo *si, + int32 gr, + int32 ch, + tmp3Bits *pMainData); + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_get_side_info.cpp b/ohos-specific/pvmp3dec/src/pvmp3_get_side_info.cpp new file mode 100644 index 0000000000..7eaa860731 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_get_side_info.cpp @@ -0,0 +1,285 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_get_side_info.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + mp3SideInfo *si, + mp3Header *info, mp3 header information + uint32 *crc initialized crc value (if enabled) + + + Returns + + mp3SideInfo *si, side information + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + acquires side information + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_get_side_info.h" +#include "pvmp3_crc.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +ERROR_CODE pvmp3_get_side_info(tmp3Bits *inputStream, + mp3SideInfo *si, + mp3Header *info, + uint32 *crc) +{ + int32 ch, gr; + uint32 tmp; + + int stereo = (info->mode == MPG_MD_MONO) ? 1 : 2; + + if (info->version_x == MPEG_1) + { + if (stereo == 1) + { + tmp = getbits_crc(inputStream, 14, crc, info->error_protection); + si->main_data_begin = (tmp << 18) >> 23; /* 9 */ + si->private_bits = (tmp << 23) >> 27; /* 5 */ + } + else + { + tmp = getbits_crc(inputStream, 12, crc, info->error_protection); + si->main_data_begin = (tmp << 20) >> 23; /* 9 */ + si->private_bits = (tmp << 23) >> 29; /* 3 */ + + } + + for (ch = 0; ch < stereo; ch++) + { + tmp = getbits_crc(inputStream, 4, crc, info->error_protection); + si->ch[ch].scfsi[0] = (tmp << 28) >> 31; /* 1 */ + si->ch[ch].scfsi[1] = (tmp << 29) >> 31; /* 1 */ + si->ch[ch].scfsi[2] = (tmp << 30) >> 31; /* 1 */ + si->ch[ch].scfsi[3] = tmp & 1; /* 1 */ + } + + for (gr = 0; gr < 2 ; gr++) + { + for (ch = 0; ch < stereo; ch++) + { + si->ch[ch].gran[gr].part2_3_length = getbits_crc(inputStream, 12, crc, info->error_protection); + tmp = getbits_crc(inputStream, 22, crc, info->error_protection); + + si->ch[ch].gran[gr].big_values = (tmp << 10) >> 23; /* 9 */ + si->ch[ch].gran[gr].global_gain = ((tmp << 19) >> 24) - 210; /* 8 */ + si->ch[ch].gran[gr].scalefac_compress = (tmp << 27) >> 28; /* 4 */ + si->ch[ch].gran[gr].window_switching_flag = tmp & 1; /* 1 */ + + if (si->ch[ch].gran[gr].window_switching_flag) + { + tmp = getbits_crc(inputStream, 22, crc, info->error_protection); + + si->ch[ch].gran[gr].block_type = (tmp << 10) >> 30; /* 2 */; + si->ch[ch].gran[gr].mixed_block_flag = (tmp << 12) >> 31; /* 1 */; + + si->ch[ch].gran[gr].table_select[0] = (tmp << 13) >> 27; /* 5 */; + si->ch[ch].gran[gr].table_select[1] = (tmp << 18) >> 27; /* 5 */; + + si->ch[ch].gran[gr].subblock_gain[0] = (tmp << 23) >> 29; /* 3 */; + si->ch[ch].gran[gr].subblock_gain[1] = (tmp << 26) >> 29; /* 3 */; + si->ch[ch].gran[gr].subblock_gain[2] = (tmp << 29) >> 29; /* 3 */; + + /* Set region_count parameters since they are implicit in this case. */ + + if (si->ch[ch].gran[gr].block_type == 0) + { + return(SIDE_INFO_ERROR); + } + else if ((si->ch[ch].gran[gr].block_type == 2) + && (si->ch[ch].gran[gr].mixed_block_flag == 0)) + { + si->ch[ch].gran[gr].region0_count = 8; /* MI 9; */ + si->ch[ch].gran[gr].region1_count = 12; + } + else + { + si->ch[ch].gran[gr].region0_count = 7; /* MI 8; */ + si->ch[ch].gran[gr].region1_count = 13; + } + } + else + { + tmp = getbits_crc(inputStream, 22, crc, info->error_protection); + + si->ch[ch].gran[gr].table_select[0] = (tmp << 10) >> 27; /* 5 */; + si->ch[ch].gran[gr].table_select[1] = (tmp << 15) >> 27; /* 5 */; + si->ch[ch].gran[gr].table_select[2] = (tmp << 20) >> 27; /* 5 */; + + si->ch[ch].gran[gr].region0_count = (tmp << 25) >> 28; /* 4 */; + si->ch[ch].gran[gr].region1_count = (tmp << 29) >> 29; /* 3 */; + + si->ch[ch].gran[gr].block_type = 0; + } + + tmp = getbits_crc(inputStream, 3, crc, info->error_protection); + si->ch[ch].gran[gr].preflag = (tmp << 29) >> 31; /* 1 */ + si->ch[ch].gran[gr].scalefac_scale = (tmp << 30) >> 31; /* 1 */ + si->ch[ch].gran[gr].count1table_select = tmp & 1; /* 1 */ + } + } + } + else /* Layer 3 LSF */ + { + si->main_data_begin = getbits_crc(inputStream, 8, crc, info->error_protection); + si->private_bits = getbits_crc(inputStream, stereo, crc, info->error_protection); + + for (ch = 0; ch < stereo; ch++) + { + tmp = getbits_crc(inputStream, 21, crc, info->error_protection); + si->ch[ch].gran[0].part2_3_length = (tmp << 11) >> 20; /* 12 */ + si->ch[ch].gran[0].big_values = (tmp << 23) >> 23; /* 9 */ + + tmp = getbits_crc(inputStream, 18, crc, info->error_protection); + si->ch[ch].gran[0].global_gain = ((tmp << 14) >> 24) - 210; /* 8 */ + si->ch[ch].gran[0].scalefac_compress = (tmp << 22) >> 23; /* 9 */ + si->ch[ch].gran[0].window_switching_flag = tmp & 1; /* 1 */ + + if (si->ch[ch].gran[0].window_switching_flag) + { + + tmp = getbits_crc(inputStream, 22, crc, info->error_protection); + + si->ch[ch].gran[0].block_type = (tmp << 10) >> 30; /* 2 */; + si->ch[ch].gran[0].mixed_block_flag = (tmp << 12) >> 31; /* 1 */; + + si->ch[ch].gran[0].table_select[0] = (tmp << 13) >> 27; /* 5 */; + si->ch[ch].gran[0].table_select[1] = (tmp << 18) >> 27; /* 5 */; + + si->ch[ch].gran[0].subblock_gain[0] = (tmp << 23) >> 29; /* 3 */; + si->ch[ch].gran[0].subblock_gain[1] = (tmp << 26) >> 29; /* 3 */; + si->ch[ch].gran[0].subblock_gain[2] = (tmp << 29) >> 29; /* 3 */; + + /* Set region_count parameters since they are implicit in this case. */ + + if (si->ch[ch].gran[0].block_type == 0) + { + return(SIDE_INFO_ERROR); + } + else if ((si->ch[ch].gran[0].block_type == 2) + && (si->ch[ch].gran[0].mixed_block_flag == 0)) + { + si->ch[ch].gran[0].region0_count = 8; /* MI 9; */ + si->ch[ch].gran[0].region1_count = 12; + } + else + { + si->ch[ch].gran[0].region0_count = 7; /* MI 8; */ + si->ch[ch].gran[0].region1_count = 13; + } + } + else + { + tmp = getbits_crc(inputStream, 22, crc, info->error_protection); + + si->ch[ch].gran[0].table_select[0] = (tmp << 10) >> 27; /* 5 */; + si->ch[ch].gran[0].table_select[1] = (tmp << 15) >> 27; /* 5 */; + si->ch[ch].gran[0].table_select[2] = (tmp << 20) >> 27; /* 5 */; + + si->ch[ch].gran[0].region0_count = (tmp << 25) >> 28; /* 4 */; + si->ch[ch].gran[0].region1_count = (tmp << 29) >> 29; /* 3 */; + + si->ch[ch].gran[0].block_type = 0; + } + + tmp = getbits_crc(inputStream, 2, crc, info->error_protection); + si->ch[ch].gran[0].scalefac_scale = tmp >> 1; /* 1 */ + si->ch[ch].gran[0].count1table_select = tmp & 1; /* 1 */ + + } + } + return (NO_DECODING_ERROR); +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_get_side_info.h b/ohos-specific/pvmp3dec/src/pvmp3_get_side_info.h new file mode 100644 index 0000000000..2d6ccd8e5d --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_get_side_info.h @@ -0,0 +1,102 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_get_side_info.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_GET_SIDE_INFO_H +#define PVMP3_GET_SIDE_INFO_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" +#include "s_mp3bits.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + ERROR_CODE pvmp3_get_side_info(tmp3Bits *inputStream, + mp3SideInfo *si, + mp3Header *info, + uint32 *crc); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_getbits.cpp b/ohos-specific/pvmp3dec/src/pvmp3_getbits.cpp new file mode 100644 index 0000000000..8ff79538b5 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_getbits.cpp @@ -0,0 +1,257 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_getbits.cpp + + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Inputs: + + tmp3Bits *inputStream, structure holding the input stream parameters + int32 neededBits number of bits to read from the bit stream + + Outputs: + + word parsed from teh bitstream, with size neededBits-bits, + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_getbits.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +uint32 getNbits(tmp3Bits *ptBitStream, + int32 neededBits) /* number of bits to read from the bitstream (up to 25) */ +{ + + uint32 offset; + uint32 bitIndex; + uint8 Elem; /* Needs to be same type as pInput->pBuffer */ + uint8 Elem1; + uint8 Elem2; + uint8 Elem3; + uint32 returnValue = 0; + + if (!neededBits) + { + return (returnValue); + } + + offset = (ptBitStream->usedBits) >> INBUF_ARRAY_INDEX_SHIFT; + + Elem = *(ptBitStream->pBuffer + module(offset , BUFSIZE)); + Elem1 = *(ptBitStream->pBuffer + module(offset + 1, BUFSIZE)); + Elem2 = *(ptBitStream->pBuffer + module(offset + 2, BUFSIZE)); + Elem3 = *(ptBitStream->pBuffer + module(offset + 3, BUFSIZE)); + + + returnValue = (((uint32)(Elem)) << 24) | + (((uint32)(Elem1)) << 16) | + (((uint32)(Elem2)) << 8) | + ((uint32)(Elem3)); + + /* Remove extra high bits by shifting up */ + bitIndex = module(ptBitStream->usedBits, INBUF_BIT_WIDTH); + + /* This line is faster than to mask off the high bits. */ + returnValue <<= bitIndex; + + /* Move the field down. */ + returnValue >>= (32 - neededBits); + + ptBitStream->usedBits += neededBits; + + return (returnValue); +} + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +uint16 getUpTo9bits(tmp3Bits *ptBitStream, + int32 neededBits) /* number of bits to read from the bit stream 2 to 9 */ +{ + + uint32 offset; + uint32 bitIndex; + uint8 Elem; /* Needs to be same type as pInput->pBuffer */ + uint8 Elem1; + uint16 returnValue; + + offset = (ptBitStream->usedBits) >> INBUF_ARRAY_INDEX_SHIFT; + + Elem = *(ptBitStream->pBuffer + module(offset , BUFSIZE)); + Elem1 = *(ptBitStream->pBuffer + module(offset + 1, BUFSIZE)); + + + returnValue = (((uint16)(Elem)) << 8) | + ((uint16)(Elem1)); + + /* Remove extra high bits by shifting up */ + bitIndex = module(ptBitStream->usedBits, INBUF_BIT_WIDTH); + + ptBitStream->usedBits += neededBits; + /* This line is faster than to mask off the high bits. */ + returnValue = (returnValue << (bitIndex)); + + /* Move the field down. */ + + return (uint16)(returnValue >> (16 - neededBits)); + +} + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +uint32 getUpTo17bits(tmp3Bits *ptBitStream, + int32 neededBits) /* number of bits to read from the bit stream 2 to 8 */ +{ + + uint32 offset; + uint32 bitIndex; + uint8 Elem; /* Needs to be same type as pInput->pBuffer */ + uint8 Elem1; + uint8 Elem2; + uint32 returnValue; + + offset = (ptBitStream->usedBits) >> INBUF_ARRAY_INDEX_SHIFT; + + Elem = *(ptBitStream->pBuffer + module(offset , BUFSIZE)); + Elem1 = *(ptBitStream->pBuffer + module(offset + 1, BUFSIZE)); + Elem2 = *(ptBitStream->pBuffer + module(offset + 2, BUFSIZE)); + + + returnValue = (((uint32)(Elem)) << 16) | + (((uint32)(Elem1)) << 8) | + ((uint32)(Elem2)); + + /* Remove extra high bits by shifting up */ + bitIndex = module(ptBitStream->usedBits, INBUF_BIT_WIDTH); + + ptBitStream->usedBits += neededBits; + /* This line is faster than to mask off the high bits. */ + returnValue = 0xFFFFFF & (returnValue << (bitIndex)); + + /* Move the field down. */ + + return (uint32)(returnValue >> (24 - neededBits)); + +} + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +uint8 get1bit(tmp3Bits *ptBitStream) /* number of bits to read from the bit stream */ +{ + + uint32 offset; + uint32 bitIndex; + uint8 returnValue; + + offset = (ptBitStream->usedBits) >> INBUF_ARRAY_INDEX_SHIFT; + + returnValue = *(ptBitStream->pBuffer + module(offset , BUFSIZE)); + + /* Remove extra high bits by shifting up */ + bitIndex = module(ptBitStream->usedBits, INBUF_BIT_WIDTH); + ptBitStream->usedBits++; + + /* This line is faster than to mask off the high bits. */ + returnValue = (returnValue << (bitIndex)); + + return (uint8)(returnValue >> 7); + +} + + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_getbits.h b/ohos-specific/pvmp3dec/src/pvmp3_getbits.h new file mode 100644 index 0000000000..b058b007c8 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_getbits.h @@ -0,0 +1,112 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_getbits.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_GETBITS_H +#define PVMP3_GETBITS_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_dec_defs.h" +#include "s_mp3bits.h" +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ +#define INBUF_ARRAY_INDEX_SHIFT (3) +#define INBUF_BIT_WIDTH (1<<(INBUF_ARRAY_INDEX_SHIFT)) +#define INBUF_BIT_MODULO_MASK ((INBUF_BIT_WIDTH)-1) + + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + uint32 getNbits(tmp3Bits *pMainData, + int32 neededBits); + + uint16 getUpTo9bits(tmp3Bits *pMainData, + int32 neededBits); + + uint32 getUpTo17bits(tmp3Bits *pMainData, + int32 neededBits); + + uint8 get1bit(tmp3Bits *pMainData); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_huffman_decoding.cpp b/ohos-specific/pvmp3dec/src/pvmp3_huffman_decoding.cpp new file mode 100644 index 0000000000..5d58cd2c22 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_huffman_decoding.cpp @@ -0,0 +1,304 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_huffman_decoding.cpp + + Funtions: + pvmp3_huffman_quad_decoding + pvmp3_huffman_pair_decoding + pvmp3_huffman_pair_decoding_linbits + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Inputs: + struct huffcodetab *h, pointer to huffman code record + int32 *x, returns decoded x value + int32 *y, returns decoded y value + int32 *v, returns decoded v value (only in quad function) + int32 *w, returns decoded w value (only in quad function) + tbits *pMainData bit stream + + Outputs: + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + These functions are used to decode huffman codewords from the input + bitstream using combined binary search and look-up table approach. + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_dec_defs.h" +#include "pv_mp3_huffman.h" +#include "pvmp3_getbits.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + + +void pvmp3_huffman_quad_decoding(struct huffcodetab *h, + int32 *is, + tmp3Bits *pMainData) +{ + + int32 x; + int32 y; + int32 v; + int32 w; + + y = (*h->pdec_huff_tab)(pMainData); + + + if (y) + { + v = (y >> 3); + + if (v) + { + if (get1bit(pMainData)) + { + v = -v; + } + } + w = (y >> 2) & 1; + if (w) + { + if (get1bit(pMainData)) + { + w = -w; + } + } + x = (y >> 1) & 1; + if (x) + { + if (get1bit(pMainData)) + { + x = -x; + } + } + y = y & 1; + if (y) + { + if (get1bit(pMainData)) + { + y = -y; + } + } + + } + else + { + v = 0; + w = 0; + x = 0; + + } + + *is = v; + *(is + 1) = w; + *(is + 2) = x; + *(is + 3) = y; + +} + + + +void pvmp3_huffman_pair_decoding(struct huffcodetab *h, /* pointer to huffman code record */ + int32 *is, + tmp3Bits *pMainData) +{ + /* Lookup in Huffman table. */ + int32 x; + int32 y; + + uint16 cw = (*h->pdec_huff_tab)(pMainData); + + /* Process sign and escape encodings for dual tables. */ + + + if (cw) + { + x = cw >> 4; + + if (x) + { + if (get1bit(pMainData)) + { + x = -x; + } + y = cw & 0xf; + if (y && get1bit(pMainData)) + { + y = -y; + } + + } + else + { + y = cw & 0xf; + if (get1bit(pMainData)) + { + y = -y; + } + } + + *is = x; + *(is + 1) = y; + } + else + { + *is = 0; + *(is + 1) = 0; + } + + + +} + + + + +void pvmp3_huffman_pair_decoding_linbits(struct huffcodetab *h, /* pointer to huffman code record */ + int32 *is, + tmp3Bits *pMainData) +{ + int32 x; + int32 y; + + uint16 cw; + /* Lookup in Huffman table. */ + + + cw = (*h->pdec_huff_tab)(pMainData); + x = cw >> 4; + + /* Process sign and escape encodings for dual tables. */ + + + if (15 == (uint32)x) + { + int32 tmp = getUpTo17bits(pMainData, (h->linbits + 1)); + x += tmp >> 1; + if (tmp&1) + { + x = -x; + } + } + else if (x) + { + if (get1bit(pMainData)) + { + x = -x; + } + } + + y = cw & 0xf; + if (15 == (uint32)y) + { + int32 tmp = getUpTo17bits(pMainData, (h->linbits + 1)); + y += tmp >> 1; + if (tmp&1) + { + y = -y; + } + } + else if (y) + { + if (get1bit(pMainData)) + { + y = -y; + } + } + + *is = x; + *(is + 1) = y; + +} + + + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_huffman_parsing.cpp b/ohos-specific/pvmp3dec/src/pvmp3_huffman_parsing.cpp new file mode 100644 index 0000000000..ff815dc622 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_huffman_parsing.cpp @@ -0,0 +1,328 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ + +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_huffman_decoding.cpp + + Funtions: + pvmp3_huffman_quad_decoding + pvmp3_huffman_pair_decoding + pvmp3_huffman_pair_decoding_linbits + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Inputs: + int32 is[], + granuleInfo *grInfo, information for the given channel and granule + tmp3dec_file *pVars, decoder state structure + int32 part2_start, index to beginning of part 2 data + mp3Header *info mp3 header info + + Outputs: + int32 is[], uncompressed data + + Return: + non zero frequency lines + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + These functions are used to decode huffman codewords from the input + bitstream using combined binary search and look-up table approach. + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pv_mp3_huffman.h" +#include "s_mp3bits.h" +#include "mp3_mem_funcs.h" +#include "pvmp3_tables.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +int32 pvmp3_huffman_parsing(int32 is[SUBBANDS_NUMBER*FILTERBANK_BANDS], + granuleInfo *grInfo, + tmp3dec_file *pVars, + int32 part2_start, + mp3Header *info) + + +{ + int32 i; + int32 region1Start; + int32 region2Start; + int32 sfreq; + uint32 grBits; + void(*pt_huff)(struct huffcodetab *, int32 *, tmp3Bits *); + struct huffcodetab *h; + + tmp3Bits *pMainData = &pVars->mainDataStream; + + + /*int32 bt = (*si).ch[ch].gr[gr].window_switching_flag && ((*si).ch[ch].gr[gr].block_type == 2);*/ + + sfreq = info->sampling_frequency + info->version_x + (info->version_x << 1); + + /* Find region boundary for short block case. */ + + + if ((grInfo->window_switching_flag) && (grInfo->block_type == 2)) + { + if (info->version_x == MPEG_1) + { + /* Region2. */ + region1Start = 12; + } + else + { + /* Region2. */ + i = grInfo->region0_count + 1; + region1Start = mp3_sfBandIndex[sfreq].s[i/3]; + } + + region1Start += region1Start << 1; + region2Start = 576; /* No Region2 for short block case. */ + } + else + { /* Find region boundary for long block case. */ + i = grInfo->region0_count + 1; + region1Start = mp3_sfBandIndex[sfreq].l[i]; + region2Start = mp3_sfBandIndex[sfreq].l[i + grInfo->region1_count + 1]; + } + + /* Read bigvalues area. */ + + + if (grInfo->big_values > (FILTERBANK_BANDS*SUBBANDS_NUMBER >> 1)) + { + grInfo->big_values = (FILTERBANK_BANDS * SUBBANDS_NUMBER >> 1); + } + + if ((grInfo->big_values << 1) > (uint32)region2Start) + { + h = &(pVars->ht[grInfo->table_select[0]]); + if (h->linbits) + { + pt_huff = pvmp3_huffman_pair_decoding_linbits; + } + else + { + pt_huff = pvmp3_huffman_pair_decoding; + } + + for (i = 0; i < region1Start; i += 2) + { + (*pt_huff)(h, &is[i], pMainData); + } + + h = &(pVars->ht[grInfo->table_select[1]]); + if (h->linbits) + { + pt_huff = pvmp3_huffman_pair_decoding_linbits; + } + else + { + pt_huff = pvmp3_huffman_pair_decoding; + } + + for (; i < region2Start; i += 2) + { + (*pt_huff)(h, &is[i], pMainData); + } + + h = &(pVars->ht[grInfo->table_select[2]]); + if (h->linbits) + { + pt_huff = pvmp3_huffman_pair_decoding_linbits; + } + else + { + pt_huff = pvmp3_huffman_pair_decoding; + } + + for (; (uint32)i < (grInfo->big_values << 1); i += 2) + { + (*pt_huff)(h, &is[i], pMainData); + } + } + else if ((grInfo->big_values << 1) > (uint32)region1Start) + { + h = &(pVars->ht[grInfo->table_select[0]]); + if (h->linbits) + { + pt_huff = pvmp3_huffman_pair_decoding_linbits; + } + else + { + pt_huff = pvmp3_huffman_pair_decoding; + } + for (i = 0; i < region1Start; i += 2) + { + (*pt_huff)(h, &is[i], pMainData); + } + + h = &(pVars->ht[grInfo->table_select[1]]); + if (h->linbits) + { + pt_huff = pvmp3_huffman_pair_decoding_linbits; + } + else + { + pt_huff = pvmp3_huffman_pair_decoding; + } + for (; (uint32)i < (grInfo->big_values << 1); i += 2) + { + (*pt_huff)(h, &is[i], pMainData); + } + } + else + { + h = &(pVars->ht[grInfo->table_select[0]]); + if (h->linbits) + { + pt_huff = pvmp3_huffman_pair_decoding_linbits; + } + else + { + pt_huff = pvmp3_huffman_pair_decoding; + } + + for (i = 0; (uint32)i < (grInfo->big_values << 1); i += 2) + { + (*pt_huff)(h, &is[i], pMainData); + } + } + + + + /* Read count1 area. */ + h = &(pVars->ht[grInfo->count1table_select+32]); + + grBits = part2_start + grInfo->part2_3_length; + + while ((pMainData->usedBits < grBits) && + (i < FILTERBANK_BANDS*SUBBANDS_NUMBER - 4)) + { + pvmp3_huffman_quad_decoding(h, &is[i], pMainData); + i += 4; + } + + if ((pMainData->usedBits < grBits) && + (i < FILTERBANK_BANDS*SUBBANDS_NUMBER)) + { + pvmp3_huffman_quad_decoding(h, &is[i], pMainData); + i += 4; + + if ((i - 2) >= FILTERBANK_BANDS*SUBBANDS_NUMBER) + { + i -= 2; + is[i] = 0; + is[(i+1)] = 0; + } + } + + if (pMainData->usedBits > grBits) + { + i -= 4; + + if (i < 0 || i > FILTERBANK_BANDS*SUBBANDS_NUMBER - 4) + { + /* illegal parameters may cause invalid access, set i to 0 */ + i = 0; + } + + is[i] = 0; + is[(i+1)] = 0; + is[(i+2)] = 0; + is[(i+3)] = 0; + + } + + pMainData->usedBits = grBits; + + return (i); + +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_imdct_synth.cpp b/ohos-specific/pvmp3dec/src/pvmp3_imdct_synth.cpp new file mode 100644 index 0000000000..11961d1e1d --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_imdct_synth.cpp @@ -0,0 +1,376 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_imdct_synth.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Input + int32 in[], Pointer to spec values of current channel + int32 overlap[], Pointer to overlap values of current channel + uint32 blk_type, Block type + int16 mx_band, In case of mixed blocks, # of bands with long + blocks (2 or 4) else 0 + int32 *Scratch_mem + Returns + + int32 in[], + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + The frequency lines are preprocessed by the "alias reduction" scheme + and fed into the IMDCT matrix, each 18 into one transform block. + The first half of the output values are added to the stored overlap + values from the last block. These values are new output values and + are input values for the polyphase filterbank. The second half of the + output values is stored for overlap with the next data granule. + The number of windowed samples is 12 for short blocks, and 36 for long + blocks + +Windowing + + Depending on window_switching_flag[gr][ch], block_type[gr][ch] and + mixed_block_flag[gr][ch] different shapes of windows are used. + normal window + start window + stop window + short windows + Each of the three short blocks is windowed separately. + The windowed short blocks must be overlapped and concatenated. + +Overlapping and adding with previous block + + The first half (18 values) of the current block (36 values) has to be + overlapped with the second half of the previous block. The second half + of the current block has to be stored for overlapping with the next block + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_imdct_synth.h" +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_dec_defs.h" +#include "pvmp3_mdct_18.h" +#include "pvmp3_mdct_6.h" +#include "mp3_mem_funcs.h" + + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define LONG 0 +#define START 1 +#define SHORT 2 +#define STOP 3 + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ +/* + * sin(pi/36*(k+0.5)),k=0..35 + */ + +const int32 normal_win[36] = +{ + Qfmt_31(0.08723877473068f), Qfmt_31(0.26105238444010f), Qfmt_31(0.43287922787620f), + Qfmt_31(0.60141159900854f), Qfmt_31(0.76536686473018f), Qfmt_31(0.92349722647006f), + Qfmt_31(0.53729960834682f), Qfmt_31(0.60876142900872f), Qfmt_31(0.67559020761566f), + Qfmt_31(-0.73727733681012f), Qfmt_31(-0.79335334029124f), Qfmt_31(0.84339144581289f), + Qfmt_31(0.88701083317822f), Qfmt_31(0.92387953251129f), Qfmt_31(-0.95371695074823f), + Qfmt_31(-0.97629600711993f), Qfmt_31(-0.99144486137381f), Qfmt_31(-0.99904822158186f), + Qfmt_31(0.99904822158186f), Qfmt_31(0.99144486137381f), Qfmt_31(0.97629600711993f), + Qfmt_31(0.95371695074823f), Qfmt_31(0.92387953251129f), Qfmt_31(0.88701083317822f), + Qfmt_31(0.84339144581289f), Qfmt_31(0.79335334029124f), Qfmt_31(0.73727733681012f), + Qfmt_31(0.67559020761566f), Qfmt_31(0.60876142900872f), Qfmt_31(0.53729960834682f), + Qfmt_31(0.46174861323503f), Qfmt_31(0.38268343236509f), Qfmt_31(0.30070579950427f), + Qfmt_31(0.21643961393810f), Qfmt_31(0.13052619222005f), Qfmt_31(0.04361938736534f) +}; + + +const int32 start_win[36] = +{ + /* k=0..17 sin(pi/36*(k+0.5)), */ + Qfmt_31(0.08723877473068f), Qfmt_31(0.26105238444010f), Qfmt_31(0.43287922787620f), + Qfmt_31(0.60141159900854f), Qfmt_31(0.76536686473018f), Qfmt_31(0.92349722647006f), + Qfmt_31(0.53729960834682f), Qfmt_31(0.60876142900872f), Qfmt_31(0.67559020761566f), + Qfmt_31(-0.73727733681012f), Qfmt_31(-0.79335334029124f), Qfmt_31(0.84339144581289f), + Qfmt_31(0.88701083317822f), Qfmt_31(0.92387953251129f), Qfmt_31(-0.95371695074823f), + Qfmt_31(-0.97629600711993f), Qfmt_31(-0.99144486137381f), Qfmt_31(-0.99904822158186f), + + Qfmt_31(0.99999990000000f), Qfmt_31(0.99999990000000f), Qfmt_31(0.99999990000000f), + Qfmt_31(0.99999990000000f), Qfmt_31(0.99999990000000f), Qfmt_31(0.99999990000000f), + /* k=24..29; sin(pi/12*(k-18+0.5)) */ + Qfmt_31(0.99144486137381f), Qfmt_31(0.92387953251129f), Qfmt_31(0.79335334029124f), + Qfmt_31(0.60876142900872f), Qfmt_31(0.38268343236509f), Qfmt_31(0.13052619222005f), + + Qfmt_31(0.00000000000000f), Qfmt_31(0.00000000000000f), Qfmt_31(0.00000000000000f), + Qfmt_31(0.00000000000000f), Qfmt_31(0.00000000000000f), Qfmt_31(0.00000000000000f) +}; + + +const int32 stop_win[36] = +{ + Qfmt_31(0.00000000000000f), Qfmt_31(0.00000000000000f), Qfmt_31(0.00000000000000f), + Qfmt_31(0.00000000000000f), Qfmt_31(0.00000000000000f), Qfmt_31(0.00000000000000f), + /* k=6..11; sin(pi/12*(k-6+0.5)) */ + Qfmt_31(0.13052619222005f), Qfmt_31(0.38268343236509f), Qfmt_31(0.60876142900872f), + Qfmt_31(-0.79335334029124f), Qfmt_31(-0.92387953251129f), Qfmt_31(0.99144486137381f), + + Qfmt_31(0.99999990000000f), Qfmt_31(0.99999990000000f), Qfmt_31(-0.99999990000000f), + Qfmt_31(-0.99999990000000f), Qfmt_31(-0.99999990000000f), Qfmt_31(-0.99999990000000f), + /* k=18..35 sin(pi/36*(k+0.5)), */ + Qfmt_31(0.99904822158186f), Qfmt_31(0.99144486137381f), Qfmt_31(0.97629600711993f), + Qfmt_31(0.95371695074823f), Qfmt_31(0.92387953251129f), Qfmt_31(0.88701083317822f), + Qfmt_31(0.84339144581289f), Qfmt_31(0.79335334029124f), Qfmt_31(0.73727733681012f), + Qfmt_31(0.67559020761566f), Qfmt_31(0.60876142900872f), Qfmt_31(0.53729960834682f), + Qfmt_31(0.46174861323503f), Qfmt_31(0.38268343236509f), Qfmt_31(0.30070579950427f), + Qfmt_31(0.21643961393810f), Qfmt_31(0.13052619222005f), Qfmt_31(0.04361938736534f) +}; + + +const int32 short_win[12] = +{ + /* k=0..11; sin(pi/12*(k+0.5)) */ + Qfmt_31(0.13052619222005f), Qfmt_31(0.38268343236509f), Qfmt_31(0.60876142900872f), + Qfmt_31(0.79335334029124f), Qfmt_31(0.92387953251129f), Qfmt_31(0.99144486137381f), + Qfmt_31(0.99144486137381f), Qfmt_31(0.92387953251129f), Qfmt_31(0.79335334029124f), + Qfmt_31(0.60876142900872f), Qfmt_31(0.38268343236509f), Qfmt_31(0.13052619222005f), +}; +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_imdct_synth(int32 in[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 overlap[SUBBANDS_NUMBER*FILTERBANK_BANDS], + uint32 blk_type, + int16 mx_band, + int32 used_freq_lines, + int32 *Scratch_mem) +{ + + int32 band; + int32 bands2process = used_freq_lines + 2; + + if (bands2process > SUBBANDS_NUMBER) + { + bands2process = SUBBANDS_NUMBER; /* default */ + } + + + /* + * in case of mx_poly_band> 0, do + * long transforms + */ + + + for (band = 0; band < bands2process; band++) + { + uint32 current_blk_type = (band < mx_band) ? LONG : blk_type; + + int32 * out = in + (band * FILTERBANK_BANDS); + int32 * history = overlap + (band * FILTERBANK_BANDS); + + switch (current_blk_type) + { + case LONG: + + pvmp3_mdct_18(out, history, normal_win); + + break; + + case START: + + pvmp3_mdct_18(out, history, start_win); + + break; + + case STOP: + + pvmp3_mdct_18(out, history, stop_win); + + break; + + case SHORT: + { + int32 *tmp_prev_ovr = &Scratch_mem[FILTERBANK_BANDS]; + int32 i; + + for (i = 0; i < 6; i++) + { + Scratch_mem[i ] = out[(i*3)]; + Scratch_mem[6 +i] = out[(i*3) + 1]; + Scratch_mem[12 +i] = out[(i*3) + 2]; + } + + pvmp3_mdct_6(&Scratch_mem[ 0], &tmp_prev_ovr[ 0]); + pvmp3_mdct_6(&Scratch_mem[ 6], &tmp_prev_ovr[ 6]); + pvmp3_mdct_6(&Scratch_mem[12], &tmp_prev_ovr[12]); + + for (i = 0; i < 6; i++) + { + int32 temp = history[i]; + /* next iteration overlap */ + history[i] = fxp_mul32_Q32(tmp_prev_ovr[ 6+i] << 1, short_win[6+i]); + history[i] += fxp_mul32_Q32(Scratch_mem[12+i] << 1, short_win[ i]); + out[i] = temp; + } + + for (i = 0; i < 6; i++) + { + out[i+6] = fxp_mul32_Q32(Scratch_mem[i] << 1, short_win[i]); + out[i+6] += history[i+6]; + /* next iteration overlap */ + history[i+6] = fxp_mul32_Q32(tmp_prev_ovr[12+i] << 1, short_win[6+i]); + + } + for (i = 0; i < 6; i++) + { + out[i+12] = fxp_mul32_Q32(tmp_prev_ovr[ i] << 1, short_win[6+i]); + out[i+12] += fxp_mul32_Q32(Scratch_mem[6+i] << 1, short_win[ i]); + out[i+12] += history[i+12]; + history[12+i] = 0; + } + } + + break; + } + + /* + * Compensation for frequency inversion of polyphase filterbank + * every odd time sample of every odd odd subband is mulitplied by -1 before + * processing by the polyphase filter + */ + + if (band & 1) + { + for (int32 slot = 1; slot < FILTERBANK_BANDS; slot += 6) + { + int32 temp1 = out[slot ]; + int32 temp2 = out[slot+2]; + int32 temp3 = out[slot+4]; + out[slot ] = -temp1; + out[slot+2] = -temp2; + out[slot+4] = -temp3; + } + } + } + + + for (band = bands2process; band < SUBBANDS_NUMBER; band++) + { + int32 * out = in + (band * FILTERBANK_BANDS); + int32 * history = overlap + (band * FILTERBANK_BANDS); + int32 slot; + + if (band & 1) + { + for (slot = 0; slot < FILTERBANK_BANDS; slot += 6) + { + int32 temp1 = history[slot ]; + int32 temp2 = history[slot+1]; + int32 temp3 = history[slot+2]; + out[slot ] = temp1; + out[slot+1] = -temp2; + out[slot+2] = temp3; + + temp1 = history[slot+3]; + temp2 = history[slot+4]; + temp3 = history[slot+5]; + out[slot+3] = -temp1; + out[slot+4] = temp2; + out[slot+5] = -temp3; + } + } + else + { + for (slot = 0; slot < FILTERBANK_BANDS; slot += 3) + { + int32 temp1 = history[slot ]; + int32 temp2 = history[slot+1]; + int32 temp3 = history[slot+2]; + out[slot ] = temp1; + out[slot+1] = temp2; + out[slot+2] = temp3; + } + } + + pv_memset(history, 0, FILTERBANK_BANDS*sizeof(*overlap)); + } +} + + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_imdct_synth.h b/ohos-specific/pvmp3dec/src/pvmp3_imdct_synth.h new file mode 100644 index 0000000000..ea42e498eb --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_imdct_synth.h @@ -0,0 +1,102 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_imdct_synth.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ +*/ +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ + +#ifndef PVMP3_IMDCT_SYNTH_H +#define PVMP3_IMDCT_SYNTH_H + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES AND SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + + +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_imdct_synth(int32 in[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 overlap[SUBBANDS_NUMBER*FILTERBANK_BANDS], + uint32 blk_type, + int16 mx_band, + int32 used_freq_lines, + int32 *Scratch_mem); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mdct_18.cpp b/ohos-specific/pvmp3dec/src/pvmp3_mdct_18.cpp new file mode 100644 index 0000000000..09a735bf27 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mdct_18.cpp @@ -0,0 +1,289 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: mdct_18.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + int32 vec[], input vector of length 18 + int32 *history input for overlap and add, vector updated with + next overlap and add values + const int32 *window sine window used in the mdct, three types are allowed + noraml, start and stop +Returns + none mdct computation in-place + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + Returns the mdct of length 18 of the input vector, as well as the overlap + vector for next iteration ( on history[]) + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + +#if ( !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) && !defined(PV_ARM_V5) && !defined(PV_ARM_V4) ) +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_mdct_18.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ +const int32 cosTerms_dct18[9] = +{ + Qfmt(0.50190991877167f), Qfmt(0.51763809020504f), Qfmt(0.55168895948125f), + Qfmt(0.61038729438073f), Qfmt(0.70710678118655f), Qfmt(0.87172339781055f), + Qfmt(1.18310079157625f), Qfmt(1.93185165257814f), Qfmt(5.73685662283493f) +}; + + +const int32 cosTerms_1_ov_cos_phi[18] = +{ + + Qfmt1(0.50047634258166f), Qfmt1(0.50431448029008f), Qfmt1(0.51213975715725f), + Qfmt1(0.52426456257041f), Qfmt1(0.54119610014620f), Qfmt1(0.56369097343317f), + Qfmt1(0.59284452371708f), Qfmt1(0.63023620700513f), Qfmt1(0.67817085245463f), + + Qfmt2(0.74009361646113f), Qfmt2(0.82133981585229f), Qfmt2(0.93057949835179f), + Qfmt2(1.08284028510010f), Qfmt2(1.30656296487638f), Qfmt2(1.66275476171152f), + Qfmt2(2.31011315767265f), Qfmt2(3.83064878777019f), Qfmt2(11.46279281302667f) +}; + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + + + +void pvmp3_mdct_18(int32 vec[], int32 *history, const int32 *window) +{ + int32 i; + int32 tmp; + int32 tmp1; + int32 tmp2; + int32 tmp3; + int32 tmp4; + + + + const int32 *pt_cos_split = cosTerms_dct18; + const int32 *pt_cos = cosTerms_1_ov_cos_phi; + const int32 *pt_cos_x = &cosTerms_1_ov_cos_phi[17]; + int32 *pt_vec = vec; + int32 *pt_vec_o = &vec[17]; + + + for (i = 9; i != 0; i--) + { + tmp = *(pt_vec); + tmp1 = *(pt_vec_o); + tmp = fxp_mul32_Q32(tmp << 1, *(pt_cos++)); + tmp1 = fxp_mul32_Q27(tmp1, *(pt_cos_x--)); + *(pt_vec++) = tmp + tmp1 ; + *(pt_vec_o--) = fxp_mul32_Q28((tmp - tmp1), *(pt_cos_split++)); + } + + + pvmp3_dct_9(vec); // Even terms + pvmp3_dct_9(&vec[9]); // Odd terms + + + tmp3 = vec[16]; // + vec[16] = vec[ 8]; + tmp4 = vec[14]; // + vec[14] = vec[ 7]; + tmp = vec[12]; + vec[12] = vec[ 6]; + tmp2 = vec[10]; // vec[10] + vec[10] = vec[ 5]; + vec[ 8] = vec[ 4]; + vec[ 6] = vec[ 3]; + vec[ 4] = vec[ 2]; + vec[ 2] = vec[ 1]; + vec[ 1] = vec[ 9] - tmp2; // vec[9] + vec[10] + vec[ 3] = vec[11] - tmp2; + vec[ 5] = vec[11] - tmp; + vec[ 7] = vec[13] - tmp; + vec[ 9] = vec[13] - tmp4; + vec[11] = vec[15] - tmp4; + vec[13] = vec[15] - tmp3; + vec[15] = vec[17] - tmp3; + + + /* overlap and add */ + + tmp2 = vec[0]; + tmp3 = vec[9]; + + for (i = 0; i < 6; i++) + { + tmp = history[ i]; + tmp4 = vec[i+10]; + vec[i+10] = tmp3 + tmp4; + tmp1 = vec[i+1]; + vec[ i] = fxp_mac32_Q32(tmp, (vec[i+10]), window[ i]); + tmp3 = tmp4; + history[i ] = -(tmp2 + tmp1); + tmp2 = tmp1; + } + + tmp = history[ 6]; + tmp4 = vec[16]; + vec[16] = tmp3 + tmp4; + tmp1 = vec[7]; + vec[ 6] = fxp_mac32_Q32(tmp, vec[16] << 1, window[ i]); + tmp = history[ 7]; + history[6] = -(tmp2 + tmp1); + history[7] = -(tmp1 + vec[8]); + + tmp1 = history[ 8]; + tmp4 = vec[17] + tmp4; + vec[ 7] = fxp_mac32_Q32(tmp, tmp4 << 1, window[ 7]); + history[8] = -(vec[8] + vec[9]); + vec[ 8] = fxp_mac32_Q32(tmp1, vec[17] << 1, window[ 8]); + + tmp = history[9]; + tmp1 = history[17]; + tmp2 = history[16]; + vec[ 9] = fxp_mac32_Q32(tmp, vec[17] << 1, window[ 9]); + + vec[17] = fxp_mac32_Q32(tmp1, vec[10] << 1, window[17]); + vec[10] = -vec[ 16]; + vec[16] = fxp_mac32_Q32(tmp2, vec[11] << 1, window[16]); + tmp1 = history[15]; + tmp2 = history[14]; + vec[11] = -vec[ 15]; + vec[15] = fxp_mac32_Q32(tmp1, vec[12] << 1, window[15]); + vec[12] = -vec[ 14]; + vec[14] = fxp_mac32_Q32(tmp2, vec[13] << 1, window[14]); + + tmp = history[13]; + tmp1 = history[12]; + tmp2 = history[11]; + tmp3 = history[10]; + vec[13] = fxp_mac32_Q32(tmp, vec[12] << 1, window[13]); + vec[12] = fxp_mac32_Q32(tmp1, vec[11] << 1, window[12]); + vec[11] = fxp_mac32_Q32(tmp2, vec[10] << 1, window[11]); + vec[10] = fxp_mac32_Q32(tmp3, tmp4 << 1, window[10]); + + + /* next iteration overlap */ + + tmp1 = history[ 8]; + tmp3 = history[ 7]; + tmp2 = history[ 1]; + tmp = history[ 0]; + tmp1 <<= 1; + tmp3 <<= 1; + + history[ 0] = fxp_mul32_Q32(tmp1, window[18]); + history[17] = fxp_mul32_Q32(tmp1, window[35]); + history[ 1] = fxp_mul32_Q32(tmp3, window[19]); + history[16] = fxp_mul32_Q32(tmp3, window[34]); + + tmp2 <<= 1; + tmp <<= 1; + history[ 7] = fxp_mul32_Q32(tmp2, window[25]); + history[10] = fxp_mul32_Q32(tmp2, window[28]); + history[ 8] = fxp_mul32_Q32(tmp, window[26]); + history[ 9] = fxp_mul32_Q32(tmp, window[27]); + + tmp1 = history[ 6]; + tmp3 = history[ 5]; + tmp4 = history[ 4]; + tmp2 = history[ 3]; + tmp = history[ 2]; + + tmp1 <<= 1; + tmp3 <<= 1; + tmp4 <<= 1; + + history[ 2] = fxp_mul32_Q32(tmp1, window[20]); + history[15] = fxp_mul32_Q32(tmp1, window[33]); + history[ 3] = fxp_mul32_Q32(tmp3, window[21]); + history[14] = fxp_mul32_Q32(tmp3, window[32]); + history[ 4] = fxp_mul32_Q32(tmp4, window[22]); + history[13] = fxp_mul32_Q32(tmp4, window[31]); + tmp2 <<= 1; + tmp <<= 1; + history[ 5] = fxp_mul32_Q32(tmp2, window[23]); + history[12] = fxp_mul32_Q32(tmp2, window[30]); + history[ 6] = fxp_mul32_Q32(tmp, window[24]); + history[11] = fxp_mul32_Q32(tmp, window[29]); +} + +#endif // If not assembly diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mdct_18.h b/ohos-specific/pvmp3dec/src/pvmp3_mdct_18.h new file mode 100644 index 0000000000..e497aee228 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mdct_18.h @@ -0,0 +1,109 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Pathname: ./include/pvmp3_mdct_18.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This include file defines function mdct_18, dct9, mdct_6 and dct_6 + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef MDCT_18_H +#define MDCT_18_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ +#define Qfmt(a) (Int32)(a*((Int32)1<<28) ) +#define Qfmt1(a) (Int32)(a*((Int32)0x7FFFFFFF)) +#define Qfmt2(a) (Int32)(a*((Int32)1<<27)) + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_mdct_18(int32 vec[], int32 *history, const int32 *window); + + void pvmp3_dct_9(int32 vec[]); + + void pvmp3_mdct_6(int32 vec[], int32 *overlap); + + void pvmp3_dct_6(int32 vec[]); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mdct_6.cpp b/ohos-specific/pvmp3dec/src/pvmp3_mdct_6.cpp new file mode 100644 index 0000000000..6a72aadf0f --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mdct_6.cpp @@ -0,0 +1,165 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + Filename: mdct_18.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + int32 vec[], input vector of length 6 + int32 *history input for overlap and add, vector updated with + next overlap and add values +Returns + none mdct computation in-place + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + Returns the mdct of length 6 of the input vector, as well as the overlap + vector for next iteration ( on history[]) + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_mdct_6.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define QFORMAT 29 +#define Qfmt29(a) (int32)(a*((int32)1<<QFORMAT) + (a>=0?0.5F:-0.5F)) + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ +/* + * (1./(2*cos((pi/(2*N))*(2*i+1)))), N = 12, i = [0:N/2-1] + */ + +const int32 cosTerms_1_ov_cos_phi_N6[6] = +{ + + Qfmt29(0.50431448029008f), Qfmt29(0.54119610014620f), + Qfmt29(0.63023620700513f), Qfmt29(0.82133981585229f), + Qfmt29(1.30656296487638f), Qfmt29(3.83064878777019f) +}; + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + + +void pvmp3_mdct_6(int32 vec[], int32 *history) +{ + int32 i; + int32 tmp; + int32 tmp1; + int32 tmp2; + + int32 *pt_vec = vec; + int32 *pt_vec_o = vec; + const int32 *pt_cos = cosTerms_1_ov_cos_phi_N6; + + for (i = 2; i != 0; i--) + { + tmp = *(pt_vec++); + tmp1 = *(pt_vec++); + tmp2 = *(pt_vec++); + *(pt_vec_o++) = fxp_mul32_Q29(tmp, *(pt_cos++)); + *(pt_vec_o++) = fxp_mul32_Q29(tmp1, *(pt_cos++)); + *(pt_vec_o++) = fxp_mul32_Q29(tmp2, *(pt_cos++)); + } + + + pvmp3_dct_6(vec); // Even terms + + + tmp = -(vec[0] + vec[1]); + history[3] = tmp; + history[2] = tmp; + tmp = -(vec[1] + vec[2]); + vec[0] = vec[3] + vec[4]; + vec[1] = vec[4] + vec[5]; + history[4] = tmp; + history[1] = tmp; + tmp = -(vec[2] + vec[3]); + vec[4] = -vec[1]; + history[5] = tmp; + history[0] = tmp; + + vec[2] = vec[5]; + vec[3] = -vec[5]; + vec[5] = -vec[0]; + +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mdct_6.h b/ohos-specific/pvmp3dec/src/pvmp3_mdct_6.h new file mode 100644 index 0000000000..6ba53d7d11 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mdct_6.h @@ -0,0 +1,106 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Pathname: ./include/pvmp3_mdct_6.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This include file defines function mdct_18, dct9, mdct_6 and dct_6 + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_MDCT_6_H +#define PVMP3_MDCT_6_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ +#define Qfmt(a) (Int32)(a*((Int32)1<<28) ) +#define Qfmt1(a) (Int32)(a*((Int32)0x7FFFFFFF)) +#define Qfmt2(a) (Int32)(a*((Int32)1<<27)) + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + + void pvmp3_mdct_6(int32 vec[], int32 *overlap); + + void pvmp3_dct_6(int32 vec[]); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_data.cpp b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_data.cpp new file mode 100644 index 0000000000..499672b492 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_data.cpp @@ -0,0 +1,247 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_mpeg2_get_scale_data.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + mp3SideInfo *si, side information + int32 gr, granule + int32 ch, channel + mp3Header *info, mp3 header information + uint32 *scalefac_buffer, + uint32 *scalefac_IIP_buffer, + tbits *pMainData bit stream Data + + Returns + + uint32 *scalefac_buffer, acquired scale band data + uint32 *scalefac_IIP_buffer, auxiliary scale data + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + get scale data for mpeg2 layer III LSF extension + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_mpeg2_get_scale_data.h" +#include "pvmp3_getbits.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +const uint32 nr_of_sfb_block[6][3][4] = +{ {{ 6, 5, 5, 5}, { 9, 9, 9, 9}, { 6, 9, 9, 9}}, + {{ 6, 5, 7, 3}, { 9, 9, 12, 6}, { 6, 9, 12, 6}}, + {{11, 10, 0, 0}, { 18, 18, 0, 0}, {15, 18, 0, 0}}, + {{ 7, 7, 7, 0}, { 12, 12, 12, 0}, { 6, 15, 12, 0}}, + {{ 6, 6, 6, 3}, { 12, 9, 9, 6}, { 6, 12, 9, 6}}, + {{ 8, 8, 5, 0}, { 15, 12, 9, 0}, { 6, 18, 9, 0}} +}; + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_mpeg2_get_scale_data(mp3SideInfo *si, + int32 gr, + int32 ch, + mp3Header *info, + uint32 *scalefac_buffer, + uint32 *scalefac_IIP_buffer, + tmp3Bits *pMainData) +{ + int16 i; + int16 j; + int16 k; + int16 blocktypenumber = 0; + int16 blocknumber = 0; + + granuleInfo *gr_info = &(si->ch[ch].gran[gr]); + uint32 scalefac_comp, int_scalefac_comp, new_slen[4] = { 0,0,0,0 }; + + scalefac_comp = gr_info->scalefac_compress; + + + + if ((((info->mode_ext &1)) && (ch == 1))) + { + /* intensity_scale = scalefac_comp %2; */ + int_scalefac_comp = scalefac_comp >> 1; + + if (int_scalefac_comp < 180) + { + new_slen[0] = int_scalefac_comp / 36; + new_slen[1] = (int_scalefac_comp % 36) / 6; + new_slen[2] = int_scalefac_comp % 6; + blocknumber = 3; + } + else if (int_scalefac_comp < 244) + { + int_scalefac_comp -= 180; + new_slen[0] = (int_scalefac_comp & 63) >> 4; + new_slen[1] = (int_scalefac_comp & 15) >> 2; + new_slen[2] = int_scalefac_comp & 3; + blocknumber = 4; + } + else if (int_scalefac_comp <= 255) + { + int_scalefac_comp -= 244; + new_slen[0] = (int_scalefac_comp) / 3; + new_slen[1] = (int_scalefac_comp) % 3; + new_slen[2] = 0; + blocknumber = 5; + } + new_slen[3] = 0; + si->ch[ch].gran[gr].preflag = 0; + } + else + { + if (scalefac_comp < 400) + { + new_slen[0] = (scalefac_comp >> 4) / 5; + new_slen[1] = (scalefac_comp >> 4) % 5; + new_slen[2] = (scalefac_comp & 15) >> 2 ; + new_slen[3] = (scalefac_comp & 3); + si->ch[ch].gran[gr].preflag = 0; + + blocknumber = 0; + } + else if (scalefac_comp < 500) + { + scalefac_comp -= 400; + new_slen[0] = (scalefac_comp >> 2) / 5; + new_slen[1] = (scalefac_comp >> 2) % 5; + new_slen[2] = scalefac_comp & 3; + new_slen[3] = 0; + si->ch[ch].gran[gr].preflag = 0; + blocknumber = 1; + } + else if (scalefac_comp < 512) + { + scalefac_comp -= 500; + new_slen[0] = scalefac_comp / 3; + new_slen[1] = scalefac_comp % 3; + new_slen[2] = 0 ; + new_slen[3] = 0; + si->ch[ch].gran[gr].preflag = 1; + blocknumber = 2; + } + } + + if (gr_info->block_type == 2) + { + if (gr_info->mixed_block_flag) + { + blocktypenumber = 2; + } + else + { + blocktypenumber = 1; + } + } + + k = 0; + for (i = 0; i < 4; i++) + { + if (new_slen[i]) + { + for (j = 0; j < (int16)nr_of_sfb_block[blocknumber][blocktypenumber][i]; j++) + { + scalefac_buffer[k] = getNbits(pMainData, new_slen[i]); + scalefac_IIP_buffer[k] = (1L << new_slen[i]) - 1; + k++; + } + } + else + { + for (j = 0; j < (int16)nr_of_sfb_block[blocknumber][blocktypenumber][i]; j++) + { + scalefac_buffer[k] = 0; + scalefac_IIP_buffer[k] = 0; + k++; + } + } + } +} diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_data.h b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_data.h new file mode 100644 index 0000000000..630ed61048 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_data.h @@ -0,0 +1,105 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_mpeg2_get_scale_data.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_MPEG2_GET_SCALE_DATA_H +#define PVMP3_MPEG2_GET_SCALE_DATA_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" +#include "s_mp3bits.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_mpeg2_get_scale_data(mp3SideInfo *si, + int32 gr, + int32 ch, + mp3Header *info, + uint32 *scalefac_buffer, + uint32 *scalefac_IIP_buffer, + tmp3Bits *pMainData); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_factors.cpp b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_factors.cpp new file mode 100644 index 0000000000..e4d29d66c0 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_factors.cpp @@ -0,0 +1,202 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_mpeg2_get_scale_factors.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + + mp3ScaleFactors *scalefac, + mp3SideInfo *si, side information + int32 gr, granule + int32 ch, channel + mp3Header *info, mp3 header information + uint32 *scalefac_IIP_buffer, auxiliary scale data + tbits *pMainData bit stream Data + + Returns + + III_scalefac_t *scalefac, scale factor + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + get scale factor for mpe2 layer III LSF extension + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_mpeg2_get_scale_factors.h" +#include "pvmp3_mpeg2_get_scale_data.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_mpeg2_get_scale_factors(mp3ScaleFactors *scalefac, + mp3SideInfo *si, + int32 gr, + int32 ch, + mp3Header *info, + uint32 *scalefac_IIP_buffer, + tmp3Bits *pMainData) +{ + + int32 sfb; + int32 k = 0; + int32 window; + uint32 *scalefac_buffer = &scalefac_IIP_buffer[56]; + + granuleInfo *gr_info = &(si->ch[ch].gran[gr]); + + pvmp3_mpeg2_get_scale_data(si, + gr, + ch, + info, + (uint32 *)scalefac_buffer, + (uint32 *)scalefac_IIP_buffer, + pMainData); + + + if (gr_info->window_switching_flag && (gr_info->block_type == 2)) + { + if (gr_info->mixed_block_flag) + { + for (sfb = 0; sfb < 6; sfb++) + { + scalefac->l[sfb] = scalefac_buffer[sfb]; + } + + + k = 6; + for (sfb = 3; sfb < 12; sfb++) + { + for (window = 0; window < 3; window++) + { + scalefac->s[window][sfb] = scalefac_buffer[k]; + k++; + } + } + + + /* adjust position of "illegal position" information in scalefac_IIP_buffer[] */ + /* in mixed blocks mode for short sfb, move them 3 places up. efs 3002-07-04 */ + for (sfb = 11; sfb >= 3; sfb--) + { + scalefac_IIP_buffer[3*sfb + 2] = scalefac_IIP_buffer[3*sfb - 1]; + scalefac_IIP_buffer[3*sfb + 1] = scalefac_IIP_buffer[3*sfb - 2]; + scalefac_IIP_buffer[3*sfb ] = scalefac_IIP_buffer[3*sfb - 3]; + + } + } + else + { /* SHORT*/ + for (sfb = 0; sfb < 12; sfb++) + { + for (window = 0; window < 3; window++) + { + scalefac->s[window][sfb] = scalefac_buffer[k]; + k++; + } + } + } + + scalefac->s[0][12] = 0; + scalefac->s[1][12] = 0; + scalefac->s[2][12] = 0; + + } + else + { /* LONG types 0,1,3 */ + for (sfb = 0; sfb < 21; sfb++) + { + scalefac->l[sfb] = scalefac_buffer[sfb]; + } + scalefac->l[21] = 0; + scalefac->l[22] = 0; + + } +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_factors.h b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_factors.h new file mode 100644 index 0000000000..46d16b3a30 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_get_scale_factors.h @@ -0,0 +1,105 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_mpeg2_get_scale_factors.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_MPEG2_GET_SCALE_FACTORS_H +#define PVMP3_MPEG2_GET_SCALE_FACTORS_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" +#include "s_mp3bits.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_mpeg2_get_scale_factors(mp3ScaleFactors *scalefac, + mp3SideInfo *si, + int32 gr, + int32 ch, + mp3Header *info, + uint32 *scalefac_IIP_buffer, + tmp3Bits *pMainData); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_stereo_proc.cpp b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_stereo_proc.cpp new file mode 100644 index 0000000000..c79062c4c8 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_stereo_proc.cpp @@ -0,0 +1,700 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_mpeg2_stereo_proc.cpp + + Functions: + + pvmp3_st_intensity_ver2 + pvmp3_mpeg2_stereo_proc + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + + +------------------------------------------------------------------------------ + +pvmp3_st_intensity_ver2 + + INPUT AND OUTPUT DEFINITIONS + +Input + + int32 xr[], input channel + int32 xl[], + int32 m, selecting index: io = 2(1/4) (m=0), io = 2(1/8) (m=1) + int32 is_pos, index on table is_pos_pow_eitgh_root_of_2 + int32 Start, Location of first element where stereo intensity is applied + int32 Number number of elements affected + + Returns + + int32 xl[], generated stereo channel + + + + +------------------------------------------------------------------------------ + +pvmp3_mpeg2_stereo_proc + + INPUT AND OUTPUT DEFINITIONS + +Input + + int32 xr[], input channel + int32 xl[], + mp3ScaleFactors *scalefac, scale factors structure for Right channel + granuleInfo *gr_info_l, granule structure for the left channel + granuleInfo *gr_info_r, granule structure for the rigth channel + uint32 *scalefac_IIP_buffer, auxiliary scale factor vector + mp3Header *info mp3 header info + Returns + + int32 xl[], generated stereo channel + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + stereo processing for mpeg2 layer III LSF extension + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_mpeg2_stereo_proc.h" +#include "pvmp3_stereo_proc.h" +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_tables.h" +#include "mp3_mem_funcs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +#define Q31_fmt(a) (int32(double(0x7FFFFFFF)*a)) + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ +const int32 is_pos_pow_eitgh_root_of_2[8] = +{ + /* --- 2^(1/8) ----- */ + Q31_fmt(1.00000000000000), Q31_fmt(0.91700404320467), Q31_fmt(0.84089641525371), + Q31_fmt(0.77110541270397), Q31_fmt(0.70710678118655), Q31_fmt(0.64841977732550), + Q31_fmt(0.59460355750136), Q31_fmt(0.54525386633263) +}; + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_st_intensity_ver2(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 m, + int32 is_pos, + int32 Start, + int32 Number) +{ + int32 k[2]; + + /* pow(io, ((is_pos + 1)>>1)); io = 2(1/4) (m=0), io = 2(1/8) (m=1) */ + k[0] = is_pos_pow_eitgh_root_of_2[((is_pos+1)&(3+(m<<2)))<<(1-m)] >> ((is_pos + 1) >> (2 + m)); + /* pow(io, (is_pos>>1)); io = 2(1/4) (m=0), io = 2(1/8) (m=1) */ + k[1] = is_pos_pow_eitgh_root_of_2[(is_pos&(3+(m<<2)))<<(1-m)] >> (is_pos >> (2 + m)); + + + int32 *pt_xr = &xr[Start]; + int32 *pt_xl = &xl[Start]; + + if (is_pos == 0) /* 0 < is_pos < 31 */ + { + pv_memcpy(pt_xl, pt_xr, Number*sizeof(*pt_xr)); + } + else if (is_pos & 1) + { + for (int32 i = Number >> 1; i != 0; i--) + { + *(pt_xl++) = (*pt_xr); + *(pt_xr) = fxp_mul32_Q32((*pt_xr) << 1, k[0]); + pt_xr++; + *(pt_xl++) = (*pt_xr); + *(pt_xr) = fxp_mul32_Q32((*pt_xr) << 1, k[0]); + pt_xr++; + } + if (Number&1) + { + *(pt_xl) = (*pt_xr); + *(pt_xr) = fxp_mul32_Q32((*pt_xr) << 1, k[0]); + } + } + else + { + for (int32 i = Number >> 1; i != 0; i--) + { + *(pt_xl++) = fxp_mul32_Q32((*(pt_xr++)) << 1, k[1]); + *(pt_xl++) = fxp_mul32_Q32((*(pt_xr++)) << 1, k[1]); + } + if (Number&1) + { + *(pt_xl) = fxp_mul32_Q32((*pt_xr) << 1, k[1]); + } + } + +} + + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +void pvmp3_mpeg2_stereo_proc(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + mp3ScaleFactors *scalefac_R, + granuleInfo *gr_info_l, + granuleInfo *gr_info_r, + uint32 *scalefac_IIP_buffer, + int32 used_freq_lines, + mp3Header *info) +{ + + int32 sfreq; + int32 sb; + int32 ss; + int32 sfbNo; + int32 sfbStart; + int32 sfb; + int32 sfbTemp; + int32 i; + int32 j; + int32 io; + + + int32 i_stereo = (info->mode == MPG_MD_JOINT_STEREO) && + (info->mode_ext & 0x1); + + int32 ms_stereo = (info->mode == MPG_MD_JOINT_STEREO) && + (info->mode_ext & 0x2); + + + if (i_stereo) + { + if (gr_info_r->scalefac_compress & 1) + { + io = 0; /* 2^(-1/4) */ + } + else + { + io = 1; /* 2^(-1/8) */ + } + + sfreq = info->version_x + (info->version_x << 1); + sfreq += info->sampling_frequency; + + if (gr_info_l->window_switching_flag && (gr_info_l->block_type == 2)) + { + if (gr_info_l->mixed_block_flag) + { + /* + * mixed blocks processing + */ + i = 31; + ss = 17; + sb = -1; + + while (i >= 0) + { + if (xl[(i*FILTERBANK_BANDS) + ss]) + { + sb = (i << 4) + (i << 1) + ss; + i = -1; + } + else + { + ss--; + if (ss < 0) + { + i--; + ss = 17; + } + } + } /* now sb is the number of highest line with value != 0 */ + /* can be between -1 (all lines zero) and 575 (no line zero) */ + + if (sb < 36) /* was (sb <= 36) */ + { + /* + * mixed blocks processing: intensity bound inside long blocks + */ + /* 1. long blocks up to intensity border: Stereo or M/S */ + if (mp3_sfBandIndex[sfreq].l[4] <= sb) + { + i = 4; + } + else + { + i = 0; + } + + while (mp3_sfBandIndex[sfreq].l[i] <= sb) + { + i++; + } + sfbTemp = i; /* from that (long) sfb on we have intensity stereo */ + + sfbNo = mp3_sfBandIndex[sfreq].l[sfbTemp]; /* number of lines to process */ + + /* from sfbStart up sfbNo lines do ms_stereo or normal stereo */ + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, 0, sfbNo); + } + + /* 2. long blocks from intensity border up to sfb band 6: intensity */ + /* calc. MPEG_1_2_Factor[0], MPEG_1_2_Factor[1] */ + + for (sfb = sfbTemp; sfb < 6; sfb++) + { + sfbStart = mp3_sfBandIndex[sfreq].l[sfb]; /* = Start in 0 ... 575 */ + sfbNo = mp3_sfBandIndex[sfreq].l[sfb+1] - mp3_sfBandIndex[sfreq].l[sfb]; /* No of lines to process */ + + if ((uint32)(scalefac_R->l[sfb]) != scalefac_IIP_buffer[sfb]) + { + pvmp3_st_intensity_ver2(xr, xl, io, scalefac_R->l[sfb], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + } + + /* 3. now process all sfb with short blocks (3...12), all in intensity mode */ + + for (j = 0; j < 3; j++) + { + /* first calculate directional factors for intensity stereo, + * for all sfb in intensity mode, but only + * if they do not have "illegal" position: + */ + /* to do this for all sfb we have to get information for last scale factor band: + * here we clearly have more than one sfb in intensity mode, + * so copy factors and legal/illegal information from sfb11 to sfb12 + */ + (scalefac_R->s[j][12]) = (scalefac_R->s[j][11]); + scalefac_IIP_buffer[36 + j] = scalefac_IIP_buffer[33 + j]; /* legal/illegal in sfb 12 same as in sfb 11 */ + + for (sfb = 3; sfb < 13; sfb++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; /* No of lines to process */ + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sfb] + j * sfbNo; + + if ((uint32)(scalefac_R->s[j][sfb]) != scalefac_IIP_buffer[3*sfb + j]) + { + pvmp3_st_intensity_ver2(xr, xl, io, scalefac_R->s[j][sfb], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + } + } /* for (j = 0; j < 3; j++) */ + } + else /* else then (sb >= 36) */ + { + /* + * mixed blocks processing: intensity bound outside long blocks + */ + + /* 2. short blocks, do for all 3 */ + /* ------------------------------ */ + for (j = 0; j < 3; j++) + { + int32 sfbcnt = -1; + + for (sfb = 12; sfb >= 3; sfb--) + { + int32 lines = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; + + i = 3 * mp3_sfBandIndex[sfreq].s[sfb] + (j + 1) * lines - 1; + + while (lines > 0) + { + if (xl[i]) + { + sfbcnt = sfb; + sfb = -10; + lines = -10; + } + lines--; + i--; + } + } + + sfbcnt += 1; + if (sfbcnt < 3) + { + sfbcnt = 3; /* should not be necessary */ + } + + sfbTemp = sfbcnt; /* from this (short) sfb on we have intensity mode */ + /* can have values between 3 (all short sfb in intensity) */ + /* and 13 (no short sfb in intensity mode) */ + + /* 3. from sfbTemp to last sfb calculate is_ratio values: */ + /* first calculate directional factors for intensity stereo, */ + /* for all sfb in intensity mode, but only */ + /* if they do not have "illegal" position: */ + + /* to do this for all sfb we have to get information for last scale factor band: */ + /* get factors for last scale factor band: */ + /* more than one sfb in intensity mode, + copy factors and legal/illegal information from sfb11 to sfb12 */ + if (sfbTemp < 12) + { + (scalefac_R->s[j][12]) = (scalefac_R->s[j][11]); + scalefac_IIP_buffer[36 + j] = scalefac_IIP_buffer[33 + j]; /* legal/illegal in sfb 12 same as in sfb 11 */ + } + else if (sfbTemp == sfb) + /* only sfb 12 in intensity mode, use factors corresponding to is_pos[12] == 0 */ + { + (scalefac_R->s[j][12]) = 0; + scalefac_IIP_buffer[36 + j] = 1; /* the scf value 0 in sfb12 is "legal" */ + } + /* if sfbTemp > sfb (no sfb in intensity mode): do nothing */ + + + /* 4. do normal stereo or MS stereo from sfb 3 to < sfbTemp: */ + for (sfb = 3; sfb < sfbTemp; sfb++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sfb] + j * sfbNo; + + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + } + + /* 5. now intensity stereo processing of the remaining sfb's: */ + + for (sfb = sfbTemp; sfb < 13; sfb++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; /* No of lines to process */ + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sfb] + j * sfbNo; + if ((uint32)(scalefac_R->s[j][sfb]) != scalefac_IIP_buffer[3*sfb + j]) + { + pvmp3_st_intensity_ver2(xr, xl, io, scalefac_R->s[j][sfb], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + } + /* end of correction by efs 2003-07-04 */ + } /* for (j = 0; j < 3; j++) */ + + + /* long blocks 0 up to sfb band 6: no intensity */ + + sfbNo = mp3_sfBandIndex[sfreq].l[6]; /* number of lines to process */ + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, 0, sfbNo); + } + + } /* if intensity bound inside or outside long blocks */ + } /* if (gr_info->mixed_block_flag) */ + else + { + /* + * short block processing + */ + for (j = 0; j < 3; j++) + { + int32 sfbcnt = -1; + + for (sfb = 12; sfb >= 0; sfb--) + { + int32 lines = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; + i = 3 * mp3_sfBandIndex[sfreq].s[sfb] + (j + 1) * lines - 1; + + while (lines > 0) + { + if (xl[i]) + { + sfbcnt = sfb; + sfb = -10; + lines = -10; + } + lines--; + i--; + } + } + + sfbcnt += 1; + + /* start of corrected version by efs 2003-07-04 */ + sfbTemp = sfbcnt; /* from this (short) sfb on we have intensity mode */ + /* can have values between 3 (all short sfb in intensity) */ + /* and 13 (no short sfb in intensity mode) */ + + /* first calculate directional factors for intensity stereo, + for all sfb in intensity mode, but only + if they do not have "illegal" position: */ + + /* to do this for all sfb we have to get information for last scale factor band: */ + /* get factors for last scale factor band: */ + /* more than one sfb in intensity mode, + copy factors and legal/illegal information from sfb11 to sfb12 */ + if (sfbTemp < 12) + { + (scalefac_R->s[j][12]) = (scalefac_R->s[j][11]); + scalefac_IIP_buffer[36 + j] = scalefac_IIP_buffer[33 + j]; /* legal/illegal in sfb 12 same as in sfb 11 */ + } + else if (sfbTemp == 12) + /* only sfb 12 in intensity mode, use factors corresponding to is_pos[12] == 0 */ + { + (scalefac_R->s[j][12]) = 0; + scalefac_IIP_buffer[36 + j] = 1; /* the scf value 0 in sfb12 is "legal" */ + } + /* if sfbTemp > sfb (no sfb in intensity mode): do nothing */ + + + /* Now process audio samples */ + /* first process lower sfb's not in intensity mode */ + for (sfb = 0; sfb < sfbTemp; sfb++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sfb] + j * sfbNo; + + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + } + + /* now intensity stereo processing of the remaining sfb's: */ + for (sfb = sfbTemp; sfb < 13; sfb++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; /* No of lines to process */ + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sfb] + j * sfbNo; + + if ((uint32)(scalefac_R->s[j][sfb]) != scalefac_IIP_buffer[3*sfb + j]) + { + pvmp3_st_intensity_ver2(xr, xl, io, scalefac_R->s[j][sfb], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + } + + } /* for (j = 0; j < 3; j++) */ + + } /* end of else ( gr_info->mixed_block_flag) */ + + } /* if (gr_info->window_switching_flag && (gr_info->block_type == 2)) */ + else + { + /* + * long block processing + */ + i = 31; + ss = 17; + sb = 0; + + while (i >= 0) + { + if (xl[(i*FILTERBANK_BANDS) + ss]) + { + sb = (i << 4) + (i << 1) + ss; + /* i = -1 patched RF 24-09-2002 */ + i = -2; + } + else + { + ss--; + if (ss < 0) + { + i--; + ss = 17; + } + } + } + + /* patched RF 24-09-2002 */ + if (sb) + { + if (mp3_sfBandIndex[sfreq].l[14] <= sb) + { + i = 14; + } + else if (mp3_sfBandIndex[sfreq].l[7] <= sb) + { + i = 7; + } + else + { + i = 0; + } + + while (mp3_sfBandIndex[sfreq].l[i] <= sb) + { + i++; + } + } + + else + { + if (i == -1) + { + /* all xr[1][][] are 0: set IS bound sfb to 0 */ + i = 0; + } + else + { + /* xr[1][0][0] is unequal 0 and all others are 0: set IS bound sfb to 1 */ + i = 1; + } + } + /* corrected version by efs 2003-07-04 */ + sfbTemp = i; /* from this (long) sfb on we have intensity mode */ + /* can have values between 0 (all long sfb in intensity) */ + /* and 22 (no long sfb in intensity mode) */ + + /* first calculate directional factors for intensity stereo, + for all sfb in intensity mode, but only if they + do not have "illegal" position: */ + + /* to do this for all sfb we have to get information for last scale factor band: */ + if (sfbTemp < 21) + /* more than one sfb in intensity mode, */ + /* copy factors and legal/illegal information from sfb20 to sfb21 */ + { + (scalefac_R->l[21]) = (scalefac_R->l[20]); + scalefac_IIP_buffer[21] = scalefac_IIP_buffer[20]; /* legal/illegal in sfb 21 same as in sfb 20 */ + } + else if (sfbTemp == 21) + /* only sfb 21 in intensity mode, is_pos[21] = 0 */ + { + (scalefac_R->l[21]) = 0; + scalefac_IIP_buffer[21] = 1; /* the scf value 0 in sfb21 is "legal" */ + } + /* if sfbTemp > 21 (no sfb in intensity mode): do nothing */ + + + /* Now process audio samples */ + /* first process lower sfb's not in intensity mode */ + + sfbNo = mp3_sfBandIndex[sfreq].l[sfbTemp] - mp3_sfBandIndex[sfreq].l[0]; + sfbStart = mp3_sfBandIndex[sfreq].l[0]; + + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + + /* now intensity stereo processing of the remaining sfb's: */ + for (sfb = sfbTemp; sfb < 22; sfb++) + { + sfbNo = mp3_sfBandIndex[sfreq].l[sfb+1] - mp3_sfBandIndex[sfreq].l[sfb]; /* number of lines to process */ + sfbStart = mp3_sfBandIndex[sfreq].l[sfb]; /* start of sfb */ + + if ((uint32)(scalefac_R->l[sfb]) != scalefac_IIP_buffer[sfb]) /* "legal" position ? */ + { + pvmp3_st_intensity_ver2(xr, xl, io, scalefac_R->l[sfb], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + + } /* for (sfb = sfbTemp; sfb < 22; sfb++) */ + + } /* if (gr_info->window_switching_flag && (gr_info->block_type == 2)) */ + + } /* if (i_stereo) */ + else + { + /* + * normal or ms stereo processing + */ + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, 0, used_freq_lines); + } + + } /* if (i_stereo) */ + +} + + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_stereo_proc.h b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_stereo_proc.h new file mode 100644 index 0000000000..7db0c53020 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_mpeg2_stereo_proc.h @@ -0,0 +1,112 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_mpeg2_stereo_proc.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_MPEG2_STEREO_PROC_H +#define PVMP3_MPEG2_STEREO_PROC_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_mpeg2_stereo_proc(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + mp3ScaleFactors *scalefac, + granuleInfo *gr_info_l, + granuleInfo *gr_info_r, + uint32 *scalefac_IIP_buffer, + int32 used_freq_lines, + mp3Header *info); + + + void pvmp3_st_intensity_ver2(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 m, + int32 is_pos, + int32 Start, + int32 Number); +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_normalize.cpp b/ohos-specific/pvmp3dec/src/pvmp3_normalize.cpp new file mode 100644 index 0000000000..e579bbd8dc --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_normalize.cpp @@ -0,0 +1,173 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_normalize.cpp + + Date: 10/02/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +Input + Int32 x 32-bit integer non-zero input +Returns + Int32 i number of leading zeros on x + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + Returns number of leading zeros on the non-zero input + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" +#include "pvmp3_normalize.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +#if (defined(PV_ARM_V5)||defined(PV_ARM_V4)) +#elif (defined(PV_ARM_GCC_V5)||defined(PV_ARM_GCC_V4)) + + +/* function is inlined in header file */ + + +#else + +int32 pvmp3_normalize(int32 x) +{ + /*---------------------------------------------------------------------------- + ; Define all local variables + ----------------------------------------------------------------------------*/ + int32 i; + + + if (x > 0x0FFFFFFF) + { + i = 0; /* most likely case */ + } + else if (x > 0x00FFFFFF) + { + i = 3; /* second most likely case */ + } + else if (x > 0x0000FFFF) + { + i = x > 0x000FFFFF ? 7 : 11; + } + else + { + if (x > 0x000000FF) + { + i = x > 0x00000FFF ? 15 : 19; + } + else + { + i = x > 0x0000000F ? 23 : 27; + } + } + + + x <<= i; + + switch (x & 0x78000000) + { + case 0x08000000: + i += 3; + break; + + case 0x18000000: + case 0x10000000: + i += 2; + break; + case 0x28000000: + case 0x20000000: + case 0x38000000: + case 0x30000000: + i++; + + default: + ; + } + + return i; + +} + +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_normalize.h b/ohos-specific/pvmp3dec/src/pvmp3_normalize.h new file mode 100644 index 0000000000..54717712bf --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_normalize.h @@ -0,0 +1,108 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_normalize.h + + Date: 10/02/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +#ifndef PVMP3_NORMALIZE_H +#define PVMP3_NORMALIZE_H + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES AND SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +#if (defined(PV_ARM_V5)||defined(PV_ARM_V4)) + +__inline int32 pvmp3_normalize(int32 x) +{ + int32 y; + __asm + { + clz y, x; + sub y, y, #1 + } + return (y); +} + + +#elif (defined(PV_ARM_GCC_V5)||defined(PV_ARM_GCC_V4)) + +__inline int32 pvmp3_normalize(int32 x) +{ + register int32 y; + register int32 ra = x; + + + asm volatile( + "clz %0, %1\n\t" + "sub %0, %0, #1" + : "=&r*i"(y) + : "r"(ra)); + return (y); + +} + +#else + +#ifdef __cplusplus +extern "C" +{ +#endif + + int32 pvmp3_normalize(int32 x); + +#ifdef __cplusplus +} +#endif + +#endif + + + +#endif /* PV_NORMALIZE_H */ diff --git a/ohos-specific/pvmp3dec/src/pvmp3_poly_phase_synthesis.cpp b/ohos-specific/pvmp3dec/src/pvmp3_poly_phase_synthesis.cpp new file mode 100644 index 0000000000..33c8e61945 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_poly_phase_synthesis.cpp @@ -0,0 +1,187 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_poly_phase_synthesis.cpp + + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Input + tmp3dec_chan *pChVars, decoder state structure per channel + int32 numChannels, number of channels + e_equalization equalizerType, equalization mode + int16 *outPcm pointer to the PCM output data + + Output + int16 *outPcm pointer to the PCM output data + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + polyphase synthesis + Each time the subband samples for all 32 polyphase subbands of one + channel have been calculated, they can be applied to the synthesis + subband filter and 32 consecutive audio samples can be calculated + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_poly_phase_synthesis.h" +#include "pvmp3_polyphase_filter_window.h" +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_dec_defs.h" +#include "pvmp3_dct_16.h" +#include "pvmp3_equalizer.h" +#include "mp3_mem_funcs.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_poly_phase_synthesis(tmp3dec_chan *pChVars, + int32 numChannels, + e_equalization equalizerType, + int16 *outPcm) +{ + /* + * Equalizer + */ + pvmp3_equalizer(pChVars->circ_buffer, + equalizerType, + pChVars->work_buf_int32); + + + int16 * ptr_out = outPcm; + + + for (int32 band = 0; band < FILTERBANK_BANDS; band += 2) + { + int32 *inData = &pChVars->circ_buffer[544 - (band<<5)]; + + /* + * DCT 32 + */ + + pvmp3_split(&inData[16]); + + pvmp3_dct_16(&inData[16], 0); + pvmp3_dct_16(inData, 1); // Even terms + + pvmp3_merge_in_place_N32(inData); + + pvmp3_polyphase_filter_window(inData, + ptr_out, + numChannels); + + inData -= SUBBANDS_NUMBER; + + /* + * DCT 32 + */ + + pvmp3_split(&inData[16]); + + pvmp3_dct_16(&inData[16], 0); + pvmp3_dct_16(inData, 1); // Even terms + + pvmp3_merge_in_place_N32(inData); + + pvmp3_polyphase_filter_window(inData, + ptr_out + (numChannels << 5), + numChannels); + + ptr_out += (numChannels << 6); + + inData -= SUBBANDS_NUMBER; + + }/* end band loop */ + + pv_memmove(&pChVars->circ_buffer[576], + pChVars->circ_buffer, + 480*sizeof(*pChVars->circ_buffer)); + +} + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_poly_phase_synthesis.h b/ohos-specific/pvmp3dec/src/pvmp3_poly_phase_synthesis.h new file mode 100644 index 0000000000..166cffd812 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_poly_phase_synthesis.h @@ -0,0 +1,102 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_poly_phase_synthesis.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_POLY_PHASE_SYNTHESIS_H +#define PVMP3_POLY_PHASE_SYNTHESIS_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" +#include "s_tmp3dec_chan.h" +#include "pvmp3decoder_api.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_poly_phase_synthesis(tmp3dec_chan *pChVars, + int32 numChannels, + e_equalization equalizerType, + int16 *outPcm); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_polyphase_filter_window.cpp b/ohos-specific/pvmp3dec/src/pvmp3_polyphase_filter_window.cpp new file mode 100644 index 0000000000..8380437077 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_polyphase_filter_window.cpp @@ -0,0 +1,239 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ + +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_polyphase_filter_window.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + +Input + int32 *synth_buffer, synthesis input buffer + int16 *outPcm, generated output ( 32 values) + int32 numChannels number of channels + Returns + + int16 *outPcm + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + apply polyphase filter window + Input 32 subband samples + Calculate 64 values +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + +#if ( !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) && !defined(PV_ARM_V5) && !defined(PV_ARM_V4) ) +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_polyphase_filter_window.h" +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_dec_defs.h" +#include "pvmp3_tables.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module1 specific macros here +----------------------------------------------------------------------------*/ + + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module1 +----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module_x +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module_x but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_polyphase_filter_window(int32 *synth_buffer, + int16 *outPcm, + int32 numChannels) +{ + int32 sum1; + int32 sum2; + const int32 *winPtr = pqmfSynthWin; + int32 i; + + + for (int16 j = 1; j < SUBBANDS_NUMBER / 2; j++) + { + sum1 = 0x00000020; + sum2 = 0x00000020; + + + for (i = (SUBBANDS_NUMBER >> 1); + i < HAN_SIZE + (SUBBANDS_NUMBER >> 1); + i += SUBBANDS_NUMBER << 4) + { + int32 *pt_1 = &synth_buffer[ i+j]; + int32 *pt_2 = &synth_buffer[ i-j]; + int32 temp1 = pt_1[ 0]; + int32 temp3 = pt_2[ SUBBANDS_NUMBER*15 ]; + int32 temp2 = pt_2[ SUBBANDS_NUMBER* 1 ]; + int32 temp4 = pt_1[ SUBBANDS_NUMBER*14 ]; + + sum1 = fxp_mac32_Q32(sum1, temp1, winPtr[ 0]); + sum2 = fxp_mac32_Q32(sum2, temp3, winPtr[ 0]); + sum2 = fxp_mac32_Q32(sum2, temp1, winPtr[ 1]); + sum1 = fxp_msb32_Q32(sum1, temp3, winPtr[ 1]); + sum1 = fxp_mac32_Q32(sum1, temp2, winPtr[ 2]); + sum2 = fxp_msb32_Q32(sum2, temp4, winPtr[ 2]); + sum2 = fxp_mac32_Q32(sum2, temp2, winPtr[ 3]); + sum1 = fxp_mac32_Q32(sum1, temp4, winPtr[ 3]); + + temp1 = pt_1[ SUBBANDS_NUMBER* 2]; + temp3 = pt_2[ SUBBANDS_NUMBER*13]; + temp2 = pt_2[ SUBBANDS_NUMBER* 3]; + temp4 = pt_1[ SUBBANDS_NUMBER*12]; + + sum1 = fxp_mac32_Q32(sum1, temp1, winPtr[ 4]); + sum2 = fxp_mac32_Q32(sum2, temp3, winPtr[ 4]); + sum2 = fxp_mac32_Q32(sum2, temp1, winPtr[ 5]); + sum1 = fxp_msb32_Q32(sum1, temp3, winPtr[ 5]); + sum1 = fxp_mac32_Q32(sum1, temp2, winPtr[ 6]); + sum2 = fxp_msb32_Q32(sum2, temp4, winPtr[ 6]); + sum2 = fxp_mac32_Q32(sum2, temp2, winPtr[ 7]); + sum1 = fxp_mac32_Q32(sum1, temp4, winPtr[ 7]); + + temp1 = pt_1[ SUBBANDS_NUMBER* 4 ]; + temp3 = pt_2[ SUBBANDS_NUMBER*11 ]; + temp2 = pt_2[ SUBBANDS_NUMBER* 5 ]; + temp4 = pt_1[ SUBBANDS_NUMBER*10 ]; + + sum1 = fxp_mac32_Q32(sum1, temp1, winPtr[ 8]); + sum2 = fxp_mac32_Q32(sum2, temp3, winPtr[ 8]); + sum2 = fxp_mac32_Q32(sum2, temp1, winPtr[ 9]); + sum1 = fxp_msb32_Q32(sum1, temp3, winPtr[ 9]); + sum1 = fxp_mac32_Q32(sum1, temp2, winPtr[10]); + sum2 = fxp_msb32_Q32(sum2, temp4, winPtr[10]); + sum2 = fxp_mac32_Q32(sum2, temp2, winPtr[11]); + sum1 = fxp_mac32_Q32(sum1, temp4, winPtr[11]); + + temp1 = pt_1[ SUBBANDS_NUMBER*6 ]; + temp3 = pt_2[ SUBBANDS_NUMBER*9 ]; + temp2 = pt_2[ SUBBANDS_NUMBER*7 ]; + temp4 = pt_1[ SUBBANDS_NUMBER*8 ]; + + sum1 = fxp_mac32_Q32(sum1, temp1, winPtr[12]); + sum2 = fxp_mac32_Q32(sum2, temp3, winPtr[12]); + sum2 = fxp_mac32_Q32(sum2, temp1, winPtr[13]); + sum1 = fxp_msb32_Q32(sum1, temp3, winPtr[13]); + sum1 = fxp_mac32_Q32(sum1, temp2, winPtr[14]); + sum2 = fxp_msb32_Q32(sum2, temp4, winPtr[14]); + sum2 = fxp_mac32_Q32(sum2, temp2, winPtr[15]); + sum1 = fxp_mac32_Q32(sum1, temp4, winPtr[15]); + + winPtr += 16; + } + + + + int32 k = j << (numChannels - 1); + outPcm[k] = saturate16(sum1 >> 6); + outPcm[(numChannels<<5) - k] = saturate16(sum2 >> 6); + } + + + + sum1 = 0x00000020; + sum2 = 0x00000020; + + + for (i = 16; i < HAN_SIZE + 16; i += (SUBBANDS_NUMBER << 2)) + { + int32 *pt_synth = &synth_buffer[i]; + int32 temp1 = pt_synth[ 0 ]; + int32 temp2 = pt_synth[ SUBBANDS_NUMBER ]; + int32 temp3 = pt_synth[ SUBBANDS_NUMBER/2]; + + sum1 = fxp_mac32_Q32(sum1, temp1, winPtr[0]) ; + sum1 = fxp_mac32_Q32(sum1, temp2, winPtr[1]) ; + sum2 = fxp_mac32_Q32(sum2, temp3, winPtr[2]) ; + + temp1 = pt_synth[ SUBBANDS_NUMBER<<1 ]; + temp2 = pt_synth[ 3*SUBBANDS_NUMBER ]; + temp3 = pt_synth[ SUBBANDS_NUMBER*5/2]; + + sum1 = fxp_mac32_Q32(sum1, temp1, winPtr[3]) ; + sum1 = fxp_mac32_Q32(sum1, temp2, winPtr[4]) ; + sum2 = fxp_mac32_Q32(sum2, temp3, winPtr[5]) ; + + winPtr += 6; + } + + + outPcm[0] = saturate16(sum1 >> 6); + outPcm[(SUBBANDS_NUMBER/2)<<(numChannels-1)] = saturate16(sum2 >> 6); + + +} + +#endif // If not assembly + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_polyphase_filter_window.h b/ohos-specific/pvmp3dec/src/pvmp3_polyphase_filter_window.h new file mode 100644 index 0000000000..b9eccad0e8 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_polyphase_filter_window.h @@ -0,0 +1,138 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_decode_header.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_POLYPHASE_FILTER_WINDOW_H +#define PVMP3_POLYPHASE_FILTER_WINDOW_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_audio_type_defs.h" +#include "s_tmp3dec_chan.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ +#define MAX_16BITS_INT 0x7FFF + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#if (defined(PV_ARM_V5)||defined(PV_ARM_V4)) + + + __inline int16 saturate16(int32 sample) + { + int32 a; + int32 b = 31; + __asm + { + mov a, sample, asr#15 + teq a, sample, asr b + eorne sample, MAX_16BITS_INT, sample, asr#31 + } + return sample ; + } + +#else + + inline int16 saturate16(int32 sample) + { + + if ((sample >> 15) ^(sample >> 31)) + { + sample = MAX_16BITS_INT ^(sample >> 31); + } + return sample; + + } +#endif + + + void pvmp3_polyphase_filter_window(int32 *synth_buffer, + int16 *outPcm, + int32 numChannels); + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + + + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_reorder.cpp b/ohos-specific/pvmp3dec/src/pvmp3_reorder.cpp new file mode 100644 index 0000000000..286c6363e2 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_reorder.cpp @@ -0,0 +1,197 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_reorder.cpp + + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + + Inputs: + + int32 xr[ ], rescaled data + struct gr_info_s *gr_info, granule structure + mp3Header *info, mp3 header info + int32 Scratch_mem[198] for temporary usage + + Outputs: + + int32 xr[ ], reordered data + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + If short blocks are used (block_type[gr][ch]=='10'), the rescaled data + xr[scf_band][window][freq_line] shall be reordered in polyphase subband + order, xr[subband][window][freq_line], prior to the IMDCT operation. + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_dec_defs.h" +#include "pvmp3_reorder.h" +#include "pvmp3_tables.h" +#include "mp3_mem_funcs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_reorder(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + granuleInfo *gr_info, + int32 *used_freq_lines, + mp3Header *info, + int32 Scratch_mem[198]) +{ + int32 sfreq = info->version_x + (info->version_x << 1); + sfreq += info->sampling_frequency; + + if (gr_info->window_switching_flag && (gr_info->block_type == 2)) + { + int32 sfb_lines; + int32 freq; + int32 src_line; + int32 sfb; + if (gr_info->mixed_block_flag) + { + /* REORDERING FOR REST SWITCHED SHORT */ + sfb = 3; /* no reorder for low 2 subbands */ + src_line = 36; + } + else + { /* pure short */ + sfb = 0; + src_line = 0; + } + int16 ct = src_line; + + for (; sfb < 13; sfb++) + { + if (*used_freq_lines > 3*mp3_sfBandIndex[sfreq].s[sfb+1]) + { + sfb_lines = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; + + for (freq = 0; freq < 3*sfb_lines; freq += 3) + { + int32 tmp1 = xr[src_line]; + int32 tmp2 = xr[src_line+(sfb_lines)]; + int32 tmp3 = xr[src_line+(sfb_lines<<1)]; + src_line++; + Scratch_mem[freq ] = tmp1; + Scratch_mem[freq+1] = tmp2; + Scratch_mem[freq+2] = tmp3; + } + src_line += (sfb_lines << 1); + + pv_memcpy(&xr[ct], Scratch_mem, sfb_lines*3*sizeof(int32)); + ct += sfb_lines + (sfb_lines << 1); + + } + else + { + + sfb_lines = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; + + for (freq = 0; freq < 3*sfb_lines; freq += 3) + { + int32 tmp1 = xr[src_line]; + int32 tmp2 = xr[src_line+(sfb_lines)]; + int32 tmp3 = xr[src_line+(sfb_lines<<1)]; + src_line++; + Scratch_mem[freq ] = tmp1; + Scratch_mem[freq+1] = tmp2; + Scratch_mem[freq+2] = tmp3; + } + + pv_memcpy(&xr[ct], Scratch_mem, sfb_lines*3*sizeof(int32)); + + *used_freq_lines = mp3_sfBandIndex[sfreq].s[sfb+1] * 3; + + sfb = 13; /* force out of the for-loop */ + } + } + } +} + + + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_reorder.h b/ohos-specific/pvmp3dec/src/pvmp3_reorder.h new file mode 100644 index 0000000000..52489517d8 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_reorder.h @@ -0,0 +1,103 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_reorder.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_REORDER_H +#define PVMP3_REORDER_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + void pvmp3_reorder(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + granuleInfo *gr_info, + int32 *used_freq_lines, + mp3Header *info, + int32 Scratch_mem[198]); + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_seek_synch.cpp b/ohos-specific/pvmp3dec/src/pvmp3_seek_synch.cpp new file mode 100644 index 0000000000..82faafd2b0 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_seek_synch.cpp @@ -0,0 +1,308 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_seek_synch.cpp + + Functions: + pvmp3_seek_synch + pvmp3_header_sync + + + Date: 9/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +pvmp3_frame_synch + +Input + pExt = pointer to the external interface structure. See the file + pvmp3decoder_api.h for a description of each field. + Data type of pointer to a tPVMP3DecoderExternal + structure. + + pMem = void pointer to hide the internal implementation of the library + It is cast back to a tmp3dec_file structure. This structure + contains information that needs to persist between calls to + this function, or is too big to be placed on the stack, even + though the data is only needed during execution of this function + Data type void pointer, internally pointer to a tmp3dec_file + structure. + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + search mp3 sync word, when found, it verifies, based on header parameters, + the locations of the very next sync word, + - if fails, then indicates a false sync, + - otherwise, it confirm synchronization of at least 2 consecutives frames + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_seek_synch.h" +#include "pvmp3_getbits.h" +#include "s_tmp3dec_file.h" +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_tables.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + + + +ERROR_CODE pvmp3_frame_synch(tPVMP3DecoderExternal *pExt, + void *pMem) /* bit stream structure */ +{ + uint16 val; + ERROR_CODE err; + + tmp3dec_file *pVars; + + pVars = (tmp3dec_file *)pMem; + + pVars->inputStream.pBuffer = pExt->pInputBuffer; + pVars->inputStream.usedBits = (pExt->inputBufferUsedLength << 3); // in bits + + + pVars->inputStream.inputBufferCurrentLength = (pExt->inputBufferCurrentLength); // in bits + + err = pvmp3_header_sync(&pVars->inputStream); + + if (err == NO_DECODING_ERROR) + { + /* validate synchronization by checking two consecutive sync words */ + + // to avoid multiple bitstream accesses + uint32 temp = getNbits(&pVars->inputStream, 21); + // put back whole header + pVars->inputStream.usedBits -= 21 + SYNC_WORD_LNGTH; + + int32 version; + + switch (temp >> 19) /* 2 */ + { + case 0: + version = MPEG_2_5; + break; + case 2: + version = MPEG_2; + break; + case 3: + version = MPEG_1; + break; + default: + version = INVALID_VERSION; + break; + } + + int32 freq_index = (temp << 20) >> 30; + + if (version != INVALID_VERSION && (freq_index != 3)) + { + int32 numBytes = fxp_mul32_Q28(mp3_bitrate[version][(temp<<16)>>28] << 20, + inv_sfreq[freq_index]); + + numBytes >>= (20 - version); + + if (version != MPEG_1) + { + numBytes >>= 1; + } + if ((temp << 22) >> 31) + { + numBytes++; + } + + if (numBytes > (int32)pVars->inputStream.inputBufferCurrentLength) + { + /* frame should account for padding and 2 bytes to check sync */ + pExt->CurrentFrameLength = numBytes + 3; + return (SYNCH_LOST_ERROR); + } + else if (numBytes == (int32)pVars->inputStream.inputBufferCurrentLength) + { + /* No enough data to validate, but current frame appears to be correct ( EOF case) */ + pExt->inputBufferUsedLength = pVars->inputStream.usedBits >> 3; + return (NO_DECODING_ERROR); + } + else + { + + int32 offset = pVars->inputStream.usedBits + ((numBytes) << 3); + + offset >>= INBUF_ARRAY_INDEX_SHIFT; + uint8 *pElem = pVars->inputStream.pBuffer + offset; + uint16 tmp1 = *(pElem++); + uint16 tmp2 = *(pElem); + + val = (tmp1 << 3); + val |= (tmp2 >> 5); + } + } + else + { + val = 0; // force mismatch + } + + if (val == SYNC_WORD) + { + pExt->inputBufferUsedLength = pVars->inputStream.usedBits >> 3; /// !!!!! + err = NO_DECODING_ERROR; + } + else + { + pExt->inputBufferCurrentLength = 0; + err = SYNCH_LOST_ERROR; + } + } + else + { + pExt->inputBufferCurrentLength = 0; + } + + return(err); + +} + +/* +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + +------------------------------------------------------------------------------ + INPUT AND OUTPUT DEFINITIONS + +pvmp3_header_sync + +Input + tmp3Bits *inputStream, structure holding the input stream parameters + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + search mp3 sync word + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + + +ERROR_CODE pvmp3_header_sync(tmp3Bits *inputStream) +{ + uint16 val; + uint32 availableBits = (inputStream->inputBufferCurrentLength << 3); // in bits + + // byte aligment + inputStream->usedBits = (inputStream->usedBits + 7) & 8; + + val = (uint16)getUpTo17bits(inputStream, SYNC_WORD_LNGTH); + + while (((val&SYNC_WORD) != SYNC_WORD) && (inputStream->usedBits < availableBits)) + { + val <<= 8; + val |= getUpTo9bits(inputStream, 8); + } + + if ((val&SYNC_WORD) == SYNC_WORD && (inputStream->usedBits < availableBits)) + { + return(NO_DECODING_ERROR); + } + else + { + return(SYNCH_LOST_ERROR); + } + +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_seek_synch.h b/ohos-specific/pvmp3dec/src/pvmp3_seek_synch.h new file mode 100644 index 0000000000..8097cee69b --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_seek_synch.h @@ -0,0 +1,106 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_seek_synch.h + + Date: 09/21/2007 +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_SEEK_SYNCH_H +#define PVMP3_SEEK_SYNCH_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" +#include "pvmp3decoder_api.h" +#include "s_tmp3dec_file.h" +#include "pvmp3_dec_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + ERROR_CODE pvmp3_frame_synch(tPVMP3DecoderExternal *pExt, + void *pMem); + + ERROR_CODE pvmp3_header_sync(tmp3Bits *inputStream); + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif /* DECODE_READ_INPUT_H */ + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_stereo_proc.cpp b/ohos-specific/pvmp3dec/src/pvmp3_stereo_proc.cpp new file mode 100644 index 0000000000..d69a46dbd8 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_stereo_proc.cpp @@ -0,0 +1,676 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_stereo_proc.cpp + + Functions: + + pvmp3_st_mid_side + pvmp3_st_intensity + pvmp3_stereo_proc + +------------------------------------------------------------------------------ + +pvmp3_st_mid_side + + INPUT AND OUTPUT DEFINITIONS + +Input + + int32 xr[], input channel + int32 xl[], + int32 Start, Location of first element where stereo intensity is applied + int32 Number number of elements affected + + Returns + + int32 xl[], generated stereo channel + + +------------------------------------------------------------------------------ + +pvmp3_st_intensity + + INPUT AND OUTPUT DEFINITIONS + +Input + + int32 xr[], input channel + int32 xl[], + int32 is_pos, index to table is_ratio_factor[] + int32 Start, Location of first element where stereo intensity is applied + int32 Number number of elements affected + + Returns + + int32 xl[], generated stereo channel + + +------------------------------------------------------------------------------ + +pvmp3_stereo_proc + + INPUT AND OUTPUT DEFINITIONS + +Input + + int32 xr[], input channel + int32 xl[], + mp3ScaleFactors *scalefac, scale factors structure + struct gr_info_s *gr_info, granule structure + mp3Header *info mp3 header info + Returns + + int32 xl[], generated stereo channel + + +------------------------------------------------------------------------------ + FUNCTION DESCRIPTION + + stereo processing for mpeg1 layer III + After requantization, the reconstructed values are processed for ms_stereo + or intensity_stereo modes or both, before passing them to the synthesis + filterbank + + In ms_stereo mode the values of the normalized middle/side channels + M[l] and S[l] are transmitted instead of the left/right channel values + L[l] and R[l]. From here, L[l] and R[l] are reconstructed + + Intensity_stereo is done by specifying the magnitude (via the + scalefactors of the left channel) and a stereo position is_pos[sfb], + which is transmitted instead of scalefactors of the right channel. + The stereo position is used to derive the left and right channel signals + +------------------------------------------------------------------------------ + REQUIREMENTS + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ + PSEUDO-CODE + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_stereo_proc.h" +#include "pv_mp3dec_fxd_op.h" +#include "pvmp3_tables.h" + + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ +#define N31 31 + +#define Q31_fmt(a) (int32(double(0x7FFFFFFF)*a)) + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ +/* + * TmpFac= tan(is_pos * (PI /12)); + * + * TmpFac /= (1 + TmpFac); + * + */ + +const int32 is_ratio_factor[8] = {0, + Q31_fmt(0.21132486540519), Q31_fmt(0.36602540378444), Q31_fmt(0.50000000000000), + Q31_fmt(0.63397459621556), Q31_fmt(0.78867513459481), Q31_fmt(1.00000000000000), + 0 + }; + +/*---------------------------------------------------------------------------- +; EXTERNAL FUNCTION REFERENCES +; Declare functions defined elsewhere and referenced in this module +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_st_mid_side(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 Start, + int32 Number) +{ + + int32 *pt_xr = &xr[Start]; + int32 *pt_xl = &xl[Start]; + + for (int32 i = Number >> 1; i != 0; i--) + { + int32 xxr = *(pt_xr) << 1; + int32 xxl = *(pt_xl) << 1; + *(pt_xr++) = fxp_mul32_Q32((xxr + xxl), Q31_fmt(0.70710678118655)); /* Sum */ + *(pt_xl++) = fxp_mul32_Q32((xxr - xxl), Q31_fmt(0.70710678118655)); /* Diff */ + xxr = *(pt_xr) << 1; + xxl = *(pt_xl) << 1; + *(pt_xr++) = fxp_mul32_Q32((xxr + xxl), Q31_fmt(0.70710678118655)); /* Sum */ + *(pt_xl++) = fxp_mul32_Q32((xxr - xxl), Q31_fmt(0.70710678118655)); /* Diff */ + } + + + if (Number&1) + { + int32 xxr = *(pt_xr) << 1; + int32 xxl = *(pt_xl) << 1; + *(pt_xr) = fxp_mul32_Q32((xxr + xxl), Q31_fmt(0.70710678118655)); /* Sum */ + *(pt_xl) = fxp_mul32_Q32((xxr - xxl), Q31_fmt(0.70710678118655)); /* Diff */ + } + +} + + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ + +void pvmp3_st_intensity(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 is_pos, + int32 Start, + int32 Number) +{ + + int32 TmpFac = is_ratio_factor[ is_pos & 7]; + + int32 *pt_xr = &xr[Start]; + int32 *pt_xl = &xl[Start]; + + for (int32 i = Number >> 1; i != 0; i--) + { + int32 tmp = fxp_mul32_Q32((*pt_xr) << 1, TmpFac); + *(pt_xl++) = (*pt_xr) - tmp; + *(pt_xr++) = tmp; + tmp = fxp_mul32_Q32((*pt_xr) << 1, TmpFac); + *(pt_xl++) = (*pt_xr) - tmp; + *(pt_xr++) = tmp; + } + + if (Number&1) + { + int32 tmp = fxp_mul32_Q32((*pt_xr) << 1, TmpFac); + *(pt_xl) = (*pt_xr) - tmp; + *(pt_xr) = tmp; + } + +} + +/*---------------------------------------------------------------------------- +; FUNCTION CODE +----------------------------------------------------------------------------*/ +void pvmp3_stereo_proc(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + mp3ScaleFactors *scalefac, + granuleInfo *gr_info, + int32 used_freq_lines, + mp3Header *info) +{ + + + int32 sb; + int32 ss; + int32 sfbNo; + int32 sfbStart; + + int32 sfb; + int32 sfbTemp; + int32 i; + int32 j; + + + int32 i_stereo = (info->mode == MPG_MD_JOINT_STEREO) && + (info->mode_ext & 0x1); + + int32 ms_stereo = (info->mode == MPG_MD_JOINT_STEREO) && + (info->mode_ext & 0x2); + + int32 sfreq = info->version_x + (info->version_x << 1); + sfreq += info->sampling_frequency; + + + + + if (i_stereo) + { + if (gr_info->window_switching_flag && (gr_info->block_type == 2)) + { + if (gr_info->mixed_block_flag) + { + /* + * mixed blocks processing + */ + i = 31; + ss = 17; + sb = 0; + while (i >= 0) + { + if (xl[(i*FILTERBANK_BANDS) + ss]) + { + sb = (i << 4) + (i << 1) + ss; + i = -1; + } + else + { + ss--; + if (ss < 0) + { + i--; + ss = 17; + } + } + } + + if (sb < 36) + { + /* + * mixed blocks processing: intensity bound inside long blocks + */ + /* 1. long blocks up to intensity border: not intensity */ + + if (mp3_sfBandIndex[sfreq].l[4] <= sb) + { + sfb = 4; + } + else + { + sfb = 0; + } + + while (mp3_sfBandIndex[sfreq].l[sfb] < sb) + { + sfb++; + } + + /* from that sfb on intensity stereo */ + sfbTemp = sfb; /* save for later use */ + + sfbStart = mp3_sfBandIndex[sfreq].l[sfb]; + + /* from 0 up to sfbStart do ms_stereo or normal stereo */ + + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, 0, sfbStart); + } + + /* 2. long blocks from intensity border up to sfb band 8: intensity */ + /* calc. is_ratio */ + + + /* Start of intensity stereo of remaining sfc bands: */ + for (; sfbTemp < 8; sfbTemp++) + { + sfbStart = mp3_sfBandIndex[sfreq].l[sfbTemp]; /* = Start in 0 ... 575 */ + sfbNo = mp3_sfBandIndex[sfreq].l[sfbTemp+1] - mp3_sfBandIndex[sfreq].l[sfbTemp]; /* No of lines to process */ + + if (scalefac->l[sfbTemp] != 7) + { + pvmp3_st_intensity(xr, xl, scalefac->l[sfbTemp], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + + } /* for (; sfbTemp < 8; sfbTemp++) */ + + for (j = 0; j < 3; j++) + { + /* 3. short blocks from sfbcnt to last sfb do intensity stereo */ + for (sfbTemp = 3; sfbTemp < 13; sfbTemp++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sfbTemp+1] - mp3_sfBandIndex[sfreq].s[sfbTemp]; /* No of lines to process */ + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sfbTemp] + j * sfbNo; + + if (scalefac->s[j][sfbTemp] != 7) + { + pvmp3_st_intensity(xr, xl, scalefac->s[j][sfbTemp], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + + } /* for (; sfbTemp < 22; sfbTemp++) */ + } /* for (j = 0; j < 3; j++) */ + } + else /* else for (sb >= 36) */ + { + /* + * mixed blocks processing: intensity bound outside long blocks + */ + + + /* + * 2. short blocks from sfb band 3 up to intensity border: normal stereo, ms stereo and intensity + */ + for (j = 0; j < 3; j++) + { + int32 sfbcnt; + sfbcnt = -1; + + for (sfb = 12; sfb >= 3; sfb--) + { + int32 lines; + lines = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; + i = 3 * mp3_sfBandIndex[sfreq].s[sfb] + (j + 1) * lines - 1; + + while (lines > 0) + { + if (xl[i]) + { + sfbcnt = sfb; + sfb = -10; + lines = -10; + } + lines--; + i--; + } + } + + sfbcnt += 1; + if (sfbcnt < 3) + { + sfbcnt = 3; + } + + sfbTemp = sfbcnt; /* for later use */ + + + /* + * do normal stereo or MS stereo from sfb 3 to < sfbcnt: + */ + for (sb = 3; sb < sfbcnt; sb++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sb+1] - mp3_sfBandIndex[sfreq].s[sb]; + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sb] + j * sfbNo; + + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + + } + + /* from sfbcnt to last sfb do intensity stereo */ + for (; sfbTemp < 13; sfbTemp++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sfbTemp+1] - mp3_sfBandIndex[sfreq].s[sfbTemp]; /* No of lines to process */ + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sfbTemp] + j * sfbNo; + + if (scalefac->s[j][sfbTemp] != 7) + { + pvmp3_st_intensity(xr, xl, scalefac->s[j][sfbTemp], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + + } /* for (; sfbTemp < 22; sfbTemp++) */ + + } /* for (j = 0; j < 3; j++) */ + + /* 1. long blocks up to sfb band 8: not intensity */ + /* from 0 to sfb 8 ms_stereo or normal stereo */ + + sfbStart = mp3_sfBandIndex[sfreq].l[8]; + + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, 0, sfbStart); + } + + } + } /* if (gr_info->mixed_block_flag) */ + else + { + /* + * short block processing + */ + for (j = 0; j < 3; j++) + { + int32 sfbcnt = -1; + + for (sfb = 12; sfb >= 0; sfb--) + { + int32 lines = mp3_sfBandIndex[sfreq].s[sfb+1] - mp3_sfBandIndex[sfreq].s[sfb]; + i = 3 * mp3_sfBandIndex[sfreq].s[sfb] + (j + 1) * lines - 1; + + while (lines > 0) + { + if (xl[i]) + { + sfbcnt = sfb; + sfb = -10; + lines = -10; + } + lines--; + i--; + } + } + + sfbcnt += 1; + sfbTemp = sfbcnt; /* for later use */ + + /* do normal stereo or MS stereo from 0 to sfbcnt */ + for (sb = 0; sb < sfbcnt; sb++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sb+1] - mp3_sfBandIndex[sfreq].s[sb]; + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sb] + j * sfbNo; + + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + } + + + /* from sfbcnt to last sfb do intensity stereo */ + for (; sfbTemp < 13; sfbTemp++) + { + sfbNo = mp3_sfBandIndex[sfreq].s[sfbTemp+1] - mp3_sfBandIndex[sfreq].s[sfbTemp]; /* No of lines to process */ + sfbStart = 3 * mp3_sfBandIndex[sfreq].s[sfbTemp] + j * sfbNo; + + if (scalefac->s[j][sfbTemp] != 7) + { + pvmp3_st_intensity(xr, xl, scalefac->s[j][sfbTemp], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + + } /* for (; sfbTemp < 22; sfbTemp++) */ + + } /* for (j = 0; j < 3; j++) */ + + } /* if( gr_info->mixed_block_flag) */ + + + + } /* if (gr_info->window_switching_flag && (gr_info->block_type == 2)) */ + else + { + /* + * long block processing + */ + i = 31; + ss = 17; + sb = 0; + + while (i >= 0) + { + if (xl[(i*FILTERBANK_BANDS) + ss] != 0) + { + sb = (i << 4) + (i << 1) + ss; + i = -2; + } + else + { + ss--; + if (ss < 0) + { + i--; + ss = 17; + } + } + } + + if (sb) + { + if (mp3_sfBandIndex[sfreq].l[14] <= sb) + { + sfb = 14; + } + else if (mp3_sfBandIndex[sfreq].l[7] <= sb) + { + sfb = 7; + } + else + { + sfb = 0; + } + + + while (mp3_sfBandIndex[sfreq].l[sfb] <= sb) + { + sfb++; + } + } + else + { + if (i == -1) + { + /* all xr[1][][] are 0: set IS bound sfb to 0 */ + sfb = 0; + } + else + { + /* xr[1][0][0] is unequal 0 and all others are 0: set IS bound sfb to 1 */ + sfb = 1; + } + } + + sfbTemp = sfb; /* save for later use */ + + + sfbStart = mp3_sfBandIndex[sfreq].l[sfb]; + + /* from 0 to sfbStart ms_stereo or normal stereo */ + if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, 0, sfbStart); + } + + /* now intensity stereo of the remaining sfb's: */ + for (; sfb < 21; sfb++) + { + sfbStart = mp3_sfBandIndex[sfreq].l[sfb]; + sfbNo = mp3_sfBandIndex[sfreq].l[sfb+1] - mp3_sfBandIndex[sfreq].l[sfb]; /* No of lines to process */ + + if (scalefac->l[sfb] != 7) + { + pvmp3_st_intensity(xr, xl, scalefac->l[sfb], sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + + } /* for (; sfbTemp < 22; sfbTemp++) */ + + + + sfbStart = mp3_sfBandIndex[sfreq].l[21]; + sfbNo = mp3_sfBandIndex[sfreq].l[22] - mp3_sfBandIndex[sfreq].l[21]; /* No of lines to process */ + + if (scalefac->l[21] != 7) + { + if (sfbTemp < 21) + { + sfbTemp = scalefac->l[20]; + } + else + { + sfbTemp = 0; /* if scalefac[20] is not an intensity position, is_pos = 0 */ + } + + pvmp3_st_intensity(xr, xl, sfbTemp, sfbStart, sfbNo); + } + else if (ms_stereo) + { + pvmp3_st_mid_side(xr, xl, sfbStart, sfbNo); + } + + } /* if (gr_info->window_switching_flag && (gr_info->block_type == 2)) */ + + + } /* if (i_stereo) */ + else + { + /* + * normal or ms stereo processing + */ + if (ms_stereo) + { + + pvmp3_st_mid_side(xr, xl, 0, used_freq_lines); + + } + + } /* if (i_stereo) */ + +} + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_stereo_proc.h b/ohos-specific/pvmp3dec/src/pvmp3_stereo_proc.h new file mode 100644 index 0000000000..bfaf1a12a9 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_stereo_proc.h @@ -0,0 +1,114 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_stereo_proc.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef PVMP3_STEREO_PROC_H +#define PVMP3_STEREO_PROC_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + + void pvmp3_stereo_proc(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + mp3ScaleFactors *scalefac, + granuleInfo *gr_info, + int32 used_freq_lines, + mp3Header *info); + + void pvmp3_st_intensity(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 is_pos, + int32 Start, + int32 Number); + + void pvmp3_st_mid_side(int32 xr[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 xl[SUBBANDS_NUMBER*FILTERBANK_BANDS], + int32 Start, + int32 Number); +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_tables.cpp b/ohos-specific/pvmp3dec/src/pvmp3_tables.cpp new file mode 100644 index 0000000000..90e524a962 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_tables.cpp @@ -0,0 +1,2934 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: pvmp3_tables.cpp + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + + Description: + + +------------------------------------------------------------------------------ + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +------------------------------------------------------------------------------ +*/ + + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_tables.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. Include conditional +; compile variables also. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; LOCAL STORE/BUFFER/POINTER DEFINITIONS +; Variable declaration - defined here and used outside this module +----------------------------------------------------------------------------*/ + +const int32 mp3_s_freq[4][4] = +{ + {44100, 48000, 32000, 0}, + {22050, 24000, 16000, 0}, + {11025, 12000, 8000, 0} +}; // MPEG-2.5 + + +/* + * 144000./s_freq + */ +const int32 inv_sfreq[4] = +{ + Qfmt_28(3.26530612244898), + Qfmt_28(3.0), + Qfmt_28(4.5), + 0 +}; + + +/* 1: MPEG-1, 0: MPEG-2 LSF, 1995-07-11 shn */ + + +const int16 mp3_bitrate[3][15] = +{ + {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320}, + {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160}, + {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160} +}; + + +const mp3_scaleFactorBandIndex mp3_sfBandIndex[9] = +{ + + /* MPEG 1 */ + + {{0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 52, 62, 74, 90, 110, 134, 162, 196, 238, 288, 342, 418, 576}, + {0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 84, 106, 136, 192}}, + {{0, 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 60, 72, 88, 106, 128, 156, 190, 230, 276, 330, 384, 576}, + {0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 80, 100, 126, 192}}, + {{0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 54, 66, 82, 102, 126, 156, 194, 240, 296, 364, 448, 550, 576}, + {0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 104, 138, 180, 192}}, + + /* MPEG 2 - LSF */ + + {{0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, 522, 576}, + {0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 100, 132, 174, 192}}, + {{0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 114, 136, 162, 194, 232, 278, 332, 394, 464, 540, 576}, + {0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 136, 180, 192}}, + {{0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, 522, 576}, + {0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192}}, + + /* MPEG 2.5 extension */ + + {{0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, 522, 576}, + {0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192}}, + {{0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, 522, 576}, + {0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192}}, + {{0, 12, 24, 36, 48, 60, 72, 88, 108, 132, 160, 192, 232, 280, 336, 400, 476, 566, 568, 570, 572, 574, 576}, + {0, 8, 16, 24, 36, 52, 72, 96, 124, 160, 162, 164, 166, 192}} + +}; + +#define INV_Q31( x) (int32)(0x7FFFFFFF/(float)x - 1.0f) + +const int32 mp3_shortwindBandWidths[9][13] = +{ + { INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(6), INV_Q31(8), INV_Q31(10), + INV_Q31(12), INV_Q31(14), INV_Q31(18), INV_Q31(22), INV_Q31(30), INV_Q31(56)}, + { INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(6), INV_Q31(6), INV_Q31(10), + INV_Q31(12), INV_Q31(14), INV_Q31(16), INV_Q31(20), INV_Q31(26), INV_Q31(66)}, + { INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(6), INV_Q31(8), INV_Q31(12), + INV_Q31(16), INV_Q31(20), INV_Q31(26), INV_Q31(34), INV_Q31(42), INV_Q31(12)}, + { INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(6), INV_Q31(6), INV_Q31(8), INV_Q31(10), + INV_Q31(14), INV_Q31(18), INV_Q31(26), INV_Q31(32), INV_Q31(42), INV_Q31(18)}, + { INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(6), INV_Q31(8), INV_Q31(10), INV_Q31(12), + INV_Q31(14), INV_Q31(18), INV_Q31(24), INV_Q31(32), INV_Q31(44), INV_Q31(12)}, + { INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(6), INV_Q31(8), INV_Q31(10), INV_Q31(12), + INV_Q31(14), INV_Q31(18), INV_Q31(24), INV_Q31(30), INV_Q31(40), INV_Q31(18)}, + { INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(6), INV_Q31(8), INV_Q31(10), INV_Q31(12), + INV_Q31(14), INV_Q31(18), INV_Q31(24), INV_Q31(30), INV_Q31(40), INV_Q31(18)}, + { INV_Q31(4), INV_Q31(4), INV_Q31(4), INV_Q31(6), INV_Q31(8), INV_Q31(10), INV_Q31(12), + INV_Q31(14), INV_Q31(18), INV_Q31(24), INV_Q31(30), INV_Q31(40), INV_Q31(18)}, + { INV_Q31(8), INV_Q31(8), INV_Q31(8), INV_Q31(12), INV_Q31(16), INV_Q31(20), INV_Q31(24), + INV_Q31(28), INV_Q31(36), INV_Q31(2), INV_Q31(2), INV_Q31(2), INV_Q31(26)} +}; + + +#define Q30_fmt(a) (int32((0x40000000)*a)) + +const int32 pqmfSynthWin[(HAN_SIZE/2) + 8] = +{ + Q30_fmt(-0.000015259F), Q30_fmt(0.000396729F), Q30_fmt(0.000473022F), Q30_fmt(0.003173828F), + Q30_fmt(0.003326416F), Q30_fmt(0.006118770F), Q30_fmt(0.007919310F), Q30_fmt(0.031478880F), + Q30_fmt(0.030517578F), Q30_fmt(0.073059080F), Q30_fmt(0.084182740F), Q30_fmt(0.108856200F), + Q30_fmt(0.090927124F), Q30_fmt(0.543823240F), Q30_fmt(0.600219727F), Q30_fmt(1.144287109F), + + Q30_fmt(-0.000015259F), Q30_fmt(0.000366211F), Q30_fmt(0.000534058F), Q30_fmt(0.003082275F), + Q30_fmt(0.003387451F), Q30_fmt(0.005294800F), Q30_fmt(0.008865360F), Q30_fmt(0.031738280F), + Q30_fmt(0.029785160F), Q30_fmt(0.067520140F), Q30_fmt(0.089706420F), Q30_fmt(0.116577150F), + Q30_fmt(0.080688480F), Q30_fmt(0.515609740F), Q30_fmt(0.628295900F), Q30_fmt(1.142211914F), + + Q30_fmt(-0.000015259F), Q30_fmt(0.000320435F), Q30_fmt(0.000579834F), Q30_fmt(0.002990723F), + Q30_fmt(0.003433228F), Q30_fmt(0.004486080F), Q30_fmt(0.009841920F), Q30_fmt(0.031845090F), + Q30_fmt(0.028884890F), Q30_fmt(0.061996460F), Q30_fmt(0.095169070F), Q30_fmt(0.123474120F), + Q30_fmt(0.069595340F), Q30_fmt(0.487472530F), Q30_fmt(0.656219480F), Q30_fmt(1.138763428F), + + Q30_fmt(-0.000015259F), Q30_fmt(0.000289917F), Q30_fmt(0.000625610F), Q30_fmt(0.002899170F), + Q30_fmt(0.003463745F), Q30_fmt(0.003723140F), Q30_fmt(0.010849000F), Q30_fmt(0.031814580F), + Q30_fmt(0.027801510F), Q30_fmt(0.056533810F), Q30_fmt(0.100540160F), Q30_fmt(0.129577640F), + Q30_fmt(0.057617190F), Q30_fmt(0.459472660F), Q30_fmt(0.683914180F), Q30_fmt(1.133926392F), + + Q30_fmt(-0.000015259F), Q30_fmt(0.000259399F), Q30_fmt(0.000686646F), Q30_fmt(0.002792358F), + Q30_fmt(0.003479004F), Q30_fmt(0.003005981F), Q30_fmt(0.011886600F), Q30_fmt(0.031661990F), + Q30_fmt(0.026535030F), Q30_fmt(0.051132200F), Q30_fmt(0.105819700F), Q30_fmt(0.134887700F), + Q30_fmt(0.044784550F), Q30_fmt(0.431655880F), Q30_fmt(0.711318970F), Q30_fmt(1.127746582F), + + Q30_fmt(-0.000015259F), Q30_fmt(0.000244141F), Q30_fmt(0.000747681F), Q30_fmt(0.002685547F), + Q30_fmt(0.003479004F), Q30_fmt(0.002334595F), Q30_fmt(0.012939450F), Q30_fmt(0.031387330F), + Q30_fmt(0.025085450F), Q30_fmt(0.045837400F), Q30_fmt(0.110946660F), Q30_fmt(0.139450070F), + Q30_fmt(0.031082153F), Q30_fmt(0.404083250F), Q30_fmt(0.738372800F), Q30_fmt(1.120223999F), + + Q30_fmt(-0.000030518F), Q30_fmt(0.000213623F), Q30_fmt(0.000808716F), Q30_fmt(0.002578735F), + Q30_fmt(0.003463745F), Q30_fmt(0.001693726F), Q30_fmt(0.014022830F), Q30_fmt(0.031005860F), + Q30_fmt(0.023422240F), Q30_fmt(0.040634160F), Q30_fmt(0.115921020F), Q30_fmt(0.143264770F), + Q30_fmt(0.016510010F), Q30_fmt(0.376800540F), Q30_fmt(0.765029907F), Q30_fmt(1.111373901F), + + Q30_fmt(-0.000030518F), Q30_fmt(0.000198364F), Q30_fmt(0.000885010F), Q30_fmt(0.002456665F), + Q30_fmt(0.003417969F), Q30_fmt(0.001098633F), Q30_fmt(0.015121460F), Q30_fmt(0.030532840F), + Q30_fmt(0.021575930F), Q30_fmt(0.035552980F), Q30_fmt(0.120697020F), Q30_fmt(0.146362300F), + Q30_fmt(0.001068120F), Q30_fmt(0.349868770F), Q30_fmt(0.791213990F), Q30_fmt(1.101211548F), + + Q30_fmt(-0.000030518F), Q30_fmt(0.000167847F), Q30_fmt(0.000961304F), Q30_fmt(0.002349854F), + Q30_fmt(0.003372192F), Q30_fmt(0.000549316F), Q30_fmt(0.016235350F), Q30_fmt(0.029937740F), + Q30_fmt(0.019531250F), Q30_fmt(0.030609130F), Q30_fmt(0.125259400F), Q30_fmt(0.148773190F), + Q30_fmt(-0.015228270F), Q30_fmt(0.323318480F), Q30_fmt(0.816864010F), Q30_fmt(1.089782715F), + + Q30_fmt(-0.000030518F), Q30_fmt(0.000152588F), Q30_fmt(0.001037598F), Q30_fmt(0.002243042F), + Q30_fmt(0.003280640F), Q30_fmt(0.000030518F), Q30_fmt(0.017349240F), Q30_fmt(0.029281620F), + Q30_fmt(0.017257690F), Q30_fmt(0.025817870F), Q30_fmt(0.129562380F), Q30_fmt(0.150497440F), + Q30_fmt(-0.032379150F), Q30_fmt(0.297210693F), Q30_fmt(0.841949463F), Q30_fmt(1.077117920F), + + Q30_fmt(-0.000045776F), Q30_fmt(0.000137329F), Q30_fmt(0.001113892F), Q30_fmt(0.002120972F), + Q30_fmt(0.003173828F), Q30_fmt(-0.000442505F), Q30_fmt(0.018463130F), Q30_fmt(0.028533940F), + Q30_fmt(0.014801030F), Q30_fmt(0.021179200F), Q30_fmt(0.133590700F), Q30_fmt(0.151596070F), + Q30_fmt(-0.050354000F), Q30_fmt(0.271591190F), Q30_fmt(0.866363530F), Q30_fmt(1.063217163F), + + Q30_fmt(-0.000045776F), Q30_fmt(0.000122070F), Q30_fmt(0.001205444F), Q30_fmt(0.002014160F), + Q30_fmt(0.003051758F), Q30_fmt(-0.000869751F), Q30_fmt(0.019577030F), Q30_fmt(0.027725220F), + Q30_fmt(0.012115480F), Q30_fmt(0.016708370F), Q30_fmt(0.137298580F), Q30_fmt(0.152069090F), + Q30_fmt(-0.069168090F), Q30_fmt(0.246505740F), Q30_fmt(0.890090940F), Q30_fmt(1.048156738F), + + Q30_fmt(-0.000061035F), Q30_fmt(0.000106812F), Q30_fmt(0.001296997F), Q30_fmt(0.001907349F), + Q30_fmt(0.002883911F), Q30_fmt(-0.001266479F), Q30_fmt(0.020690920F), Q30_fmt(0.026840210F), + Q30_fmt(0.009231570F), Q30_fmt(0.012420650F), Q30_fmt(0.140670780F), Q30_fmt(0.151962280F), + Q30_fmt(-0.088775630F), Q30_fmt(0.221984860F), Q30_fmt(0.913055420F), Q30_fmt(1.031936646F), + + Q30_fmt(-0.000061035F), Q30_fmt(0.000106812F), Q30_fmt(0.001388550F), Q30_fmt(0.001785278F), + Q30_fmt(0.002700806F), Q30_fmt(-0.001617432F), Q30_fmt(0.021789550F), Q30_fmt(0.025909420F), + Q30_fmt(0.006134030F), Q30_fmt(0.008316040F), Q30_fmt(0.143676760F), Q30_fmt(0.151306150F), + Q30_fmt(-0.109161380F), Q30_fmt(0.198059080F), Q30_fmt(0.935195920F), Q30_fmt(1.014617920F), + + Q30_fmt(-0.000076294F), Q30_fmt(0.000091553F), Q30_fmt(0.001480103F), Q30_fmt(0.001693726F), + Q30_fmt(0.002487183F), Q30_fmt(-0.001937866F), Q30_fmt(0.022857670F), Q30_fmt(0.024932860F), + Q30_fmt(0.002822880F), Q30_fmt(0.004394530F), Q30_fmt(0.146255490F), Q30_fmt(0.150115970F), + Q30_fmt(-0.130310060F), Q30_fmt(0.174789430F), Q30_fmt(0.956481930F), Q30_fmt(0.996246338F), + + Q30_fmt(0.000000000F), Q30_fmt(0.000442505F), Q30_fmt(0.001586910F), Q30_fmt(0.003250122F), + Q30_fmt(0.007003780F), Q30_fmt(0.023910525F), Q30_fmt(0.031082153F), Q30_fmt(0.078628545F), + Q30_fmt(0.148422240F), Q30_fmt(0.100311279F), Q30_fmt(0.572036740F), Q30_fmt(0.976852417F), + Q30_fmt(1.144989014F), Q30_fmt(-0.572036745F), Q30_fmt(-0.152206421F), Q30_fmt(0.100311279F), + + Q30_fmt(-0.078628540F), Q30_fmt(-0.000686646F), Q30_fmt(0.031082153F), Q30_fmt(-0.007003785F), + Q30_fmt(0.002227783F), Q30_fmt(0.003250122F), Q30_fmt(-0.000442500F), Q30_fmt(-0.000076294F), +}; + + + + + +const uint16 huffTable_1[8] = +{ + 0x1103, 0x0103, 0x1002, 0x1002, + 0x0001, 0x0001, 0x0001, 0x0001 +}; + +const uint16 huffTable_2[15] = +{ + 0x1103, 0x0103, 0x1003, 0x0001, + 0x0001, 0x0001, 0x0001, 0x2206, + 0x0206, 0x1205, 0x1205, 0x2105, + 0x2105, 0x2005, 0x2005 +}; + +const uint16 huffTable_3[15] = +{ + + 0x1003, 0x1102, 0x1102, 0x0102, + 0x0102, 0x0002, 0x0002, 0x2206, + 0x0206, 0x1205, 0x1205, 0x2105, + 0x2105, 0x2005, 0x2005 +}; + +const uint16 huffTable_5[25] = +{ + + 0x1103, 0x0103, 0x1003, 0x0001, + 0x0001, 0x0001, 0x0001, 0x3106, + 0x3106, 0x1307, 0x0307, 0x3007, + 0x2207, 0x1206, 0x1206, 0x2106, + 0x2106, 0x0206, 0x0206, 0x2006, + 0x2006, 0x3308, 0x2308, 0x3207, + 0x3207 +}; + + +const uint16 huffTable_6[26] = +{ + + 0x1204, 0x2104, 0x2004, 0x0103, + 0x0103, 0x1102, 0x1102, 0x1102, + 0x1102, 0x1003, 0x1003, 0x0003, + 0x0003, 0x2306, 0x3206, 0x3006, + 0x1305, 0x1305, 0x3105, 0x3105, + 0x2205, 0x2205, 0x0205, 0x0205, + 0x3307, 0x0307 +}; + + + +const uint16 huffTable_7[73] = +{ + 0x0103, + 0x1003, + 0x0001, + 0x0001, + 0x0001, + 0x0001, + 0x1206, + 0x2105, + 0x2105, + 0x0206, + 0x2006, + 0x1104, + 0x1104, + 0x1104, + 0x1104, + 0x3509, + 0x4409, + 0x2509, + 0x5209, + 0x1508, + 0x1508, + 0x5108, + 0x5108, + 0x0509, + 0x3409, + 0x5008, + 0x5008, + 0x4309, + 0x3309, + 0x2408, + 0x2408, + 0x4208, + 0x4208, + 0x1407, + 0x1407, + 0x1407, + 0x1407, + 0x4107, + 0x4107, + 0x4107, + 0x4107, + 0x4007, + 0x4007, + 0x4007, + 0x4007, + 0x0408, + 0x0408, + 0x2308, + 0x2308, + 0x3208, + 0x3208, + 0x0308, + 0x0308, + 0x1307, + 0x1307, + 0x1307, + 0x1307, + 0x3107, + 0x3107, + 0x3107, + 0x3107, + 0x3007, + 0x3007, + 0x3007, + 0x3007, + 0x2207, + 0x2207, + 0x2207, + 0x2207, + 0x550a, + 0x450a, + 0x540a, + 0x530a +}; + +const uint16 huffTable_8[66] = +{ + 0x1204, + 0x2104, + 0x1102, + 0x1102, + 0x1102, + 0x1102, + 0x0103, + 0x0103, + 0x1003, + 0x1003, + 0x0002, + 0x0002, + 0x0002, + 0x0002, + 0x2206, + 0x0206, + 0x2006, + 0x2509, + 0x5209, + 0x0509, + 0x1508, + 0x1508, + 0x5108, + 0x5108, + 0x3409, + 0x4309, + 0x5009, + 0x3309, + 0x2408, + 0x2408, + 0x4208, + 0x4208, + 0x1408, + 0x1408, + 0x4107, + 0x4107, + 0x4107, + 0x4107, + 0x0408, + 0x0408, + 0x4008, + 0x4008, + 0x2308, + 0x2308, + 0x3208, + 0x3208, + 0x1308, + 0x1308, + 0x3108, + 0x3108, + 0x0308, + 0x0308, + 0x3008, + 0x3008, + 0x550b, + 0x540b, + 0x450a, + 0x450a, + 0x5309, + 0x5309, + 0x5309, + 0x5309, + 0x350a, + 0x350a, + 0x440a, + 0x440a + +}; + + +const uint16 huffTable_9[53] = +{ + 0x1204, + 0x2104, + 0x2004, + 0x1103, + 0x1103, + 0x0103, + 0x0103, + 0x1003, + 0x1003, + 0x0003, + 0x0003, + 0x1406, + 0x4106, + 0x2306, + 0x3206, + 0x1305, + 0x1305, + 0x3105, + 0x3105, + 0x0306, + 0x3006, + 0x2205, + 0x2205, + 0x0205, + 0x0205, + 0x4408, + 0x2508, + 0x5208, + 0x1508, + 0x5107, + 0x5107, + 0x3407, + 0x3407, + 0x4307, + 0x4307, + 0x5008, + 0x0408, + 0x2407, + 0x2407, + 0x4207, + 0x4207, + 0x3307, + 0x3307, + 0x4007, + 0x4007, + 0x5509, + 0x4509, + 0x3508, + 0x3508, + 0x5308, + 0x5308, + 0x5409, + 0x0509 + +}; + + +const uint16 huffTable_10[96] = +{ + 0x0001, + 0x1104, + 0x0103, + 0x0103, + 0x1003, + 0x1003, + 0x1206, + 0x2106, + 0x0206, + 0x2006, + 0x1408, + 0x4108, + 0x4008, + 0x2308, + 0x3208, + 0x0308, + 0x1307, + 0x1307, + 0x3107, + 0x3107, + 0x3007, + 0x3007, + 0x2207, + 0x2207, + 0x1608, + 0x1608, + 0x6108, + 0x6108, + 0x6008, + 0x6008, + 0x0509, + 0x5009, + 0x2409, + 0x4209, + 0x3309, + 0x0409, + 0x2709, + 0x2709, + 0x7209, + 0x7209, + 0x640a, + 0x070a, + 0x7009, + 0x7009, + 0x6209, + 0x6209, + 0x450a, + 0x350a, + 0x0609, + 0x0609, + 0x530a, + 0x440a, + 0x1708, + 0x1708, + 0x1708, + 0x1708, + 0x7108, + 0x7108, + 0x7108, + 0x7108, + 0x3609, + 0x3609, + 0x2609, + 0x2609, + 0x250a, + 0x520a, + 0x1509, + 0x1509, + 0x5109, + 0x5109, + 0x340a, + 0x430a, + 0x770b, + 0x670b, + 0x760b, + 0x570b, + 0x750b, + 0x660b, + 0x470a, + 0x470a, + 0x740a, + 0x740a, + 0x560a, + 0x560a, + 0x650a, + 0x650a, + 0x370a, + 0x370a, + 0x730a, + 0x730a, + 0x460a, + 0x460a, + 0x550b, + 0x540b, + 0x630a, + 0x630a +}; + + +const uint16 huffTable_11[116] = +{ + 0x1103, + 0x0103, + 0x1003, + 0x0002, + 0x0002, + 0x2105, + 0x1204, /* 0100 */ + 0x1204, /* 010 */ + 0x0205, /* 01010 */ + 0x2005, /* 01011 */ + 0x1408, /* 10 */ + 0x4108, /* 00 */ + 0x0408, /* 0 0 */ + 0x4008, /* 0 1 */ + 0x2307, /* 0 */ + 0x2307, /* */ + 0x3207, /* 1 */ + 0x3207, /* */ + 0x1306, /* 010 */ + 0x1306, /* 01 */ + 0x1306, /* 01 */ + 0x1306, /* 01 */ + 0x3106, /* 011 */ + 0x3106, /* 01 */ + 0x3106, /* 01 */ + 0x3106, /* 01 */ + 0x0307, /* 1000 */ + 0x0307, /* 100 */ + 0x3007, /* 1 */ + 0x3007, /* 100 */ + 0x2206, /* 101 */ + 0x2206, /* 10 */ + 0x2206, /* 10 */ + 0x2206, /* 10 */ + 0x2708, + 0x2708, /* 000 0 */ + 0x7208, /* 000 10 */ + 0x7208, /* 000 1 */ + 0x6409, /* 000 110 */ + 0x0709, + 0x7107, + 0x7107, + 0x7107, /* 00 0 */ + 0x7107, /* 00 0 */ + 0x1708, + 0x1708, /* 00 01 */ + 0x7008, + 0x7008, + 0x3608, + 0x3608, /* 00 10 */ + 0x6308, /* 00 101 */ + 0x6308, /* 00 10 */ + 0x6008, + 0x6008, /* 00 11 */ + 0x4409, + 0x2509, + 0x5209, /* 0 */ + 0x0509, /* 0 00 */ + 0x1508, /* 0 0 */ + 0x1508, /* 0 000 */ + 0x6207, /* 0 */ + 0x6207, /* 0 00 */ + 0x6207, /* 0 00 */ + 0x6207, /* 0 00 */ + 0x2608, + 0x2608, /* 0 010 */ + 0x0608, + 0x0608, + 0x1607, + 0x1607, + 0x1607, + 0x1607, + 0x6107, + 0x6107, + 0x6107, + 0x6107, + 0x5108, + 0x5108, + 0x3408, + 0x3408, + 0x5008, + 0x5008, + 0x4309, + 0x3309, + 0x2408, + 0x2408, /* 0 111 */ + 0x4208, /* 0 1111 */ + 0x4208, /* 0 111 */ + 0x560a, + 0x650a, + 0x3709, + 0x3709, + 0x7309, + 0x7309, + 0x4609, + 0x4609, + 0x450a, + 0x540a, /* 000 0 */ + 0x350a, /* 000 0 */ + 0x530a, /* 000 1 */ + 0x770a, + 0x770a, + 0x670a, + 0x670a, + 0x760a, /* 0 */ + 0x760a, /* */ + 0x750a, /* 1 */ + 0x750a, /* */ + 0x660a, /* 00 */ + 0x660a, /* 0 */ + 0x470a, /* 01 */ + 0x470a, /* 0 */ + 0x740a, /* 10 */ + 0x740a, /* 1 */ + 0x570b, /* 110 */ + 0x550b /* 111 */ + +}; + +const uint16 huffTable_12[134] = +{ + + 0x1103, /* 101 */ + 0x0103, /* 110 */ + 0x1003, /* 111 */ + 0x1204, + 0x1204, /* 011 */ + 0x2104, /* 0111 */ + 0x2104, /* 011 */ + 0x0205, /* 10000 */ + 0x2005, /* 10 */ + 0x0004, /* 1 */ + 0x0004, /* 100 */ + 0x3006, + 0x1305, /* 01 */ + 0x1305, /* 0100 */ + 0x3105, + 0x3105, + 0x2205, + 0x2205, /* 0101 */ + 0x1507, + 0x1507, /* 000 */ + 0x5107, /* 0 */ + 0x5107, /* 000 */ + 0x3407, /* 0 */ + 0x3407, /* */ + 0x4307, /* 1 */ + 0x4307, /* */ + 0x5008, + 0x0408, + 0x2407, + 0x2407, /* 010 */ + 0x4207, + 0x4207, + 0x1407, /* 0111 */ + 0x1407, /* 011 */ + 0x3306, + 0x3306, + 0x3306, + 0x3306, + 0x4106, + 0x4106, + 0x4106, + 0x4106, + 0x2306, + 0x2306, + 0x2306, + 0x2306, + 0x3206, + 0x3206, + 0x3206, + 0x3206, + 0x4007, + 0x4007, + 0x0307, + 0x0307, /* 010000 */ + 0x7208, + 0x7208, /* 00 00 */ + 0x4608, /* 00 */ + 0x4608, /* 00 00 */ + 0x6408, + 0x6408, /* 00 01 */ + 0x1708, /* 00 011 */ + 0x1708, + 0x7108, /* 00 100 */ + 0x7108, + 0x0709, + 0x7009, + 0x3608, + 0x3608, /* 00 11 */ + 0x6308, + 0x6308, + 0x4508, + 0x4508, + 0x5408, /* 0 0 */ + 0x5408, /* 0 000 */ + 0x4408, /* 0 0 */ + 0x4408, /* 0 */ + 0x0609, /* 0 10 */ + 0x0509, /* 0 11 */ + 0x2607, + 0x2607, + 0x2607, + 0x2607, + 0x6207, + 0x6207, + 0x6207, + 0x6207, + 0x6107, + 0x6107, + 0x6107, + 0x6107, + 0x1608, /* 0 1010 */ + 0x1608, /* 0 101 */ + 0x6008, /* 0 1011 */ + 0x6008, /* 0 101 */ + 0x3508, + 0x3508, /* 0 110 */ + 0x5308, /* 0 1101 */ + 0x5308, /* 0 110 */ + 0x2508, + 0x2508, /* 0 111 */ + 0x5208, /* 0 1111 */ + 0x5208, /* 0 111 */ + 0x770a, + 0x670a, + 0x7609, /* */ + 0x7609, + 0x5709, /* 0 */ + 0x5709, /* */ + 0x7509, /* 1 */ + 0x7509, /* */ + 0x6609, + 0x6609, + 0x4709, /* 0000 01 */ + 0x4709, /* 0000 0 */ + 0x7409, + 0x7409, /* 0000 1 */ + 0x6509, + 0x6509, /* 0000 1 */ + 0x5608, + 0x5608, + 0x5608, + 0x5608, + 0x3708, + 0x3708, + 0x3708, + 0x3708, + 0x7309, /* 000 100 */ + 0x7309, /* 000 10 */ + 0x5509, + 0x5509, /* 000 10 */ + 0x2708, + 0x2708, + 0x2708, + 0x2708, +}; + + + +const uint16 huffTable_13[491] = +{ + 0x0001, + 0x1104, + 0x0104, + 0x1003, + 0x1003, + 0x4107, + 0x4107, + 0x0408, + 0x4008, + 0x2308, + 0x3208, + 0x1307, + 0x1307, + 0x3107, + 0x3107, + 0x0307, + 0x0307, + 0x3007, + 0x3007, + 0x2207, + 0x2207, + 0x1206, + 0x1206, + 0x1206, + 0x1206, + 0x2106, + 0x2106, + 0x2106, + 0x2106, + 0x0206, + 0x0206, + 0x0206, + 0x0206, + 0x2006, + 0x2006, + 0x2006, + 0x2006, + 0x370a, + 0x270a, /* 0 000 */ + 0x1709, /* 0 00 */ + 0x1709, + 0x7109, + 0x7109, /* 0 0 */ + 0x550a, + 0x070a, /* 0 0 11 */ + 0x700a, + 0x360a, /* 0 */ + 0x630a, + 0x450a, /* 0 011 */ + 0x540a, + 0x260a, /* 0 101 */ + 0x620a, + 0x350a, /* 0 111 */ + 0x8108, + 0x8108, /* 0 010 */ + 0x8108, + 0x8108, /* 0 010 */ + 0x0809, + 0x0809, /* 0 0101 */ + 0x8009, + 0x8009, /* 0 0101 */ + 0x1609, + 0x1609, /* 0 0110 */ + 0x6109, + 0x6109, /* 0 0110 */ + 0x0609, + 0x0609, /* 0 0111 */ + 0x6009, + 0x6009, /* 0 0111 */ + 0x530a, + 0x440a, /* 0 100 */ + 0x2509, + 0x2509, /* 0 1000 */ + 0x5209, + 0x5209, /* 0 1 */ + 0x0509, + 0x0509, /* 0 1 */ + 0x1508, + 0x1508, /* 0 101 */ + 0x1508, + 0x1508, /* 0 101 */ + 0x5108, + 0x5108, /* 0 101 */ + 0x5108, + 0x5108, /* 0 101 */ + 0x3409, + 0x3409, /* 0 1100 */ + 0x4309, + 0x4309, /* 0 1100 */ + 0x5009, + 0x5009, /* 0 1101 */ + 0x2409, + 0x2409, /* 0 1101 */ + 0x4209, + 0x4209, /* 0 1110 */ + 0x3309, + 0x3309, /* 0 1110 */ + 0x1408, + 0x1408, /* 0 111 */ + 0x1408, + 0x1408, /* 0 111 */ + 0x1a0a, + 0x1a0a, + 0xa10a, /* 00 00 */ + 0xa10a, + 0x0a0b, + 0x680b, + 0xa00a, + 0xa00a, + 0x860b, + 0x490b, + 0x930a, + 0x930a, + 0x390b, + 0x580b, + 0x850b, + 0x670b, + 0x290a, + 0x290a, + 0x920a, + 0x920a, + 0x570b, + 0x750b, + 0x380a, + 0x380a, + 0x830a, + 0x830a, + 0x660b, + 0x470b, + 0x740b, + 0x560b, + 0x650b, + 0x730b, + 0x1909, + 0x1909, + 0x1909, + 0x1909, + 0x9109, + 0x9109, + 0x9109, + 0x9109, + 0x090a, /* 00 10100 */ + 0x090a, + 0x900a, /* 00 10101 */ + 0x900a, + 0x480a, /* 00 10110 */ + 0x480a, + 0x840a, /* 00 10111 */ + 0x840a, + 0x720a, /* 00 11000 */ + 0x720a, + 0x460b, /* 00 11 0 */ + 0x640b, + 0x2809, + 0x2809, + 0x2809, + 0x2809, + 0x8209, + 0x8209, + 0x8209, + 0x8209, + 0x1809, + 0x1809, + 0x1809, + 0x1809, + 0xc10b, + 0xc10b, /* 000 0000 */ + 0x980c, + 0x0c0c, /* 000 00 1 */ + 0xc00b, + 0xc00b, /* 000 0 */ + 0xb40c, + 0x6a0c, /* 000 0 11 */ + 0xa60c, + 0x790c, /* 000 */ + 0x3b0b, + 0x3b0b, /* 000 0 */ + 0xb30b, + 0xb30b, /* 000 1 */ + 0x880c, + 0x5a0c, /* 000 111 */ + 0x2b0b, + 0x2b0b, /* 000 0100 */ + 0xa50c, + 0x690c, /* 000 01 1 */ + 0xa40b, + 0xa40b, /* 000 0101 */ + 0x780c, + 0x870c, + 0x940b, + 0x940b, /* 000 0110 */ + 0x770c, + 0x760c, /* 000 011011 */ + 0xb20a, + 0xb20a, /* 000 011 */ + 0xb20a, + 0xb20a, /* 000 011 */ + 0x1b0a, + 0x1b0a, /* 000 100 */ + 0x1b0a, + 0x1b0a, /* 000 100 */ + 0xb10a, + 0xb10a, + 0xb10a, /* 000 100 */ + 0xb10a, /* 000 100 */ + 0x0b0b, /* 000 10100 */ + 0x0b0b, /* 000 1010 */ + 0xb00b, + 0xb00b, /* 000 1010 */ + 0x960b, /* 000 10110 */ + 0x960b, /* 000 1011 */ + 0x4a0b, + 0x4a0b, /* 000 1011 */ + 0x3a0b, /* 000 11000 */ + 0x3a0b, /* 000 1100 */ + 0xa30b, /* 000 11 */ + 0xa30b, /* 000 1100 */ + 0x590b, + 0x590b, /* 000 1101 */ + 0x950b, /* 000 11011 */ + 0x950b, /* 000 1101 */ + 0x2a0a, + 0x2a0a, + 0x2a0a, + 0x2a0a, + 0xa20a, + 0xa20a, + 0xa20a, + 0xa20a, + 0xf00c, + 0xf00c, /* 000 */ + 0xba0d, + 0xe50d, /* 0 1 */ + 0xe40d, + 0x8c0d, /* 01 */ + 0x6d0d, + 0xe30d, /* 11 */ + 0xe20c, /* 0100 */ + 0xe20c, + 0x2e0d, /* 01010 */ + 0x0e0d, + 0x1e0c, /* 0110 */ + 0x1e0c, + 0xe10c, /* 0111 */ + 0xe10c, + 0xe00d, /* 10000 */ + 0x5d0d, + 0xd50d, /* 1 0 */ + 0x7c0d, + 0xc70d, + 0x4d0d, + 0x8b0d, + 0xb80d, + 0xd40d, + 0x9a0d, + 0xa90d, + 0x6c0d, + 0xc60c, + 0xc60c, + 0x3d0c, + 0x3d0c, /* 111 */ + 0xd30d, /* 0000 */ + 0x7b0d, + 0x2d0c, + 0x2d0c, + 0xd20c, + 0xd20c, + 0x1d0c, + 0x1d0c, + 0xb70c, + 0xb70c, /* 0000 0 */ + 0x5c0d, + 0xc50d, /* 0000 011 */ + 0x990d, + 0x7a0d, + 0xc30c, + 0xc30c, /* 0000 1 */ + 0xa70d, + 0x970d, + 0x4b0c, + 0x4b0c, + 0xd10b, + 0xd10b, + 0xd10b, /* 0000 010 */ + 0xd10b, + 0x0d0c, + 0x0d0c, + 0xd00c, + 0xd00c, + 0x8a0c, + 0x8a0c, + 0xa80c, + 0xa80c, + 0x4c0c, + 0x4c0c, + 0xc40c, + 0xc40c, + 0x6b0c, + 0x6b0c, /* 0000 1 */ + 0xb60c, /* 0000 1 1 */ + 0xb60c, /* 0000 1 */ + 0x3c0b, + 0x3c0b, + 0x3c0b, + 0x3c0b, + 0x2c0b, /* 0000 1011 */ + 0x2c0b, /* 0000 101 */ + 0x2c0b, /* 0000 101 */ + 0x2c0b, /* 0000 101 */ + 0xc20b, + 0xc20b, + 0xc20b, + 0xc20b, + 0x5b0b, /* 0000 1101 */ + 0x5b0b, + 0x5b0b, /* 0000 110 */ + 0x5b0b, /* 0000 110 */ + 0xb50c, + 0xb50c, + 0x890c, + 0x890c, /* 0000 1110 */ + 0x1c0b, + 0x1c0b, + 0x1c0b, + 0x1c0b, + 0x2f0d, + 0x2f0d, /* 000 */ + 0xf20d, /* 0 */ + 0xf20d, /* 000 */ + 0x6e0e, /* 00 */ + 0x9c0e, /* 01 */ + 0x0f0d, /* 1 */ + 0x0f0d, /* */ + 0xc90e, + 0x5e0e, /* 01 */ + 0xab0d, /* 0101 */ + 0xab0d, + 0x7d0e, /* 01100 */ + 0xd70e, + 0x4e0d, /* 0111 */ + 0x4e0d, + 0xc80e, + 0xd60e, /* 10 */ + 0x3e0d, + 0x3e0d, /* 100 */ + 0xb90d, + 0xb90d, /* 101 */ + 0x9b0e, + 0xaa0e, /* 10111 */ + 0x1f0c, + 0x1f0c, /* 11 */ + 0x1f0c, /* 11 */ + 0x1f0c, + 0xf10c, /* 111 */ + 0xf10c, /* 11 */ + 0xf10c, /* 11 */ + 0xf10c, /* 11 */ + 0xe80e, + 0xe80e, + 0x5f0e, + 0x5f0e, + 0x9d0e, + 0x9d0e, + 0xd90e, + 0xd90e, /* 0000000 */ + 0xf50e, + 0xf50e, + 0xe70e, + 0xe70e, + 0xac0e, + 0xac0e, + 0xbb0e, + 0xbb0e, + 0x4f0e, + 0x4f0e, + 0xf40e, /* 0000000 1 */ + 0xf40e, + 0xca0f, + 0xe60f, + 0xf30e, + 0xf30e, /* 0000000 101 */ + 0x3f0d, + 0x3f0d, /* 0000000 11 */ + 0x3f0d, + 0x3f0d, /* 0000000 11 */ + 0x8d0e, + 0x8d0e, + 0xd80e, /* 0000000 1111 */ + 0xd80e, + 0x8f0f, + 0x8f0f, /* 00000000 000 */ + 0xf80f, /* 00000000 0 */ + 0xf80f, + 0xcc0f, /* 00000000 0 */ + 0xcc0f, + 0xae10, + 0x9e10, /* 00000000 11 */ + 0x8e0f, + 0x8e0f, + 0x7f10, + 0x7e10, + 0xf70e, /* 00000000 011 */ + 0xf70e, + 0xf70e, + 0xf70e, /* 00000000 01 */ + 0xda0e, + 0xda0e, /* 00000000 10 */ + 0xda0e, + 0xda0e, /* 00000000 10 */ + 0xad0f, + 0xad0f, /* 00000000 101 */ + 0xbc0f, + 0xbc0f, /* 00000000 101 */ + 0xcb0f, + 0xcb0f, /* 00000000 110 */ + 0xf60f, + 0xf60f, /* 00000000 110 */ + 0x6f0e, + 0x6f0e, /* 00000000 11 */ + 0x6f0e, /* 00000000 11 */ + 0x6f0e, /* 00000000 11 */ + 0xff10, + 0xff10, + 0xef10, + 0xef10, /* 000000000000 */ + 0xdf10, /* 000000000000 1 */ + 0xdf10, /* 000000000000 */ + 0xee10, /* 00000000000 00 */ + 0xee10, /* 00000000000 0 */ + 0xcf10, /* 00000000000 01 */ + 0xcf10, + 0xde10, /* 00000000000 10 */ + 0xde10, + 0xbf10, /* 00000000000 11 */ + 0xbf10, /* 00000000000 1 */ + 0xfb10, + 0xfb10, + 0xce10, + 0xce10, /* 0000000000 00 */ + 0xdc10, /* 0000000000 010 */ + 0xdc10, + 0xaf11, + 0xe911, + 0xec0f, /* 0000000000 10 */ + 0xec0f, /* 0000000000 1 */ + 0xec0f, /* 0000000000 1 */ + 0xec0f, /* 0000000000 1 */ + 0xdd0f, /* 0000000000 11 */ + 0xdd0f, /* 0000000000 1 */ + 0xdd0f, /* 0000000000 1 */ + 0xdd0f, /* 0000000000 1 */ + 0xfa10, /* 000000000 0000 */ + 0xfa10, /* 000000000 000 */ + 0xcd10, /* 000000000 0 */ + 0xcd10, /* 000000000 000 */ + 0xbe0f, /* 000000000 */ + 0xbe0f, + 0xbe0f, + 0xbe0f, + 0xeb0f, + 0xeb0f, + 0xeb0f, + 0xeb0f, /* 000000000 01 */ + 0x9f0f, /* 000000000 011 */ + 0x9f0f, /* 000000000 01 */ + 0x9f0f, + 0x9f0f, + 0xf90f, /* 000000000 100 */ + 0xf90f, /* 000000000 10 */ + 0xf90f, /* 000000000 10 */ + 0xf90f, /* 000000000 10 */ + 0xea0f, /* 000000000 101 */ + 0xea0f, /* 000000000 10 */ + 0xea0f, /* 000000000 10 */ + 0xea0f, /* 000000000 10 */ + 0xbd0f, /* 000000000 110 */ + 0xbd0f, /* 000000000 11 */ + 0xbd0f, /* 000000000 11 */ + 0xbd0f, /* 000000000 11 */ + 0xdb0f, /* 000000000 111 */ + 0xdb0f, /* 000000000 11 */ + 0xdb0f, /* 000000000 11 */ + 0xdb0f, /* 000000000 11 */ + 0xfe13, + 0xfc13, + 0xfd12, + 0xfd12, + 0xed11, + 0xed11, + 0xed11, + 0xed11 + +}; + + + +const uint16 huffTable_15[421] = +{ + 0x1103, + 0x1103, + 0x0104, + 0x1004, + 0x0003, /* 111 */ + 0x0003, /* 11 */ + 0x3407, + 0x4307, + 0x2407, /* 0101 */ + 0x4207, /* 0101010 */ + 0x3307, + 0x4106, /* 010110 */ + 0x4106, + 0x1407, /* 0101110 */ + 0x0407, + 0x2306, /* 011000 */ + 0x2306, + 0x3206, /* 011 */ + 0x3206, + 0x4007, + 0x0307, + 0x1306, /* 011011 */ + 0x1306, /* 01101 */ + 0x3106, /* 011100 */ + 0x3106, /* 01110 */ + 0x3006, /* 011101 */ + 0x3006, /* 01110 */ + 0x2205, /* 01111 */ + 0x2205, /* 0111 */ + 0x2205, /* 0111 */ + 0x2205, /* 0111 */ + 0x1205, /* 10000 */ + 0x1205, /* 1000 */ + 0x1205, /* 1000 */ + 0x1205, /* 1000 */ + 0x2105, /* 10 */ + 0x2105, /* 1000 */ + 0x2105, /* 1000 */ + 0x2105, /* 1000 */ + 0x0205, + 0x0205, /* 1 */ + 0x0205, /* 1 */ + 0x0205, /* 1 */ + 0x2005, /* 1 1 */ + 0x2005, /* 1 */ + 0x2005, /* 1 */ + 0x2005, /* 1 */ + 0x5809, + 0x8509, + 0x2909, /* */ + 0x6709, /* 000 */ + 0x7609, /* 00 0 */ + 0x9209, /* 00 1 */ + 0x9108, /* 0 0 */ + 0x9108, /* 0 */ + 0x1909, /* 0 10 */ + 0x9009, /* 0 11 */ + 0x4809, /* 000 */ + 0x8409, /* */ + 0x5709, /* 010 */ + 0x7509, /* 011 */ + 0x3809, /* 100 */ + 0x8309, /* 101 */ + 0x6609, /* 110 */ + 0x4709, /* 111 */ + 0x2808, + 0x2808, /* 0100 */ + 0x8208, /* 01 */ + 0x8208, /* 0100 */ + 0x1808, /* 01010 */ + 0x1808, /* 0101 */ + 0x8108, /* 01011 */ + 0x8108, /* 0101 */ + 0x7409, + 0x0809, /* 011 */ + 0x8009, /* 011010 */ + 0x5609, + 0x6509, /* 011100 */ + 0x3709, + 0x7309, /* 011110 */ + 0x4609, + 0x2708, /* 10000 */ + 0x2708, /* 1000 */ + 0x7208, /* 10 */ + 0x7208, /* 1000 */ + 0x6408, /* 1 0 */ + 0x6408, /* 1 */ + 0x1708, /* 1 1 */ + 0x1708, /* 1 */ + 0x5508, /* 10100 */ + 0x5508, + 0x7108, /* 10101 */ + 0x7108, + 0x0709, /* 101100 */ + 0x7009, /* 101101 */ + 0x3608, /* 10111 */ + 0x3608, /* 1011 */ + 0x6308, /* 11000 */ + 0x6308, /* 1100 */ + 0x4508, /* 11 */ + 0x4508, /* 1100 */ + 0x5408, /* 11010 */ + 0x5408, /* 1101 */ + 0x2608, /* 11011 */ + 0x2608, /* 1101 */ + 0x6208, /* 11100 */ + 0x6208, /* 1110 */ + 0x1608, /* 11101 */ + 0x1608, /* 1110 */ + 0x0609, /* 111100 */ + 0x6009, /* 111101 */ + 0x3508, /* 11111 */ + 0x3508, /* 1111 */ + 0x6107, + 0x6107, + 0x6107, + 0x6107, + 0x5308, /* 0100 0 */ + 0x5308, /* 0100 */ + 0x4408, /* 0100 1 */ + 0x4408, /* 0100 */ + 0x2507, /* 010 0 */ + 0x2507, /* 010 */ + 0x2507, /* 010 */ + 0x2507, /* 010 */ + 0x5207, /* 010 1 */ + 0x5207, /* 010 */ + 0x5207, /* 010 */ + 0x5207, /* 010 */ + 0x1507, /* 01 00 */ + 0x1507, /* 01 0 */ + 0x1507, /* 01 0 */ + 0x1507, /* 01 0 */ + 0x5107, /* 01 01 */ + 0x5107, /* 01 0 */ + 0x5107, /* 01 0 */ + 0x5107, /* 01 0 */ + 0x0508, /* 01 100 */ + 0x0508, /* 01 10 */ + 0x5008, /* 01 101 */ + 0x5008, /* 01 10 */ + 0xc209, + 0xc209, + 0x2c0a, /* 00 11110 */ + 0x5b0a, + 0xb50a, /* 0 */ + 0x1c0a, /* 0 000 */ + 0x890a, /* 0 00 0 */ + 0x980a, + 0xc10a, /* 0 0 00 */ + 0x4b0a, /* 0 0 01 */ + 0xb40a, /* 0 0 10 */ + 0x6a0a, /* 0 0 11 */ + 0x3b0a, /* 0 000 */ + 0x790a, /* 0 */ + 0xb309, /* 0 01 */ + 0xb309, /* 0 0 */ + 0x970a, /* 0 100 */ + 0x880a, /* 0 101 */ + 0x2b0a, /* 0 110 */ + 0x5a0a, /* 0 111 */ + 0xb209, /* 0 01000 */ + 0xb209, /* 0 0100 */ + 0xa50a, /* 0 01 0 */ + 0x1b0a, /* 0 01 1 */ + 0xb109, /* 0 01010 */ + 0xb109, /* 0 0101 */ + 0xb00a, /* 0 010110 */ + 0x690a, /* 0 010111 */ + 0x960a, /* 0 011000 */ + 0x4a0a, /* 0 011 */ + 0xa40a, /* 0 011010 */ + 0x780a, /* 0 011011 */ + 0x870a, /* 0 011100 */ + 0x3a0a, /* 0 011101 */ + 0xa309, /* 0 01111 */ + 0xa309, /* 0 0111 */ + 0x5909, /* 0 10000 */ + 0x5909, /* 0 1000 */ + 0x9509, /* 0 10 */ + 0x9509, /* 0 1000 */ + 0x2a09, /* 0 1 0 */ + 0x2a09, /* 0 1 */ + 0xa209, /* 0 1 1 */ + 0xa209, /* 0 1 */ + 0x1a09, /* 0 10100 */ + 0x1a09, /* 0 1010 */ + 0xa109, /* 0 10101 */ + 0xa109, /* 0 1010 */ + 0x0a0a, /* 0 101100 */ + 0xa00a, /* 0 101101 */ + 0x6809, /* 0 10111 */ + 0x6809, /* 0 1011 */ + 0x8609, /* 0 11000 */ + 0x8609, /* 0 1100 */ + 0x4909, /* 0 11 */ + 0x4909, /* 0 1100 */ + 0x9409, /* 0 11010 */ + 0x9409, /* 0 1101 */ + 0x3909, /* 0 11011 */ + 0x3909, /* 0 1101 */ + 0x9309, /* 0 11100 */ + 0x9309, /* 0 1110 */ + 0x770a, /* 0 111010 */ + 0x090a, /* 0 111011 */ + 0x7c0b, + 0xc70b, /* 00 000 */ + 0x4d0b, /* 00 00 0 */ + 0x8b0b, /* 00 00 1 */ + 0xd40a, /* 00 0 0 */ + 0xd40a, /* 00 0 */ + 0xb80b, /* 00 0 10 */ + 0x9a0b, /* 00 0 11 */ + 0xa90b, /* 00 000 */ + 0x6c0b, /* 00 */ + 0xc60b, /* 00 010 */ + 0x3d0b, /* 00 011 */ + 0xd30a, /* 00 10 */ + 0xd30a, /* 00 1 */ + 0xd20a, /* 00 11 */ + 0xd20a, /* 00 1 */ + 0x2d0b, /* 00 010000 */ + 0x0d0b, /* 00 010 */ + 0x1d0a, /* 00 01 */ + 0x1d0a, /* 00 0100 */ + 0x7b0a, /* 00 01010 */ + 0x7b0a, /* 00 0101 */ + 0xb70a, /* 00 01011 */ + 0xb70a, /* 00 0101 */ + 0xd10a, /* 00 01100 */ + 0xd10a, /* 00 0110 */ + 0x5c0b, /* 00 011010 */ + 0xd00b, /* 00 011011 */ + 0xc50a, /* 00 01110 */ + 0xc50a, /* 00 0111 */ + 0x8a0a, /* 00 01111 */ + 0x8a0a, /* 00 0111 */ + 0xa80a, /* 00 10000 */ + 0xa80a, /* 00 1000 */ + 0x4c0a, /* 00 10 */ + 0x4c0a, /* 00 1000 */ + 0xc40a, /* 00 1 0 */ + 0xc40a, /* 00 1 */ + 0x6b0a, /* 00 1 1 */ + 0x6b0a, /* 00 1 */ + 0xb60a, /* 00 10100 */ + 0xb60a, /* 00 1010 */ + 0x990b, /* 00 101010 */ + 0x0c0b, /* 00 101011 */ + 0x3c0a, /* 00 10110 */ + 0x3c0a, /* 00 1011 */ + 0xc30a, /* 00 10111 */ + 0xc30a, /* 00 1011 */ + 0x7a0a, /* 00 11000 */ + 0x7a0a, /* 00 1100 */ + 0xa70a, /* 00 11 */ + 0xa70a, /* 00 1100 */ + 0xa60a, /* 00 11010 */ + 0xa60a, /* 00 1101 */ + 0xc00b, /* 00 110110 */ + 0x0b0b, /* 00 110111 */ + 0xcb0b, + 0xcb0b, /* 0000 000 */ + 0xf60b, /* 0000 0 */ + 0xf60b, /* 0000 000 */ + 0x8e0c, /* 0000 00 */ + 0xe80c, /* 0000 01 */ + 0x5f0c, /* 0000 10 */ + 0x9d0c, /* 0000 11 */ + 0xf50b, /* 0000 0100 */ + 0xf50b, /* 0000 010 */ + 0x7e0b, /* 0000 0101 */ + 0x7e0b, /* 0000 010 */ + 0xe70b, /* 0000 0110 */ + 0xe70b, /* 0000 011 */ + 0xac0b, /* 0000 0111 */ + 0xac0b, /* 0000 011 */ + 0xca0b, /* 0000 1000 */ + 0xca0b, /* 0000 100 */ + 0xbb0b, /* 0000 1 */ + 0xbb0b, /* 0000 100 */ + 0xd90c, /* 0000 10100 */ + 0x8d0c, /* 0000 10101 */ + 0x4f0b, /* 0000 1011 */ + 0x4f0b, /* 0000 101 */ + 0xf40b, /* 0000 1100 */ + 0xf40b, /* 0000 110 */ + 0x3f0b, /* 0000 1101 */ + 0x3f0b, /* 0000 110 */ + 0xf30b, /* 0000 1110 */ + 0xf30b, /* 0000 111 */ + 0xd80b, /* 0000 1111 */ + 0xd80b, /* 0000 111 */ + 0xe60b, /* 000 */ + 0xe60b, /* 000 0000 */ + 0x2f0b, /* 000 00 */ + 0x2f0b, /* 000 0000 */ + 0xf20b, /* 000 0 0 */ + 0xf20b, /* 000 0 */ + 0x6e0c, /* 000 0 10 */ + 0xf00c, /* 000 0 11 */ + 0x1f0b, /* 000 00 */ + 0x1f0b, /* 000 0 */ + 0xf10b, /* 000 01 */ + 0xf10b, /* 000 0 */ + 0x9c0b, /* 000 10 */ + 0x9c0b, /* 000 1 */ + 0xc90b, /* 000 11 */ + 0xc90b, /* 000 1 */ + 0x5e0b, /* 000 01000 */ + 0x5e0b, /* 000 0100 */ + 0xab0b, /* 000 01 */ + 0xab0b, /* 000 0100 */ + 0xba0b, /* 000 01010 */ + 0xba0b, /* 000 0101 */ + 0xe50b, /* 000 01011 */ + 0xe50b, /* 000 0101 */ + 0x7d0b, /* 000 01100 */ + 0x7d0b, /* 000 0110 */ + 0xd70b, /* 000 01101 */ + 0xd70b, + 0x4e0b, /* 000 01110 */ + 0x4e0b, + 0xe40b, /* 000 01111 */ + 0xe40b, /* 000 0111 */ + 0x8c0b, + 0x8c0b, /* 000 1000 */ + 0xc80b, /* 000 10 */ + 0xc80b, + 0x3e0b, /* 000 1 0 */ + 0x3e0b, /* 000 1 */ + 0x6d0b, + 0x6d0b, /* 000 1 */ + 0xd60b, /* 000 10100 */ + 0xd60b, /* 000 1010 */ + 0xe30b, + 0xe30b, /* 000 1010 */ + 0x9b0b, /* 000 10110 */ + 0x9b0b, /* 000 1011 */ + 0xb90b, + 0xb90b, /* 000 1011 */ + 0x2e0b, /* 000 11000 */ + 0x2e0b, /* 000 1100 */ + 0xaa0b, + 0xaa0b, /* 000 1100 */ + 0xe20b, + 0xe20b, /* 000 1101 */ + 0x1e0b, + 0x1e0b, /* 000 1101 */ + 0xe10b, + 0xe10b, /* 000 1110 */ + 0x0e0c, + 0xe00c, /* 000 111011 */ + 0x5d0b, + 0x5d0b, /* 000 1111 */ + 0xd50b, + 0xd50b, /* 000 1111 */ + 0xff0d, + 0xef0d, + 0xfe0d, + 0xdf0d, + 0xee0c, + 0xee0c, + 0xfd0d, + 0xcf0d, + 0xfc0d, + 0xde0d, + 0xed0d, + 0xbf0d, + 0xfb0c, + 0xfb0c, + 0xce0d, + 0xec0d, + 0xdd0c, /* 000 */ + 0xdd0c, /* 00 */ + 0xaf0c, /* */ + 0xaf0c, /* 00 */ + 0xfa0c, /* 010 */ + 0xfa0c, /* 01 */ + 0xbe0c, /* 011 */ + 0xbe0c, /* 01 */ + 0xeb0c, /* 100 */ + 0xeb0c, /* 10 */ + 0xcd0c, /* 101 */ + 0xcd0c, /* 10 */ + 0xdc0c, /* 110 */ + 0xdc0c, /* 11 */ + 0x9f0c, /* 111 */ + 0x9f0c, /* 11 */ + 0xf90c, /* 0000 */ + 0xf90c, /* 000 */ + 0xea0c, /* 0 */ + 0xea0c, /* 000 */ + 0xbd0c, /* 0 */ + 0xbd0c, /* */ + 0xdb0c, /* 1 */ + 0xdb0c, /* */ + 0x8f0c, /* 0100 */ + 0x8f0c, /* 010 */ + 0xf80c, /* 0101 */ + 0xf80c, /* 010 */ + 0xcc0c, + 0xcc0c, /* 011 */ + 0x9e0c, /* 0111 */ + 0x9e0c, /* 011 */ + 0xe90c, /* 1000 */ + 0xe90c, /* 100 */ + 0x7f0c, /* 1 */ + 0x7f0c, + 0xf70c, /* 1010 */ + 0xf70c, /* 101 */ + 0xad0c, /* 1011 */ + 0xad0c, /* 101 */ + 0xda0c, /* 1100 */ + 0xda0c, /* 110 */ + 0xbc0c, + 0xbc0c, /* 110 */ + 0x6f0c, /* 1110 */ + 0x6f0c, /* 111 */ + 0xae0d, /* 11110 */ + 0x0f0d +}; + +const uint16 huffTable_16[465] = +{ + 0x0001, + 0x1104, + 0x0104, + 0x1003, + 0x1003, + 0x2308, + 0x3208, /* 11 */ + 0x1307, /* 0100 */ + 0x1307, /* 010 */ + 0x3107, + 0x3107, + 0x0308, + 0x3008, + 0x2207, /* 0111 */ + 0x2207, /* 011 */ + 0x1206, /* 100 */ + 0x1206, /* 10 */ + 0x1206, /* 10 */ + 0x1206, /* 10 */ + 0x2106, /* 101 */ + 0x2106, /* 10 */ + 0x2106, /* 10 */ + 0x2106, /* 10 */ + 0x0206, + 0x0206, + 0x0206, + 0x0206, + 0x2006, + 0x2006, + 0x2006, + 0x2006, + 0x1709, + 0x1709, /* 0 0111 */ + 0x7109, /* 0 10000 */ + 0x7109, /* 0 1000 */ + 0x700a, /* 0 10 0 */ + 0x360a, /* 0 10 1 */ + 0x630a, /* 0 1 00 */ + 0x450a, /* 0 1 01 */ + 0x540a, /* 0 1 10 */ + 0x260a, /* 0 1 11 */ + 0x6209, /* 0 10100 */ + 0x6209, /* 0 1010 */ + 0x1609, + 0x1609, + 0x6109, /* 0 10110 */ + 0x6109, /* 0 1011 */ + 0x060a, /* 0 101110 */ + 0x600a, + 0x5309, + 0x5309, /* 0 1100 */ + 0x350a, /* 0 11 0 */ + 0x440a, /* 0 11 1 */ + 0x2509, /* 0 11010 */ + 0x2509, /* 0 1101 */ + 0x5209, /* 0 11011 */ + 0x5209, /* 0 1101 */ + 0x5108, + 0x5108, + 0x5108, + 0x5108, + 0x1509, + 0x1509, /* 0 1111 */ + 0x0509, /* 0 11111 */ + 0x0509, /* 0 1111 */ + 0x3409, /* */ + 0x3409, /* */ + 0x4309, /* 000 */ + 0x4309, /* */ + 0x5009, /* 00 0 */ + 0x5009, /* 00 */ + 0x2409, /* 00 1 */ + 0x2409, /* 00 */ + 0x4209, /* 0 00 */ + 0x4209, /* 0 0 */ + 0x3309, /* 0 01 */ + 0x3309, /* 0 0 */ + 0x1408, /* 0 1 */ + 0x1408, /* 0 */ + 0x1408, /* 0 */ + 0x1408, /* 0 */ + 0x4108, /* 00 */ + 0x4108, /* 0 */ + 0x4108, /* 0 */ + 0x4108, /* 0 */ + 0x0409, /* 010 */ + 0x0409, /* 01 */ + 0x4009, /* 011 */ + 0x4009, /* 01 */ + 0x1d0b, + 0x1d0b, /* 00 10101 */ + 0xc40c, /* 00 1011000 */ + 0x6b0c, /* 00 1011 */ + 0xc30c, /* 00 1011010 */ + 0xa70c, /* 00 1011011 */ + 0x2c0b, /* 00 101110 */ + 0x2c0b, /* 00 10111 */ + 0xc20c, /* 00 1011110 */ + 0xb50c, /* 00 1011111 */ + 0xc10c, /* 00 1100000 */ + 0x0c0c, /* 00 1100 */ + 0x4b0c, /* 00 110 0 */ + 0xb40c, /* 00 110 1 */ + 0x6a0c, /* 00 11 00 */ + 0xa60c, /* 00 11 01 */ + 0xb30b, /* 00 11 1 */ + 0xb30b, /* 00 11 */ + 0x5a0c, /* 00 1101000 */ + 0xa50c, /* 00 1101 */ + 0x2b0b, /* 00 110101 */ + 0x2b0b, /* 00 11010 */ + 0xb20b, /* 00 110110 */ + 0xb20b, /* 00 11011 */ + 0x1b0b, /* 00 110111 */ + 0x1b0b, /* 00 11011 */ + 0xb10b, /* 00 111000 */ + 0xb10b, /* 00 11100 */ + 0x0b0c, /* 00 111 0 */ + 0xb00c, /* 00 111 1 */ + 0x690c, /* 00 1110100 */ + 0x960c, /* 00 1110101 */ + 0x4a0c, /* 00 1110110 */ + 0xa40c, /* 00 1110111 */ + 0x780c, /* 00 1111000 */ + 0x870c, /* 00 1111 */ + 0xa30b, /* 00 111101 */ + 0xa30b, /* 00 11110 */ + 0x3a0c, /* 00 1111100 */ + 0x590c, /* 00 1111101 */ + 0x2a0b, /* 00 111111 */ + 0x2a0b, /* 00 11111 */ + 0x950c, /* 0 00000000 */ + 0x680c, /* 0 */ + 0xa10b, /* 0 0000 */ + 0xa10b, /* 0 */ + 0x860c, /* 0 000 00 */ + 0x770c, /* 0 000 01 */ + 0x940b, /* 0 000 1 */ + 0x940b, /* 0 000 */ + 0x490c, /* 0 00 000 */ + 0x570c, /* 0 00 */ + 0x670b, /* 0 00 01 */ + 0x670b, /* 0 00 0 */ + 0xa20a, /* 0 00 1 */ + 0xa20a, /* 0 00 */ + 0xa20a, /* 0 00 */ + 0xa20a, /* 0 00 */ + 0x1a0a, /* 0 0 00 */ + 0x1a0a, /* 0 0 0 */ + 0x1a0a, /* 0 0 0 */ + 0x1a0a, /* 0 0 0 */ + 0x0a0b, /* 0 0 010 */ + 0x0a0b, /* 0 0 01 */ + 0xa00b, /* 0 0 011 */ + 0xa00b, /* 0 0 01 */ + 0x390b, /* 0 0 100 */ + 0x390b, /* 0 0 10 */ + 0x930b, /* 0 0 101 */ + 0x930b, /* 0 0 10 */ + 0x580b, /* 0 0 110 */ + 0x580b, /* 0 0 11 */ + 0x850b, /* 0 0 111 */ + 0x850b, /* 0 0 11 */ + 0x290a, /* 0 000 */ + 0x290a, /* 0 00 */ + 0x290a, /* 0 00 */ + 0x290a, /* 0 00 */ + 0x920a, /* 0 */ + 0x920a, /* 0 00 */ + 0x920a, /* 0 00 */ + 0x920a, /* 0 00 */ + 0x760b, /* 0 0100 */ + 0x760b, /* 0 010 */ + 0x090b, /* 0 0101 */ + 0x090b, /* 0 010 */ + 0x190a, /* 0 011 */ + 0x190a, /* 0 01 */ + 0x190a, /* 0 01 */ + 0x190a, /* 0 01 */ + 0x910a, /* 0 100 */ + 0x910a, /* 0 10 */ + 0x910a, /* 0 10 */ + 0x910a, /* 0 10 */ + 0x900b, /* 0 1010 */ + 0x900b, /* 0 101 */ + 0x480b, /* 0 1011 */ + 0x480b, /* 0 101 */ + 0x840b, /* 0 1100 */ + 0x840b, /* 0 110 */ + 0x750b, /* 0 1101 */ + 0x750b, /* 0 110 */ + 0x380b, /* 0 1110 */ + 0x380b, /* 0 111 */ + 0x830b, /* 0 1111 */ + 0x830b, /* 0 111 */ + 0x660b, /* 0 0100000 */ + 0x660b, /* 0 010000 */ + 0x280b, /* 0 0100 */ + 0x280b, /* 0 010000 */ + 0x820a, /* 0 010 */ + 0x820a, /* 0 01000 */ + 0x820a, /* 0 01000 */ + 0x820a, /* 0 01000 */ + 0x470b, /* 0 01 00 */ + 0x470b, /* 0 01 0 */ + 0x740b, /* 0 01 01 */ + 0x740b, /* 0 01 0 */ + 0x180a, /* 0 01 1 */ + 0x180a, /* 0 01 */ + 0x180a, /* 0 01 */ + 0x180a, /* 0 01 */ + 0x810a, /* 0 010100 */ + 0x810a, /* 0 01010 */ + 0x810a, /* 0 01010 */ + 0x810a, /* 0 01010 */ + 0x800a, /* 0 010101 */ + 0x800a, /* 0 01010 */ + 0x800a, /* 0 01010 */ + 0x800a, /* 0 01010 */ + 0x080b, /* 0 0101100 */ + 0x080b, /* 0 010110 */ + 0x560b, /* 0 0101101 */ + 0x560b, /* 0 010110 */ + 0x370a, /* 0 010111 */ + 0x370a, /* 0 01011 */ + 0x370a, /* 0 01011 */ + 0x370a, /* 0 01011 */ + 0x730a, /* 0 011000 */ + 0x730a, /* 0 01100 */ + 0x730a, /* 0 01100 */ + 0x730a, /* 0 01100 */ + 0x650b, /* 0 011 0 */ + 0x650b, /* 0 011 */ + 0x460b, /* 0 011 1 */ + 0x460b, /* 0 011 */ + 0x270a, /* 0 011010 */ + 0x270a, /* 0 01101 */ + 0x270a, /* 0 01101 */ + 0x270a, /* 0 01101 */ + 0x720a, /* 0 011011 */ + 0x720a, /* 0 01101 */ + 0x720a, /* 0 01101 */ + 0x720a, /* 0 01101 */ + 0x640b, /* 0 0111000 */ + 0x640b, /* 0 011100 */ + 0x550b, /* 0 0111 */ + 0x550b, /* 0 011100 */ + 0x070a, /* 0 011101 */ + 0x070a, /* 0 01110 */ + 0x070a, /* 0 01110 */ + 0x070a, /* 0 01110 */ + 0x9e0d, + 0x9e0d, /* 00 0110000 */ + 0xbc0e, /* 00 01100 0 */ + 0xcb0e, /* 00 01100 1 */ + 0x8e0e, /* 00 0110 00 */ + 0xe80e, /* 00 0110 01 */ + 0x9d0e, /* 00 0110 10 */ + 0xe70e, /* 00 0110 11 */ + 0xbb0e, /* 00 011 000 */ + 0x8d0e, /* 00 011 */ + 0xd80e, /* 00 011 010 */ + 0x6e0e, /* 00 011 011 */ + 0xe60d, /* 00 011 10 */ + 0xe60d, /* 00 011 1 */ + 0x9c0d, /* 00 011 11 */ + 0x9c0d, /* 00 011 1 */ + 0xab0e, /* 00 011010000 */ + 0xba0e, /* 00 011010 */ + 0xe50e, /* 00 01101 0 */ + 0xd70e, /* 00 01101 1 */ + 0x4e0d, /* 00 01101010 */ + 0x4e0d, /* 00 0110101 */ + 0xe40e, /* 00 011010110 */ + 0x8c0e, /* 00 011010111 */ + 0xc80d, /* 00 01101100 */ + 0xc80d, /* 00 0110110 */ + 0x3e0d, /* 00 01101101 */ + 0x3e0d, /* 00 0110110 */ + 0x6d0d, /* 00 01101110 */ + 0x6d0d, /* 00 0110111 */ + 0xd60e, /* 00 011011110 */ + 0x9b0e, /* 00 011011111 */ + 0xb90e, /* 00 011100000 */ + 0xaa0e, /* 00 011100 */ + 0xe10d, /* 00 01110 */ + 0xe10d, /* 00 0111000 */ + 0xd40d, /* 00 0111 0 */ + 0xd40d, /* 00 0111 */ + 0xb80e, /* 00 0111 10 */ + 0xa90e, /* 00 0111 11 */ + 0x7b0d, /* 00 01110100 */ + 0x7b0d, /* 00 0111010 */ + 0xb70e, /* 00 011101010 */ + 0xd00e, /* 00 011101011 */ + 0xe30c, /* 00 0111011 */ + 0xe30c, /* 00 011101 */ + 0xe30c, /* 00 011101 */ + 0xe30c, /* 00 011101 */ + 0x0e0d, /* 00 01111000 */ + 0x0e0d, /* 00 0111100 */ + 0xe00d, /* 00 01111 */ + 0xe00d, /* 00 0111100 */ + 0x5d0d, /* 00 01111010 */ + 0x5d0d, /* 00 0111101 */ + 0xd50d, /* 00 01111011 */ + 0xd50d, /* 00 0111101 */ + 0x7c0d, /* 00 01111100 */ + 0x7c0d, /* 00 0111110 */ + 0xc70d, /* 00 01111101 */ + 0xc70d, /* 00 0111110 */ + 0x4d0d, /* 00 01111110 */ + 0x4d0d, /* 00 0111111 */ + 0x8b0d, /* 00 01111111 */ + 0x8b0d, /* 00 0111111 */ + 0x9a0d, + 0x6c0d, /* 00 10000 */ + 0xc60d, /* 00 1000 0 */ + 0x3d0d, /* 00 1000 1 */ + 0x5c0d, /* 00 100 00 */ + 0xc50d, /* 00 100 01 */ + 0x0d0c, /* 00 100 1 */ + 0x0d0c, /* 00 100 */ + 0x8a0d, /* 00 10 000 */ + 0xa80d, /* 00 10 */ + 0x990d, /* 00 10 010 */ + 0x4c0d, /* 00 10 011 */ + 0xb60d, /* 00 10 100 */ + 0x7a0d, /* 00 10 101 */ + 0x3c0c, /* 00 10 11 */ + 0x3c0c, /* 00 10 1 */ + 0x5b0d, /* 00 1 0000 */ + 0x890d, /* 00 1 0 */ + 0x1c0c, /* 00 1 */ + 0x1c0c, /* 00 1 00 */ + 0xc00c, /* 00 1 010 */ + 0xc00c, /* 00 1 01 */ + 0x980d, /* 00 1 0110 */ + 0x790d, /* 00 1 0111 */ + 0xe20b, /* 00 1 10 */ + 0xe20b, /* 00 1 1 */ + 0xe20b, /* 00 1 1 */ + 0xe20b, /* 00 1 1 */ + 0x2e0c, /* 00 1 110 */ + 0x2e0c, /* 00 1 11 */ + 0x1e0c, /* 00 1 111 */ + 0x1e0c, /* 00 1 11 */ + 0xd30c, /* 00 1010000 */ + 0xd30c, /* 00 101000 */ + 0x2d0c, /* 00 1010 */ + 0x2d0c, /* 00 101000 */ + 0xd20c, /* 00 101 0 */ + 0xd20c, /* 00 101 */ + 0xd10c, /* 00 101 1 */ + 0xd10c, /* 00 101 */ + 0x3b0c, /* 00 1010100 */ + 0x3b0c, /* 00 101010 */ + 0x970d, /* 00 10101010 */ + 0x880d, /* 00 10101011 */ + 0xf208, + 0xf208, /* 000 1 */ + 0x2f09, /* 00 0000 */ + 0x0f09, /* 00 0 */ + 0x1f08, /* 00 */ + 0x1f08, /* 00 00 */ + 0xf108, /* 00 010 */ + 0xf108, /* 00 01 */ + 0xce10, + 0xce10, /* 000 101100000 */ + 0xec11, /* 000 1011000 0 */ + 0xdd11, /* 000 1011000 1 */ + 0xde0f, /* 000 101100 */ + 0xde0f, /* 000 10110000 */ + 0xde0f, /* 000 10110000 */ + 0xde0f, /* 000 10110000 */ + 0xe90f, /* 000 10110 0 */ + 0xe90f, /* 000 10110 */ + 0xe90f, /* 000 10110 */ + 0xe90f, /* 000 10110 */ + 0xea10, /* 000 10110 10 */ + 0xea10, /* 000 10110 1 */ + 0xd910, /* 000 10110 11 */ + 0xd910, /* 000 10110 1 */ + 0xee0e, + 0xee0e, /* 000 1011 */ + 0xed0f, /* 000 1011 10 */ + 0xeb0f, /* 000 1011 11 */ + 0xbe0e, /* 000 10110100 */ + 0xbe0e, /* 000 1011010 */ + 0xcd0e, /* 000 10110101 */ + 0xcd0e, /* 000 1011010 */ + 0xdc0f, /* 000 101101100 */ + 0xdb0f, /* 000 101101101 */ + 0xae0e, /* 000 10110111 */ + 0xae0e, /* 000 1011011 */ + 0xcc0e, /* 000 10111000 */ + 0xcc0e, /* 000 1011100 */ + 0xad0f, /* 000 10111 0 */ + 0xda0f, /* 000 10111 1 */ + 0x7e0f, /* 000 101110100 */ + 0xac0f, /* 000 101110101 */ + 0xca0e, /* 000 10111011 */ + 0xca0e, /* 000 1011101 */ + 0xc90f, /* 000 101111000 */ + 0x7d0f, /* 000 101111 */ + 0x5e0e, /* 000 10111101 */ + 0x5e0e, /* 000 1011110 */ + 0xbd0d, /* 000 1011111 */ + 0xbd0d, /* 000 101111 */ + 0xbd0d, /* 000 101111 */ + 0xbd0d, /* 000 101111 */ + 0xef0b, + 0xfe0b, /* 00000000 */ + 0xdf0b, /* 0000000 0 */ + 0xfd0b, /* 0000000 1 */ + 0xcf0b, /* 00 */ + 0xfc0b, /* 01 */ + 0xbf0b, /* 10 */ + 0xfb0b, /* 11 */ + 0xaf0a, /* 00 */ + 0xaf0a, /* 0 */ + 0xfa0b, /* 010 */ + 0x9f0b, /* 011 */ + 0xf90b, /* 100 */ + 0xf80b, /* 101 */ + 0x8f0a, /* 11 */ + 0x8f0a, /* 1 */ + 0x7f0a, /* 0000 000 */ + 0x7f0a, /* 0000 00 */ + 0xf70a, /* 0000 */ + 0xf70a, /* 0000 00 */ + 0x6f0a, /* 0000 010 */ + 0x6f0a, /* 0000 01 */ + 0xf60a, /* 0000 011 */ + 0xf60a, /* 0000 01 */ + 0xff08, /* 0000 1 */ + 0xff08, /* 0000 */ + 0xff08, /* 0000 */ + 0xff08, /* 0000 */ + 0xff08, /* 0000 */ + 0xff08, /* 0000 */ + 0xff08, /* 0000 */ + 0xff08, /* 0000 */ + 0x5f0a, /* 000 0000 */ + 0x5f0a, /* 000 000 */ + 0xf50a, /* 000 0 */ + 0xf50a, /* 000 000 */ + 0x4f09, /* 000 */ + 0x4f09, /* 000 00 */ + 0x4f09, /* 000 00 */ + 0x4f09, /* 000 00 */ + 0xf409, /* 000 010 */ + 0xf409, /* 000 01 */ + 0xf409, /* 000 01 */ + 0xf409, /* 000 01 */ + 0xf309, /* 000 011 */ + 0xf309, /* 000 01 */ + 0xf309, /* 000 01 */ + 0xf309, /* 000 01 */ + 0xf009, /* 000 100 */ + 0xf009, /* 000 10 */ + 0xf009, /* 000 10 */ + 0xf009, /* 000 10 */ + 0x3f0a, + 0x3f0a +}; + + + +const uint16 huffTable_24[478] = +{ + + 0x2206, /* 101 */ + 0x1205, /* 10101 */ + 0x1205, /* 1010 */ + 0x2105, /* 10110 */ + 0x2105, /* 1011 */ + 0x0206, /* 101110 */ + 0x2006, /* 101111 */ + 0x1104, + 0x1104, + 0x1104, + 0x1104, + 0x0104, + 0x0104, + 0x0104, + 0x0104, + 0x1004, + 0x1004, + 0x1004, + 0x1004, + 0x0004, + 0x0004, + 0x0004, + 0x0004, + 0x7308, + 0x7308, + 0x3709, + 0x2709, + 0x7208, + 0x7208, + 0x4608, /* 01110000 */ + 0x4608, /* 0111000 */ + 0x6408, /* 01110 */ + 0x6408, /* 0111000 */ + 0x5508, /* 0111 0 */ + 0x5508, /* 0111 */ + 0x7108, /* 0111 1 */ + 0x7108, /* 0111 */ + 0x3608, /* 01110100 */ + 0x3608, /* 0111010 */ + 0x6308, /* 01110101 */ + 0x6308, /* 0111010 */ + 0x4508, /* 01110110 */ + 0x4508, /* 0111011 */ + 0x5408, /* 01110111 */ + 0x5408, /* 0111011 */ + 0x2608, /* 01111000 */ + 0x2608, /* 0111100 */ + 0x6208, /* 01111 */ + 0x6208, /* 0111100 */ + 0x1608, /* 01111010 */ + 0x1608, /* 0111101 */ + 0x6108, /* 01111011 */ + 0x6108, /* 0111101 */ + 0x0609, /* 011111000 */ + 0x6009, /* 011111 */ + 0x3508, /* 01111101 */ + 0x3508, /* 0111110 */ + 0x5308, /* 01111110 */ + 0x5308, /* 0111111 */ + 0x4408, /* 01111111 */ + 0x4408, /* 0111111 */ + 0x2508, /* 10000000 */ + 0x2508, /* 1000000 */ + 0x5208, /* 10000 */ + 0x5208, /* 1000000 */ + 0x1508, /* 1000 0 */ + 0x1508, /* 1000 */ + 0x0509, /* 1000 10 */ + 0x5009, /* 1000 11 */ + 0x5107, /* 100 0 */ + 0x5107, /* 100 */ + 0x5107, /* 100 */ + 0x5107, /* 100 */ + 0x3408, /* 100 10 */ + 0x3408, /* 100 1 */ + 0x4308, /* 100 11 */ + 0x4308, /* 100 1 */ + 0x2407, /* 10 00 */ + 0x2407, /* 10 0 */ + 0x2407, /* 10 0 */ + 0x2407, /* 10 0 */ + 0x4207, /* 10 01 */ + 0x4207, /* 10 0 */ + 0x4207, /* 10 0 */ + 0x4207, /* 10 0 */ + 0x3307, /* 10 10 */ + 0x3307, /* 10 1 */ + 0x3307, /* 10 1 */ + 0x3307, /* 10 1 */ + 0x1407, /* 10 11 */ + 0x1407, /* 10 1 */ + 0x1407, /* 10 1 */ + 0x1407, /* 10 1 */ + 0x4107, /* 1 000 */ + 0x4107, /* 1 00 */ + 0x4107, /* 1 00 */ + 0x4107, /* 1 00 */ + 0x0408, /* 1 0 */ + 0x0408, /* 1 */ + 0x4008, /* 1 1 */ + 0x4008, /* 1 */ + 0x2307, /* 1 010 */ + 0x2307, /* 1 01 */ + 0x2307, /* 1 01 */ + 0x2307, /* 1 01 */ + 0x3207, /* 1 011 */ + 0x3207, /* 1 01 */ + 0x3207, /* 1 01 */ + 0x3207, /* 1 01 */ + 0x1306, /* 1 10 */ + 0x1306, /* 1 1 */ + 0x1306, /* 1 1 */ + 0x1306, /* 1 1 */ + 0x1306, /* 1 1 */ + 0x1306, /* 1 1 */ + 0x1306, /* 1 1 */ + 0x1306, /* 1 1 */ + 0x3106, /* 1 11 */ + 0x3106, /* 1 1 */ + 0x3106, /* 1 1 */ + 0x3106, /* 1 1 */ + 0x3106, /* 1 1 */ + 0x3106, /* 1 1 */ + 0x3106, /* 1 1 */ + 0x3106, /* 1 1 */ + 0x0307, /* 1010000 */ + 0x0307, /* 101000 */ + 0x0307, /* 101000 */ + 0x0307, /* 101000 */ + 0x3007, /* 1010 */ + 0x3007, /* 101000 */ + 0x3007, /* 101000 */ + 0x3007, /* 101000 */ + 0xb309, + 0xb309, + 0x8809, /* 010101 */ + 0x8809, /* 01010100 */ + 0x2b0a, /* 0101010100 */ + 0x5a0a, /* 0101010101 */ + 0xb209, /* 010101011 */ + 0xb209, /* 01010101 */ + 0xa50a, /* 0101011000 */ + 0x1b0a, /* 0101011 */ + 0xb10a, /* 0101011010 */ + 0x690a, /* 0101011011 */ + 0x9609, /* 010101110 */ + 0x9609, /* 01010111 */ + 0xa409, /* 010101111 */ + 0xa409, /* 01010111 */ + 0x4a0a, /* 0101100000 */ + 0x780a, /* 0101100 */ + 0x8709, /* 010110 */ + 0x8709, /* 01011000 */ + 0x3a09, /* 01011 0 */ + 0x3a09, /* 01011 */ + 0xa309, /* 01011 1 */ + 0xa309, /* 01011 */ + 0x5909, /* 010110100 */ + 0x5909, /* 01011010 */ + 0x9509, /* 010110101 */ + 0x9509, /* 01011010 */ + 0x2a09, /* 010110110 */ + 0x2a09, /* 01011011 */ + 0xa209, /* 010110111 */ + 0xa209, /* 01011011 */ + 0xa109, /* 010111000 */ + 0xa109, /* 01011100 */ + 0x6809, /* 010111 */ + 0x6809, /* 01011100 */ + 0x8609, /* 010111010 */ + 0x8609, /* 01011101 */ + 0x7709, /* 010111011 */ + 0x7709, /* 01011101 */ + 0x4909, /* 010111100 */ + 0x4909, /* 01011110 */ + 0x9409, /* 010111101 */ + 0x9409, /* 01011110 */ + 0x3909, /* 010111110 */ + 0x3909, /* 01011111 */ + 0x9309, /* 010111111 */ + 0x9309, /* 01011111 */ + 0x5809, /* 011000000 */ + 0x5809, /* 01100000 */ + 0x8509, /* 011000 */ + 0x8509, /* 01100000 */ + 0x2909, /* 01100 0 */ + 0x2909, /* 01100 */ + 0x6709, /* 01100 1 */ + 0x6709, /* 01100 */ + 0x7609, /* 0110 00 */ + 0x7609, /* 0110 0 */ + 0x9209, /* 0110 01 */ + 0x9209, /* 0110 0 */ + 0x1909, /* 0110 10 */ + 0x1909, /* 0110 1 */ + 0x9109, /* 0110 11 */ + 0x9109, /* 0110 1 */ + 0x4809, /* 011 000 */ + 0x4809, /* 011 00 */ + 0x8409, /* 011 */ + 0x8409, /* 011 00 */ + 0x5709, /* 011 010 */ + 0x5709, /* 011 01 */ + 0x7509, /* 011 011 */ + 0x7509, /* 011 01 */ + 0x3809, /* 011 100 */ + 0x3809, /* 011 10 */ + 0x8309, /* 011 101 */ + 0x8309, /* 011 10 */ + 0x6609, /* 011 110 */ + 0x6609, /* 011 11 */ + 0x2809, /* 011 111 */ + 0x2809, /* 011 11 */ + 0x8209, /* 011010000 */ + 0x8209, /* 01101000 */ + 0x1809, /* 011010 */ + 0x1809, /* 01101000 */ + 0x4709, /* 01101 0 */ + 0x4709, /* 01101 */ + 0x7409, /* 01101 1 */ + 0x7409, /* 01101 */ + 0x8109, /* 011010100 */ + 0x8109, /* 01101010 */ + 0x080a, /* 0110101010 */ + 0x800a, /* 0110101011 */ + 0x5609, /* 011010110 */ + 0x5609, /* 01101011 */ + 0x6509, /* 011010111 */ + 0x6509, /* 01101011 */ + 0x1709, /* 011011000 */ + 0x1709, /* 01101100 */ + 0x070a, /* 011011 0 */ + 0x700a, /* 011011 1 */ + 0x6e0b, + 0x9c0b, + 0xc90a, /* 01000 01 */ + 0xc90a, /* 01000 0 */ + 0x5e0a, /* 01000 10 */ + 0x5e0a, /* 01000 1 */ + 0xba0a, /* 01000 11 */ + 0xba0a, /* 01000 1 */ + 0xe50a, /* 0100 000 */ + 0xe50a, /* 0100 00 */ + 0xab0b, /* 0100 0 */ + 0x7d0b, /* 0100 1 */ + 0xd70a, /* 0100 010 */ + 0xd70a, /* 0100 01 */ + 0xe40a, /* 0100 011 */ + 0xe40a, /* 0100 01 */ + 0x8c0a, /* 0100 100 */ + 0x8c0a, + 0xc80a, + 0xc80a, + 0x4e0b, /* 0100 1100 */ + 0x2e0b, /* 0100 1101 */ + 0x3e0a, /* 0100 111 */ + 0x3e0a, /* 0100 11 */ + 0x6d0a, /* 010 0000 */ + 0x6d0a, /* 010 000 */ + 0xd60a, /* 010 0 */ + 0xd60a, /* 010 000 */ + 0xe30a, /* 010 0 */ + 0xe30a, /* 010 */ + 0x9b0a, /* 010 1 */ + 0x9b0a, /* 010 */ + 0xb90a, /* 010 0100 */ + 0xb90a, /* 010 010 */ + 0xaa0a, /* 010 0101 */ + 0xaa0a, + 0xe20a, + 0xe20a, + 0x1e0a, + 0x1e0a, + 0xe10a, + 0xe10a, + 0x5d0a, + 0x5d0a, + 0xd50a, + 0xd50a, + 0x7c0a, + 0x7c0a, + 0xc70a, + 0xc70a, + 0x4d0a, + 0x4d0a, + 0x8b0a, + 0x8b0a, + 0xb80a, + 0xb80a, + 0xd40a, + 0xd40a, + 0x9a0a, + 0x9a0a, + 0xa90a, /* 01 0 0 */ + 0xa90a, /* 01 0 */ + 0x6c0a, /* 01 0 1 */ + 0x6c0a, /* 01 0 */ + 0xc60a, /* 01 00 */ + 0xc60a, /* 01 0 */ + 0x3d0a, /* 01 01 */ + 0x3d0a, /* 01 0 */ + 0xd30a, /* 01 10 */ + 0xd30a, /* 01 1 */ + 0x2d0a, /* 01 11 */ + 0x2d0a, /* 01 1 */ + 0xd20a, + 0xd20a, + 0x1d0a, /* 01 01 */ + 0x1d0a, /* 01 0100 */ + 0x7b0a, /* 01 01010 */ + 0x7b0a, /* 01 0101 */ + 0xb70a, /* 01 01011 */ + 0xb70a, + 0xd10a, + 0xd10a, /* 01 0110 */ + 0x5c0a, /* 01 01101 */ + 0x5c0a, /* 01 0110 */ + 0xc50a, /* 01 01110 */ + 0xc50a, /* 01 0111 */ + 0x8a0a, /* 01 01111 */ + 0x8a0a, /* 01 0111 */ + 0xa80a, /* 01 10000 */ + 0xa80a, /* 01 1000 */ + 0x990a, /* 01 10 */ + 0x990a, /* 01 1000 */ + 0x4c0a, /* 01 1 0 */ + 0x4c0a, /* 01 1 */ + 0xc40a, /* 01 1 1 */ + 0xc40a, /* 01 1 */ + 0x6b0a, /* 01 10100 */ + 0x6b0a, /* 01 1010 */ + 0xb60a, /* 01 10101 */ + 0xb60a, /* 01 1010 */ + 0xd00b, /* 01 101100 */ + 0x0c0b, /* 01 101101 */ + 0x3c0a, /* 01 10111 */ + 0x3c0a, /* 01 1011 */ + 0xc30a, /* 01 11000 */ + 0xc30a, /* 01 1100 */ + 0x7a0a, /* 01 11 */ + 0x7a0a, /* 01 1100 */ + 0xa70a, /* 01 11010 */ + 0xa70a, /* 01 1101 */ + 0x2c0a, /* 01 11011 */ + 0x2c0a, /* 01 1101 */ + 0xc20a, /* 01 11100 */ + 0xc20a, /* 01 1110 */ + 0x5b0a, /* 01 11101 */ + 0x5b0a, /* 01 1110 */ + 0xb50a, /* 01 11110 */ + 0xb50a, /* 01 1111 */ + 0x1c0a, + 0x1c0a, + 0x890a, + 0x890a, + 0x980a, + 0x980a, + 0xc10a, /* 010100 0 */ + 0xc10a, /* 010100 */ + 0x4b0a, /* 010100 1 */ + 0x4b0a, /* 010100 */ + 0xc00b, /* 01010 000 */ + 0x0b0b, /* 01010 */ + 0x3b0a, /* 01010 01 */ + 0x3b0a, /* 01010 0 */ + 0xb00b, /* 01010 100 */ + 0x0a0b, /* 01010 101 */ + 0x1a0a, /* 01010 11 */ + 0x1a0a, /* 01010 1 */ + 0xb409, /* 0101 00 */ + 0xb409, /* 0101 0 */ + 0xb409, /* 0101 0 */ + 0xb409, /* 0101 0 */ + 0x6a0a, /* 0101 010 */ + 0x6a0a, /* 0101 01 */ + 0xa60a, /* 0101 011 */ + 0xa60a, /* 0101 01 */ + 0x790a, /* 0101 100 */ + 0x790a, /* 0101 10 */ + 0x970a, /* 0101 101 */ + 0x970a, /* 0101 10 */ + 0xa00b, /* 0101 1100 */ + 0x090b, /* 0101 1101 */ + 0x900a, /* 0101 111 */ + 0x900a, /* 0101 11 */ + 0xca0b, + 0xca0b, + 0xbb0b, + 0xbb0b, + 0x8d0b, + 0x8d0b, /* 0100000 */ + 0xd80b, /* 0100000 1 */ + 0xd80b, /* 0100000 */ + 0x0e0c, /* 010000 000 */ + 0xe00c, /* 010000 */ + 0x0d0b, /* 010000 01 */ + 0x0d0b, /* 010000 0 */ + 0xe60a, /* 010000 1 */ + 0xe60a, /* 010000 */ + 0xe60a, /* 010000 */ + 0xe60a, /* 010000 */ + 0x0f09, /* 011000 401 */ + 0x0f09, /* 01100 */ + 0x0f09, /* 01100 */ + 0x0f09, /* 01100 */ + 0xee0b, /* 011 00 */ + 0xde0b, /* 011 01 */ + 0xed0b, /* 011 10 */ + 0xce0b, /* 011 11 */ + 0xec0b, /* 01101000 */ + 0xdd0b, /* 01101 */ + 0xbe0b, /* 01101010 */ + 0xeb0b, /* 01101011 */ + 0xcd0b, /* 01101100 */ + 0xdc0b, /* 01101101 */ + 0xae0b, /* 01101110 */ + 0xea0b, /* 01101111 */ + 0xbd0b, /* 01110000 */ + 0xdb0b, /* 01110 */ + 0xcc0b, /* 0111 0 */ + 0x9e0b, /* 0111 1 */ + 0xe90b, /* 01110100 */ + 0xad0b, /* 01110101 */ + 0xda0b, /* 01110110 */ + 0xbc0b, /* 01110111 */ + 0xcb0b, /* 01111000 */ + 0x8e0b, + 0xe80b, + 0x9d0b, + 0xd90b, + 0x7e0b, + 0xe70b, + 0xac0b, + 0xff04, + 0xef08, + 0xfe08, + 0xdf08, /* 0000 0 */ + 0xfd08, /* 0000 1 */ + 0xcf08, /* 000 00 */ + 0xfc08, /* 000 01 */ + 0xbf08, /* 000 10 */ + 0xfb08, /* 000 11 */ + 0xfa07, /* 00 00 */ + 0xfa07, /* 00 0 */ + 0xaf08, /* 00 010 */ + 0x9f08, /* 00 011 */ + 0xf907, /* 00 10 */ + 0xf907, /* 00 1 */ + 0xf807, /* 00 11 */ + 0xf807, /* 00 1 */ + 0x8f08, + 0x7f08, /* 0 0 */ + 0xf707, /* 0 */ + 0xf707, /* 0 00 */ + 0x6f07, /* 0 010 */ + 0x6f07, /* 0 01 */ + 0xf607, /* 0 011 */ + 0xf607, /* 0 01 */ + 0x5f07, + 0x5f07, /* 0 10 */ + 0xf507, /* 0 101 */ + 0xf507, /* 0 10 */ + 0x4f07, /* 0 110 */ + 0x4f07, /* 0 11 */ + 0xf407, /* 0 111 */ + 0xf407, /* 0 11 */ + 0x3f07, + 0x3f07, + 0xf307, /* 0 */ + 0xf307, + 0x2f07, /* 0 */ + 0x2f07, /* */ + 0xf207, /* 1 */ + 0xf207, /* */ + 0xf107, + 0xf107, + 0x1f08, + 0xf008 + +}; + + +const uint16 huffTable_32[33] = +{ + + 0x0b06, + 0x0f06, + 0x0d06, + 0x0e06, + 0x0706, + 0x0506, + 0x0905, + 0x0905, + 0x0605, + 0x0605, + 0x0305, + 0x0305, + 0x0a05, + 0x0a05, + 0x0c05, + 0x0c05, + 0x0204, + 0x0204, + 0x0204, + 0x0204, + 0x0104, + 0x0104, + 0x0104, + 0x0104, + 0x0404, + 0x0404, + 0x0404, + 0x0404, + 0x0804, + 0x0804, + 0x0804, + 0x0804, + 0x0001 + +}; + + +/* + * MM = 512; z = [0:(MM)]; a = z.^(1/3); + * Table is in Q27 + */ +const int32 power_one_third[513] = +{ + + 0x00000000, 0x08000000, 0x0A14517D, 0x0B89BA25, + 0x0CB2FF53, 0x0DAE07DE, 0x0E897685, 0x0F4DAEDD, + 0x10000000, 0x10A402FD, 0x113C4841, 0x11CAB613, + 0x1250BFE2, 0x12CF8890, 0x1347F8AB, 0x13BACD65, + 0x1428A2FA, 0x1491FC15, 0x14F74744, 0x1558E2F7, + 0x15B72095, 0x161246D7, 0x166A9399, 0x16C03D55, + 0x17137449, 0x17646369, 0x17B33124, 0x18000000, + 0x184AEF29, 0x18941AD8, 0x18DB9CB7, 0x19218C2E, + 0x1965FEA5, 0x19A907C2, 0x19EAB998, 0x1A2B24D0, + 0x1A6A58D5, 0x1AA863EE, 0x1AE5535D, 0x1B213377, + 0x1B5C0FBD, 0x1B95F2EC, 0x1BCEE70F, 0x1C06F590, + 0x1C3E2745, 0x1C74847A, 0x1CAA1501, 0x1CDEE035, + 0x1D12ED0B, 0x1D464212, 0x1D78E582, 0x1DAADD3A, + 0x1DDC2ECF, 0x1E0CDF8C, 0x1E3CF476, 0x1E6C7257, + 0x1E9B5DBA, 0x1EC9BAF6, 0x1EF78E2C, 0x1F24DB4E, + 0x1F51A620, 0x1F7DF23C, 0x1FA9C314, 0x1FD51BF2, + 0x20000000, 0x202A7244, 0x205475A6, 0x207E0CEE, + 0x20A73ACA, 0x20D001CC, 0x20F8646D, 0x2120650E, + 0x214805FA, 0x216F4963, 0x2196316C, 0x21BCC020, + 0x21E2F77A, 0x2208D961, 0x222E67AD, 0x2253A425, + 0x22789082, 0x229D2E6E, 0x22C17F82, 0x22E5854F, + 0x23094155, 0x232CB509, 0x234FE1D5, 0x2372C918, + 0x23956C26, 0x23B7CC47, 0x23D9EABB, 0x23FBC8B9, + 0x241D676E, 0x243EC7FF, 0x245FEB86, 0x2480D319, + 0x24A17FC3, 0x24C1F28B, 0x24E22C6C, 0x25022E5F, + 0x2521F954, 0x25418E33, 0x2560EDE2, 0x2580193E, + 0x259F111F, 0x25BDD657, 0x25DC69B4, 0x25FACBFE, + 0x2618FDF8, 0x26370060, 0x2654D3EF, 0x2672795C, + 0x268FF156, 0x26AD3C8A, 0x26CA5BA2, 0x26E74F41, + 0x27041808, 0x2720B695, 0x273D2B81, 0x27597762, + 0x27759ACB, 0x2791964B, 0x27AD6A6F, 0x27C917C0, + 0x27E49EC5, 0x28000000, 0x281B3BF3, 0x2836531B, + 0x285145F3, 0x286C14F5, 0x2886C096, 0x28A1494B, + 0x28BBAF85, 0x28D5F3B3, 0x28F01641, 0x290A179B, + 0x2923F82A, 0x293DB854, 0x2957587E, 0x2970D90A, + 0x298A3A59, 0x29A37CCA, 0x29BCA0BB, 0x29D5A687, + 0x29EE8E87, 0x2A075914, 0x2A200684, 0x2A38972C, + 0x2A510B5F, 0x2A696370, 0x2A819FAE, 0x2A99C069, + 0x2AB1C5ED, 0x2AC9B088, 0x2AE18085, 0x2AF9362C, + 0x2B10D1C6, 0x2B28539B, 0x2B3FBBEF, 0x2B570B09, + 0x2B6E412B, 0x2B855E97, 0x2B9C6390, 0x2BB35056, + 0x2BCA2527, 0x2BE0E242, 0x2BF787E4, 0x2C0E1649, + 0x2C248DAD, 0x2C3AEE4A, 0x2C513859, 0x2C676C13, + 0x2C7D89AF, 0x2C939164, 0x2CA98368, 0x2CBF5FF1, + 0x2CD52731, 0x2CEAD95E, 0x2D0076A9, 0x2D15FF45, + 0x2D2B7363, 0x2D40D332, 0x2D561EE4, 0x2D6B56A7, + 0x2D807AAA, 0x2D958B19, 0x2DAA8823, 0x2DBF71F4, + 0x2DD448B7, 0x2DE90C98, 0x2DFDBDC0, 0x2E125C5C, + 0x2E26E892, 0x2E3B628D, 0x2E4FCA75, 0x2E642070, + 0x2E7864A8, 0x2E8C9741, 0x2EA0B862, 0x2EB4C831, + 0x2EC8C6D3, 0x2EDCB46C, 0x2EF09121, 0x2F045D14, + 0x2F18186A, 0x2F2BC345, 0x2F3F5DC7, 0x2F52E812, + 0x2F666247, 0x2F79CC88, 0x2F8D26F4, 0x2FA071AC, + 0x2FB3ACD0, 0x2FC6D87F, 0x2FD9F4D7, 0x2FED01F8, + 0x30000000, 0x3012EF0C, 0x3025CF39, 0x3038A0A6, + 0x304B636D, 0x305E17AD, 0x3070BD81, 0x30835504, + 0x3095DE51, 0x30A85985, 0x30BAC6B9, 0x30CD2609, + 0x30DF778D, 0x30F1BB60, 0x3103F19C, 0x31161A59, + 0x312835B0, 0x313A43BA, 0x314C4490, 0x315E3849, + 0x31701EFD, 0x3181F8C4, 0x3193C5B4, 0x31A585E6, + 0x31B7396F, 0x31C8E066, 0x31DA7AE1, 0x31EC08F6, + 0x31FD8ABC, 0x320F0047, 0x322069AC, 0x3231C702, + 0x3243185C, 0x32545DCF, 0x32659770, 0x3276C552, + 0x3287E78A, 0x3298FE2C, 0x32AA094A, 0x32BB08F9, + 0x32CBFD4A, 0x32DCE652, 0x32EDC423, 0x32FE96D0, + 0x330F5E6A, 0x33201B04, 0x3330CCB0, 0x33417380, + 0x33520F85, 0x3362A0D0, 0x33732774, 0x3383A380, + 0x33941506, 0x33A47C17, 0x33B4D8C4, 0x33C52B1B, + 0x33D5732F, 0x33E5B10F, 0x33F5E4CA, 0x34060E71, + 0x34162E14, 0x342643C1, 0x34364F88, 0x34465178, + 0x345649A1, 0x34663810, 0x34761CD6, 0x3485F800, + 0x3495C99D, 0x34A591BB, 0x34B55069, 0x34C505B4, + 0x34D4B1AB, 0x34E4545B, 0x34F3EDD2, 0x35037E1D, + 0x3513054B, 0x35228367, 0x3531F881, 0x354164A3, + 0x3550C7DC, 0x35602239, 0x356F73C5, 0x357EBC8E, + 0x358DFCA0, 0x359D3408, 0x35AC62D1, 0x35BB8908, + 0x35CAA6B9, 0x35D9BBF0, 0x35E8C8B9, 0x35F7CD20, + 0x3606C92F, 0x3615BCF3, 0x3624A878, 0x36338BC8, + 0x364266EE, 0x365139F6, 0x366004EC, 0x366EC7D9, + 0x367D82C9, 0x368C35C6, 0x369AE0DC, 0x36A98414, + 0x36B81F7A, 0x36C6B317, 0x36D53EF7, 0x36E3C323, + 0x36F23FA5, 0x3700B488, 0x370F21D5, 0x371D8797, + 0x372BE5D7, 0x373A3CA0, 0x37488BF9, 0x3756D3EF, + 0x37651489, 0x37734DD1, 0x37817FD1, 0x378FAA92, + 0x379DCE1D, 0x37ABEA7C, 0x37B9FFB7, 0x37C80DD7, + 0x37D614E6, 0x37E414EC, 0x37F20DF1, 0x38000000, + 0x380DEB20, 0x381BCF5A, 0x3829ACB6, 0x3837833D, + 0x384552F8, 0x38531BEE, 0x3860DE28, 0x386E99AF, + 0x387C4E89, 0x3889FCC0, 0x3897A45B, 0x38A54563, + 0x38B2DFDF, 0x38C073D7, 0x38CE0152, 0x38DB885A, + 0x38E908F4, 0x38F68329, 0x3903F701, 0x39116483, + 0x391ECBB6, 0x392C2CA1, 0x3939874D, 0x3946DBC0, + 0x39542A01, 0x39617218, 0x396EB40C, 0x397BEFE4, + 0x398925A7, 0x3996555C, 0x39A37F09, 0x39B0A2B7, + 0x39BDC06A, 0x39CAD82B, 0x39D7EA01, 0x39E4F5F0, + 0x39F1FC01, 0x39FEFC3A, 0x3A0BF6A2, 0x3A18EB3E, + 0x3A25DA16, 0x3A32C32F, 0x3A3FA691, 0x3A4C8441, + 0x3A595C46, 0x3A662EA6, 0x3A72FB67, 0x3A7FC28F, + 0x3A8C8425, 0x3A99402E, 0x3AA5F6B1, 0x3AB2A7B3, + 0x3ABF533A, 0x3ACBF94D, 0x3AD899F1, 0x3AE5352C, + 0x3AF1CB03, 0x3AFE5B7D, 0x3B0AE6A0, 0x3B176C70, + 0x3B23ECF3, 0x3B306830, 0x3B3CDE2C, 0x3B494EEB, + 0x3B55BA74, 0x3B6220CC, 0x3B6E81F9, 0x3B7ADE00, + 0x3B8734E5, 0x3B9386B0, 0x3B9FD364, 0x3BAC1B07, + 0x3BB85D9E, 0x3BC49B2F, 0x3BD0D3BE, 0x3BDD0751, + 0x3BE935ED, 0x3BF55F97, 0x3C018453, 0x3C0DA427, + 0x3C19BF17, 0x3C25D52A, 0x3C31E662, 0x3C3DF2C6, + 0x3C49FA5B, 0x3C55FD24, 0x3C61FB27, 0x3C6DF468, + 0x3C79E8ED, 0x3C85D8B9, 0x3C91C3D2, 0x3C9DAA3C, + 0x3CA98BFC, 0x3CB56915, 0x3CC1418E, 0x3CCD156A, + 0x3CD8E4AE, 0x3CE4AF5E, 0x3CF0757F, 0x3CFC3714, + 0x3D07F423, 0x3D13ACB0, 0x3D1F60BF, 0x3D2B1055, + 0x3D36BB75, 0x3D426224, 0x3D4E0466, 0x3D59A23F, + 0x3D653BB4, 0x3D70D0C8, 0x3D7C6180, 0x3D87EDE0, + 0x3D9375EC, 0x3D9EF9A8, 0x3DAA7918, 0x3DB5F43F, + 0x3DC16B23, 0x3DCCDDC7, 0x3DD84C2E, 0x3DE3B65D, + 0x3DEF1C58, 0x3DFA7E22, 0x3E05DBC0, 0x3E113535, + 0x3E1C8A85, 0x3E27DBB3, 0x3E3328C4, 0x3E3E71BB, + 0x3E49B69C, 0x3E54F76B, 0x3E60342B, 0x3E6B6CE0, + 0x3E76A18D, 0x3E81D237, 0x3E8CFEE0, 0x3E98278D, + 0x3EA34C40, 0x3EAE6CFE, 0x3EB989CA, 0x3EC4A2A8, + 0x3ECFB79A, 0x3EDAC8A5, 0x3EE5D5CB, 0x3EF0DF10, + 0x3EFBE478, 0x3F06E606, 0x3F11E3BE, 0x3F1CDDA2, + 0x3F27D3B6, 0x3F32C5FD, 0x3F3DB47B, 0x3F489F32, + 0x3F538627, 0x3F5E695C, 0x3F6948D5, 0x3F742494, + 0x3F7EFC9D, 0x3F89D0F3, 0x3F94A19A, 0x3F9F6E94, + 0x3FAA37E4, 0x3FB4FD8E, 0x3FBFBF94, 0x3FCA7DFB, + 0x3FD538C4, 0x3FDFEFF3, 0x3FEAA38A, 0x3FF5538E, + 0x40000000 +}; + + diff --git a/ohos-specific/pvmp3dec/src/pvmp3_tables.h b/ohos-specific/pvmp3dec/src/pvmp3_tables.h new file mode 100644 index 0000000000..b54c5bf786 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/pvmp3_tables.h @@ -0,0 +1,124 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* + Filename: pvmp3_tables.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + +------------------------------------------------------------------------------ +*/ + +#ifndef PVMP3_TABLES_H +#define PVMP3_TABLES_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ + +#include "pvmp3_dec_defs.h" +#include "pv_mp3_huffman.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES AND SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ +#define Qfmt_28(a) (int32(double(0x10000000)*a)) + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +typedef struct +{ + int16 l[23]; + int16 s[14]; +} mp3_scaleFactorBandIndex; + + + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + extern const int32 mp3_s_freq[4][4]; + extern const int32 inv_sfreq[4]; + extern const int16 mp3_bitrate[3][15]; + extern const int32 power_one_third[513]; + + extern const mp3_scaleFactorBandIndex mp3_sfBandIndex[9]; + extern const int32 mp3_shortwindBandWidths[9][13]; + extern const int32 pqmfSynthWin[(HAN_SIZE/2) + 8]; + + + extern const uint16 huffTable_1[]; + extern const uint16 huffTable_2[]; + extern const uint16 huffTable_3[]; + extern const uint16 huffTable_5[]; + extern const uint16 huffTable_6[]; + extern const uint16 huffTable_7[]; + extern const uint16 huffTable_8[]; + extern const uint16 huffTable_9[]; + extern const uint16 huffTable_10[]; + extern const uint16 huffTable_11[]; + extern const uint16 huffTable_12[]; + extern const uint16 huffTable_13[]; + extern const uint16 huffTable_15[]; + extern const uint16 huffTable_16[]; + extern const uint16 huffTable_24[]; + extern const uint16 huffTable_32[]; + extern const uint16 huffTable_33[]; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif diff --git a/ohos-specific/pvmp3dec/src/s_huffcodetab.h b/ohos-specific/pvmp3dec/src/s_huffcodetab.h new file mode 100644 index 0000000000..874943df9c --- /dev/null +++ b/ohos-specific/pvmp3dec/src/s_huffcodetab.h @@ -0,0 +1,98 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + + PacketVideo Corp. + MP3 Decoder Library + + Filename: s_huffcodetab.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + +------------------------------------------------------------------------------ + REFERENCES + + [1] ISO MPEG Audio Subgroup Software Simulation Group (1996) + ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension + +----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef S_HUFFCODETAB_H +#define S_HUFFCODETAB_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ +#define HUFF_TBL 34 + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ + +struct huffcodetab +{ + uint32 linbits; /*number of linbits */ + uint16(*pdec_huff_tab)(tmp3Bits *); +}; + + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/s_mp3bits.h b/ohos-specific/pvmp3dec/src/s_mp3bits.h new file mode 100644 index 0000000000..b905b9a6fd --- /dev/null +++ b/ohos-specific/pvmp3dec/src/s_mp3bits.h @@ -0,0 +1,107 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: s_mp3bits.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This include file defines the structure, BITS + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef S_MP3BITS_H +#define S_MP3BITS_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ +/* + * Name: BITS + * Description: Holds information for processing the input data buffer + * as a "stream". The data is in packed format. + * Fields: + * pBuffer - pointer to the beginning of the buffer. If the data type of + * this changes, make sure to update the constants in ibstream.h + * usedBits - number of bits read thus far from the buffer. Bit 0 is + * the LSB of pBuffer[0]. + */ + + +typedef struct +{ + uint8 *pBuffer; + uint32 usedBits; + uint32 inputBufferCurrentLength; + uint32 offset; +} tmp3Bits; + + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ +#endif + diff --git a/ohos-specific/pvmp3dec/src/s_tmp3dec_chan.h b/ohos-specific/pvmp3dec/src/s_tmp3dec_chan.h new file mode 100644 index 0000000000..6eb8835f82 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/s_tmp3dec_chan.h @@ -0,0 +1,110 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: s_tmp3dec_chan.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This include file defines the structure, tmp3dec_chan. + This structure contains information per channel that needs to persist + between calls + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef S_TMP3DEC_CHAN_H +#define S_TMP3DEC_CHAN_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "pvmp3_audio_type_defs.h" +#include "pvmp3_dec_defs.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + typedef struct + { + int32 used_freq_lines; + int32 overlap[SUBBANDS_NUMBER*FILTERBANK_BANDS]; + int32 work_buf_int32[SUBBANDS_NUMBER*FILTERBANK_BANDS]; /* working buffer */ + int32 circ_buffer[480 + 576]; + + } tmp3dec_chan; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + + diff --git a/ohos-specific/pvmp3dec/src/s_tmp3dec_file.h b/ohos-specific/pvmp3dec/src/s_tmp3dec_file.h new file mode 100644 index 0000000000..611e08fbe5 --- /dev/null +++ b/ohos-specific/pvmp3dec/src/s_tmp3dec_file.h @@ -0,0 +1,118 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 1998-2009 PacketVideo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ +/* +------------------------------------------------------------------------------ + PacketVideo Corp. + MP3 Decoder Library + + Filename: s_tmp3dec_file.h + + Date: 09/21/2007 + +------------------------------------------------------------------------------ + REVISION HISTORY + + Description: + +------------------------------------------------------------------------------ + INCLUDE DESCRIPTION + + This include file defines the structure, tmp3dec_file. + This structure contains information that needs to persist between calls + +------------------------------------------------------------------------------ +*/ + +/*---------------------------------------------------------------------------- +; CONTINUE ONLY IF NOT ALREADY DEFINED +----------------------------------------------------------------------------*/ +#ifndef S_TMP3DEC_FILE_H +#define S_TMP3DEC_FILE_H + +/*---------------------------------------------------------------------------- +; INCLUDES +----------------------------------------------------------------------------*/ +#include "s_tmp3dec_chan.h" +#include "s_mp3bits.h" +#include "s_huffcodetab.h" + +/*---------------------------------------------------------------------------- +; MACROS +; Define module specific macros here +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; DEFINES +; Include all pre-processor statements here. +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; EXTERNAL VARIABLES REFERENCES +; Declare variables used in this module but defined elsewhere +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; SIMPLE TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; ENUMERATED TYPEDEF'S +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; STRUCTURES TYPEDEF'S +----------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + + typedef struct + { + int32 num_channels; + int32 predicted_frame_size; + int32 frame_start; + int32 Scratch_mem[198]; + tmp3dec_chan perChan[CHAN]; + mp3ScaleFactors scaleFactors[CHAN]; + mp3SideInfo sideInfo; + tmp3Bits mainDataStream; + uint8 mainDataBuffer[BUFSIZE]; + tmp3Bits inputStream; + huffcodetab ht[HUFF_TBL]; + } tmp3dec_file; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- +; GLOBAL FUNCTION DEFINITIONS +; Function Prototype declaration +----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +; END +----------------------------------------------------------------------------*/ + +#endif + + + + diff --git a/ohos-specific/tremolo/CMakeLists.txt b/ohos-specific/tremolo/CMakeLists.txt new file mode 100644 index 0000000000..d64102f547 --- /dev/null +++ b/ohos-specific/tremolo/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.6) + +set(lib_name tremolo) +set(target_name ext_${lib_name}) + +project(${lib_name}) + +set(${target_name}_src + ./Tremolo/bitwise.c + ./Tremolo/codebook.c + ./Tremolo/dsp.c + ./Tremolo/floor0.c + ./Tremolo/floor1.c + ./Tremolo/floor_lookup.c + ./Tremolo/framing.c + ./Tremolo/mapping0.c + ./Tremolo/mdct.c + ./Tremolo/misc.c + ./Tremolo/res012.c + ./Tremolo/treminfo.c + ./Tremolo/vorbisfile.c +) + +add_library(${target_name} STATIC + ${${target_name}_src} +) + +target_compile_definitions(${target_name} PRIVATE ONLY_C) + +target_include_directories(${target_name} PUBLIC .) +set_target_properties(${target_name} + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + FOLDER "External" + LINKER_LANGUAGE C +) + diff --git a/ohos-specific/tremolo/MODULE_LICENSE_BSD_LIKE b/ohos-specific/tremolo/MODULE_LICENSE_BSD_LIKE new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ohos-specific/tremolo/NOTICE b/ohos-specific/tremolo/NOTICE new file mode 100644 index 0000000000..e4fd53f29a --- /dev/null +++ b/ohos-specific/tremolo/NOTICE @@ -0,0 +1,30 @@ +Copyright (C) 2002-2009, Xiph.org Foundation +Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the Xiph.org Foundation nor Pinknoise +Productions Ltd nor the names of its contributors may be used to +endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/ohos-specific/tremolo/README b/ohos-specific/tremolo/README new file mode 100644 index 0000000000..f1a1151eb8 --- /dev/null +++ b/ohos-specific/tremolo/README @@ -0,0 +1,8 @@ +This version of Tremolo is derived from Tremolo library version +0.07. It has been patched against publicly known vulnerabilities +with sample files available here: + + http://static.dataspill.org/releases/ogg/examples/ + +When syncing with svn, please ensure that these defects are not +reintroduced. diff --git a/ohos-specific/tremolo/README.version b/ohos-specific/tremolo/README.version new file mode 100644 index 0000000000..fe58e9d087 --- /dev/null +++ b/ohos-specific/tremolo/README.version @@ -0,0 +1,3 @@ +URL: http://wss.co.uk/pinknoise/tremolo/Tremolo007.zip +Version: 0.07 +BugComponent: 99142 diff --git a/ohos-specific/tremolo/Tremolo/asm_arm.h b/ohos-specific/tremolo/Tremolo/asm_arm.h new file mode 100644 index 0000000000..6303b87133 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/asm_arm.h @@ -0,0 +1,265 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: arm7 and later wide math functions + + ************************************************************************/ + +#ifdef _ARM_ASSEM_ + +#if !defined(_V_WIDE_MATH) && !defined(_LOW_ACCURACY_) +#define _V_WIDE_MATH + +static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { + int lo,hi; + asm volatile("smull\t%0, %1, %2, %3" + : "=&r"(lo),"=&r"(hi) + : "%r"(x),"r"(y) + : "cc"); + return(hi); +} + +static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { + return MULT32(x,y)<<1; +} + +static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { + int lo,hi; + asm volatile("smull %0, %1, %2, %3\n\t" + "movs %0, %0, lsr #15\n\t" + "adc %1, %0, %1, lsl #17\n\t" + : "=&r"(lo),"=&r"(hi) + : "%r"(x),"r"(y) + : "cc"); + return(hi); +} + +#define MB() asm volatile ("" : : : "memory") + +static inline void XPROD32(ogg_int32_t a, ogg_int32_t b, + ogg_int32_t t, ogg_int32_t v, + ogg_int32_t *x, ogg_int32_t *y) +{ + int x1, y1, l; + asm( "smull %0, %1, %4, %6\n\t" + "smlal %0, %1, %5, %7\n\t" + "rsb %3, %4, #0\n\t" + "smull %0, %2, %5, %6\n\t" + "smlal %0, %2, %3, %7" + : "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a) + : "3" (a), "r" (b), "r" (t), "r" (v) + : "cc" ); + *x = x1; + MB(); + *y = y1; +} + +/* x = (a*t + b*v)>>31, y = (b*t - a*v)>>31 */ +static inline void XPROD31(ogg_int32_t a, ogg_int32_t b, + ogg_int32_t t, ogg_int32_t v, + ogg_int32_t *x, ogg_int32_t *y) +{ + int x1, y1, l; + asm( "smull %0, %1, %4, %6\n\t" + "smlal %0, %1, %5, %7\n\t" + "rsb %3, %4, #0\n\t" + "smull %0, %2, %5, %6\n\t" + "smlal %0, %2, %3, %7" + : "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a) + : "3" (a), "r" (b), "r" (t), "r" (v) + : "cc" ); + *x = x1 << 1; + MB(); + *y = y1 << 1; +} + +/* x = (a*t - b*v)>>31, y = (b*t + a*v)>>31 */ +static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b, + ogg_int32_t t, ogg_int32_t v, + ogg_int32_t *x, ogg_int32_t *y) +{ + int x1, y1, l; + asm( "rsb %2, %4, #0\n\t" + "smull %0, %1, %3, %5\n\t" + "smlal %0, %1, %2, %6\n\t" + "smull %0, %2, %4, %5\n\t" + "smlal %0, %2, %3, %6" + : "=&r" (l), "=&r" (x1), "=&r" (y1) + : "r" (a), "r" (b), "r" (t), "r" (v) + : "cc" ); + *x = x1 << 1; + MB(); + *y = y1 << 1; +} + +#endif + +#ifndef _V_CLIP_MATH +#define _V_CLIP_MATH + +static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) { + int tmp; + asm volatile("subs %1, %0, #32768\n\t" + "movpl %0, #0x7f00\n\t" + "orrpl %0, %0, #0xff\n" + "adds %1, %0, #32768\n\t" + "movmi %0, #0x8000" + : "+r"(x),"=r"(tmp) + : + : "cc"); + return(x); +} + +#endif + +#ifndef _V_LSP_MATH_ASM +#define _V_LSP_MATH_ASM + +static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip, + ogg_int32_t *qexpp, + ogg_int32_t *ilsp,ogg_int32_t wi, + ogg_int32_t m){ + + ogg_uint32_t qi=*qip,pi=*pip; + ogg_int32_t qexp=*qexpp; + + asm("mov r0,%3;" + "mov r1,%5,asr#1;" + "add r0,r0,r1,lsl#3;" + "1:" + + "ldmdb r0!,{r1,r3};" + "subs r1,r1,%4;" //ilsp[j]-wi + "rsbmi r1,r1,#0;" //labs(ilsp[j]-wi) + "umull %0,r2,r1,%0;" //qi*=labs(ilsp[j]-wi) + + "subs r1,r3,%4;" //ilsp[j+1]-wi + "rsbmi r1,r1,#0;" //labs(ilsp[j+1]-wi) + "umull %1,r3,r1,%1;" //pi*=labs(ilsp[j+1]-wi) + + "cmn r2,r3;" // shift down 16? + "beq 0f;" + "add %2,%2,#16;" + "mov %0,%0,lsr #16;" + "orr %0,%0,r2,lsl #16;" + "mov %1,%1,lsr #16;" + "orr %1,%1,r3,lsl #16;" + "0:" + "cmp r0,%3;\n" + "bhi 1b;\n" + + // odd filter assymetry + "ands r0,%5,#1;\n" + "beq 2f;\n" + "add r0,%3,%5,lsl#2;\n" + + "ldr r1,[r0,#-4];\n" + "mov r0,#0x4000;\n" + + "subs r1,r1,%4;\n" //ilsp[j]-wi + "rsbmi r1,r1,#0;\n" //labs(ilsp[j]-wi) + "umull %0,r2,r1,%0;\n" //qi*=labs(ilsp[j]-wi) + "umull %1,r3,r0,%1;\n" //pi*=labs(ilsp[j+1]-wi) + + "cmn r2,r3;\n" // shift down 16? + "beq 2f;\n" + "add %2,%2,#16;\n" + "mov %0,%0,lsr #16;\n" + "orr %0,%0,r2,lsl #16;\n" + "mov %1,%1,lsr #16;\n" + "orr %1,%1,r3,lsl #16;\n" + + //qi=(pi>>shift)*labs(ilsp[j]-wi); + //pi=(qi>>shift)*labs(ilsp[j+1]-wi); + //qexp+=shift; + + //} + + /* normalize to max 16 sig figs */ + "2:" + "mov r2,#0;" + "orr r1,%0,%1;" + "tst r1,#0xff000000;" + "addne r2,r2,#8;" + "movne r1,r1,lsr #8;" + "tst r1,#0x00f00000;" + "addne r2,r2,#4;" + "movne r1,r1,lsr #4;" + "tst r1,#0x000c0000;" + "addne r2,r2,#2;" + "movne r1,r1,lsr #2;" + "tst r1,#0x00020000;" + "addne r2,r2,#1;" + "movne r1,r1,lsr #1;" + "tst r1,#0x00010000;" + "addne r2,r2,#1;" + "mov %0,%0,lsr r2;" + "mov %1,%1,lsr r2;" + "add %2,%2,r2;" + + : "+r"(qi),"+r"(pi),"+r"(qexp) + : "r"(ilsp),"r"(wi),"r"(m) + : "r0","r1","r2","r3","cc"); + + *qip=qi; + *pip=pi; + *qexpp=qexp; +} + +static inline void lsp_norm_asm(ogg_uint32_t *qip,ogg_int32_t *qexpp){ + + ogg_uint32_t qi=*qip; + ogg_int32_t qexp=*qexpp; + + asm("tst %0,#0x0000ff00;" + "moveq %0,%0,lsl #8;" + "subeq %1,%1,#8;" + "tst %0,#0x0000f000;" + "moveq %0,%0,lsl #4;" + "subeq %1,%1,#4;" + "tst %0,#0x0000c000;" + "moveq %0,%0,lsl #2;" + "subeq %1,%1,#2;" + "tst %0,#0x00008000;" + "moveq %0,%0,lsl #1;" + "subeq %1,%1,#1;" + : "+r"(qi),"+r"(qexp) + : + : "cc"); + *qip=qi; + *qexpp=qexp; +} + +#endif +#endif + diff --git a/ohos-specific/tremolo/Tremolo/bitwise.c b/ohos-specific/tremolo/Tremolo/bitwise.c new file mode 100644 index 0000000000..c991ca130c --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/bitwise.c @@ -0,0 +1,871 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: packing variable sized words into an octet stream + + ************************************************************************/ + +/* We're 'LSb' endian; if we write a word but read individual bits, + then we'll read the lsb first */ + +#include <string.h> +#include <stdlib.h> +#include "misc.h" +#include "ogg.h" + +#include <stdio.h> + + +#if !defined(ARM_LITTLE_ENDIAN) || defined(_V_BIT_TEST) +static unsigned long mask[]= +{0x00000000,0x00000001,0x00000003,0x00000007,0x0000000f, + 0x0000001f,0x0000003f,0x0000007f,0x000000ff,0x000001ff, + 0x000003ff,0x000007ff,0x00000fff,0x00001fff,0x00003fff, + 0x00007fff,0x0000ffff,0x0001ffff,0x0003ffff,0x0007ffff, + 0x000fffff,0x001fffff,0x003fffff,0x007fffff,0x00ffffff, + 0x01ffffff,0x03ffffff,0x07ffffff,0x0fffffff,0x1fffffff, + 0x3fffffff,0x7fffffff,0xffffffff }; +#endif + +#ifdef ARM_LITTLE_ENDIAN + +#ifdef DEBUGGING_BITWISE +extern void oggpack_readinitARM(oggpack_buffer *b,ogg_reference *r); + +void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){ + oggpack_readinitARM(b,r); + //fprintf(stderr, "Init: buffer=(%d,%x,%d,%d) %08x%08x\n", + // b->bitsLeftInSegment, b->ptr, b->bitsLeftInWord, b->count, + // b->ptr[1], b->ptr[0]); + //fflush(stderr); +} + +extern long oggpack_lookARM(oggpack_buffer *b,int bits); + +long oggpack_look(oggpack_buffer *b,int bits){ + long l; + + //fprintf(stderr, "PreLook: buffer=(%x,%x,%x) %08x%08x (%d bits)\n", + // b->bitsLeftInSegment, b->ptr, b->bitsLeftInWord, + // b->ptr[1], b->ptr[0], bits); + //fflush(stderr); + l = oggpack_lookARM(b,bits); + //fprintf(stderr, "Look: buffer=(%d,%x,%d,%d) %08x%08x (%d bits) (result=%x)\n", + // b->bitsLeftInSegment, b->ptr, b->bitsLeftInWord, b->count, + // b->ptr[1], b->ptr[0], bits, l); + //fflush(stderr); + + return l; +} + +extern void oggpack_advARM(oggpack_buffer *b,int bits); + +void oggpack_adv(oggpack_buffer *b,int bits){ + //fprintf(stderr, "Adv before: buffer=(%x,%x,%x) %08x%08x (%d bits)\n", + // b->bitsLeftInSegment, b->ptr, b->bitsLeftInWord, + // b->ptr[1], b->ptr[0],bits); + //fflush(stderr); + oggpack_advARM(b,bits); + //fprintf(stderr, "Adv: buffer=(%d,%x,%d,%d) %08x%08x\n", + // b->bitsLeftInSegment, b->ptr, b->bitsLeftInWord, b->count, + // b->ptr[1], b->ptr[0]); + //fflush(stderr); +} + +extern long oggpack_readARM(oggpack_buffer *b,int bits); + +/* bits <= 32 */ +long oggpack_read(oggpack_buffer *b,int bits){ + long l; + + //fprintf(stderr, "PreRead: buffer=(%d,%x,%d,%d) %08x%08x (%d bits)\n", + // b->bitsLeftInSegment, b->ptr, b->bitsLeftInWord, b->count, + // b->ptr[1], b->ptr[0], bits); + //fflush(stderr); + l = oggpack_readARM(b,bits); + //fprintf(stderr, "Read: buffer=(%d,%x,%d,%d) %08x%08x (%d bits) (result=%x)\n", + // b->bitsLeftInSegment, b->ptr, b->bitsLeftInWord, b->count, + // b->ptr[1], b->ptr[0], bits, l); + //fflush(stderr); + + return l; +} +#endif + +int oggpack_eop(oggpack_buffer *b){ + int ret; + if(b->bitsLeftInSegment<0)ret= -1; + else ret = 0; + //fprintf(stderr, "EOP %d\n", ret); + //fflush(stderr); + return ret; +} + +long oggpack_bytes(oggpack_buffer *b){ + long ret; + if(b->bitsLeftInSegment<0) ret = b->count+b->head->length; + else ret = b->count + b->head->length - (b->bitsLeftInSegment)/8; + //fprintf(stderr, "count=%d length=%d bitsLeftInSegment=%d\n", + // b->count, b->head->length, b->bitsLeftInSegment); + //fflush(stderr); + return ret; +} + +long oggpack_bits(oggpack_buffer *b){ + long ret; + if(b->bitsLeftInSegment<0) ret=(b->count+b->head->length)*8; + else ret = b->count*8 + b->head->length*8 - b->bitsLeftInSegment; + //fprintf(stderr, "count=%d length=%d bitsLeftInSegment=%d\n", + // b->count, b->head->length, b->bitsLeftInSegment); + //fflush(stderr); + return ret; +} + +#else + +/* spans forward, skipping as many bytes as headend is negative; if + headend is zero, simply finds next byte. If we're up to the end + of the buffer, leaves headend at zero. If we've read past the end, + halt the decode process. */ + +static void _span(oggpack_buffer *b){ + while(b->headend-(b->headbit>>3)<1){ + b->headend-=b->headbit>>3; + b->headbit&=0x7; + + if(b->head && b->head->next){ + b->count+=b->head->length; + b->head=b->head->next; + + if(b->headend+b->head->length>0) + b->headptr=b->head->buffer->data+b->head->begin-b->headend; + + b->headend+=b->head->length; + }else{ + /* we've either met the end of decode, or gone past it. halt + only if we're past */ + if(b->headend*8<b->headbit) + /* read has fallen off the end */ + b->headend=-1; + break; + } + } +} + +void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){ + memset(b,0,sizeof(*b)); + + b->tail=b->head=r; + b->count=0; + if (b->head && r->length) { + b->headptr=b->head->buffer->data+b->head->begin; + b->headend=b->head->length; + } else { + b->headptr=0; + b->headend=0; + } + _span(b); + + //fprintf(stderr, + // "Init: buffer=(%d,%x,%d,%d) %02x%02x%02x%02x%02x%02x%02x%02x\n", + // b->headbit, b->headptr, b->headend, b->count, + // b->headptr[7], b->headptr[6], b->headptr[5], b->headptr[4], + // b->headptr[3], b->headptr[2], b->headptr[1], b->headptr[0]); + //fflush(stderr); +} + +#define _lookspan() while(!end){\ + head=head->next;\ + if(!head) return -1;\ + ptr=head->buffer->data + head->begin;\ + end=head->length;\ + } + +/* Read in bits without advancing the bitptr; bits <= 32 */ +long oggpack_look(oggpack_buffer *b,int bits){ + unsigned long m=mask[bits]; + unsigned long ret = 0; + int BITS = bits; + + if (!b->headptr) return 0; + + bits+=b->headbit; + + if(bits >= b->headend<<3){ + int end=b->headend; + unsigned char *ptr=b->headptr; + ogg_reference *head=b->head; + + if(end<0)return 0; + if (!head || !end)return 0; + + if(bits){ + _lookspan(); + ret=*ptr++>>b->headbit; + if(bits>8){ + --end; + _lookspan(); + ret|=*ptr++<<(8-b->headbit); + if(bits>16){ + --end; + _lookspan(); + ret|=*ptr++<<(16-b->headbit); + if(bits>24){ + --end; + _lookspan(); + ret|=*ptr++<<(24-b->headbit); + if(bits>32 && b->headbit){ + --end; + _lookspan(); + ret|=*ptr<<(32-b->headbit); + } + } + } + } + } + + }else{ + + /* make this a switch jump-table */ + ret=b->headptr[0]>>b->headbit; + if(bits>8){ + ret|=b->headptr[1]<<(8-b->headbit); + if(bits>16){ + ret|=b->headptr[2]<<(16-b->headbit); + if(bits>24){ + ret|=b->headptr[3]<<(24-b->headbit); + if(bits>32 && b->headbit) + ret|=b->headptr[4]<<(32-b->headbit); + } + } + } + } + + ret&=m; + //fprintf(stderr, + // "Look: buffer=(%d,%x,%d,%d) %02x%02x%02x%02x%02x%02x%02x%02x (%d bits) return=%x\n", + // b->headbit, b->headptr, b->headend, b->count, + // b->headptr[7], b->headptr[6], b->headptr[5], b->headptr[4], + // b->headptr[3], b->headptr[2], b->headptr[1], b->headptr[0], + // BITS, ret); + //fflush(stderr); + return ret; +} + +/* limited to 32 at a time */ +void oggpack_adv(oggpack_buffer *b,int bits){ + int BITS=bits; + bits+=b->headbit; + b->headbit=bits&7; + b->headend-=(bits>>3); + b->headptr+=(bits>>3); + if(b->headend<1)_span(b); + //fprintf(stderr, "Adv: buffer=(%d,%x,%d,%d) %02x%02x%02x%02x%02x%02x%02x%02x (%d bits)\n", + // b->headbit, b->headptr, b->headend,b->count, + // b->headptr[7], b->headptr[6], b->headptr[5], b->headptr[4], + // b->headptr[3], b->headptr[2], b->headptr[1], b->headptr[0], + // BITS); + //fflush(stderr); +} + +int oggpack_eop(oggpack_buffer *b){ + int ret; + if(b->headend<0)ret= -1; + else ret = 0; + //fprintf(stderr, "EOP %d\n", ret); + //fflush(stderr); + return ret; +} + +long oggpack_bytes(oggpack_buffer *b){ + long ret; + if(b->headend<0) ret = b->count+b->head->length; + ret = b->count + b->head->length-b->headend + (b->headbit+7)/8; + //fprintf(stderr, "Bytes: buffer=(%d,%x,%d,%d) %02x%02x%02x%02x%02x%02x%02x%02x (%d bytes)\n", + // b->headbit, b->headptr, b->headend, b->count, + // b->headptr[7], b->headptr[6], b->headptr[5], b->headptr[4], + // b->headptr[3], b->headptr[2], b->headptr[1], b->headptr[0], + // ret); + //fflush(stderr); + return ret; +} + +long oggpack_bits(oggpack_buffer *b){ + long ret; + if(b->headend<0) ret = (b->count+b->head->length)*8; + else ret = (b->count + b->head->length-b->headend)*8 + b->headbit; + //fprintf(stderr, "Bits: buffer=(%x,%x,%x) %02x%02x%02x%02x%02x%02x%02x%02x (%d bits)\n", + // b->headbit, b->headptr, b->headend, + // b->headptr[7], b->headptr[6], b->headptr[5], b->headptr[4], + // b->headptr[3], b->headptr[2], b->headptr[1], b->headptr[0], + // ret); + //fflush(stderr); + return ret; +} + +/* bits <= 32 */ +long oggpack_read(oggpack_buffer *b,int bits){ + long ret=oggpack_look(b,bits); + oggpack_adv(b,bits); + return(ret); +} + +#endif + +/* Self test of the bitwise routines; everything else is based on + them, so they damned well better be solid. */ + +#ifdef _V_BIT_TEST +#include <string.h> +#include <stdlib.h> +#include <stdio.h> +#include "framing.c" + +static int ilog(unsigned long v){ + int ret=0; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +oggpack_buffer r; +oggpack_buffer o; +ogg_buffer_state *bs; +ogg_reference *or; +#define TESTWORDS 256 + +void report(char *in){ + fprintf(stderr,"%s",in); + exit(1); +} + +int getbyte(ogg_reference *or,int position){ + while(or && position>=or->length){ + position-=or->length; + or=or->next; + if(or==NULL){ + fprintf(stderr,"\n\tERROR: getbyte ran off end of buffer.\n"); + exit(1); + } + } + + if((position+or->begin)&1) + return (or->buffer->data[(position+or->begin)>>1])&0xff; + else + return (or->buffer->data[(position+or->begin)>>1]>>8)&0xff; +} + +void cliptest(unsigned long *b,int vals,int bits,int *comp,int compsize){ + long i,bitcount=0; + ogg_reference *or=ogg_buffer_alloc(bs,64); + for(i=0;i<compsize;i++) + or->buffer->data[i]= comp[i]; + or->length=i; + + oggpack_readinit(&r,or); + for(i=0;i<vals;i++){ + unsigned long test; + int tbit=bits?bits:ilog(b[i]); + if((test=oggpack_look(&r,tbit))==0xffffffff) + report("out of data!\n"); + if(test!=(b[i]&mask[tbit])){ + fprintf(stderr,"%ld) %lx %lx\n",i,(b[i]&mask[tbit]),test); + report("looked at incorrect value!\n"); + } + if((test=oggpack_read(&r,tbit))==0xffffffff){ + report("premature end of data when reading!\n"); + } + if(test!=(b[i]&mask[tbit])){ + fprintf(stderr,"%ld) %lx %lx\n",i,(b[i]&mask[tbit]),test); + report("read incorrect value!\n"); + } + bitcount+=tbit; + + if(bitcount!=oggpack_bits(&r)) + report("wrong number of bits while reading!\n"); + if((bitcount+7)/8!=oggpack_bytes(&r)) + report("wrong number of bytes while reading!\n"); + + } + if(oggpack_bytes(&r)!=(bitcount+7)/8){ + fprintf(stderr, "%d vs %d\n", oggpack_bytes(&r), (bitcount+7)/8); + report("leftover bytes after read!\n"); + } + ogg_buffer_release(or); +} + +void _end_verify(int count){ + int i; + + /* are the proper number of bits left over? */ + int leftover=count*8-oggpack_bits(&o); + if(leftover>7) + report("\nERROR: too many bits reported left over.\n"); + + /* does reading to exactly byte alignment *not* trip EOF? */ + if(oggpack_read(&o,leftover)==-1) + report("\nERROR: read to but not past exact end tripped EOF.\n"); + if(oggpack_bits(&o)!=count*8) + report("\nERROR: read to but not past exact end reported bad bitcount.\n"); + + /* does EOF trip properly after a single additional bit? */ + if(oggpack_read(&o,1)!=-1) + report("\nERROR: read past exact end did not trip EOF.\n"); + if(oggpack_bits(&o)!=count*8) + report("\nERROR: read past exact end reported bad bitcount.\n"); + + /* does EOF stay set over additional bit reads? */ + for(i=0;i<=32;i++){ + if(oggpack_read(&o,i)!=-1) + report("\nERROR: EOF did not stay set on stream.\n"); + if(oggpack_bits(&o)!=count*8) + report("\nERROR: read past exact end reported bad bitcount.\n"); + } +} + +void _end_verify2(int count){ + int i; + + /* are the proper number of bits left over? */ + int leftover=count*8-oggpack_bits(&o); + if(leftover>7) + report("\nERROR: too many bits reported left over.\n"); + + /* does reading to exactly byte alignment *not* trip EOF? */ + oggpack_adv(&o,leftover); +#ifdef ARM_LITTLE_ENDIAN + if(o.bitsLeftInSegment!=0) +#else + if(o.headend!=0) +#endif + report("\nERROR: read to but not past exact end tripped EOF.\n"); + if(oggpack_bits(&o)!=count*8) + report("\nERROR: read to but not past exact end reported bad bitcount.\n"); + + /* does EOF trip properly after a single additional bit? */ + oggpack_adv(&o,1); +#ifdef ARM_LITTLE_ENDIAN + if(o.bitsLeftInSegment>=0) +#else + if(o.headend>=0) +#endif + report("\nERROR: read past exact end did not trip EOF.\n"); + if(oggpack_bits(&o)!=count*8) + report("\nERROR: read past exact end reported bad bitcount.\n"); + + /* does EOF stay set over additional bit reads? */ + for(i=0;i<=32;i++){ + oggpack_adv(&o,i); +#ifdef ARM_LITTLE_ENDIAN + if(o.bitsLeftInSegment>=0) +#else + if(o.headend>=0) +#endif + report("\nERROR: EOF did not stay set on stream.\n"); + if(oggpack_bits(&o)!=count*8) + report("\nERROR: read past exact end reported bad bitcount.\n"); + } +} + +long ogg_buffer_length(ogg_reference *or){ + int count=0; + while(or){ + count+=or->length; + or=or->next; + } + return count; +} + +ogg_reference *ogg_buffer_extend(ogg_reference *or,long bytes){ + if(or){ + while(or->next){ + or=or->next; + } + or->next=ogg_buffer_alloc(or->buffer->ptr.owner,bytes); + return(or->next); + } + return 0; +} + +void ogg_buffer_posttruncate(ogg_reference *or,long pos){ + /* walk to the point where we want to begin truncate */ + while(or && pos>or->length){ + pos-=or->length; + or=or->next; + } + if(or){ + ogg_buffer_release(or->next); + or->next=0; + or->length=pos; + } +} + +int main(void){ + long i; + static unsigned long testbuffer1[]= + {18,12,103948,4325,543,76,432,52,3,65,4,56,32,42,34,21,1,23,32,546,456,7, + 567,56,8,8,55,3,52,342,341,4,265,7,67,86,2199,21,7,1,5,1,4}; + int test1size=43; + + static unsigned long testbuffer2[]= + {216531625L,1237861823,56732452,131,3212421,12325343,34547562,12313212, + 1233432,534,5,346435231,14436467,7869299,76326614,167548585, + 85525151,0,12321,1,349528352}; + int test2size=21; + + static unsigned long testbuffer3[]= + {1,0,14,0,1,0,12,0,1,0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,1,1,1,0,0,1, + 0,1,30,1,1,1,0,0,1,0,0,0,12,0,11,0,1,0,0,1}; + int test3size=56; + + static unsigned long large[]= + {2136531625L,2137861823,56732452,131,3212421,12325343,34547562,12313212, + 1233432,534,5,2146435231,14436467,7869299,76326614,167548585, + 85525151,0,12321,1,2146528352}; + + int onesize=33; + static int one[33]={146,25,44,151,195,15,153,176,233,131,196,65,85,172,47,40, + 34,242,223,136,35,222,211,86,171,50,225,135,214,75,172, + 223,4}; + + int twosize=6; + static int two[6]={61,255,255,251,231,29}; + + int threesize=54; + static int three[54]={169,2,232,252,91,132,156,36,89,13,123,176,144,32,254, + 142,224,85,59,121,144,79,124,23,67,90,90,216,79,23,83, + 58,135,196,61,55,129,183,54,101,100,170,37,127,126,10, + 100,52,4,14,18,86,77,1}; + + int foursize=38; + static int four[38]={18,6,163,252,97,194,104,131,32,1,7,82,137,42,129,11,72, + 132,60,220,112,8,196,109,64,179,86,9,137,195,208,122,169, + 28,2,133,0,1}; + + int fivesize=45; + static int five[45]={169,2,126,139,144,172,30,4,80,72,240,59,130,218,73,62, + 241,24,210,44,4,20,0,248,116,49,135,100,110,130,181,169, + 84,75,159,2,1,0,132,192,8,0,0,18,22}; + + int sixsize=7; + static int six[7]={17,177,170,242,169,19,148}; + + /* Test read/write together */ + /* Later we test against pregenerated bitstreams */ + bs=ogg_buffer_create(); + + fprintf(stderr,"\nSmall preclipped packing (LSb): "); + cliptest(testbuffer1,test1size,0,one,onesize); + fprintf(stderr,"ok."); + + fprintf(stderr,"\nNull bit call (LSb): "); + cliptest(testbuffer3,test3size,0,two,twosize); + fprintf(stderr,"ok."); + + fprintf(stderr,"\nLarge preclipped packing (LSb): "); + cliptest(testbuffer2,test2size,0,three,threesize); + fprintf(stderr,"ok."); + + fprintf(stderr,"\n32 bit preclipped packing (LSb): "); + + or=ogg_buffer_alloc(bs,128); + for(i=0;i<test2size;i++){ + or->buffer->data[i*4] = large[i]&0xff; + or->buffer->data[i*4+1] = (large[i]>>8)&0xff; + or->buffer->data[i*4+2] = (large[i]>>16)&0xff; + or->buffer->data[i*4+3] = (large[i]>>24)&0xff; + } + or->length=test2size*4; + oggpack_readinit(&r,or); + for(i=0;i<test2size;i++){ + unsigned long test; + if((test=oggpack_look(&r,32))==0xffffffffUL)report("out of data. failed!"); + if(test!=large[i]){ + fprintf(stderr,"%ld != %ld (%lx!=%lx):",test,large[i], + test,large[i]); + report("read incorrect value!\n"); + } + oggpack_adv(&r,32); + } + ogg_buffer_release(or); + if(oggpack_bytes(&r)!=test2size*4){ + fprintf(stderr, "%d vs %d\n", oggpack_bytes(&r), test2size*4); + report("leftover bytes after read!\n"); + } + fprintf(stderr,"ok."); + + fprintf(stderr,"\nSmall unclipped packing (LSb): "); + cliptest(testbuffer1,test1size,7,four,foursize); + fprintf(stderr,"ok."); + + fprintf(stderr,"\nLarge unclipped packing (LSb): "); + cliptest(testbuffer2,test2size,17,five,fivesize); + fprintf(stderr,"ok."); + + fprintf(stderr,"\nSingle bit unclipped packing (LSb): "); + cliptest(testbuffer3,test3size,1,six,sixsize); + fprintf(stderr,"ok."); + + fprintf(stderr,"\nTesting read past end (LSb): "); + { + unsigned char dda[]={0,0,0,0}; + ogg_buffer lob={dda,8,0,{0}}; + ogg_reference lor={&lob,0,8,0}; + + oggpack_readinit(&r,&lor); + for(i=0;i<64;i++){ + if(oggpack_read(&r,1)<0){ + fprintf(stderr,"failed; got -1 prematurely.\n"); + exit(1); + } + } + if(oggpack_look(&r,1)!=-1 || + oggpack_read(&r,1)!=-1){ + fprintf(stderr,"failed; read past end without -1.\n"); + exit(1); + } + } + { + unsigned char dda[]={0,0,0,0}; + ogg_buffer lob={dda,8,0,{0}}; + ogg_reference lor={&lob,0,8,0}; + unsigned long test; + + oggpack_readinit(&r,&lor); + if((test=oggpack_read(&r,30))==0xffffffffUL || + (test=oggpack_read(&r,16))==0xffffffffUL){ + fprintf(stderr,"failed 2; got -1 prematurely.\n"); + exit(1); + } + + if((test=oggpack_look(&r,18))==0xffffffffUL){ + fprintf(stderr,"failed 3; got -1 prematurely.\n"); + exit(1); + } + if((test=oggpack_look(&r,19))!=0xffffffffUL){ + fprintf(stderr,"failed; read past end without -1.\n"); + exit(1); + } + if((test=oggpack_look(&r,32))!=0xffffffffUL){ + fprintf(stderr,"failed; read past end without -1.\n"); + exit(1); + } + } + fprintf(stderr,"ok.\n"); + + /* now the scary shit: randomized testing */ + + for(i=0;i<10000;i++){ + long j,count=0,count2=0,bitcount=0; + unsigned long values[TESTWORDS]; + int len[TESTWORDS]; + unsigned char flat[4*TESTWORDS]; /* max possible needed size */ + + memset(flat,0,sizeof(flat)); + fprintf(stderr,"\rRandomized testing (LSb)... (%ld) ",10000-i); + + /* generate a list of words and lengths */ + /* write the required number of bits out to packbuffer */ + { + long word=0; + long bit=0; + int k; + + for(j=0;j<TESTWORDS;j++){ + values[j]=rand(); + len[j]=(rand()%33); + + for(k=0;k<len[j];k++){ + flat[word] |= ((values[j]>>k)&0x1)<<bit; + bit++; + bitcount++; + if(bit>7){ + bit=0; + word++; + } + } + } + } + count2=(bitcount+7)>>3; + + /* construct random-length buffer chain from flat vector; random + byte starting offset within the length of the vector */ + { + ogg_reference *or=NULL,*orl=NULL; + long pos=0; + + /* build buffer chain */ + while(count2){ + int ilen=(rand()%32),k; + int ibegin=(rand()%32); + + + if(ilen>count2)ilen=count2; + + if(or) + orl=ogg_buffer_extend(orl,64); + else + or=orl=ogg_buffer_alloc(bs,64); + + orl->length=ilen; + orl->begin=ibegin; + + for(k=0;k<ilen;k++) + orl->buffer->data[ibegin++]= flat[pos++]; + + count2-=ilen; + } + + if(ogg_buffer_length(or)!=(bitcount+7)/8){ + fprintf(stderr,"\nERROR: buffer length incorrect after build.\n"); + exit(1); + } + + + { + int begin=0; //=(rand()%TESTWORDS); + int ilen=(rand()%(TESTWORDS-begin)); + int bitoffset,bitcount=0; + unsigned long temp; + + for(j=0;j<begin;j++) + bitcount+=len[j]; + or=ogg_buffer_pretruncate(or,bitcount/8); + bitoffset=bitcount%=8; + for(;j<begin+ilen;j++) + bitcount+=len[j]; + ogg_buffer_posttruncate(or,((bitcount+7)/8)); + + if((count=ogg_buffer_length(or))!=(bitcount+7)/8){ + fprintf(stderr,"\nERROR: buffer length incorrect after truncate.\n"); + exit(1); + } + + oggpack_readinit(&o,or); + + /* verify bit count */ + if(oggpack_bits(&o)!=0){ + fprintf(stderr,"\nERROR: Read bitcounter not zero!\n"); + exit(1); + } + if(oggpack_bytes(&o)!=0){ + fprintf(stderr,"\nERROR: Read bytecounter not zero!\n"); + exit(1); + } + + bitcount=bitoffset; + oggpack_read(&o,bitoffset); + + /* read and compare to original list */ + for(j=begin;j<begin+ilen;j++){ + temp=oggpack_read(&o,len[j]); + if(temp==0xffffffffUL){ + fprintf(stderr,"\nERROR: End of stream too soon! word: %ld,%d\n", + j-begin,ilen); + exit(1); + } + if(temp!=(values[j]&mask[len[j]])){ + fprintf(stderr,"\nERROR: Incorrect read %lx != %lx, word %ld, len %d\n" +, + values[j]&mask[len[j]],temp,j-begin,len[j]); + exit(1); + } + bitcount+=len[j]; + if(oggpack_bits(&o)!=bitcount){ + fprintf(stderr,"\nERROR: Read bitcounter %d != %ld!\n", + bitcount,oggpack_bits(&o)); + exit(1); + } + if(oggpack_bytes(&o)!=(bitcount+7)/8){ + fprintf(stderr,"\nERROR: Read bytecounter %d != %ld!\n", + (bitcount+7)/8,oggpack_bytes(&o)); + exit(1); + } + + } + _end_verify(count); + + /* look/adv version */ + oggpack_readinit(&o,or); + bitcount=bitoffset; + oggpack_adv(&o,bitoffset); + + /* read and compare to original list */ + for(j=begin;j<begin+ilen;j++){ + temp=oggpack_look(&o,len[j]); + + if(temp==0xffffffffUL){ + fprintf(stderr,"\nERROR: End of stream too soon! word: %ld\n", + j-begin); + exit(1); + } + if(temp!=(values[j]&mask[len[j]])){ + fprintf(stderr,"\nERROR: Incorrect look %lx != %lx, word %ld, len %d\n" +, + values[j]&mask[len[j]],temp,j-begin,len[j]); + exit(1); + } + oggpack_adv(&o,len[j]); + bitcount+=len[j]; + if(oggpack_bits(&o)!=bitcount){ + fprintf(stderr,"\nERROR: Look/Adv bitcounter %d != %ld!\n", + bitcount,oggpack_bits(&o)); + exit(1); + } + if(oggpack_bytes(&o)!=(bitcount+7)/8){ + fprintf(stderr,"\nERROR: Look/Adv bytecounter %d != %ld!\n", + (bitcount+7)/8,oggpack_bytes(&o)); + exit(1); + } + + } + _end_verify2(count); + + } + ogg_buffer_release(or); + } + } + fprintf(stderr,"\rRandomized testing (LSb)... ok. \n"); + + return(0); +} + +#ifdef _WIN32_WCE +int WinMain(void){ + return main(); +} +#endif + +#endif diff --git a/ohos-specific/tremolo/Tremolo/bitwiseARM.s b/ohos-specific/tremolo/Tremolo/bitwiseARM.s new file mode 100644 index 0000000000..5805977622 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/bitwiseARM.s @@ -0,0 +1,399 @@ +@ Tremolo library +@----------------------------------------------------------------------- +@ Copyright (C) 2002-2009, Xiph.org Foundation +@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd +@ All rights reserved. + +@ Redistribution and use in source and binary forms, with or without +@ modification, are permitted provided that the following conditions +@ are met: + +@ * Redistributions of source code must retain the above copyright +@ notice, this list of conditions and the following disclaimer. +@ * Redistributions in binary form must reproduce the above +@ copyright notice, this list of conditions and the following disclaimer +@ in the documentation and/or other materials provided with the +@ distribution. +@ * Neither the names of the Xiph.org Foundation nor Pinknoise +@ Productions Ltd nor the names of its contributors may be used to +@ endorse or promote products derived from this software without +@ specific prior written permission. +@ +@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@ ---------------------------------------------------------------------- + + .text + + .global oggpack_look + .global oggpack_adv + .global oggpack_readinit + .global oggpack_read + +oggpack_look: + @ r0 = oggpack_buffer *b + @ r1 = int bits + STMFD r13!,{r10,r11,r14} + LDMIA r0,{r2,r3,r12} + @ r2 = bitsLeftInSegment + @ r3 = ptr + @ r12= bitsLeftInWord + SUBS r2,r2,r1 @ bitsLeftinSegment -= bits + BLT look_slow @ Not enough bits in this segment for + @ this request. Do it slowly. + LDR r10,[r3] @ r10= ptr[0] + RSB r14,r12,#32 @ r14= 32-bitsLeftInWord + SUBS r12,r12,r1 @ r12= bitsLeftInWord -= bits + LDRLT r11,[r3,#4]! @ r11= ptr[1] + MOV r10,r10,LSR r14 @ r10= ptr[0]>>(32-bitsLeftInWord) + ADDLE r12,r12,#32 @ r12= bitsLeftInWord += 32 + RSB r14,r14,#32 @ r14= 32-bitsLeftInWord + ORRLT r10,r10,r11,LSL r14 @ r10= Next 32 bits. + MOV r14,#1 + RSB r14,r14,r14,LSL r1 + AND r0,r10,r14 + LDMFD r13!,{r10,r11,PC} + +look_slow: + STMFD r13!,{r5,r6} + ADDS r10,r2,r1 @ r10= bitsLeftInSegment + bits (i.e. + @ the initial value of bitsLeftInSeg) + @ r10 = bitsLeftInSegment (initial) + @ r12 = bitsLeftInWord + RSB r14,r12,#32 @ r14= 32-bitsLeftInWord + MOV r5,r10 @ r5 = bitsLeftInSegment (initial) + BLT look_overrun + BEQ look_next_segment @ r10= r12 = 0, if we branch + CMP r12,r10 @ If bitsLeftInWord < bitsLeftInSeg + @ there must be more in the next word + LDR r10,[r3],#4 @ r10= ptr[0] + LDRLT r6,[r3] @ r6 = ptr[1] + MOV r11,#1 + MOV r10,r10,LSR r14 @ r10= first bitsLeftInWord bits + ORRLT r10,r10,r6,LSL r12 @ r10= first bitsLeftInSeg bits+crap + RSB r11,r11,r11,LSL r5 @ r11= mask + AND r10,r10,r11 @ r10= first r5 bits + @ Load the next segments data +look_next_segment: + @ At this point, r10 contains the first r5 bits of the result + LDR r11,[r0,#12] @ r11= head = b->head + @ Stall + @ Stall +look_next_segment_2: + LDR r11,[r11,#12] @ r11= head = head->next + @ Stall + @ Stall + CMP r11,#0 + BEQ look_out_of_data + LDMIA r11,{r6,r12,r14} @ r6 = buffer + @ r12= begin + @ r14= length + LDR r6,[r6] @ r6 = buffer->data + CMP r14,#0 + BEQ look_next_segment_2 + ADD r6,r6,r12 @ r6 = buffer->data+begin +look_slow_loop: + LDRB r12,[r6],#1 @ r12= *buffer + SUBS r14,r14,#1 @ r14= length + @ Stall + ORR r10,r10,r12,LSL r5 @ r10= first r5+8 bits + ADD r5,r5,#8 + BLE look_really_slow + CMP r5,r1 + BLT look_slow_loop + MOV r14,#1 + RSB r14,r14,r14,LSL r1 + AND r0,r10,r14 + LDMFD r13!,{r5,r6,r10,r11,PC} + + +look_really_slow: + CMP r5,r1 + BLT look_next_segment_2 + MOV r14,#1 + RSB r14,r14,r14,LSL r1 + AND r0,r10,r14 + LDMFD r13!,{r5,r6,r10,r11,PC} + +look_out_of_data: + @MVN r0,#0 ; return -1 + MOV r0,#0 + LDMFD r13!,{r5,r6,r10,r11,PC} + +look_overrun: + @ We had overrun when we started, so we need to skip -r10 bits. + LDR r11,[r0,#12] @ r11 = head = b->head + @ stall + @ stall +look_overrun_next_segment: + LDR r11,[r11,#12] @ r11 = head->next + @ stall + @ stall + CMP r11,#0 + BEQ look_out_of_data + LDMIA r11,{r6,r7,r14} @ r6 = buffer + @ r7 = begin + @ r14= length + LDR r6,[r6] @ r6 = buffer->data + @ stall + @ stall + ADD r6,r6,r7 @ r6 = buffer->data+begin + MOV r14,r14,LSL #3 @ r14= length in bits + ADDS r14,r14,r10 @ r14= length in bits-bits to skip + MOVLE r10,r14 + BLE look_overrun_next_segment + RSB r10,r10,#0 @ r10= bits to skip + ADD r6,r10,r10,LSR #3 @ r6 = pointer to data + MOV r10,#0 + B look_slow_loop + +oggpack_adv: + @ r0 = oggpack_buffer *b + @ r1 = bits + LDMIA r0,{r2,r3,r12} + @ r2 = bitsLeftInSegment + @ r3 = ptr + @ r12= bitsLeftInWord + SUBS r2,r2,r1 @ Does this run us out of bits in the + BLE adv_slow @ segment? If so, do it slowly + SUBS r12,r12,r1 + ADDLE r12,r12,#32 + ADDLE r3,r3,#4 + STMIA r0,{r2,r3,r12} + BX LR +adv_slow: + STMFD r13!,{r10,r14} + + LDR r14,[r0,#12] @ r14= head + @ stall +adv_slow_loop: + LDR r1,[r0,#20] @ r1 = count + LDR r10,[r14,#8] @ r10= head->length + LDR r14,[r14,#12] @ r14= head->next + @ stall + ADD r1,r1,r10 @ r1 = count += head->length + CMP r14,#0 + BEQ adv_end + STR r1,[r0,#20] @ b->count = count + STR r14,[r0,#12] @ b->head = head + LDMIA r14,{r3,r10,r12} @ r3 = buffer + @ r10= begin + @ r12= length + LDR r3,[r3] @ r3 = buffer->data + ADD r3,r3,r10 @ r3 = Pointer to start (byte) + AND r10,r3,#3 @ r10= bytes to backtrk to word align + MOV r10,r10,LSL #3 @ r10= bits to backtrk to word align + RSB r10,r10,#32 @ r10= bits left in word + ADDS r10,r10,r2 @ r10= bits left in word after skip + ADDLE r10,r10,#32 + ADDLE r3,r3,#4 + BIC r3,r3,#3 @ r3 = Pointer to start (word) + ADDS r2,r2,r12,LSL #3 @ r2 = length in bits after advance + BLE adv_slow_loop + STMIA r0,{r2,r3,r10} + + LDMFD r13!,{r10,PC} +adv_end: + MOV r2, #0 + MOV r12,#0 + STMIA r0,{r2,r3,r12} + + LDMFD r13!,{r10,PC} + +oggpack_readinit: + @ r0 = oggpack_buffer *b + @ r1 = oggreference *r + STR r1,[r0,#12] @ b->head = r1 + STR r1,[r0,#16] @ b->tail = r1 + LDMIA r1,{r2,r3,r12} @ r2 = b->head->buffer + @ r3 = b->head->begin + @ r12= b->head->length + LDR r2,[r2] @ r2 = b->head->buffer->data + MOV r1,r12,LSL #3 @ r1 = BitsInSegment + MOV r12,#0 + ADD r3,r2,r3 @ r3 = r2+b->head->begin + BIC r2,r3,#3 @ r2 = b->headptr (word) + AND r3,r3,#3 + MOV r3,r3,LSL #3 + RSB r3,r3,#32 @ r3 = BitsInWord + STMIA r0,{r1,r2,r3} + STR r12,[r0,#20] + BX LR + +oggpack_read: + @ r0 = oggpack_buffer *b + @ r1 = int bits + STMFD r13!,{r10,r11,r14} + LDMIA r0,{r2,r3,r12} + @ r2 = bitsLeftInSegment + @ r3 = ptr + @ r12= bitsLeftInWord + SUBS r2,r2,r1 @ bitsLeftinSegment -= bits + BLT read_slow @ Not enough bits in this segment for + @ this request. Do it slowly. + LDR r10,[r3] @ r10= ptr[0] + RSB r14,r12,#32 @ r14= 32-bitsLeftInWord + SUBS r12,r12,r1 @ r12= bitsLeftInWord -= bits + ADDLE r3,r3,#4 + LDRLT r11,[r3] @ r11= ptr[1] + MOV r10,r10,LSR r14 @ r10= ptr[0]>>(32-bitsLeftInWord) + ADDLE r12,r12,#32 @ r12= bitsLeftInWord += 32 + RSB r14,r14,#32 @ r14= 32-bitsLeftInWord + ORRLT r10,r10,r11,LSL r14 @ r10= Next 32 bits. + STMIA r0,{r2,r3,r12} + MOV r14,#1 + RSB r14,r14,r14,LSL r1 + AND r0,r10,r14 + LDMFD r13!,{r10,r11,PC} + +read_slow: + STMFD r13!,{r5,r6} + ADDS r10,r2,r1 @ r10= bitsLeftInSegment + bits (i.e. + @ the initial value of bitsLeftInSeg) + @ r10 = bitsLeftInSegment (initial) + @ r12 = bitsLeftInWord + RSB r14,r12,#32 @ r14= 32-bitsLeftInWord + MOV r5,r10 @ r5 = bitsLeftInSegment (initial) + BLT read_overrun + BEQ read_next_segment @ r10= r12 = 0, if we branch + CMP r12,r10 @ If bitsLeftInWord < bitsLeftInSeg + @ there must be more in the next word + LDR r10,[r3],#4 @ r10= ptr[0] + LDRLT r6,[r3] @ r6 = ptr[1] + MOV r11,#1 + MOV r10,r10,LSR r14 @ r10= first bitsLeftInWord bits + ORRLT r10,r10,r6,LSL r12 @ r10= first bitsLeftInSeg bits+crap + RSB r11,r11,r11,LSL r5 @ r11= mask + AND r10,r10,r11 @ r10= first r5 bits + @ Load the next segments data +read_next_segment: + @ At this point, r10 contains the first r5 bits of the result + LDR r11,[r0,#12] @ r11= head = b->head + @ Stall +read_next_segment_2: + @ r11 = head + LDR r6,[r0,#20] @ r6 = count + LDR r12,[r11,#8] @ r12= length + LDR r11,[r11,#12] @ r11= head = head->next + @ Stall + ADD r6,r6,r12 @ count += length + CMP r11,#0 + BEQ read_out_of_data + STR r11,[r0,#12] + STR r6,[r0,#20] @ b->count = count + LDMIA r11,{r6,r12,r14} @ r6 = buffer + @ r12= begin + @ r14= length + LDR r6,[r6] @ r6 = buffer->data + CMP r14,#0 + BEQ read_next_segment_2 + ADD r6,r6,r12 @ r6 = buffer->data+begin +read_slow_loop: + LDRB r12,[r6],#1 @ r12= *buffer + SUBS r14,r14,#1 @ r14= length + @ Stall + ORR r10,r10,r12,LSL r5 @ r10= first r5+8 bits + ADD r5,r5,#8 + BLE read_really_slow + CMP r5,r1 + BLT read_slow_loop +read_end: + MOV r12,#1 + RSB r12,r12,r12,LSL r1 + + @ Store back the new position + @ r2 = -number of bits to go from this segment + @ r6 = ptr + @ r14= bytesLeftInSegment + @ r11= New head value + LDMIA r11,{r3,r6,r14} @ r3 = buffer + @ r6 = begin + @ r14= length + LDR r3,[r3] @ r3 = buffer->data + ADD r1,r2,r14,LSL #3 @ r1 = bitsLeftInSegment + @ stall + ADD r6,r3,r6 @ r6 = pointer + AND r3,r6,#3 @ r3 = bytes used in first word + RSB r3,r2,r3,LSL #3 @ r3 = bits used in first word + BIC r2,r6,#3 @ r2 = word ptr + RSBS r3,r3,#32 @ r3 = bitsLeftInWord + ADDLE r3,r3,#32 + ADDLE r2,r2,#4 + STMIA r0,{r1,r2,r3} + + AND r0,r10,r12 + LDMFD r13!,{r5,r6,r10,r11,PC} + + +read_really_slow: + CMP r5,r1 + BGE read_end + LDR r14,[r11,#8] @ r14= length of segment just done + @ stall + @ stall + ADD r2,r2,r14,LSL #3 @ r2 = -bits to use from next seg + B read_next_segment_2 + +read_out_of_data: + @ Store back the new position + @ r2 = -number of bits to go from this segment + @ r6 = ptr + @ r14= bytesLeftInSegment + @ RJW: This may be overkill - we leave the buffer empty, with -1 + @ bits left in it. We might get away with just storing the + @ bitsLeftInSegment as -1. + LDR r11,[r0,#12] @ r11=head + + LDMIA r11,{r3,r6,r14} @ r3 = buffer + @ r6 = begin + @ r14= length + LDR r3,[r3] @ r3 = buffer->data + ADD r6,r3,r6 @ r6 = pointer + ADD r6,r6,r14 + AND r3,r6,#3 @ r3 = bytes used in first word + MOV r3,r3,LSL #3 @ r3 = bits used in first word + BIC r2,r6,#3 @ r2 = word ptr + RSBS r3,r3,#32 @ r3 = bitsLeftInWord + MVN r1,#0 @ r1 = -1 = bitsLeftInSegment + STMIA r0,{r1,r2,r3} + @MVN r0,#0 ; return -1 + MOV r0,#0 + LDMFD r13!,{r5,r6,r10,r11,PC} + +read_overrun: + @ We had overrun when we started, so we need to skip -r10 bits. + LDR r11,[r0,#12] @ r11 = head = b->head + @ stall + @ stall +read_overrun_next_segment: + LDR r11,[r11,#12] @ r11 = head->next + @ stall + @ stall + CMP r11,#0 + BEQ read_out_of_data + LDMIA r11,{r6,r7,r14} @ r6 = buffer + @ r7 = begin + @ r14= length + LDR r6,[r6] @ r6 = buffer->data + @ stall + @ stall + ADD r6,r6,r7 @ r6 = buffer->data+begin + MOV r14,r14,LSL #3 @ r14= length in bits + ADDS r14,r14,r10 @ r14= length in bits-bits to skip + MOVLE r10,r14 + BLE read_overrun_next_segment + RSB r10,r10,#0 @ r10= bits to skip + ADD r6,r10,r10,LSR #3 @ r6 = pointer to data + MOV r10,#0 + B read_slow_loop + + @ END diff --git a/ohos-specific/tremolo/Tremolo/codebook.c b/ohos-specific/tremolo/Tremolo/codebook.c new file mode 100644 index 0000000000..0dbcacc2f2 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/codebook.c @@ -0,0 +1,920 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: basic codebook pack/unpack/code/decode operations + + ************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include <math.h> +#include <limits.h> +// #include <log/log.h> +#include "ogg.h" +#include "ivorbiscodec.h" +#include "codebook.h" +#include "misc.h" +#include "os.h" + +#define MARKER_SIZE 33 + +/**** pack/unpack helpers ******************************************/ +int _ilog(unsigned int v){ + int ret=0; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +static ogg_uint32_t decpack(long entry,long used_entry,long quantvals, + codebook *b,oggpack_buffer *opb,int maptype){ + ogg_uint32_t ret=0; + int j; + + switch(b->dec_type){ + + case 0: + return (ogg_uint32_t)entry; + + case 1: + if(maptype==1){ + /* vals are already read into temporary column vector here */ + for(j=0;j<b->dim;j++){ + ogg_uint32_t off=entry%quantvals; + entry/=quantvals; + ret|=((ogg_uint16_t *)(b->q_val))[off]<<(b->q_bits*j); + } + }else{ + for(j=0;j<b->dim;j++) + ret|=oggpack_read(opb,b->q_bits)<<(b->q_bits*j); + } + return ret; + + case 2: + for(j=0;j<b->dim;j++){ + ogg_uint32_t off=entry%quantvals; + entry/=quantvals; + ret|=off<<(b->q_pack*j); + } + return ret; + + case 3: + return (ogg_uint32_t)used_entry; + + } + return 0; /* silence compiler */ +} + +/* 32 bit float (not IEEE; nonnormalized mantissa + + biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm + Why not IEEE? It's just not that important here. */ + +static ogg_int32_t _float32_unpack(long val,int *point){ + long mant=val&0x1fffff; + int sign=val&0x80000000; + + *point=((val&0x7fe00000L)>>21)-788; + + if(mant){ + while(!(mant&0x40000000)){ + mant<<=1; + *point-=1; + } + if(sign)mant= -mant; + }else{ + *point=-9999; + } + return mant; +} + +/* choose the smallest supported node size that fits our decode table. + Legal bytewidths are 1/1 1/2 2/2 2/4 4/4 */ +static int _determine_node_bytes(long used, int leafwidth){ + + /* special case small books to size 4 to avoid multiple special + cases in repack */ + if(used<2) + return 4; + + if(leafwidth==3)leafwidth=4; + if(_ilog(3*used-6)+1 <= leafwidth*4) + return leafwidth/2?leafwidth/2:1; + return leafwidth; +} + +/* convenience/clarity; leaves are specified as multiple of node word + size (1 or 2) */ +static int _determine_leaf_words(int nodeb, int leafwidth){ + if(leafwidth>nodeb)return 2; + return 1; +} + +/* given a list of word lengths, number of used entries, and byte + width of a leaf, generate the decode table */ +static int _make_words(char *l,long n,ogg_uint32_t *r,long quantvals, + codebook *b, oggpack_buffer *opb,int maptype){ + long i,j,count=0; + long top=0; + ogg_uint32_t marker[MARKER_SIZE]; + + if (n<1) + return 1; + + if(n<2){ + r[0]=0x80000000; + }else{ + memset(marker,0,sizeof(marker)); + + for(i=0;i<n;i++){ + long length=l[i]; + if(length){ + if (length < 0 || length >= MARKER_SIZE) { + //cjh ALOGE("b/23881715"); + return 1; + } + ogg_uint32_t entry=marker[length]; + long chase=0; + if(count && !entry)return -1; /* overpopulated tree! */ + + /* chase the tree as far as it's already populated, fill in past */ + for(j=0;j<length-1;j++){ + int bit=(entry>>(length-j-1))&1; + if(chase>=top){ + if (chase < 0 || chase >= n) return 1; + top++; + r[chase*2]=top; + r[chase*2+1]=0; + }else + if (chase < 0 || chase >= n || chase*2+bit > n*2+1) return 1; + if(!r[chase*2+bit]) + r[chase*2+bit]=top; + chase=r[chase*2+bit]; + if (chase < 0 || chase >= n) return 1; + } + { + int bit=(entry>>(length-j-1))&1; + if(chase>=top){ + top++; + r[chase*2+1]=0; + } + r[chase*2+bit]= decpack(i,count++,quantvals,b,opb,maptype) | + 0x80000000; + } + + /* Look to see if the next shorter marker points to the node + above. if so, update it and repeat. */ + for(j=length;j>0;j--){ + if(marker[j]&1){ + marker[j]=marker[j-1]<<1; + break; + } + marker[j]++; + } + + /* prune the tree; the implicit invariant says all the longer + markers were dangling from our just-taken node. Dangle them + from our *new* node. */ + for(j=length+1;j<MARKER_SIZE;j++) + if((marker[j]>>1) == entry){ + entry=marker[j]; + marker[j]=marker[j-1]<<1; + }else + break; + } + } + } + + // following sanity check copied from libvorbis + /* sanity check the huffman tree; an underpopulated tree must be + rejected. The only exception is the one-node pseudo-nil tree, + which appears to be underpopulated because the tree doesn't + really exist; there's only one possible 'codeword' or zero bits, + but the above tree-gen code doesn't mark that. */ + if(b->used_entries != 1){ + for(i=1;i<MARKER_SIZE;i++) + if(marker[i] & (0xffffffffUL>>(32-i))){ + return 1; + } + } + + + return 0; +} + +static int _make_decode_table(codebook *s,char *lengthlist,long quantvals, + oggpack_buffer *opb,int maptype){ + int i; + ogg_uint32_t *work; + + if (!lengthlist) return 1; + if(s->dec_nodeb==4){ + /* Over-allocate by using s->entries instead of used_entries. + * This means that we can use s->entries to enforce size in + * _make_words without messing up length list looping. + * This probably wastes a bit of space, but it shouldn't + * impact behavior or size too much. + */ + s->dec_table=_ogg_malloc((s->entries*2+1)*sizeof(*work)); + if (!s->dec_table) return 1; + /* +1 (rather than -2) is to accommodate 0 and 1 sized books, + which are specialcased to nodeb==4 */ + if(_make_words(lengthlist,s->entries, + s->dec_table,quantvals,s,opb,maptype))return 1; + + return 0; + } + + if (s->used_entries > INT_MAX/2 || + s->used_entries*2 > INT_MAX/((long) sizeof(*work)) - 1) return 1; + /* Overallocate as above */ + work=calloc((s->entries*2+1),sizeof(*work)); + if (!work) return 1; + if(_make_words(lengthlist,s->entries,work,quantvals,s,opb,maptype)) goto error_out; + if (s->used_entries > INT_MAX/(s->dec_leafw+1)) goto error_out; + if (s->dec_nodeb && s->used_entries * (s->dec_leafw+1) > INT_MAX/s->dec_nodeb) goto error_out; + s->dec_table=_ogg_malloc((s->used_entries*(s->dec_leafw+1)-2)* + s->dec_nodeb); + if (!s->dec_table) goto error_out; + + if(s->dec_leafw==1){ + switch(s->dec_nodeb){ + case 1: + for(i=0;i<s->used_entries*2-2;i++) + ((unsigned char *)s->dec_table)[i]=(unsigned char) + (((work[i] & 0x80000000UL) >> 24) | work[i]); + break; + case 2: + for(i=0;i<s->used_entries*2-2;i++) + ((ogg_uint16_t *)s->dec_table)[i]=(ogg_uint16_t) + (((work[i] & 0x80000000UL) >> 16) | work[i]); + break; + } + + }else{ + /* more complex; we have to do a two-pass repack that updates the + node indexing. */ + long top=s->used_entries*3-2; + if(s->dec_nodeb==1){ + unsigned char *out=(unsigned char *)s->dec_table; + + for(i=s->used_entries*2-4;i>=0;i-=2){ + if(work[i]&0x80000000UL){ + if(work[i+1]&0x80000000UL){ + top-=4; + out[top]=(work[i]>>8 & 0x7f)|0x80; + out[top+1]=(work[i+1]>>8 & 0x7f)|0x80; + out[top+2]=work[i] & 0xff; + out[top+3]=work[i+1] & 0xff; + }else{ + top-=3; + out[top]=(work[i]>>8 & 0x7f)|0x80; + out[top+1]=work[work[i+1]*2]; + out[top+2]=work[i] & 0xff; + } + }else{ + if(work[i+1]&0x80000000UL){ + top-=3; + out[top]=work[work[i]*2]; + out[top+1]=(work[i+1]>>8 & 0x7f)|0x80; + out[top+2]=work[i+1] & 0xff; + }else{ + top-=2; + out[top]=work[work[i]*2]; + out[top+1]=work[work[i+1]*2]; + } + } + work[i]=top; + } + }else{ + ogg_uint16_t *out=(ogg_uint16_t *)s->dec_table; + for(i=s->used_entries*2-4;i>=0;i-=2){ + if(work[i]&0x80000000UL){ + if(work[i+1]&0x80000000UL){ + top-=4; + out[top]=(work[i]>>16 & 0x7fff)|0x8000; + out[top+1]=(work[i+1]>>16 & 0x7fff)|0x8000; + out[top+2]=work[i] & 0xffff; + out[top+3]=work[i+1] & 0xffff; + }else{ + top-=3; + out[top]=(work[i]>>16 & 0x7fff)|0x8000; + out[top+1]=work[work[i+1]*2]; + out[top+2]=work[i] & 0xffff; + } + }else{ + if(work[i+1]&0x80000000UL){ + top-=3; + out[top]=work[work[i]*2]; + out[top+1]=(work[i+1]>>16 & 0x7fff)|0x8000; + out[top+2]=work[i+1] & 0xffff; + }else{ + top-=2; + out[top]=work[work[i]*2]; + out[top+1]=work[work[i+1]*2]; + } + } + work[i]=top; + } + } + } + + free(work); + return 0; +error_out: + free(work); + return 1; +} + +/* most of the time, entries%dimensions == 0, but we need to be + well defined. We define that the possible vales at each + scalar is values == entries/dim. If entries%dim != 0, we'll + have 'too few' values (values*dim<entries), which means that + we'll have 'left over' entries; left over entries use zeroed + values (and are wasted). So don't generate codebooks like + that */ +/* there might be a straightforward one-line way to do the below + that's portable and totally safe against roundoff, but I haven't + thought of it. Therefore, we opt on the side of caution */ +long _book_maptype1_quantvals(codebook *b){ + /* get us a starting hint, we'll polish it below */ + int bits=_ilog(b->entries); + int vals=b->entries>>((bits-1)*(b->dim-1)/b->dim); + + while(1){ + long acc=1; + long acc1=1; + int i; + for(i=0;i<b->dim;i++){ + acc*=vals; + acc1*=vals+1; + } + if(acc<=b->entries && acc1>b->entries){ + return(vals); + }else{ + if(acc>b->entries){ + vals--; + }else{ + vals++; + } + } + } +} + +void vorbis_book_clear(codebook *b){ + /* static book is not cleared; we're likely called on the lookup and + the static codebook belongs to the info struct */ + if(b->q_val)_ogg_free(b->q_val); + if(b->dec_table)_ogg_free(b->dec_table); + if(b->dec_buf)_ogg_free(b->dec_buf); + + memset(b,0,sizeof(*b)); +} + +int vorbis_book_unpack(oggpack_buffer *opb,codebook *s){ + char *lengthlist=NULL; + int quantvals=0; + long i,j; + int maptype; + + memset(s,0,sizeof(*s)); + + /* make sure alignment is correct */ + if(oggpack_read(opb,24)!=0x564342)goto _eofout; + + /* first the basic parameters */ + s->dim=oggpack_read(opb,16); + s->dec_buf=_ogg_malloc(sizeof(ogg_int32_t)*s->dim); + if (s->dec_buf == NULL) + goto _errout; + s->entries=oggpack_read(opb,24); + if(s->entries<=0)goto _eofout; + if(s->dim<=0)goto _eofout; + if(_ilog(s->dim)+_ilog(s->entries)>24)goto _eofout; + if (s->dim > INT_MAX/s->entries) goto _eofout; + + /* codeword ordering.... length ordered or unordered? */ + switch((int)oggpack_read(opb,1)){ + case 0: + /* unordered */ + lengthlist=(char *)calloc(s->entries, sizeof(*lengthlist)); + if(!lengthlist) goto _eofout; + + /* allocated but unused entries? */ + if(oggpack_read(opb,1)){ + /* yes, unused entries */ + + for(i=0;i<s->entries;i++){ + if(oggpack_read(opb,1)){ + long num=oggpack_read(opb,5); + if(num==-1)goto _eofout; + lengthlist[i]=(char)(num+1); + s->used_entries++; + if(num+1>s->dec_maxlength)s->dec_maxlength=num+1; + }else + lengthlist[i]=0; + } + }else{ + /* all entries used; no tagging */ + s->used_entries=s->entries; + for(i=0;i<s->entries;i++){ + long num=oggpack_read(opb,5); + if(num==-1)goto _eofout; + lengthlist[i]=(char)(num+1); + if(num+1>s->dec_maxlength)s->dec_maxlength=num+1; + } + } + + break; + case 1: + /* ordered */ + { + long length=oggpack_read(opb,5)+1; + + s->used_entries=s->entries; + lengthlist=(char *)calloc(s->entries, sizeof(*lengthlist)); + if (!lengthlist) goto _eofout; + + for(i=0;i<s->entries;){ + long num=oggpack_read(opb,_ilog(s->entries-i)); + if(num<0)goto _eofout; + for(j=0;j<num && i<s->entries;j++,i++) + lengthlist[i]=(char)length; + s->dec_maxlength=length; + length++; + } + } + break; + default: + /* EOF */ + goto _eofout; + } + + + /* Do we have a mapping to unpack? */ + + if((maptype=oggpack_read(opb,4))>0){ + s->q_min=_float32_unpack(oggpack_read(opb,32),&s->q_minp); + s->q_del=_float32_unpack(oggpack_read(opb,32),&s->q_delp); + s->q_bits=oggpack_read(opb,4)+1; + s->q_seq=oggpack_read(opb,1); + + s->q_del>>=s->q_bits; + s->q_delp+=s->q_bits; + } + + switch(maptype){ + case 0: + + /* no mapping; decode type 0 */ + + /* how many bytes for the indexing? */ + /* this is the correct boundary here; we lose one bit to + node/leaf mark */ + s->dec_nodeb=_determine_node_bytes(s->used_entries,_ilog(s->entries)/8+1); + s->dec_leafw=_determine_leaf_words(s->dec_nodeb,_ilog(s->entries)/8+1); + s->dec_type=0; + + if(_make_decode_table(s,lengthlist,quantvals,opb,maptype)) goto _errout; + break; + + case 1: + + /* mapping type 1; implicit values by lattice position */ + quantvals=_book_maptype1_quantvals(s); + + /* dec_type choices here are 1,2; 3 doesn't make sense */ + { + /* packed values */ + long total1=(s->q_bits*s->dim+8)/8; /* remember flag bit */ + if (s->dim > (INT_MAX-8)/s->q_bits) goto _eofout; + /* vector of column offsets; remember flag bit */ + long total2=(_ilog(quantvals-1)*s->dim+8)/8+(s->q_bits+7)/8; + + + if(total1<=4 && total1<=total2){ + /* use dec_type 1: vector of packed values */ + + /* need quantized values before */ + s->q_val=calloc(sizeof(ogg_uint16_t), quantvals); + if (!s->q_val) goto _eofout; + for(i=0;i<quantvals;i++) + ((ogg_uint16_t *)s->q_val)[i]=(ogg_uint16_t)oggpack_read(opb,s->q_bits); + + if(oggpack_eop(opb)){ + goto _eofout; + } + + s->dec_type=1; + s->dec_nodeb=_determine_node_bytes(s->used_entries, + (s->q_bits*s->dim+8)/8); + s->dec_leafw=_determine_leaf_words(s->dec_nodeb, + (s->q_bits*s->dim+8)/8); + if(_make_decode_table(s,lengthlist,quantvals,opb,maptype)){ + goto _errout; + } + + free(s->q_val); + s->q_val=0; + + }else{ + /* use dec_type 2: packed vector of column offsets */ + + /* need quantized values before */ + if(s->q_bits<=8){ + s->q_val=_ogg_malloc(quantvals); + if (!s->q_val) goto _eofout; + for(i=0;i<quantvals;i++) + ((unsigned char *)s->q_val)[i]=(unsigned char)oggpack_read(opb,s->q_bits); + }else{ + s->q_val=_ogg_malloc(quantvals*2); + if (!s->q_val) goto _eofout; + for(i=0;i<quantvals;i++) + ((ogg_uint16_t *)s->q_val)[i]=(ogg_uint16_t)oggpack_read(opb,s->q_bits); + } + + if(oggpack_eop(opb))goto _eofout; + + s->q_pack=_ilog(quantvals-1); + s->dec_type=2; + s->dec_nodeb=_determine_node_bytes(s->used_entries, + (_ilog(quantvals-1)*s->dim+8)/8); + s->dec_leafw=_determine_leaf_words(s->dec_nodeb, + (_ilog(quantvals-1)*s->dim+8)/8); + if(_make_decode_table(s,lengthlist,quantvals,opb,maptype))goto _errout; + + } + } + break; + case 2: + + /* mapping type 2; explicit array of values */ + quantvals=s->entries*s->dim; + /* dec_type choices here are 1,3; 2 is not possible */ + + if( (s->q_bits*s->dim+8)/8 <=4){ /* remember flag bit */ + /* use dec_type 1: vector of packed values */ + + s->dec_type=1; + s->dec_nodeb=_determine_node_bytes(s->used_entries,(s->q_bits*s->dim+8)/8); + s->dec_leafw=_determine_leaf_words(s->dec_nodeb,(s->q_bits*s->dim+8)/8); + if(_make_decode_table(s,lengthlist,quantvals,opb,maptype))goto _errout; + + }else{ + /* use dec_type 3: scalar offset into packed value array */ + + s->dec_type=3; + s->dec_nodeb=_determine_node_bytes(s->used_entries,_ilog(s->used_entries-1)/8+1); + s->dec_leafw=_determine_leaf_words(s->dec_nodeb,_ilog(s->used_entries-1)/8+1); + if(_make_decode_table(s,lengthlist,quantvals,opb,maptype))goto _errout; + + /* get the vals & pack them */ + s->q_pack=(s->q_bits+7)/8*s->dim; + s->q_val=_ogg_malloc(s->q_pack*s->used_entries); + + if(s->q_bits<=8){ + for(i=0;i<s->used_entries*s->dim;i++) + ((unsigned char *)(s->q_val))[i]=(unsigned char)oggpack_read(opb,s->q_bits); + }else{ + for(i=0;i<s->used_entries*s->dim;i++) + ((ogg_uint16_t *)(s->q_val))[i]=(ogg_uint16_t)oggpack_read(opb,s->q_bits); + } + } + break; + default: + goto _errout; + } + + if (s->dec_nodeb==1) + if (s->dec_leafw == 1) + s->dec_method = 0; + else + s->dec_method = 1; + else if (s->dec_nodeb==2) + if (s->dec_leafw == 1) + s->dec_method = 2; + else + s->dec_method = 3; + else + s->dec_method = 4; + + if(oggpack_eop(opb))goto _eofout; + + free(lengthlist); + return 0; + _errout: + _eofout: + vorbis_book_clear(s); + free(lengthlist); + free(s->q_val); + return -1; +} + +#ifndef ONLY_C +ogg_uint32_t decode_packed_entry_number(codebook *book, + oggpack_buffer *b); +#else +static inline ogg_uint32_t decode_packed_entry_number(codebook *book, + oggpack_buffer *b){ + ogg_uint32_t chase=0; + int read=book->dec_maxlength; + long lok = oggpack_look(b,read),i; + + while(lok<0 && read>1) + lok = oggpack_look(b, --read); + + if(lok<0){ + oggpack_adv(b,1); /* force eop */ + return -1; + } + + /* chase the tree with the bits we got */ + switch (book->dec_method) + { + case 0: + { + /* book->dec_nodeb==1, book->dec_leafw==1 */ + /* 8/8 - Used */ + unsigned char *t=(unsigned char *)book->dec_table; + + for(i=0;i<read;i++){ + chase=t[chase*2+((lok>>i)&1)]; + if(chase&0x80UL)break; + } + chase&=0x7fUL; + break; + } + case 1: + { + /* book->dec_nodeb==1, book->dec_leafw!=1 */ + /* 8/16 - Used by infile2 */ + unsigned char *t=(unsigned char *)book->dec_table; + for(i=0;i<read;i++){ + int bit=(lok>>i)&1; + int next=t[chase+bit]; + if(next&0x80){ + chase= (next<<8) | t[chase+bit+1+(!bit || t[chase]&0x80)]; + break; + } + chase=next; + } + //chase&=0x7fffUL; + chase&=~0x8000UL; + break; + } + case 2: + { + /* book->dec_nodeb==2, book->dec_leafw==1 */ + /* 16/16 - Used */ + for(i=0;i<read;i++){ + chase=((ogg_uint16_t *)(book->dec_table))[chase*2+((lok>>i)&1)]; + if(chase&0x8000UL)break; + } + //chase&=0x7fffUL; + chase&=~0x8000UL; + break; + } + case 3: + { + /* book->dec_nodeb==2, book->dec_leafw!=1 */ + /* 16/32 - Used by infile2 */ + ogg_uint16_t *t=(ogg_uint16_t *)book->dec_table; + for(i=0;i<read;i++){ + int bit=(lok>>i)&1; + int next=t[chase+bit]; + if(next&0x8000){ + chase= (next<<16) | t[chase+bit+1+(!bit || t[chase]&0x8000)]; + break; + } + chase=next; + } + //chase&=0x7fffffffUL; + chase&=~0x80000000UL; + break; + } + case 4: + { + //Output("32/32"); + for(i=0;i<read;i++){ + chase=((ogg_uint32_t *)(book->dec_table))[chase*2+((lok>>i)&1)]; + if(chase&0x80000000UL)break; + } + //chase&=0x7fffffffUL; + chase&=~0x80000000UL; + break; + } + } + + if(i<read){ + oggpack_adv(b,i+1); + return chase; + } + oggpack_adv(b,read+1); + return(-1); +} +#endif + +/* returns the [original, not compacted] entry number or -1 on eof *********/ +long vorbis_book_decode(codebook *book, oggpack_buffer *b){ + if(book->dec_type)return -1; + return decode_packed_entry_number(book,b); +} + +#ifndef ONLY_C +int decode_map(codebook *s, oggpack_buffer *b, ogg_int32_t *v, int point); +#else +static int decode_map(codebook *s, oggpack_buffer *b, ogg_int32_t *v, int point){ + ogg_uint32_t entry = decode_packed_entry_number(s,b); + int i; + if(oggpack_eop(b))return(-1); + + /* 1 used by test file 0 */ + + /* according to decode type */ + switch(s->dec_type){ + case 1:{ + /* packed vector of values */ + int mask=(1<<s->q_bits)-1; + for(i=0;i<s->dim;i++){ + v[i]=entry&mask; + entry>>=s->q_bits; + } + break; + } + case 2:{ + /* packed vector of column offsets */ + int mask=(1<<s->q_pack)-1; + for(i=0;i<s->dim;i++){ + if(s->q_bits<=8) + v[i]=((unsigned char *)(s->q_val))[entry&mask]; + else + v[i]=((ogg_uint16_t *)(s->q_val))[entry&mask]; + entry>>=s->q_pack; + } + break; + } + case 3:{ + /* offset into array */ + void *ptr=((char *)s->q_val)+entry*s->q_pack; + + if(s->q_bits<=8){ + for(i=0;i<s->dim;i++) + v[i]=((unsigned char *)ptr)[i]; + }else{ + for(i=0;i<s->dim;i++) + v[i]=((ogg_uint16_t *)ptr)[i]; + } + break; + } + default: + return -1; + } + + /* we have the unpacked multiplicands; compute final vals */ + { + int shiftM = point-s->q_delp; + ogg_int32_t add = point-s->q_minp; + int mul = s->q_del; + + if(add>0) + add= s->q_min >> add; + else + add= s->q_min << -add; + if (shiftM<0) + { + mul <<= -shiftM; + shiftM = 0; + } + add <<= shiftM; + + for(i=0;i<s->dim;i++) + v[i]= ((add + v[i] * mul) >> shiftM); + + if(s->q_seq) + for(i=1;i<s->dim;i++) + v[i]+=v[i-1]; + } + + return 0; +} +#endif + +/* returns 0 on OK or -1 on eof *************************************/ +long vorbis_book_decodevs_add(codebook *book,ogg_int32_t *a, + oggpack_buffer *b,int n,int point){ + if(book->used_entries>0){ + int step=n/book->dim; + ogg_int32_t *v = book->dec_buf;//(ogg_int32_t *)alloca(sizeof(*v)*book->dim); + int i,j,o; + if (!v) return -1; + + for (j=0;j<step;j++){ + if(decode_map(book,b,v,point))return -1; + for(i=0,o=j;i<book->dim;i++,o+=step) + a[o]+=v[i]; + } + } + return 0; +} + +long vorbis_book_decodev_add(codebook *book,ogg_int32_t *a, + oggpack_buffer *b,int n,int point){ + if(book->used_entries>0){ + ogg_int32_t *v = book->dec_buf;//(ogg_int32_t *)alloca(sizeof(*v)*book->dim); + int i,j; + + if (!v) return -1; + for(i=0;i<n;){ + if(decode_map(book,b,v,point))return -1; + for (j=0;j<book->dim;j++) + a[i++]+=v[j]; + } + } + return 0; +} + +long vorbis_book_decodev_set(codebook *book,ogg_int32_t *a, + oggpack_buffer *b,int n,int point){ + if(book->used_entries>0){ + ogg_int32_t *v = book->dec_buf;//(ogg_int32_t *)alloca(sizeof(*v)*book->dim); + int i,j; + + if (!v) return -1; + for(i=0;i<n;){ + if(decode_map(book,b,v,point))return -1; + for (j=0;j<book->dim;j++) + a[i++]=v[j]; + } + }else{ + int i,j; + + for(i=0;i<n;){ + for (j=0;j<book->dim;j++) + a[i++]=0; + } + } + + return 0; +} + +#ifndef ONLY_C +long vorbis_book_decodevv_add(codebook *book,ogg_int32_t **a, + long offset,int ch, + oggpack_buffer *b,int n,int point); +#else +long vorbis_book_decodevv_add(codebook *book,ogg_int32_t **a, + long offset,int ch, + oggpack_buffer *b,int n,int point){ + if(book->used_entries>0){ + + ogg_int32_t *v = book->dec_buf;//(ogg_int32_t *)alloca(sizeof(*v)*book->dim); + long i,j; + int chptr=0; + + if (!v) return -1; + for(i=offset;i<offset+n;){ + if(decode_map(book,b,v,point))return -1; + for (j=0;j<book->dim;j++){ + a[chptr++][i]+=v[j]; + if(chptr==ch){ + chptr=0; + i++; + } + } + } + } + + return 0; +} +#endif diff --git a/ohos-specific/tremolo/Tremolo/codebook.h b/ohos-specific/tremolo/Tremolo/codebook.h new file mode 100644 index 0000000000..7aff26bee3 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/codebook.h @@ -0,0 +1,89 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: basic shared codebook operations + + ************************************************************************/ + +#ifndef _V_CODEBOOK_H_ +#define _V_CODEBOOK_H_ + +#include "ogg.h" + +typedef struct codebook{ + /* Top 15 used in ARM code */ + int dec_maxlength; + void *dec_table; + int dec_method; + int dec_type; /* 0 = entry number + 1 = packed vector of values + 2 = packed vector of column offsets, maptype 1 + 3 = scalar offset into value array, maptype 2 */ + int q_bits; + long dim; /* codebook dimensions (elements per vector) */ + int q_delp; + int q_minp; + ogg_int32_t q_del; + ogg_int32_t q_min; + int q_seq; + int q_pack; + void *q_val; + long used_entries; /* populated codebook entries */ + ogg_int32_t *dec_buf; + + /* C only */ + int dec_nodeb; + int dec_leafw; + + long entries; /* codebook entries */ + +} codebook; + +extern void vorbis_book_clear(codebook *b); +extern int vorbis_book_unpack(oggpack_buffer *b,codebook *c); + +extern long vorbis_book_decode(codebook *book, oggpack_buffer *b); +extern long vorbis_book_decodevs_add(codebook *book, ogg_int32_t *a, + oggpack_buffer *b,int n,int point); +extern long vorbis_book_decodev_set(codebook *book, ogg_int32_t *a, + oggpack_buffer *b,int n,int point); +extern long vorbis_book_decodev_add(codebook *book, ogg_int32_t *a, + oggpack_buffer *b,int n,int point); +extern long vorbis_book_decodevv_add(codebook *book, ogg_int32_t **a, + long off,int ch, + oggpack_buffer *b,int n,int point); + +extern int _ilog(unsigned int v); + + +#endif diff --git a/ohos-specific/tremolo/Tremolo/codec_internal.h b/ohos-specific/tremolo/Tremolo/codec_internal.h new file mode 100644 index 0000000000..c94db5ff1c --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/codec_internal.h @@ -0,0 +1,235 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: libvorbis codec headers + + ************************************************************************/ + +#ifndef _V_CODECI_H_ +#define _V_CODECI_H_ + +#define CHUNKSIZE 1024 + +#include "codebook.h" +#include "ivorbiscodec.h" + +#define VI_TRANSFORMB 1 +#define VI_WINDOWB 1 +#define VI_TIMEB 1 +#define VI_FLOORB 2 +#define VI_RESB 3 +#define VI_MAPB 1 + +typedef void vorbis_info_floor; + +/* vorbis_dsp_state buffers the current vorbis audio + analysis/synthesis state. The DSP state belongs to a specific + logical bitstream ****************************************************/ +struct vorbis_dsp_state{ + vorbis_info *vi; + oggpack_buffer opb; + + ogg_int32_t **work; + ogg_int32_t **mdctright; + int out_begin; + int out_end; + + long lW; + long W; + + ogg_int64_t granulepos; + ogg_int64_t sequence; + ogg_int64_t sample_count; + +}; + + +/* Floor backend generic *****************************************/ + +extern vorbis_info_floor *floor0_info_unpack(vorbis_info *,oggpack_buffer *); +extern void floor0_free_info(vorbis_info_floor *); +extern int floor0_memosize(vorbis_info_floor *); +extern ogg_int32_t *floor0_inverse1(struct vorbis_dsp_state *, + vorbis_info_floor *,ogg_int32_t *); +extern int floor0_inverse2 (struct vorbis_dsp_state *,vorbis_info_floor *, + ogg_int32_t *buffer,ogg_int32_t *); + +extern vorbis_info_floor *floor1_info_unpack(vorbis_info *,oggpack_buffer *); +extern void floor1_free_info(vorbis_info_floor *); +extern int floor1_memosize(vorbis_info_floor *); +extern ogg_int32_t *floor1_inverse1(struct vorbis_dsp_state *, + vorbis_info_floor *,ogg_int32_t *); +extern int floor1_inverse2 (struct vorbis_dsp_state *,vorbis_info_floor *, + ogg_int32_t *buffer,ogg_int32_t *); + +typedef struct{ + int order; + long rate; + long barkmap; + + int ampbits; + int ampdB; + + int numbooks; /* <= 16 */ + char books[16]; + +} vorbis_info_floor0; + +typedef struct{ + char class_dim; /* 1 to 8 */ + char class_subs; /* 0,1,2,3 (bits: 1<<n poss) */ + unsigned char class_book; /* subs ^ dim entries */ + unsigned char class_subbook[8]; /* [VIF_CLASS][subs] */ +} floor1class; + +typedef struct{ + floor1class *klass; /* [VIF_CLASS] */ + ogg_uint8_t *partitionclass; /* [VIF_PARTS]; 0 to 15 */ + ogg_uint16_t *postlist; /* [VIF_POSIT+2]; first two implicit */ + ogg_uint8_t *forward_index; /* [VIF_POSIT+2]; */ + ogg_uint8_t *hineighbor; /* [VIF_POSIT]; */ + ogg_uint8_t *loneighbor; /* [VIF_POSIT]; */ + + int partitions; /* 0 to 31 */ + int posts; + int mult; /* 1 2 3 or 4 */ + +} vorbis_info_floor1; + +/* Residue backend generic *****************************************/ + +typedef struct vorbis_info_residue{ + int type; + unsigned char *stagemasks; + unsigned char *stagebooks; + +/* block-partitioned VQ coded straight residue */ + long begin; + long end; + + /* first stage (lossless partitioning) */ + int grouping; /* group n vectors per partition */ + char partitions; /* possible codebooks for a partition */ + unsigned char groupbook; /* huffbook for partitioning */ + char stages; +} vorbis_info_residue; + +extern void res_clear_info(vorbis_info_residue *info); +extern int res_unpack(vorbis_info_residue *info, + vorbis_info *vi,oggpack_buffer *opb); +extern int res_inverse(vorbis_dsp_state *,vorbis_info_residue *info, + ogg_int32_t **in,int *nonzero,int ch); + +/* mode ************************************************************/ +typedef struct { + unsigned char blockflag; + unsigned char mapping; +} vorbis_info_mode; + +/* Mapping backend generic *****************************************/ +typedef struct coupling_step{ + unsigned char mag; + unsigned char ang; +} coupling_step; + +typedef struct submap{ + char floor; + char residue; +} submap; + +typedef struct vorbis_info_mapping{ + int submaps; + + unsigned char *chmuxlist; + submap *submaplist; + + int coupling_steps; + coupling_step *coupling; +} vorbis_info_mapping; + +extern int mapping_info_unpack(vorbis_info_mapping *,vorbis_info *, + oggpack_buffer *); +extern void mapping_clear_info(vorbis_info_mapping *); +extern int mapping_inverse(struct vorbis_dsp_state *,vorbis_info_mapping *); + +/* codec_setup_info contains all the setup information specific to the + specific compression/decompression mode in progress (eg, + psychoacoustic settings, channel setup, options, codebook + etc). +*********************************************************************/ + +typedef struct codec_setup_info { + + /* Vorbis supports only short and long blocks, but allows the + encoder to choose the sizes */ + + long blocksizes[2]; + + /* modes are the primary means of supporting on-the-fly different + blocksizes, different channel mappings (LR or M/A), + different residue backends, etc. Each mode consists of a + blocksize flag and a mapping (along with the mapping setup */ + + int modes; + int maps; + int floors; + int residues; + int books; + + vorbis_info_mode *mode_param; + vorbis_info_mapping *map_param; + char *floor_type; + vorbis_info_floor **floor_param; + vorbis_info_residue *residue_param; + codebook *book_param; + +} codec_setup_info; + +extern int vorbis_dsp_init(vorbis_dsp_state *v, vorbis_info *vi); +extern void vorbis_dsp_clear(vorbis_dsp_state *v); +extern vorbis_dsp_state *vorbis_dsp_create(vorbis_info *vi); +extern void vorbis_dsp_destroy(vorbis_dsp_state *v); +extern int vorbis_dsp_headerin(vorbis_info *vi,vorbis_comment *vc, + ogg_packet *op); + +extern int vorbis_dsp_restart(vorbis_dsp_state *v); +extern int vorbis_dsp_synthesis(vorbis_dsp_state *vd, + ogg_packet *op,int decodep); +extern int vorbis_dsp_pcmout(vorbis_dsp_state *v, + ogg_int16_t *pcm,int samples); +extern int vorbis_dsp_read(vorbis_dsp_state *v,int samples); +extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op); + + + +#endif diff --git a/ohos-specific/tremolo/Tremolo/config_types.h b/ohos-specific/tremolo/Tremolo/config_types.h new file mode 100644 index 0000000000..a411aef111 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/config_types.h @@ -0,0 +1,47 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: #ifdef jail to whip a few platforms into the UNIX ideal. + + ************************************************************************/ +#ifndef _OS_CVTYPES_H +#define _OS_CVTYPES_H + +typedef long long ogg_int64_t; +typedef int ogg_int32_t; +typedef unsigned int ogg_uint32_t; +typedef short ogg_int16_t; +typedef unsigned short ogg_uint16_t; +typedef unsigned char ogg_uint8_t; + +#endif diff --git a/ohos-specific/tremolo/Tremolo/dpen.s b/ohos-specific/tremolo/Tremolo/dpen.s new file mode 100644 index 0000000000..9bc6f18eb8 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/dpen.s @@ -0,0 +1,496 @@ +@ Tremolo library +@----------------------------------------------------------------------- +@ Copyright (C) 2002-2009, Xiph.org Foundation +@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd +@ All rights reserved. + +@ Redistribution and use in source and binary forms, with or without +@ modification, are permitted provided that the following conditions +@ are met: + +@ * Redistributions of source code must retain the above copyright +@ notice, this list of conditions and the following disclaimer. +@ * Redistributions in binary form must reproduce the above +@ copyright notice, this list of conditions and the following disclaimer +@ in the documentation and/or other materials provided with the +@ distribution. +@ * Neither the names of the Xiph.org Foundation nor Pinknoise +@ Productions Ltd nor the names of its contributors may be used to +@ endorse or promote products derived from this software without +@ specific prior written permission. +@ +@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@ ---------------------------------------------------------------------- + + .text + + .global decode_packed_entry_number + .global decode_packed_entry_number_REALSTART + .global decode_map + .global vorbis_book_decodevv_add + .global _checksum + + .extern oggpack_adv + .extern oggpack_look + .extern oggpack_eop + .extern crc_lookup + .hidden crc_lookup + +decode_packed_entry_number_REALSTART: +dpen_nobits: + MOV r0,r5 @ r0 = b + MOV r1,#1 @ r1 = 1 + BL oggpack_adv @ oggpack_adv(b,1) /* Force eop */ +duff: + MVN r0,#0 @ return -1 + LDMFD r13!,{r4-r8,r10,PC} + +dpen_readfailed: + SUBS r4,r4,#1 @ r4 = --read + BEQ dpen_nobits + MOV r0,r5 @ r0 = b + MOV r1,r4 @ r1 = read + ADR r14,dpen_read_return + B oggpack_look + +decode_packed_entry_number: + @ r0 = codebook *book + @ r1 = oggpack_buffer *b + STMFD r13!,{r4-r8,r10,r14} + + LDMIA r0,{r4,r6,r7} @ r4 = read = book->max_length + @ r6 = book->dec_table + @ r7 = book->dec_method + MOV r5,r1 @ r5 = b + + MOV r0,r5 @ r0 = b + MOV r1,r4 @ r1 = read + BL oggpack_look +dpen_read_return: + CMP r0,#0 + BLT dpen_readfailed + + @ r0 = lok + @ r4 = read + @ r5 = b + @ r6 = dec_table + @ r7 = dec_method + + CMP r7, #3 + BGT meth4 + BEQ meth3 + CMP r7, #1 + BGT meth2 + BEQ meth1 +meth0: + RSB r1, r4, #0 @ r1 = i-read = 0-read + MOV r7, #0 @ r7 = chase +m0_loop: + MOVS r0, r0, LSR #1 @ r0 = lok>>1 C = bottom bit + ADC r2, r6, r7, LSL #1 @ r8 = &t[chase*2+C] + LDRB r7, [r2] + ADDS r1, r1, #1 @ r1 = i-read++ (i-read<0 => i<read) + @ stall Xscale + CMPLT r7, #0x80 + BLT m0_loop + AND r7, r7, #0x7F @ r7 = chase + CMP r1, #0 @ if (i-read >= 0) === (i >= read) + MVNGT r7, #0 @ if (i >= read) value to return = -1 + ADD r1, r1, r4 @ r1 = i-read+read+1 = i +1 + MOV r0, r5 @ r0 = b + BL oggpack_adv @ oggpack_adv(b, i+1); + MOV r0, r7 @ return chase + LDMFD r13!,{r4-r8,r10,PC} + +meth1: + @ r0 = lok + @ r4 = read + @ r5 = b + @ r6 = dec_table + RSB r1, r4, #0 @ r1 = i = -read + MOV r10,#0 @ r10= next = 0 +m1_loop: + MOV r7, r10 @ r7 = chase=next + MOVS r0, r0, LSR #1 @ r0 = lok>>1 C = bottom bit + ADC r8, r6, r7 @ r8 = t+chase+bit + LDRB r10,[r8], -r6 @ r10= next=t[chase+bit] r8=chase+bit + ADDS r1, r1, #1 @ r1 = i++ + @ stall Xscale + CMPLT r10,#0x80 @ if (next & 0x80) == 0 + BLT m1_loop + + ADD r1, r1, r4 @ r1 = i+read + MOV r0, r5 @ r0 = b + BL oggpack_adv @ oggpack_adv(b, i) + + CMP r10,#0x80 + BLT duff + + CMP r8, r7 @ if bit==0 (chase+bit==chase) (sets C) + LDRNEB r14,[r6, r7] @ r14= t[chase] + MOVEQ r14,#128 + ADC r12,r8, r6 @ r12= chase+bit+1+t + LDRB r14,[r12,r14,LSR #7] @ r14= t[chase+bit+1+(!bit || t[chase]0x0x80)] + BIC r10,r10,#0x80 @ r3 = next &= ~0x80 + @ stall Xscale + ORR r0, r14,r10,LSL #8 @ r7 = chase = (next<<8) | r14 + + LDMFD r13!,{r4-r8,r10,PC} + + +meth2: + RSB r1, r4, #0 @ r1 = i-read = 0-read + MOV r7, #0 @ r7 = chase + MOV r6, r6, LSR #1 +m2_loop: + MOVS r0, r0, LSR #1 @ r0 = lok>>1 C = bottom bit + ADC r2, r6, r7, LSL #1 @ r8 = &t[chase*2+C] + LDRH r7, [r2, r2] + ADDS r1, r1, #1 @ r1 = i-read++ (i-read<0 => i<read) + @ stall Xscale + CMPLT r7, #0x8000 + BLT m2_loop + BIC r7, r7, #0x8000 @ r7 = chase + CMP r1, #0 @ if (i-read >= 0) === (i >= read) + MVNGT r7, #0 @ if (i >= read) value to return = -1 + ADD r1, r1, r4 @ r1 = i-read+read+1 = i +1 + MOV r0, r5 @ r0 = b + BL oggpack_adv @ oggpack_adv(b, i+1); + MOV r0, r7 @ return chase + LDMFD r13!,{r4-r8,r10,PC} + +meth3: + @ r0 = lok + @ r4 = read + @ r5 = b + @ r6 = dec_table + RSB r1, r4, #0 @ r1 = i = -read + MOV r10,#0 @ r10= next = 0 +m3_loop: + MOV r7, r10 @ r7 = chase=next + MOVS r0, r0, LSR #1 @ r0 = lok>>1 C = bottom bit + ADC r8, r7, #0 @ r8 = chase+bit + MOV r8, r8, LSL #1 @ r8 = (chase+bit)<<1 + LDRH r10,[r6, r8] @ r10= next=t[chase+bit] + ADDS r1, r1, #1 @ r1 = i++ + @ stall Xscale + CMPLT r10,#0x8000 @ if (next & 0x8000) == 0 + BLT m3_loop + + ADD r1, r1, r4 @ r1 = i+read + MOV r0, r5 @ r0 = b + BL oggpack_adv @ oggpack_adv(b, i) + + CMP r10,#0x8000 + BLT duff + + MOV r7, r7, LSL #1 + CMP r8, r7 @ if bit==0 (chase+bit==chase) sets C + LDRNEH r14,[r6, r7] @ r14= t[chase] + MOVEQ r14,#0x8000 + ADC r12,r8, r14,LSR #15 @ r12= 1+((chase+bit)<<1)+(!bit || t[chase]0x0x8000) + ADC r12,r12,r14,LSR #15 @ r12= t + (1+chase+bit+(!bit || t[chase]0x0x8000))<<1 + LDRH r14,[r6, r12] @ r14= t[chase+bit+1 + BIC r10,r10,#0x8000 @ r3 = next &= ~0x8000 + @ stall Xscale + ORR r0, r14,r10,LSL #16 @ r7 = chase = (next<<16) | r14 + + LDMFD r13!,{r4-r8,r10,PC} + +meth4: + RSB r1, r4, #0 @ r1 = i-read = 0-read + MOV r7, #0 @ r7 = chase +m4_loop: + MOVS r0, r0, LSR #1 @ r0 = lok>>1 C = bottom bit + ADC r2, r7, r7 @ r8 = chase*2+C + LDR r7, [r6, r2, LSL #2] + ADDS r1, r1, #1 @ r1 = i-read++ (i-read<0 => i<read) + @ stall Xscale + CMPLT r7, #0x80000000 + BLT m4_loop + BIC r7, r7, #0x80000000 @ r7 = chase + CMP r1, #0 @ if (i-read >= 0) === (i >= read) + MVNGT r7, #0 @ if (i >= read) value to return = -1 + ADD r1, r1, r4 @ r1 = i-read+read+1 = i +1 + MOV r0, r5 @ r0 = b + BL oggpack_adv @ oggpack_adv(b, i+1); + MOV r0, r7 @ return chase + LDMFD r13!,{r4-r8,r10,PC} + +decode_map: + @ r0 = codebook *s + @ r1 = oggpack_buffer *b + @ r2 = int v + @ r3 = int point + STMFD r13!,{r4-r11,r14} + + MOV r4, r0 @ r4 = s + MOV r5, r1 @ r5 = b + MOV r6, r2 @ r6 = v + MOV r7, r3 @ r7 = point + BL decode_packed_entry_number + MOV r8, r0 + + MOV r0, r5 + BL oggpack_eop + CMP r0, #0 + BNE dm_duff + + @ r4 = s + @ r5 = b + @ r6 = v + @ r7 = point + @ r8 = entry + + LDR r1, [r4,#12] @ r1 = s->dec_type + LDR r2, [r4,#16] @ r2 = s->q_bits + LDR r3, [r4,#20] @ r3 = s->dim + LDR r5, [r4,#24] @ r5 = s->q_delp + LDR r11,[r4,#28] @ r11= s->q_minp + LDR r12,[r4,#32] @ r12= s->q_del = mul + LDR r14,[r4,#36] @ r14= s->q_min + SUBS r11,r7, r11 @ r11= add = point - s->q_minp + + MOVGT r14,r14,ASR r11 @ r14= add = s->q_min >> add (if add >0) + RSBLT r11,r11,#0 + MOVLT r14,r14,LSL r11 @ r14= add = s->q_min << -add (if add < 0) + + SUBS r5, r7, r5 @ r5 = shiftM = point - s->q_delp + LDR r7, [r4,#40] @ r7 = s->q_seq + RSBLT r5, r5, #0 @ if (shiftM<0) r5 =-shiftM + MOVLT r12,r12,LSL r5 @ r12=mul<<-shiftM + MOVLT r5, #0 @ r5 =shiftM = 0 + MOVGT r14,r14,LSL r5 @ add <<= shiftM + + CMP r7,#0 @ seqMask = (s->q_seq?-1:0) + MVNNE r7,#0 + + CMP r1, #2 + BEQ dm2 + BGT dm3 + CMP r1,#0 @ probably never happens + BLE dm_duff +dm1: + @ r1 = s->dec_type + @ r2 = s->q_bits + @ r3 = s->dim + @ r5 = shiftM + @ r6 = v + @ r7 = seqMask + @ r8 = entry + @ r12= mul + @ r14= add + MOV r0, #1 + RSB r0, r0, r0, LSL r2 @ r0 = mask = (1<<s->q_bits)-1 + MOV r11,#0 @ r11= prev = 0 +dm1_loop: + AND r1, r8, r0 @ r1 = v = entry & mask + MLA r1, r12, r1, r14 @ r1 = (add + mul*v) + MOV r8, r8, LSR r2 @ r8 = entry>>s->q_bits + SUBS r3, r3, #1 + ADD r1, r11,r1, ASR r5 @ r1 = v = prev+((add+mul*v)>>shiftM) + AND r11,r1, r7 @ r11= prev = seqMask & v + STR r1, [r6], #4 @ *v++ = v + BGT dm1_loop + + MOV r0, #0 + LDMFD r13!,{r4-r11,PC} +dm2: + @ r1 = s->dec_type + @ r2 = s->q_bits + @ r3 = s->dim + @ r4 = s + @ r5 = shiftM + @ r6 = v + @ r7 = seqMask + @ r8 = entry + @ r12= mul + @ r14= add + LDR r1, [r4,#44] @ r1 = s->q_pack + LDR r4, [r4,#48] @ r4 = s->q_val + MOV r11,#0 @ r11= prev + MOV r0, #1 + RSB r0, r0, r0, LSL r1 @ r8 = mask = (1<<s->q_pack)-1 + CMP r2,#8 + BGT dm2_hword +dm2_loop: + AND r2, r8, r0 @ r2 = entry & mask + LDRB r2, [r4, r2] @ r2 = v = q->val[entry & mask] + MOV r8, r8, LSR r1 @ r8 = entry>>q_pack + MLA r2, r12,r2, r14 @ r2 = (add+mul*v) + SUBS r3, r3, #1 + ADD r2, r11,r2, ASR r5 @ r2 = v = prev+(add+mul*v)>>shiftM + AND r11,r2, r7 @ r11= prev = seqMask & v + STR r2, [r6], #4 @ *v++ = v + BGT dm2_loop + MOV r0, #0 + LDMFD r13!,{r4-r11,PC} + +dm2_hword: + AND r2, r8, r0 @ r2 = entry & mask + MOV r2, r2, LSL #1 @ r2 = 2*r2 + LDRH r2, [r4, r2] @ r2 = v = q->val[entry & mask] + MOV r8, r8, LSR r1 @ r8 = entry>>q_pack + MLA r2, r12,r2, r14 @ r2 = (add+mul*v) + SUBS r3, r3, #1 + ADD r2, r11,r2, ASR r5 @ r2 = v = prev+(add+mul*v)>>shiftM + AND r11,r2, r7 @ r11= prev = seqMask & v + STR r2, [r6], #4 @ *v++ = v + BGT dm2_hword + MOV r0, #0 + LDMFD r13!,{r4-r11,PC} + +dm3: + @ r1 = s->dec_type + @ r2 = s->q_bits + @ r3 = s->dim + @ r4 = s + @ r5 = shiftM + @ r6 = v + @ r7 = seqMask + @ r8 = entry + @ r12= mul + @ r14= add + LDR r1, [r4,#44] @ r1 = s->q_pack + LDR r4, [r4,#52] @ r4 = s->q_val + CMP r2,#8 + MOV r11,#0 @ r11= prev + MLA r4,r1,r8,r4 @ r4 = ptr = s->q_val+entry*s->q_pack + + BGT dm3_hword +dm3_loop: + LDRB r2, [r4], #1 @ r2 = v = *ptr++ + SUBS r3, r3, #1 + MLA r2, r12,r2, r14 @ r2 = (add+mul*v) + ADD r2, r11,r2, ASR r5 @ r2 = v = prev+(add+mul*v)>>shiftM + AND r11,r2, r7 @ r11= prev = seqMask & v + STR r2, [r6], #4 @ *v++ = v + BGT dm3_loop + MOV r0, #0 + LDMFD r13!,{r4-r11,PC} + +dm3_hword: + LDRH r2, [r4], #2 @ r2 = *ptr++ + SUBS r3, r3, #1 + MLA r2, r12,r2, r14 @ r2 = (add+mul*v) + ADD r2, r11,r2, ASR r5 @ r2 = v = prev+(add+mul*v)>>shiftM + AND r11,r2, r7 @ r11= prev = seqMask & v + STR r2, [r6], #4 @ *v++ = v + BGT dm3_hword + MOV r0, #0 + LDMFD r13!,{r4-r11,PC} + +dm_duff: + MVN r0,#0 + LDMFD r13!,{r4-r11,PC} + +vorbis_book_decodevv_add: + @ r0 = codebook *book + @ r1 = ogg_int32_t **a + @ r2 = long offset + @ r3 = int ch + @ <> = b + @ <> = n + @ <> = point + STMFD r13!,{r4-r11,R14} + LDR r7, [r0, #13*4] @ r7 = used_entries + MOV r9, r0 @ r9 = book + MOV r10,r1 @ r10= 0xa[chptr] chptr=0 + MOV r6, r3 @ r6 = ch + ADD r8, r10,r3, LSL #2 @ r8 = 0xa[ch] + MOV r11,r2 @ r11= offset + CMP r7, #0 @ if (used_entries <= 0) + BLE vbdvva_exit @ exit + LDR r5, [r13,#10*4] @ r5 = n +vbdvva_loop1: + @ r5 = n + @ r6 = ch + @ r8 = 0xa[ch] + @ r9 = book + @ r10= 0xa[chptr] + @ r11= offset + MOV r0, r9 @ r0 = book + LDR r1, [r13,# 9*4] @ r1 = b + LDR r2, [r9, #14*4] @ r2 = v = dec_buf + LDR r3, [r13,#11*4] @ r3 = point + BL decode_map + CMP r0, #0 + BNE vbdvva_fail + + LDR r0, [r9, # 5*4] @ r0 = book->dim + LDR r1, [r9, #14*4] @ r1 = v = dec_buf +vbdvva_loop2: + LDR r2, [r10],#4 @ r2 = a[chptr++] + LDR r12,[r1], #4 @ r1 = v[j++] + CMP r10,r8 @ if (chptr == ch) + SUBEQ r10,r10,r6, LSL #2 @ chptr = 0 + LDR r14,[r2, r11,LSL #2]! @ r2 = 0xa[chptr++][i] r14=[r12] + ADDEQ r11,r11,#1 @ i++ + SUBEQ r5, r5, #1 @ n-- + SUBS r0, r0, #1 @ r0-- + ADD r12,r12,r14 @ r12= a[chptr++][i]+ v[j] + STR r12,[r2] @ r12= a[chptr++][i]+=v[j] + BGT vbdvva_loop2 + CMP r5,#0 + BGT vbdvva_loop1 +vbdvva_exit: + MOV r0, #0 @ return 0 + LDMFD r13!,{r4-r11,PC} +vbdvva_fail: + MVN r0, #0 @ return -1 + LDMFD r13!,{r4-r11,PC} + +_checksum: + @ r0 = ogg_reference *or + @ r1 = bytes + STMFD r13!,{r5-r6,r14} + + ADR r6,.Lcrc_lookup + LDR r5,[r6] + ADD r5,r6 + MOV r14,#0 @ r14= crc_reg = 0 + MOVS r12,r0 + BEQ _cs_end +_cs_loop1: + LDMIA r12,{r0,r2,r3,r12} @ r0 = or->buffer + @ r2 = or->begin + @ r3 = or->length + @ r12= or->next + LDR r0,[r0] @ r0 = or->buffer->data + CMP r1,r3 @ r3 = post = (bytes < or->length ? + MOVLT r3,r1 @ bytes : or->length) + MOVS r6,r3 @ r6 = j = post + BEQ _cs_no_bytes + ADD r0,r0,r2 @ r0 = or->buffer->data + or->begin +_cs_loop2: + LDRB r2, [r0],#1 @ r2 = data[j] + @ stall + @ stall Xscale + EOR r2, r2, r14,LSR #24 @ r2 = (crc_reg>>24)^data[j] + LDR r2, [r5, r2, LSL #2] @ r2 = crc_lkp[(crc_reg>>24)^data[j]] + SUBS r6, r6, #1 @ j-- + @ stall Xscale + EOR r14,r2, r14,LSL #8 @ r14= crc_reg = (crc_reg<<8)^r2 + BGT _cs_loop2 +_cs_no_bytes: + SUBS r1, r1, r3 + CMPNE r12,#0 + BNE _cs_loop1 +_cs_end: + MOV r0,r14 + LDMFD r13!,{r5-r6,PC} + +.Lcrc_lookup: + .WORD crc_lookup-.Lcrc_lookup + + @ END diff --git a/ohos-specific/tremolo/Tremolo/dsp.c b/ohos-specific/tremolo/Tremolo/dsp.c new file mode 100644 index 0000000000..db809de349 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/dsp.c @@ -0,0 +1,326 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: PCM data vector blocking, windowing and dis/reassembly + + ************************************************************************/ + +#include <stdlib.h> +#include "ogg.h" +#include "mdct.h" +#include "ivorbiscodec.h" +#include "codec_internal.h" +#include "misc.h" +#include "window_lookup.h" + +int vorbis_dsp_restart(vorbis_dsp_state *v){ + if(!v)return -1; + { + vorbis_info *vi=v->vi; + codec_setup_info *ci; + + if(!vi)return -1; + ci=vi->codec_setup; + if(!ci)return -1; + + v->out_end=-1; + v->out_begin=-1; + + v->granulepos=-1; + v->sequence=-1; + v->sample_count=-1; + } + return 0; +} + +int vorbis_dsp_init(vorbis_dsp_state *v,vorbis_info *vi){ + int i; + + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + + v->vi=vi; + + v->work=(ogg_int32_t **)_ogg_malloc(vi->channels*sizeof(*v->work)); + v->mdctright=(ogg_int32_t **)_ogg_malloc(vi->channels*sizeof(*v->mdctright)); + for(i=0;i<vi->channels;i++){ + v->work[i]=(ogg_int32_t *)_ogg_calloc(1,(ci->blocksizes[1]>>1)* + sizeof(*v->work[i])); + v->mdctright[i]=(ogg_int32_t *)_ogg_calloc(1,(ci->blocksizes[1]>>2)* + sizeof(*v->mdctright[i])); + } + + v->lW=0; /* previous window size */ + v->W=0; /* current window size */ + + vorbis_dsp_restart(v); + return 0; +} + +vorbis_dsp_state *vorbis_dsp_create(vorbis_info *vi){ + vorbis_dsp_state *v=_ogg_calloc(1,sizeof(*v)); + vorbis_dsp_init(v,vi); + return v; +} + +void vorbis_dsp_clear(vorbis_dsp_state *v){ + int i; + if(v){ + vorbis_info *vi=v->vi; + + if(v->work){ + for(i=0;i<vi->channels;i++) + if(v->work[i])_ogg_free(v->work[i]); + _ogg_free(v->work); + } + if(v->mdctright){ + for(i=0;i<vi->channels;i++) + if(v->mdctright[i])_ogg_free(v->mdctright[i]); + _ogg_free(v->mdctright); + } + } +} + +void vorbis_dsp_destroy(vorbis_dsp_state *v){ + vorbis_dsp_clear(v); + _ogg_free(v); +} + +static LOOKUP_T *_vorbis_window(int left){ + switch(left){ + case 32: + return vwin64; + case 64: + return vwin128; + case 128: + return vwin256; + case 256: + return vwin512; + case 512: + return vwin1024; + case 1024: + return vwin2048; + case 2048: + return vwin4096; +#ifndef LIMIT_TO_64kHz + case 4096: + return vwin8192; +#endif + default: + return(0); + } +} + +/* pcm==0 indicates we just want the pending samples, no more */ +int vorbis_dsp_pcmout(vorbis_dsp_state *v,ogg_int16_t *pcm,int samples){ + vorbis_info *vi=v->vi; + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + if(v->out_begin>-1 && v->out_begin<v->out_end){ + int n=v->out_end-v->out_begin; + if(pcm){ + int i; + if(n>samples)n=samples; + for(i=0;i<vi->channels;i++) + mdct_unroll_lap(ci->blocksizes[0],ci->blocksizes[1], + v->lW,v->W,v->work[i],v->mdctright[i], + _vorbis_window(ci->blocksizes[0]>>1), + _vorbis_window(ci->blocksizes[1]>>1), + pcm+i,vi->channels, + v->out_begin,v->out_begin+n); + } + return(n); + } + return(0); +} + +int vorbis_dsp_read(vorbis_dsp_state *v,int s){ + if(s && v->out_begin+s>v->out_end)return(OV_EINVAL); + v->out_begin+=s; + return(0); +} + +long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){ + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + oggpack_buffer opb; + int mode; + int modebits=0; + int v=ci->modes; + + oggpack_readinit(&opb,op->packet); + + /* Check the packet type */ + if(oggpack_read(&opb,1)!=0){ + /* Oops. This is not an audio data packet */ + return(OV_ENOTAUDIO); + } + + while(v>1){ + modebits++; + v>>=1; + } + + /* read our mode and pre/post windowsize */ + mode=oggpack_read(&opb,modebits); + if(mode==-1)return(OV_EBADPACKET); + return(ci->blocksizes[ci->mode_param[mode].blockflag]); +} + + +static int ilog(ogg_uint32_t v){ + int ret=0; + if(v)--v; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +int vorbis_dsp_synthesis(vorbis_dsp_state *vd,ogg_packet *op,int decodep){ + vorbis_info *vi=vd->vi; + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + int mode,i; + + oggpack_readinit(&vd->opb,op->packet); + + /* Check the packet type */ + if(oggpack_read(&vd->opb,1)!=0){ + /* Oops. This is not an audio data packet */ + return OV_ENOTAUDIO ; + } + + /* read our mode and pre/post windowsize */ + mode=oggpack_read(&vd->opb,ilog(ci->modes)); + if(mode==-1 || mode>=ci->modes) return OV_EBADPACKET; + + /* shift information we still need from last window */ + vd->lW=vd->W; + vd->W=ci->mode_param[mode].blockflag; + for(i=0;i<vi->channels;i++) + mdct_shift_right(ci->blocksizes[vd->lW],vd->work[i],vd->mdctright[i]); + + if(vd->W){ + int temp; + oggpack_read(&vd->opb,1); + temp=oggpack_read(&vd->opb,1); + if(temp==-1) return OV_EBADPACKET; + } + + /* packet decode and portions of synthesis that rely on only this block */ + if(decodep){ + mapping_inverse(vd,ci->map_param+ci->mode_param[mode].mapping); + + if(vd->out_begin==-1){ + vd->out_begin=0; + vd->out_end=0; + }else{ + vd->out_begin=0; + vd->out_end=ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4; + } + } + + /* track the frame number... This is for convenience, but also + making sure our last packet doesn't end with added padding. + + This is not foolproof! It will be confused if we begin + decoding at the last page after a seek or hole. In that case, + we don't have a starting point to judge where the last frame + is. For this reason, vorbisfile will always try to make sure + it reads the last two marked pages in proper sequence */ + + /* if we're out of sequence, dump granpos tracking until we sync back up */ + if(vd->sequence==-1 || vd->sequence+1 != op->packetno-3){ + /* out of sequence; lose count */ + vd->granulepos=-1; + vd->sample_count=-1; + } + + vd->sequence=op->packetno; + vd->sequence=vd->sequence-3; + + if(vd->sample_count==-1){ + vd->sample_count=0; + }else{ + vd->sample_count+= + ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4; + } + + if(vd->granulepos==-1){ + if(op->granulepos!=-1){ /* only set if we have a + position to set to */ + + vd->granulepos=op->granulepos; + + /* is this a short page? */ + if(vd->sample_count>vd->granulepos){ + /* corner case; if this is both the first and last audio page, + then spec says the end is cut, not beginning */ + if(op->e_o_s){ + /* trim the end */ + /* no preceeding granulepos; assume we started at zero (we'd + have to in a short single-page stream) */ + /* granulepos could be -1 due to a seek, but that would result + in a long coun t, not short count */ + + vd->out_end-=(int)(vd->sample_count-vd->granulepos); + }else{ + /* trim the beginning */ + vd->out_begin+=(int)(vd->sample_count-vd->granulepos); + if(vd->out_begin>vd->out_end) + vd->out_begin=vd->out_end; + } + + } + + } + }else{ + vd->granulepos+= + ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4; + if(op->granulepos!=-1 && vd->granulepos!=op->granulepos){ + + if(vd->granulepos>op->granulepos){ + long extra=(long)(vd->granulepos-op->granulepos); + + if(extra) + if(op->e_o_s){ + /* partial last frame. Strip the extra samples off */ + vd->out_end-=extra; + } /* else {Shouldn't happen *unless* the bitstream is out of + spec. Either way, believe the bitstream } */ + } /* else {Shouldn't happen *unless* the bitstream is out of + spec. Either way, believe the bitstream } */ + vd->granulepos=op->granulepos; + } + } + + return(0); +} diff --git a/ohos-specific/tremolo/Tremolo/floor0.c b/ohos-specific/tremolo/Tremolo/floor0.c new file mode 100644 index 0000000000..581efcbd5f --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/floor0.c @@ -0,0 +1,448 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: floor backend 0 implementation + + ************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include <math.h> +#include "ogg.h" +#include "ivorbiscodec.h" +#include "codec_internal.h" +#include "codebook.h" +#include "misc.h" +#include "os.h" + +#define LSP_FRACBITS 14 +extern const ogg_int32_t FLOOR_fromdB_LOOKUP[]; + +/*************** LSP decode ********************/ + +#include "lsp_lookup.h" + +/* interpolated 1./sqrt(p) where .5 <= a < 1. (.100000... to .111111...) in + 16.16 format + returns in m.8 format */ + +static long ADJUST_SQRT2[2]={8192,5792}; +static inline ogg_int32_t vorbis_invsqlook_i(long a,long e){ + long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1); + long d=a&INVSQ_LOOKUP_I_MASK; /* 0.10 */ + long val=INVSQ_LOOKUP_I[i]- /* 1.16 */ + ((INVSQ_LOOKUP_IDel[i]*d)>>INVSQ_LOOKUP_I_SHIFT); /* result 1.16 */ + val*=ADJUST_SQRT2[e&1]; + e=(e>>1)+21; + return(val>>e); +} + +/* interpolated lookup based fromdB function, domain -140dB to 0dB only */ +/* a is in n.12 format */ +#ifdef _LOW_ACCURACY_ +static inline ogg_int32_t vorbis_fromdBlook_i(long a){ + if(a>0) return 0x7fffffff; + if(a<(int)(((unsigned)-140)<<12)) return 0; + return FLOOR_fromdB_LOOKUP[((a+140)*467)>>20]<<9; +} +#else +static inline ogg_int32_t vorbis_fromdBlook_i(long a){ + if(a>0) return 0x7fffffff; + if(a<(int)(((unsigned)-140)<<12)) return 0; + return FLOOR_fromdB_LOOKUP[((a+(140<<12))*467)>>20]; +} +#endif + +/* interpolated lookup based cos function, domain 0 to PI only */ +/* a is in 0.16 format, where 0==0, 2^^16-1==PI, return 0.14 */ +static inline ogg_int32_t vorbis_coslook_i(long a){ + int i=a>>COS_LOOKUP_I_SHIFT; + int d=a&COS_LOOKUP_I_MASK; + return COS_LOOKUP_I[i]- ((d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>> + COS_LOOKUP_I_SHIFT); +} + +/* interpolated half-wave lookup based cos function */ +/* a is in 0.16 format, where 0==0, 2^^16==PI, return .LSP_FRACBITS */ +static inline ogg_int32_t vorbis_coslook2_i(long a){ + int i=a>>COS_LOOKUP_I_SHIFT; + int d=a&COS_LOOKUP_I_MASK; + return ((COS_LOOKUP_I[i]<<COS_LOOKUP_I_SHIFT)- + d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>> + (COS_LOOKUP_I_SHIFT-LSP_FRACBITS+14); +} + +static const ogg_uint16_t barklook[54]={ + 0,51,102,154, 206,258,311,365, + 420,477,535,594, 656,719,785,854, + 926,1002,1082,1166, 1256,1352,1454,1564, + 1683,1812,1953,2107, 2276,2463,2670,2900, + 3155,3440,3756,4106, 4493,4919,5387,5901, + 6466,7094,7798,8599, 9528,10623,11935,13524, + 15453,17775,20517,23667, 27183,31004 +}; + +/* used in init only; interpolate the long way */ +static inline ogg_int32_t toBARK(int n){ + int i; + for(i=0;i<54;i++) + if(n>=barklook[i] && n<barklook[i+1])break; + + if(i==54){ + return 54<<14; + }else{ + return (i<<14)+(((n-barklook[i])* + ((1UL<<31)/(barklook[i+1]-barklook[i])))>>17); + } +} + +static const unsigned char MLOOP_1[64]={ + 0,10,11,11, 12,12,12,12, 13,13,13,13, 13,13,13,13, + 14,14,14,14, 14,14,14,14, 14,14,14,14, 14,14,14,14, + 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, + 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, +}; + +static const unsigned char MLOOP_2[64]={ + 0,4,5,5, 6,6,6,6, 7,7,7,7, 7,7,7,7, + 8,8,8,8, 8,8,8,8, 8,8,8,8, 8,8,8,8, + 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, + 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, +}; + +static const unsigned char MLOOP_3[8]={0,1,2,2,3,3,3,3}; + +void vorbis_lsp_to_curve(ogg_int32_t *curve,int n,int ln, + ogg_int32_t *lsp,int m, + ogg_int32_t amp, + ogg_int32_t ampoffset, + ogg_int32_t nyq){ + + /* 0 <= m < 256 */ + + /* set up for using all int later */ + int i; + int ampoffseti=ampoffset*4096; + int ampi=amp; + ogg_int32_t *ilsp=(ogg_int32_t *)alloca(m*sizeof(*ilsp)); + + ogg_uint32_t inyq= (1UL<<31) / toBARK(nyq); + ogg_uint32_t imap= (1UL<<31) / ln; + ogg_uint32_t tBnyq1 = toBARK(nyq)<<1; + + /* Besenham for frequency scale to avoid a division */ + int f=0; + int fdx=n; + int fbase=nyq/fdx; + int ferr=0; + int fdy=nyq-fbase*fdx; + int map=0; + +#ifdef _LOW_ACCURACY_ + ogg_uint32_t nextbark=((tBnyq1<<11)/ln)>>12; +#else + ogg_uint32_t nextbark=MULT31(imap>>1,tBnyq1); +#endif + int nextf=barklook[nextbark>>14]+(((nextbark&0x3fff)* + (barklook[(nextbark>>14)+1]-barklook[nextbark>>14]))>>14); + + /* lsp is in 8.24, range 0 to PI; coslook wants it in .16 0 to 1*/ + for(i=0;i<m;i++){ +#ifndef _LOW_ACCURACY_ + ogg_int32_t val=MULT32(lsp[i],0x517cc2); +#else + ogg_int32_t val=((lsp[i]>>10)*0x517d)>>14; +#endif + + /* safeguard against a malicious stream */ + if(val<0 || (val>>COS_LOOKUP_I_SHIFT)>=COS_LOOKUP_I_SZ){ + memset(curve,0,sizeof(*curve)*n); + return; + } + + ilsp[i]=vorbis_coslook_i(val); + } + + i=0; + while(i<n){ + int j; + ogg_uint32_t pi=46341; /* 2**-.5 in 0.16 */ + ogg_uint32_t qi=46341; + ogg_int32_t qexp=0,shift; + ogg_int32_t wi; + + wi=vorbis_coslook2_i((map*imap)>>15); + + +#ifdef _V_LSP_MATH_ASM + lsp_loop_asm(&qi,&pi,&qexp,ilsp,wi,m); + + pi=((pi*pi)>>16); + qi=((qi*qi)>>16); + + if(m&1){ + qexp= qexp*2-28*((m+1)>>1)+m; + pi*=(1<<14)-((wi*wi)>>14); + qi+=pi>>14; + }else{ + qexp= qexp*2-13*m; + + pi*=(1<<14)-wi; + qi*=(1<<14)+wi; + + qi=(qi+pi)>>14; + } + + if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */ + qi>>=1; qexp++; + }else + lsp_norm_asm(&qi,&qexp); + +#else + + qi*=labs(ilsp[0]-wi); + pi*=labs(ilsp[1]-wi); + + for(j=3;j<m;j+=2){ + if(!(shift=MLOOP_1[(pi|qi)>>25])) + if(!(shift=MLOOP_2[(pi|qi)>>19])) + shift=MLOOP_3[(pi|qi)>>16]; + + qi=(qi>>shift)*labs(ilsp[j-1]-wi); + pi=(pi>>shift)*labs(ilsp[j]-wi); + qexp+=shift; + } + if(!(shift=MLOOP_1[(pi|qi)>>25])) + if(!(shift=MLOOP_2[(pi|qi)>>19])) + shift=MLOOP_3[(pi|qi)>>16]; + + /* pi,qi normalized collectively, both tracked using qexp */ + + if(m&1){ + /* odd order filter; slightly assymetric */ + /* the last coefficient */ + qi=(qi>>shift)*labs(ilsp[j-1]-wi); + pi=(pi>>shift)<<14; + qexp+=shift; + + if(!(shift=MLOOP_1[(pi|qi)>>25])) + if(!(shift=MLOOP_2[(pi|qi)>>19])) + shift=MLOOP_3[(pi|qi)>>16]; + + pi>>=shift; + qi>>=shift; + qexp+=shift-14*((m+1)>>1); + + pi=((pi*pi)>>16); + qi=((qi*qi)>>16); + qexp=qexp*2+m; + + pi*=(1<<14)-((wi*wi)>>14); + qi+=pi>>14; + + }else{ + /* even order filter; still symmetric */ + + /* p*=p(1-w), q*=q(1+w), let normalization drift because it isn't + worth tracking step by step */ + + pi>>=shift; + qi>>=shift; + qexp+=shift-7*m; + + pi=((pi*pi)>>16); + qi=((qi*qi)>>16); + qexp=qexp*2+m; + + pi*=(1<<14)-wi; + qi*=(1<<14)+wi; + qi=(qi+pi)>>14; + + } + + + /* we've let the normalization drift because it wasn't important; + however, for the lookup, things must be normalized again. We + need at most one right shift or a number of left shifts */ + + if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */ + qi>>=1; qexp++; + }else + while(qi && !(qi&0x8000)){ /* checks for 0.0xxxxxxxxxxxxxxx or less*/ + qi<<=1; qexp--; + } + +#endif + + amp=vorbis_fromdBlook_i(ampi* /* n.4 */ + vorbis_invsqlook_i(qi,qexp)- + /* m.8, m+n<=8 */ + ampoffseti); /* 8.12[0] */ + +#ifdef _LOW_ACCURACY_ + amp>>=9; +#endif + curve[i]= MULT31_SHIFT15(curve[i],amp); + + while(++i<n){ + + /* line plot to get new f */ + ferr+=fdy; + if(ferr>=fdx){ + ferr-=fdx; + f++; + } + f+=fbase; + + if(f>=nextf)break; + + curve[i]= MULT31_SHIFT15(curve[i],amp); + } + + while(1){ + map++; + + if(map+1<ln){ + +#ifdef _LOW_ACCURACY_ + nextbark=((tBnyq1<<11)/ln*(map+1))>>12; +#else + nextbark=MULT31((map+1)*(imap>>1),tBnyq1); +#endif + nextf=barklook[nextbark>>14]+ + (((nextbark&0x3fff)* + (barklook[(nextbark>>14)+1]-barklook[nextbark>>14]))>>14); + if(f<=nextf)break; + + }else{ + nextf=9999999; + break; + } + } + if(map>=ln){ + map=ln-1; /* guard against the approximation */ + nextf=9999999; + } + } +} + +/*************** vorbis decode glue ************/ + +void floor0_free_info(vorbis_info_floor *i){ + vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; + if(info)_ogg_free(info); +} + +vorbis_info_floor *floor0_info_unpack (vorbis_info *vi,oggpack_buffer *opb){ + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + int j; + + vorbis_info_floor0 *info=(vorbis_info_floor0 *)_ogg_malloc(sizeof(*info)); + info->order=oggpack_read(opb,8); + info->rate=oggpack_read(opb,16); + info->barkmap=oggpack_read(opb,16); + info->ampbits=oggpack_read(opb,6); + info->ampdB=oggpack_read(opb,8); + info->numbooks=oggpack_read(opb,4)+1; + + if(info->order<1)goto err_out; + if(info->rate<1)goto err_out; + if(info->barkmap<1)goto err_out; + + for(j=0;j<info->numbooks;j++){ + info->books[j]=(char)oggpack_read(opb,8); + if(info->books[j]>=ci->books)goto err_out; + } + + if(oggpack_eop(opb))goto err_out; + return(info); + + err_out: + floor0_free_info(info); + return(NULL); +} + +int floor0_memosize(vorbis_info_floor *i){ + vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; + return info->order+1; +} + +ogg_int32_t *floor0_inverse1(vorbis_dsp_state *vd,vorbis_info_floor *i, + ogg_int32_t *lsp){ + vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; + int j,k; + + int ampraw=oggpack_read(&vd->opb,info->ampbits); + if(ampraw>0){ /* also handles the -1 out of data case */ + long maxval=(1<<info->ampbits)-1; + int amp=((ampraw*info->ampdB)<<4)/maxval; + int booknum=oggpack_read(&vd->opb,_ilog(info->numbooks)); + + if(booknum!=-1 && booknum<info->numbooks){ /* be paranoid */ + codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup; + codebook *b=ci->book_param+info->books[booknum]; + ogg_int32_t last=0; + + for(j=0;j<info->order;j+=b->dim) + if(vorbis_book_decodev_set(b,lsp+j,&vd->opb,b->dim,-24)==-1)goto eop; + for(j=0;j<info->order;){ + for(k=0;k<b->dim;k++,j++)lsp[j]+=last; + last=lsp[j-1]; + } + + lsp[info->order]=amp; + return(lsp); + } + } + eop: + return(NULL); +} + +int floor0_inverse2(vorbis_dsp_state *vd,vorbis_info_floor *i, + ogg_int32_t *lsp,ogg_int32_t *out){ + vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; + codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup; + + if(lsp){ + ogg_int32_t amp=lsp[info->order]; + + /* take the coefficients back to a spectral envelope curve */ + vorbis_lsp_to_curve(out,ci->blocksizes[vd->W]/2,info->barkmap, + lsp,info->order,amp,info->ampdB, + info->rate>>1); + return(1); + } + memset(out,0,sizeof(*out)*ci->blocksizes[vd->W]/2); + return(0); +} + diff --git a/ohos-specific/tremolo/Tremolo/floor1.c b/ohos-specific/tremolo/Tremolo/floor1.c new file mode 100644 index 0000000000..3799f50cfd --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/floor1.c @@ -0,0 +1,407 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: floor backend 1 implementation + + ************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include <math.h> +#include "ogg.h" +#include "ivorbiscodec.h" +#include "codec_internal.h" +#include "codebook.h" +#include "misc.h" + +extern const ogg_int32_t FLOOR_fromdB_LOOKUP[]; +#define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */ +#define VIF_POSIT 63 + +/***********************************************/ + +void floor1_free_info(vorbis_info_floor *i){ + vorbis_info_floor1 *info=(vorbis_info_floor1 *)i; + if(info){ + if(info->klass)_ogg_free(info->klass); + if(info->partitionclass)_ogg_free(info->partitionclass); + if(info->postlist)_ogg_free(info->postlist); + if(info->forward_index)_ogg_free(info->forward_index); + if(info->hineighbor)_ogg_free(info->hineighbor); + if(info->loneighbor)_ogg_free(info->loneighbor); + memset(info,0,sizeof(*info)); + _ogg_free(info); + } +} + +static int ilog(unsigned int v){ + int ret=0; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +static void floor1_mergesort(ogg_uint8_t *index,ogg_uint16_t *vals,ogg_uint16_t n){ + ogg_uint16_t i,j; + ogg_uint8_t *temp,*A=index,*B=_ogg_malloc(n*sizeof(*B)); + + for(i=1;i<n;i<<=1){ + for(j=0;j+i<n;){ + int k1=j; + int mid=j+i; + int k2=mid; + int end=(j+i*2<n?j+i*2:n); + while(k1<mid && k2<end){ + if(vals[A[k1]]<vals[A[k2]]) + B[j++]=A[k1++]; + else + B[j++]=A[k2++]; + } + while(k1<mid) B[j++]=A[k1++]; + while(k2<end) B[j++]=A[k2++]; + } + for(;j<n;j++)B[j]=A[j]; + temp=A;A=B;B=temp; + } + + if(B==index){ + for(j=0;j<n;j++)B[j]=A[j]; + _ogg_free(A); + }else + _ogg_free(B); +} + + +vorbis_info_floor *floor1_info_unpack (vorbis_info *vi,oggpack_buffer *opb){ + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + int j,k,count=0,maxclass=-1,rangebits; + + vorbis_info_floor1 *info=(vorbis_info_floor1 *)_ogg_calloc(1,sizeof(*info)); + /* read partitions */ + info->partitions=oggpack_read(opb,5); /* only 0 to 31 legal */ + info->partitionclass= + (ogg_uint8_t *)_ogg_malloc(info->partitions*sizeof(*info->partitionclass)); + for(j=0;j<info->partitions;j++){ + info->partitionclass[j]=(char)oggpack_read(opb,4); /* only 0 to 15 legal */ + if(maxclass<info->partitionclass[j])maxclass=info->partitionclass[j]; + } + + /* read partition classes */ + info->klass= + (floor1class *)_ogg_malloc((maxclass+1)*sizeof(*info->klass)); + for(j=0;j<maxclass+1;j++){ + info->klass[j].class_dim=(char)oggpack_read(opb,3)+1; /* 1 to 8 */ + info->klass[j].class_subs=(char)oggpack_read(opb,2); /* 0,1,2,3 bits */ + if(oggpack_eop(opb)<0) goto err_out; + if(info->klass[j].class_subs) + info->klass[j].class_book=(unsigned char)oggpack_read(opb,8); + else + info->klass[j].class_book=0; + if(info->klass[j].class_book>=ci->books)goto err_out; + for(k=0;k<(1<<info->klass[j].class_subs);k++){ + info->klass[j].class_subbook[k]=(unsigned char)(oggpack_read(opb,8)-1); + if(info->klass[j].class_subbook[k]>=ci->books && + info->klass[j].class_subbook[k]!=0xff)goto err_out; + } + } + + /* read the post list */ + info->mult=oggpack_read(opb,2)+1; /* only 1,2,3,4 legal now */ + rangebits=oggpack_read(opb,4); + + for(j=0,k=0;j<info->partitions;j++) + count+=info->klass[info->partitionclass[j]].class_dim; + info->postlist= + (ogg_uint16_t *)_ogg_malloc((count+2)*sizeof(*info->postlist)); + info->forward_index= + (ogg_uint8_t *)_ogg_malloc((count+2)*sizeof(*info->forward_index)); + info->loneighbor= + (ogg_uint8_t *)_ogg_malloc(count*sizeof(*info->loneighbor)); + info->hineighbor= + (ogg_uint8_t *)_ogg_malloc(count*sizeof(*info->hineighbor)); + + count=0; + for(j=0,k=0;j<info->partitions;j++){ + count+=info->klass[info->partitionclass[j]].class_dim; + for(;k<count;k++){ + int t=info->postlist[k+2]=(ogg_uint16_t)oggpack_read(opb,rangebits); + if(t>=(1<<rangebits))goto err_out; + } + } + if(oggpack_eop(opb))goto err_out; + info->postlist[0]=0; + info->postlist[1]=1<<rangebits; + info->posts=count+2; + + /* also store a sorted position index */ + for(j=0;j<info->posts;j++)info->forward_index[j]=j; + floor1_mergesort(info->forward_index,info->postlist,info->posts); + + /* discover our neighbors for decode where we don't use fit flags + (that would push the neighbors outward) */ + for(j=0;j<info->posts-2;j++){ + int lo=0; + int hi=1; + int lx=0; + int hx=info->postlist[1]; + int currentx=info->postlist[j+2]; + for(k=0;k<j+2;k++){ + int x=info->postlist[k]; + if(x>lx && x<currentx){ + lo=k; + lx=x; + } + if(x<hx && x>currentx){ + hi=k; + hx=x; + } + } + info->loneighbor[j]=lo; + info->hineighbor[j]=hi; + } + + return(info); + + err_out: + floor1_free_info(info); + return(NULL); +} + +#ifdef ONLY_C +static +#endif +int render_point(int x0,int x1,int y0,int y1,int x){ + y0&=0x7fff; /* mask off flag */ + y1&=0x7fff; + + { + int dy=y1-y0; + int adx=x1-x0; + int ady=abs(dy); + int err=ady*(x-x0); + + int off=err/adx; + if(dy<0)return(y0-off); + return(y0+off); + } +} + +#ifndef ONLY_C +void render_lineARM(int n, ogg_int32_t *d,const ogg_int32_t *floor, int base, int err, int adx, int ady); +#endif + +static void render_line(int n,int x0,int x1,int y0,int y1,ogg_int32_t *d){ + int dy; + int adx; + int ady; + int base; + int err; + const ogg_int32_t *floor; + + if(n>x1)n=x1; + n -= x0; + if (n <= 0 || y0 < 0 || y0 > 255 || y1 < 0 || y1 > 255) { + return; + } + dy=y1-y0; + adx=x1-x0; + ady=abs(dy); + base=dy/adx; + err=adx-1; + floor=&FLOOR_fromdB_LOOKUP[y0]; + d += x0; + ady-=abs(base*adx); + + /* We should add base each time, and then: + * if dy >=0 we occasionally add 1 + * else occasionally subtract 1. + * As an optimisation we say that if dy <0 we make base 1 smaller. + * Then we need to add 1 occassionally, rather than subtract 1 - but we + * need to add 1 in all the cases when we wouldn't have done so before. + * Previously we'd have added 1 (100*ady/adx)% of the time. Now we want + * to do so (100*(adx-ady)/adx)% of the time. + */ + if (dy < 0){ + base--; + ady = adx-ady; + err = 0; + } + + //if(x<n) + // d[x]= MULT31_SHIFT15(d[x],FLOOR_fromdB_LOOKUP[y]); + +#if defined(ONLY_C) + do{ + *d = MULT31_SHIFT15(*d,*floor); + d++; + floor+=base; + err-=ady; + if(err<0){ + err+=adx; + floor+=1; + } + n--; + } while(n>0); +#else + render_lineARM(n,d,floor,base,err,adx,ady); +#endif +} + +int floor1_memosize(vorbis_info_floor *i){ + vorbis_info_floor1 *info=(vorbis_info_floor1 *)i; + return info->posts; +} + +static int quant_look[4]={256,128,86,64}; + +ogg_int32_t *floor1_inverse1(vorbis_dsp_state *vd,vorbis_info_floor *in, + ogg_int32_t *fit_value){ + vorbis_info_floor1 *info=(vorbis_info_floor1 *)in; + codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup; + + int i,j,k; + codebook *books=ci->book_param; + int quant_q=quant_look[info->mult-1]; + + /* unpack wrapped/predicted values from stream */ + if(oggpack_read(&vd->opb,1)==1){ + fit_value[0]=oggpack_read(&vd->opb,ilog(quant_q-1)); + fit_value[1]=oggpack_read(&vd->opb,ilog(quant_q-1)); + + /* partition by partition */ + /* partition by partition */ + for(i=0,j=2;i<info->partitions;i++){ + int classv=info->partitionclass[i]; + int cdim=info->klass[classv].class_dim; + int csubbits=info->klass[classv].class_subs; + int csub=1<<csubbits; + int cval=0; + + /* decode the partition's first stage cascade value */ + if(csubbits){ + cval=vorbis_book_decode(books+info->klass[classv].class_book,&vd->opb); + + if(cval==-1)goto eop; + } + + for(k=0;k<cdim;k++){ + int book=info->klass[classv].class_subbook[cval&(csub-1)]; + cval>>=csubbits; + if(book!=0xff){ + if((fit_value[j+k]=vorbis_book_decode(books+book,&vd->opb))==-1) + goto eop; + }else{ + fit_value[j+k]=0; + } + } + j+=cdim; + } + + /* unwrap positive values and reconsitute via linear interpolation */ + for(i=2;i<info->posts;i++){ + int predicted=render_point(info->postlist[info->loneighbor[i-2]], + info->postlist[info->hineighbor[i-2]], + fit_value[info->loneighbor[i-2]], + fit_value[info->hineighbor[i-2]], + info->postlist[i]); + int hiroom=quant_q-predicted; + int loroom=predicted; + int room=(hiroom<loroom?hiroom:loroom)<<1; + int val=fit_value[i]; + + if(val){ + if(val>=room){ + if(hiroom>loroom){ + val = val-loroom; + }else{ + val = -1-(val-hiroom); + } + }else{ + if(val&1){ + val= -((val+1)>>1); + }else{ + val>>=1; + } + } + + fit_value[i]=val+predicted; + fit_value[info->loneighbor[i-2]]&=0x7fff; + fit_value[info->hineighbor[i-2]]&=0x7fff; + + }else{ + fit_value[i]=predicted|0x8000; + } + + } + + return(fit_value); + } + eop: + return(NULL); +} + +int floor1_inverse2(vorbis_dsp_state *vd,vorbis_info_floor *in, + ogg_int32_t *fit_value,ogg_int32_t *out){ + vorbis_info_floor1 *info=(vorbis_info_floor1 *)in; + + codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup; + int n=ci->blocksizes[vd->W]/2; + int j; + + if(fit_value){ + /* render the lines */ + int hx=0; + int lx=0; + int ly=fit_value[0]*info->mult; + for(j=1;j<info->posts;j++){ + int current=info->forward_index[j]; + int hy=fit_value[current]&0x7fff; + if(hy==fit_value[current]){ + + hy*=info->mult; + hx=info->postlist[current]; + + render_line(n,lx,hx,ly,hy,out); + + lx=hx; + ly=hy; + } + } + for(j=hx;j<n;j++)out[j]*=ly; /* be certain */ + return(1); + } + memset(out,0,sizeof(*out)*n); + return(0); +} diff --git a/ohos-specific/tremolo/Tremolo/floor1ARM.s b/ohos-specific/tremolo/Tremolo/floor1ARM.s new file mode 100644 index 0000000000..981e86bb51 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/floor1ARM.s @@ -0,0 +1,67 @@ +@ Tremolo library +@----------------------------------------------------------------------- +@ Copyright (C) 2002-2009, Xiph.org Foundation +@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd +@ All rights reserved. + +@ Redistribution and use in source and binary forms, with or without +@ modification, are permitted provided that the following conditions +@ are met: + +@ * Redistributions of source code must retain the above copyright +@ notice, this list of conditions and the following disclaimer. +@ * Redistributions in binary form must reproduce the above +@ copyright notice, this list of conditions and the following disclaimer +@ in the documentation and/or other materials provided with the +@ distribution. +@ * Neither the names of the Xiph.org Foundation nor Pinknoise +@ Productions Ltd nor the names of its contributors may be used to +@ endorse or promote products derived from this software without +@ specific prior written permission. +@ +@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@ ---------------------------------------------------------------------- + + .text + + .global render_lineARM + +render_lineARM: + @ r0 = n + @ r1 = d + @ r2 = floor + @ r3 = base + @ <> = err + @ <> = adx + @ <> = ady + MOV r12,r13 + STMFD r13!,{r4-r6,r11,r14} + LDMFD r12,{r11,r12,r14} @ r11 = err + @ r12 = adx + @ r14 = ady +rl_loop: + LDR r4,[r1] @ r4 = *d + LDR r5,[r2],r3,LSL #2 @ r5 = *floor r2 = floor+base + SUBS r11,r11,r14 @ err -= ady + ADDLT r11,r11,r12 @ if (err < 0) err+=adx + SMULL r6, r5, r4, r5 @ (r6,r5) = *d * *floor + ADDLT r2, r2, #4 @ floor+=1 + MOVS r6, r6, LSR #15 + ADC r5, r6, r5, LSL #17 @ r5 = MULT31_SHIFT15 + STR r5,[r1],#4 + SUBS r0, r0, #1 + BGT rl_loop + + LDMFD r13!,{r4-r6,r11,PC} + + @ END diff --git a/ohos-specific/tremolo/Tremolo/floor1LARM.s b/ohos-specific/tremolo/Tremolo/floor1LARM.s new file mode 100644 index 0000000000..48b794cd33 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/floor1LARM.s @@ -0,0 +1,66 @@ +@ Tremolo library +@----------------------------------------------------------------------- +@ Copyright (C) 2002-2009, Xiph.org Foundation +@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd +@ All rights reserved. + +@ Redistribution and use in source and binary forms, with or without +@ modification, are permitted provided that the following conditions +@ are met: + +@ * Redistributions of source code must retain the above copyright +@ notice, this list of conditions and the following disclaimer. +@ * Redistributions in binary form must reproduce the above +@ copyright notice, this list of conditions and the following disclaimer +@ in the documentation and/or other materials provided with the +@ distribution. +@ * Neither the names of the Xiph.org Foundation nor Pinknoise +@ Productions Ltd nor the names of its contributors may be used to +@ endorse or promote products derived from this software without +@ specific prior written permission. +@ +@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@ ---------------------------------------------------------------------- + + .text + + .global render_lineARM + +render_lineARM: + @ r0 = n + @ r1 = d + @ r2 = floor + @ r3 = base + @ <> = err + @ <> = adx + @ <> = ady + MOV r12,r13 + STMFD r13!,{r4-r6,r11,r14} + LDMFD r12,{r11,r12,r14} @ r11 = err + @ r12 = adx + @ r14 = ady +rl_loop: + LDR r4, [r1] @ r4 = *d + LDR r5, [r2], r3,LSL #2 @ r5 = *floor r2 = floor+base + SUBS r11,r11,r14 @ err -= ady + MOV r4, r4, ASR #6 + MUL r5, r4, r5 @ r5 = MULT31_SHIFT15 + ADDLT r11,r11,r12 @ if (err < 0) err+=adx + ADDLT r2, r2, #4 @ floor+=1 + SUBS r0, r0, #1 + STR r5, [r1], #4 + BGT rl_loop + + LDMFD r13!,{r4-r6,r11,PC} + + @ END diff --git a/ohos-specific/tremolo/Tremolo/floor_lookup.c b/ohos-specific/tremolo/Tremolo/floor_lookup.c new file mode 100644 index 0000000000..91c585c25d --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/floor_lookup.c @@ -0,0 +1,112 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: floor dB lookup + + ************************************************************************/ + +#include "os.h" + +#ifdef _LOW_ACCURACY_ +# define XdB(n) ((((n)>>8)+1)>>1) +#else +# define XdB(n) (n) +#endif + +const ogg_int32_t FLOOR_fromdB_LOOKUP[256]={ + XdB(0x000000e5), XdB(0x000000f4), XdB(0x00000103), XdB(0x00000114), + XdB(0x00000126), XdB(0x00000139), XdB(0x0000014e), XdB(0x00000163), + XdB(0x0000017a), XdB(0x00000193), XdB(0x000001ad), XdB(0x000001c9), + XdB(0x000001e7), XdB(0x00000206), XdB(0x00000228), XdB(0x0000024c), + XdB(0x00000272), XdB(0x0000029b), XdB(0x000002c6), XdB(0x000002f4), + XdB(0x00000326), XdB(0x0000035a), XdB(0x00000392), XdB(0x000003cd), + XdB(0x0000040c), XdB(0x00000450), XdB(0x00000497), XdB(0x000004e4), + XdB(0x00000535), XdB(0x0000058c), XdB(0x000005e8), XdB(0x0000064a), + XdB(0x000006b3), XdB(0x00000722), XdB(0x00000799), XdB(0x00000818), + XdB(0x0000089e), XdB(0x0000092e), XdB(0x000009c6), XdB(0x00000a69), + XdB(0x00000b16), XdB(0x00000bcf), XdB(0x00000c93), XdB(0x00000d64), + XdB(0x00000e43), XdB(0x00000f30), XdB(0x0000102d), XdB(0x0000113a), + XdB(0x00001258), XdB(0x0000138a), XdB(0x000014cf), XdB(0x00001629), + XdB(0x0000179a), XdB(0x00001922), XdB(0x00001ac4), XdB(0x00001c82), + XdB(0x00001e5c), XdB(0x00002055), XdB(0x0000226f), XdB(0x000024ac), + XdB(0x0000270e), XdB(0x00002997), XdB(0x00002c4b), XdB(0x00002f2c), + XdB(0x0000323d), XdB(0x00003581), XdB(0x000038fb), XdB(0x00003caf), + XdB(0x000040a0), XdB(0x000044d3), XdB(0x0000494c), XdB(0x00004e10), + XdB(0x00005323), XdB(0x0000588a), XdB(0x00005e4b), XdB(0x0000646b), + XdB(0x00006af2), XdB(0x000071e5), XdB(0x0000794c), XdB(0x0000812e), + XdB(0x00008993), XdB(0x00009283), XdB(0x00009c09), XdB(0x0000a62d), + XdB(0x0000b0f9), XdB(0x0000bc79), XdB(0x0000c8b9), XdB(0x0000d5c4), + XdB(0x0000e3a9), XdB(0x0000f274), XdB(0x00010235), XdB(0x000112fd), + XdB(0x000124dc), XdB(0x000137e4), XdB(0x00014c29), XdB(0x000161bf), + XdB(0x000178bc), XdB(0x00019137), XdB(0x0001ab4a), XdB(0x0001c70e), + XdB(0x0001e4a1), XdB(0x0002041f), XdB(0x000225aa), XdB(0x00024962), + XdB(0x00026f6d), XdB(0x000297f0), XdB(0x0002c316), XdB(0x0002f109), + XdB(0x000321f9), XdB(0x00035616), XdB(0x00038d97), XdB(0x0003c8b4), + XdB(0x000407a7), XdB(0x00044ab2), XdB(0x00049218), XdB(0x0004de23), + XdB(0x00052f1e), XdB(0x0005855c), XdB(0x0005e135), XdB(0x00064306), + XdB(0x0006ab33), XdB(0x00071a24), XdB(0x0007904b), XdB(0x00080e20), + XdB(0x00089422), XdB(0x000922da), XdB(0x0009bad8), XdB(0x000a5cb6), + XdB(0x000b091a), XdB(0x000bc0b1), XdB(0x000c8436), XdB(0x000d5471), + XdB(0x000e3233), XdB(0x000f1e5f), XdB(0x001019e4), XdB(0x001125c1), + XdB(0x00124306), XdB(0x001372d5), XdB(0x0014b663), XdB(0x00160ef7), + XdB(0x00177df0), XdB(0x001904c1), XdB(0x001aa4f9), XdB(0x001c603d), + XdB(0x001e384f), XdB(0x00202f0f), XdB(0x0022467a), XdB(0x002480b1), + XdB(0x0026dff7), XdB(0x002966b3), XdB(0x002c1776), XdB(0x002ef4fc), + XdB(0x0032022d), XdB(0x00354222), XdB(0x0038b828), XdB(0x003c67c2), + XdB(0x004054ae), XdB(0x004482e8), XdB(0x0048f6af), XdB(0x004db488), + XdB(0x0052c142), XdB(0x005821ff), XdB(0x005ddc33), XdB(0x0063f5b0), + XdB(0x006a74a7), XdB(0x00715faf), XdB(0x0078bdce), XdB(0x0080967f), + XdB(0x0088f1ba), XdB(0x0091d7f9), XdB(0x009b5247), XdB(0x00a56a41), + XdB(0x00b02a27), XdB(0x00bb9ce2), XdB(0x00c7ce12), XdB(0x00d4ca17), + XdB(0x00e29e20), XdB(0x00f15835), XdB(0x0101074b), XdB(0x0111bb4e), + XdB(0x01238531), XdB(0x01367704), XdB(0x014aa402), XdB(0x016020a7), + XdB(0x017702c3), XdB(0x018f6190), XdB(0x01a955cb), XdB(0x01c4f9cf), + XdB(0x01e269a8), XdB(0x0201c33b), XdB(0x0223265a), XdB(0x0246b4ea), + XdB(0x026c9302), XdB(0x0294e716), XdB(0x02bfda13), XdB(0x02ed9793), + XdB(0x031e4e09), XdB(0x03522ee4), XdB(0x03896ed0), XdB(0x03c445e2), + XdB(0x0402efd6), XdB(0x0445ac4b), XdB(0x048cbefc), XdB(0x04d87013), + XdB(0x05290c67), XdB(0x057ee5ca), XdB(0x05da5364), XdB(0x063bb204), + XdB(0x06a36485), XdB(0x0711d42b), XdB(0x0787710e), XdB(0x0804b299), + XdB(0x088a17ef), XdB(0x0918287e), XdB(0x09af747c), XdB(0x0a50957e), + XdB(0x0afc2f19), XdB(0x0bb2ef7f), XdB(0x0c759034), XdB(0x0d44d6ca), + XdB(0x0e2195bc), XdB(0x0f0cad0d), XdB(0x10070b62), XdB(0x1111aeea), + XdB(0x122da66c), XdB(0x135c120f), XdB(0x149e24d9), XdB(0x15f525b1), + XdB(0x176270e3), XdB(0x18e7794b), XdB(0x1a85c9ae), XdB(0x1c3f06d1), + XdB(0x1e14f07d), XdB(0x200963d7), XdB(0x221e5ccd), XdB(0x2455f870), + XdB(0x26b2770b), XdB(0x29363e2b), XdB(0x2be3db5c), XdB(0x2ebe06b6), + XdB(0x31c7a55b), XdB(0x3503ccd4), XdB(0x3875c5aa), XdB(0x3c210f44), + XdB(0x4009632b), XdB(0x4432b8cf), XdB(0x48a149bc), XdB(0x4d59959e), + XdB(0x52606733), XdB(0x57bad899), XdB(0x5d6e593a), XdB(0x6380b298), + XdB(0x69f80e9a), XdB(0x70dafda8), XdB(0x78307d76), XdB(0x7fffffff), +}; + diff --git a/ohos-specific/tremolo/Tremolo/framing.c b/ohos-specific/tremolo/Tremolo/framing.c new file mode 100644 index 0000000000..4aca8ba85a --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/framing.c @@ -0,0 +1,1169 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: decode Ogg streams back into raw packets + + note: The CRC code is directly derived from public domain code by + Ross Williams (ross@guest.adelaide.edu.au). See docs/framing.html + for details. + + ************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include "ogg.h" +#include "misc.h" + + +/* A complete description of Ogg framing exists in docs/framing.html */ + +/* basic, centralized Ogg memory management based on linked lists of + references to refcounted memory buffers. References and buffers + are both recycled. Buffers are passed around and consumed in + reference form. */ + +static ogg_buffer_state *ogg_buffer_create(void){ + ogg_buffer_state *bs=_ogg_calloc(1,sizeof(*bs)); + return bs; +} + +/* destruction is 'lazy'; there may be memory references outstanding, + and yanking the buffer state out from underneath would be + antisocial. Dealloc what is currently unused and have + _release_one watch for the stragglers to come in. When they do, + finish destruction. */ + +/* call the helper while holding lock */ +static void _ogg_buffer_destroy(ogg_buffer_state *bs){ + ogg_buffer *bt; + ogg_reference *rt; + + if(bs->shutdown){ + + bt=bs->unused_buffers; + rt=bs->unused_references; + + while(bt){ + ogg_buffer *b=bt; + bt=b->ptr.next; + if(b->data)_ogg_free(b->data); + _ogg_free(b); + } + bs->unused_buffers=0; + while(rt){ + ogg_reference *r=rt; + rt=r->next; + _ogg_free(r); + } + bs->unused_references=0; + + if(!bs->outstanding) + _ogg_free(bs); + + } +} + +static void ogg_buffer_destroy(ogg_buffer_state *bs){ + bs->shutdown=1; + _ogg_buffer_destroy(bs); +} + +static ogg_buffer *_fetch_buffer(ogg_buffer_state *bs,long bytes){ + ogg_buffer *ob; + bs->outstanding++; + + /* do we have an unused buffer sitting in the pool? */ + if(bs->unused_buffers){ + ob=bs->unused_buffers; + bs->unused_buffers=ob->ptr.next; + + /* if the unused buffer is too small, grow it */ + if(ob->size<bytes){ + ob->data=_ogg_realloc(ob->data,bytes); + ob->size=bytes; + } + }else{ + /* allocate a new buffer */ + ob=_ogg_malloc(sizeof(*ob)); + ob->data=_ogg_malloc(bytes<16?16:bytes); + ob->size=bytes; + } + + ob->refcount=1; + ob->ptr.owner=bs; + return ob; +} + +static ogg_reference *_fetch_ref(ogg_buffer_state *bs){ + ogg_reference *or; + bs->outstanding++; + + /* do we have an unused reference sitting in the pool? */ + if(bs->unused_references){ + or=bs->unused_references; + bs->unused_references=or->next; + }else{ + /* allocate a new reference */ + or=_ogg_malloc(sizeof(*or)); + } + + or->begin=0; + or->length=0; + or->next=0; + return or; +} + +/* fetch a reference pointing to a fresh, initially continguous buffer + of at least [bytes] length */ +static ogg_reference *ogg_buffer_alloc(ogg_buffer_state *bs,long bytes){ + ogg_buffer *ob=_fetch_buffer(bs,bytes); + ogg_reference *or=_fetch_ref(bs); + or->buffer=ob; + return or; +} + +/* enlarge the data buffer in the current link */ +static void ogg_buffer_realloc(ogg_reference *or,long bytes){ + ogg_buffer *ob=or->buffer; + + /* if the unused buffer is too small, grow it */ + if(ob->size<bytes){ + ob->data=_ogg_realloc(ob->data,bytes); + ob->size=bytes; + } +} + +static void _ogg_buffer_mark_one(ogg_reference *or){ + or->buffer->refcount++; +} + +/* increase the refcount of the buffers to which the reference points */ +static void ogg_buffer_mark(ogg_reference *or){ + while(or){ + _ogg_buffer_mark_one(or); + or=or->next; + } +} + +/* duplicate a reference (pointing to the same actual buffer memory) + and increment buffer refcount. If the desired segment is zero + length, a zero length ref is returned. */ +static ogg_reference *ogg_buffer_sub(ogg_reference *or,long length){ + ogg_reference *ret=0,*head=0; + + /* duplicate the reference chain; increment refcounts */ + while(or && length){ + ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner); + if(head) + head->next=temp; + else + ret=temp; + head=temp; + head->buffer=or->buffer; + head->begin=or->begin; + head->length=length; + if(head->length>or->length) + head->length=or->length; + + length-=head->length; + or=or->next; + } + + ogg_buffer_mark(ret); + return ret; +} + +ogg_reference *ogg_buffer_dup(ogg_reference *or){ + ogg_reference *ret=0,*head=0; + /* duplicate the reference chain; increment refcounts */ + while(or){ + ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner); + if(head) + head->next=temp; + else + ret=temp; + head=temp; + head->buffer=or->buffer; + head->begin=or->begin; + head->length=or->length; + or=or->next; + } + + ogg_buffer_mark(ret); + return ret; +} + +/* split a reference into two references; 'return' is a reference to + the buffer preceeding pos and 'head'/'tail' are the buffer past the + split. If pos is at or past the end of the passed in segment, + 'head/tail' are NULL */ +static ogg_reference *ogg_buffer_split(ogg_reference **tail, + ogg_reference **head,long pos){ + + /* walk past any preceeding fragments to one of: + a) the exact boundary that seps two fragments + b) the fragment that needs split somewhere in the middle */ + ogg_reference *ret=*tail; + ogg_reference *or=*tail; + + while(or && pos>or->length){ + pos-=or->length; + or=or->next; + } + + if(!or || pos==0){ + + return 0; + + }else{ + + if(pos>=or->length){ + /* exact split, or off the end? */ + if(or->next){ + + /* a split */ + *tail=or->next; + or->next=0; + + }else{ + + /* off or at the end */ + *tail=*head=0; + + } + }else{ + + /* split within a fragment */ + long lengthA=pos; + long beginB=or->begin+pos; + long lengthB=or->length-pos; + + /* make a new reference to tail the second piece */ + *tail=_fetch_ref(or->buffer->ptr.owner); + + (*tail)->buffer=or->buffer; + (*tail)->begin=beginB; + (*tail)->length=lengthB; + (*tail)->next=or->next; + _ogg_buffer_mark_one(*tail); + if(head && or==*head)*head=*tail; + + /* update the first piece */ + or->next=0; + or->length=lengthA; + + } + } + return ret; +} + +static void ogg_buffer_release_one(ogg_reference *or){ + ogg_buffer *ob=or->buffer; + ogg_buffer_state *bs=ob->ptr.owner; + + ob->refcount--; + if(ob->refcount==0){ + bs->outstanding--; /* for the returned buffer */ + ob->ptr.next=bs->unused_buffers; + bs->unused_buffers=ob; + } + + bs->outstanding--; /* for the returned reference */ + or->next=bs->unused_references; + bs->unused_references=or; + + _ogg_buffer_destroy(bs); /* lazy cleanup (if needed) */ + +} + +/* release the references, decrease the refcounts of buffers to which + they point, release any buffers with a refcount that drops to zero */ +static void ogg_buffer_release(ogg_reference *or){ + while(or){ + ogg_reference *next=or->next; + ogg_buffer_release_one(or); + or=next; + } +} + +static ogg_reference *ogg_buffer_pretruncate(ogg_reference *or,long pos){ + /* release preceeding fragments we don't want */ + while(or && pos>=or->length){ + ogg_reference *next=or->next; + pos-=or->length; + ogg_buffer_release_one(or); + or=next; + } + if (or) { + or->begin+=pos; + or->length-=pos; + } + return or; +} + +static ogg_reference *ogg_buffer_walk(ogg_reference *or){ + if(!or)return NULL; + while(or->next){ + or=or->next; + } + return(or); +} + +/* *head is appended to the front end (head) of *tail; both continue to + be valid pointers, with *tail at the tail and *head at the head */ +static ogg_reference *ogg_buffer_cat(ogg_reference *tail, ogg_reference *head){ + if(!tail)return head; + + while(tail->next){ + tail=tail->next; + } + tail->next=head; + return ogg_buffer_walk(head); +} + +static void _positionB(oggbyte_buffer *b,int pos){ + if(pos<b->pos){ + /* start at beginning, scan forward */ + b->ref=b->baseref; + b->pos=0; + b->end=b->pos+b->ref->length; + b->ptr=b->ref->buffer->data+b->ref->begin; + } +} + +static void _positionF(oggbyte_buffer *b,int pos){ + /* scan forward for position */ + while(pos>=b->end){ + /* just seek forward */ + b->pos+=b->ref->length; + b->ref=b->ref->next; + b->end=b->ref->length+b->pos; + b->ptr=b->ref->buffer->data+b->ref->begin; + } +} + +static int oggbyte_init(oggbyte_buffer *b,ogg_reference *or){ + memset(b,0,sizeof(*b)); + if(or){ + b->ref=b->baseref=or; + b->pos=0; + b->end=b->ref->length; + b->ptr=b->ref->buffer->data+b->ref->begin; + return 0; + }else + return -1; +} + +static void oggbyte_set4(oggbyte_buffer *b,ogg_uint32_t val,int pos){ + int i; + _positionB(b,pos); + for(i=0;i<4;i++){ + _positionF(b,pos); + b->ptr[pos-b->pos]=val; + val>>=8; + ++pos; + } +} + +static unsigned char oggbyte_read1(oggbyte_buffer *b,int pos){ + _positionB(b,pos); + _positionF(b,pos); + return b->ptr[pos-b->pos]; +} + +static ogg_uint32_t oggbyte_read4(oggbyte_buffer *b,int pos){ + ogg_uint32_t ret; + _positionB(b,pos); + _positionF(b,pos); + ret=b->ptr[pos-b->pos]; + _positionF(b,++pos); + ret|=b->ptr[pos-b->pos]<<8; + _positionF(b,++pos); + ret|=b->ptr[pos-b->pos]<<16; + _positionF(b,++pos); + ret|=b->ptr[pos-b->pos]<<24; + return ret; +} + +static ogg_int64_t oggbyte_read8(oggbyte_buffer *b,int pos){ + ogg_int64_t ret; + unsigned char t[7]; + int i; + _positionB(b,pos); + for(i=0;i<7;i++){ + _positionF(b,pos); + t[i]=b->ptr[pos++ -b->pos]; + } + + _positionF(b,pos); + ret=b->ptr[pos-b->pos]; + + for(i=6;i>=0;--i) + ret= ret<<8 | t[i]; + + return ret; +} + +/* Now we get to the actual framing code */ + +int ogg_page_version(ogg_page *og){ + oggbyte_buffer ob; + if(oggbyte_init(&ob,og->header))return -1; + return oggbyte_read1(&ob,4); +} + +int ogg_page_continued(ogg_page *og){ + oggbyte_buffer ob; + if(oggbyte_init(&ob,og->header))return -1; + return oggbyte_read1(&ob,5)&0x01; +} + +int ogg_page_bos(ogg_page *og){ + oggbyte_buffer ob; + if(oggbyte_init(&ob,og->header))return -1; + return oggbyte_read1(&ob,5)&0x02; +} + +int ogg_page_eos(ogg_page *og){ + oggbyte_buffer ob; + if(oggbyte_init(&ob,og->header))return -1; + return oggbyte_read1(&ob,5)&0x04; +} + +ogg_int64_t ogg_page_granulepos(ogg_page *og){ + oggbyte_buffer ob; + if(oggbyte_init(&ob,og->header))return -1; + return oggbyte_read8(&ob,6); +} + +ogg_uint32_t ogg_page_serialno(ogg_page *og){ + oggbyte_buffer ob; + if(oggbyte_init(&ob,og->header)) return 0xffffffffUL; + return oggbyte_read4(&ob,14); +} + +ogg_uint32_t ogg_page_pageno(ogg_page *og){ + oggbyte_buffer ob; + if(oggbyte_init(&ob,og->header))return 0xffffffffUL; + return oggbyte_read4(&ob,18); +} + +/* returns the number of packets that are completed on this page (if + the leading packet is begun on a previous page, but ends on this + page, it's counted */ + +/* NOTE: +If a page consists of a packet begun on a previous page, and a new +packet begun (but not completed) on this page, the return will be: + ogg_page_packets(page) ==1, + ogg_page_continued(page) !=0 + +If a page happens to be a single packet that was begun on a +previous page, and spans to the next page (in the case of a three or +more page packet), the return will be: + ogg_page_packets(page) ==0, + ogg_page_continued(page) !=0 +*/ + +int ogg_page_packets(ogg_page *og){ + int i; + int n; + int count=0; + oggbyte_buffer ob; + oggbyte_init(&ob,og->header); + + n=oggbyte_read1(&ob,26); + for(i=0;i<n;i++) + if(oggbyte_read1(&ob,27+i)<255)count++; + return(count); +} + +/* Static CRC calculation table. See older code in CVS for dead + run-time initialization code. */ + +ogg_uint32_t crc_lookup[256]={ + 0x00000000,0x04c11db7,0x09823b6e,0x0d4326d9, + 0x130476dc,0x17c56b6b,0x1a864db2,0x1e475005, + 0x2608edb8,0x22c9f00f,0x2f8ad6d6,0x2b4bcb61, + 0x350c9b64,0x31cd86d3,0x3c8ea00a,0x384fbdbd, + 0x4c11db70,0x48d0c6c7,0x4593e01e,0x4152fda9, + 0x5f15adac,0x5bd4b01b,0x569796c2,0x52568b75, + 0x6a1936c8,0x6ed82b7f,0x639b0da6,0x675a1011, + 0x791d4014,0x7ddc5da3,0x709f7b7a,0x745e66cd, + 0x9823b6e0,0x9ce2ab57,0x91a18d8e,0x95609039, + 0x8b27c03c,0x8fe6dd8b,0x82a5fb52,0x8664e6e5, + 0xbe2b5b58,0xbaea46ef,0xb7a96036,0xb3687d81, + 0xad2f2d84,0xa9ee3033,0xa4ad16ea,0xa06c0b5d, + 0xd4326d90,0xd0f37027,0xddb056fe,0xd9714b49, + 0xc7361b4c,0xc3f706fb,0xceb42022,0xca753d95, + 0xf23a8028,0xf6fb9d9f,0xfbb8bb46,0xff79a6f1, + 0xe13ef6f4,0xe5ffeb43,0xe8bccd9a,0xec7dd02d, + 0x34867077,0x30476dc0,0x3d044b19,0x39c556ae, + 0x278206ab,0x23431b1c,0x2e003dc5,0x2ac12072, + 0x128e9dcf,0x164f8078,0x1b0ca6a1,0x1fcdbb16, + 0x018aeb13,0x054bf6a4,0x0808d07d,0x0cc9cdca, + 0x7897ab07,0x7c56b6b0,0x71159069,0x75d48dde, + 0x6b93dddb,0x6f52c06c,0x6211e6b5,0x66d0fb02, + 0x5e9f46bf,0x5a5e5b08,0x571d7dd1,0x53dc6066, + 0x4d9b3063,0x495a2dd4,0x44190b0d,0x40d816ba, + 0xaca5c697,0xa864db20,0xa527fdf9,0xa1e6e04e, + 0xbfa1b04b,0xbb60adfc,0xb6238b25,0xb2e29692, + 0x8aad2b2f,0x8e6c3698,0x832f1041,0x87ee0df6, + 0x99a95df3,0x9d684044,0x902b669d,0x94ea7b2a, + 0xe0b41de7,0xe4750050,0xe9362689,0xedf73b3e, + 0xf3b06b3b,0xf771768c,0xfa325055,0xfef34de2, + 0xc6bcf05f,0xc27dede8,0xcf3ecb31,0xcbffd686, + 0xd5b88683,0xd1799b34,0xdc3abded,0xd8fba05a, + 0x690ce0ee,0x6dcdfd59,0x608edb80,0x644fc637, + 0x7a089632,0x7ec98b85,0x738aad5c,0x774bb0eb, + 0x4f040d56,0x4bc510e1,0x46863638,0x42472b8f, + 0x5c007b8a,0x58c1663d,0x558240e4,0x51435d53, + 0x251d3b9e,0x21dc2629,0x2c9f00f0,0x285e1d47, + 0x36194d42,0x32d850f5,0x3f9b762c,0x3b5a6b9b, + 0x0315d626,0x07d4cb91,0x0a97ed48,0x0e56f0ff, + 0x1011a0fa,0x14d0bd4d,0x19939b94,0x1d528623, + 0xf12f560e,0xf5ee4bb9,0xf8ad6d60,0xfc6c70d7, + 0xe22b20d2,0xe6ea3d65,0xeba91bbc,0xef68060b, + 0xd727bbb6,0xd3e6a601,0xdea580d8,0xda649d6f, + 0xc423cd6a,0xc0e2d0dd,0xcda1f604,0xc960ebb3, + 0xbd3e8d7e,0xb9ff90c9,0xb4bcb610,0xb07daba7, + 0xae3afba2,0xaafbe615,0xa7b8c0cc,0xa379dd7b, + 0x9b3660c6,0x9ff77d71,0x92b45ba8,0x9675461f, + 0x8832161a,0x8cf30bad,0x81b02d74,0x857130c3, + 0x5d8a9099,0x594b8d2e,0x5408abf7,0x50c9b640, + 0x4e8ee645,0x4a4ffbf2,0x470cdd2b,0x43cdc09c, + 0x7b827d21,0x7f436096,0x7200464f,0x76c15bf8, + 0x68860bfd,0x6c47164a,0x61043093,0x65c52d24, + 0x119b4be9,0x155a565e,0x18197087,0x1cd86d30, + 0x029f3d35,0x065e2082,0x0b1d065b,0x0fdc1bec, + 0x3793a651,0x3352bbe6,0x3e119d3f,0x3ad08088, + 0x2497d08d,0x2056cd3a,0x2d15ebe3,0x29d4f654, + 0xc5a92679,0xc1683bce,0xcc2b1d17,0xc8ea00a0, + 0xd6ad50a5,0xd26c4d12,0xdf2f6bcb,0xdbee767c, + 0xe3a1cbc1,0xe760d676,0xea23f0af,0xeee2ed18, + 0xf0a5bd1d,0xf464a0aa,0xf9278673,0xfde69bc4, + 0x89b8fd09,0x8d79e0be,0x803ac667,0x84fbdbd0, + 0x9abc8bd5,0x9e7d9662,0x933eb0bb,0x97ffad0c, + 0xafb010b1,0xab710d06,0xa6322bdf,0xa2f33668, + 0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4}; + +void ogg_sync_init(ogg_sync_state *oy){ + memset(oy,0,sizeof(*oy)); + oy->bufferpool=ogg_buffer_create(); +} + +ogg_sync_state *ogg_sync_create(void){ + ogg_sync_state *oy=_ogg_calloc(1,sizeof(*oy)); + memset(oy,0,sizeof(*oy)); + oy->bufferpool=ogg_buffer_create(); + return oy; +} + +int ogg_sync_clear(ogg_sync_state *oy){ + if(oy){ + ogg_sync_reset(oy); + ogg_buffer_destroy(oy->bufferpool); + memset(oy,0,sizeof(*oy)); + } + return OGG_SUCCESS; +} + +int ogg_sync_destroy(ogg_sync_state *oy){ + if(oy){ + ogg_sync_reset(oy); + ogg_buffer_destroy(oy->bufferpool); + memset(oy,0,sizeof(*oy)); + _ogg_free(oy); + } + return OGG_SUCCESS; +} + +unsigned char *ogg_sync_bufferin(ogg_sync_state *oy, long bytes){ + + /* [allocate and] expose a buffer for data submission. + + If there is no head fragment + allocate one and expose it + else + if the current head fragment has sufficient unused space + expose it + else + if the current head fragment is unused + resize and expose it + else + allocate new fragment and expose it + */ + + /* base case; fifo uninitialized */ + if(!oy->fifo_head){ + oy->fifo_head=oy->fifo_tail=ogg_buffer_alloc(oy->bufferpool,bytes); + return oy->fifo_head->buffer->data; + } + + /* space left in current fragment case */ + if(oy->fifo_head->buffer->size- + oy->fifo_head->length- + oy->fifo_head->begin >= bytes) + return oy->fifo_head->buffer->data+ + oy->fifo_head->length+oy->fifo_head->begin; + + /* current fragment is unused, but too small */ + if(!oy->fifo_head->length){ + ogg_buffer_realloc(oy->fifo_head,bytes); + return oy->fifo_head->buffer->data+oy->fifo_head->begin; + } + + /* current fragment used/full; get new fragment */ + { + ogg_reference *new=ogg_buffer_alloc(oy->bufferpool,bytes); + oy->fifo_head->next=new; + oy->fifo_head=new; + } + return oy->fifo_head->buffer->data; +} + +int ogg_sync_wrote(ogg_sync_state *oy, long bytes){ + if(!oy->fifo_head)return OGG_EINVAL; + if(oy->fifo_head->buffer->size-oy->fifo_head->length-oy->fifo_head->begin < + bytes)return OGG_EINVAL; + oy->fifo_head->length+=bytes; + oy->fifo_fill+=bytes; + return OGG_SUCCESS; +} + +#ifndef ONLY_C +ogg_uint32_t _checksum(ogg_reference *or, int bytes); +#else +static ogg_uint32_t _checksum(ogg_reference *or, int bytes){ + ogg_uint32_t crc_reg=0; + int j,post; + + while(or){ + unsigned char *data=or->buffer->data+or->begin; + post=(bytes<or->length?bytes:or->length); + for(j=0;j<post;++j) + crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^data[j]]; + bytes-=j; + or=or->next; + } + + return crc_reg; +} +#endif + +/* sync the stream. This is meant to be useful for finding page + boundaries. + + return values for this: + -n) skipped n bytes + 0) page not ready; more data (no bytes skipped) + n) page synced at current location; page length n bytes + +*/ + +long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og){ + oggbyte_buffer page; + long bytes,ret=0; + + ogg_page_release(og); + + bytes=oy->fifo_fill; + oggbyte_init(&page,oy->fifo_tail); + + if(oy->headerbytes==0){ + if(bytes<27)goto sync_out; /* not enough for even a minimal header */ + + /* verify capture pattern */ + if(oggbyte_read1(&page,0)!=(int)'O' || + oggbyte_read1(&page,1)!=(int)'g' || + oggbyte_read1(&page,2)!=(int)'g' || + oggbyte_read1(&page,3)!=(int)'S' ) goto sync_fail; + + oy->headerbytes=oggbyte_read1(&page,26)+27; + } + if(bytes<oy->headerbytes)goto sync_out; /* not enough for header + + seg table */ + if(oy->bodybytes==0){ + int i; + /* count up body length in the segment table */ + for(i=0;i<oy->headerbytes-27;i++) + oy->bodybytes+=oggbyte_read1(&page,27+i); + } + + if(oy->bodybytes+oy->headerbytes>bytes)goto sync_out; + + /* we have what appears to be a complete page; last test: verify + checksum */ + { + ogg_uint32_t chksum=oggbyte_read4(&page,22); + oggbyte_set4(&page,0,22); + + /* Compare checksums; memory continues to be common access */ + if(chksum!=_checksum(oy->fifo_tail,oy->bodybytes+oy->headerbytes)){ + + /* D'oh. Mismatch! Corrupt page (or miscapture and not a page + at all). replace the computed checksum with the one actually + read in; remember all the memory is common access */ + + oggbyte_set4(&page,chksum,22); + goto sync_fail; + } + oggbyte_set4(&page,chksum,22); + } + + /* We have a page. Set up page return. */ + if(og){ + /* set up page output */ + og->header=ogg_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->headerbytes); + og->header_len=oy->headerbytes; + og->body=ogg_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->bodybytes); + og->body_len=oy->bodybytes; + }else{ + /* simply advance */ + oy->fifo_tail= + ogg_buffer_pretruncate(oy->fifo_tail,oy->headerbytes+oy->bodybytes); + if(!oy->fifo_tail)oy->fifo_head=0; + } + + ret=oy->headerbytes+oy->bodybytes; + oy->unsynced=0; + oy->headerbytes=0; + oy->bodybytes=0; + oy->fifo_fill-=ret; + + return ret; + + sync_fail: + + oy->headerbytes=0; + oy->bodybytes=0; + oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,1); + ret--; + + /* search forward through fragments for possible capture */ + while(oy->fifo_tail){ + /* invariant: fifo_cursor points to a position in fifo_tail */ + unsigned char *now=oy->fifo_tail->buffer->data+oy->fifo_tail->begin; + unsigned char *next=memchr(now, 'O', oy->fifo_tail->length); + + if(next){ + /* possible capture in this segment */ + long bytes=next-now; + oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,bytes); + ret-=bytes; + break; + }else{ + /* no capture. advance to next segment */ + long bytes=oy->fifo_tail->length; + ret-=bytes; + oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,bytes); + } + } + if(!oy->fifo_tail)oy->fifo_head=0; + oy->fifo_fill+=ret; + + sync_out: + return ret; +} + +/* sync the stream and get a page. Keep trying until we find a page. + Supress 'sync errors' after reporting the first. + + return values: + OGG_HOLE) recapture (hole in data) + 0) need more data + 1) page returned + + Returns pointers into buffered data; invalidated by next call to + _stream, _clear, _init, or _buffer */ + +int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og){ + + /* all we need to do is verify a page at the head of the stream + buffer. If it doesn't verify, we look for the next potential + frame */ + + while(1){ + long ret=ogg_sync_pageseek(oy,og); + if(ret>0){ + /* have a page */ + return 1; + } + if(ret==0){ + /* need more data */ + return 0; + } + + /* head did not start a synced page... skipped some bytes */ + if(!oy->unsynced){ + oy->unsynced=1; + return OGG_HOLE; + } + + /* loop. keep looking */ + + } +} + +/* clear things to an initial state. Good to call, eg, before seeking */ +int ogg_sync_reset(ogg_sync_state *oy){ + + ogg_buffer_release(oy->fifo_tail); + oy->fifo_tail=0; + oy->fifo_head=0; + oy->fifo_fill=0; + + oy->unsynced=0; + oy->headerbytes=0; + oy->bodybytes=0; + return OGG_SUCCESS; +} + +void ogg_stream_init(ogg_stream_state *os, int serialno){ + memset(os, 0, sizeof(*os)); + os->serialno=serialno; + os->pageno=-1; +} + +ogg_stream_state *ogg_stream_create(int serialno){ + ogg_stream_state *os=_ogg_calloc(1,sizeof(*os)); + os->serialno=serialno; + os->pageno=-1; + return os; +} + +int ogg_stream_clear(ogg_stream_state *os){ + if(os){ + ogg_buffer_release(os->header_tail); + ogg_buffer_release(os->body_tail); + memset(os,0,sizeof(*os)); + } + return OGG_SUCCESS; +} + +int ogg_stream_destroy(ogg_stream_state *os){ + if(os){ + ogg_buffer_release(os->header_tail); + ogg_buffer_release(os->body_tail); + memset(os,0,sizeof(*os)); + _ogg_free(os); + } + return OGG_SUCCESS; +} + + +#define FINFLAG 0x80000000UL +#define FINMASK 0x7fffffffUL + +static void _next_lace(oggbyte_buffer *ob,ogg_stream_state *os){ + /* search ahead one lace */ + os->body_fill_next=0; + while(os->laceptr<os->lacing_fill){ + int val=oggbyte_read1(ob,27+os->laceptr++); + os->body_fill_next+=val; + if(val<255){ + os->body_fill_next|=FINFLAG; + os->clearflag=1; + break; + } + } +} + +static void _span_queued_page(ogg_stream_state *os){ + while( !(os->body_fill&FINFLAG) ){ + + if(!os->header_tail)break; + + /* first flush out preceeding page header (if any). Body is + flushed as it's consumed, so that's not done here. */ + + if(os->lacing_fill>=0) + os->header_tail=ogg_buffer_pretruncate(os->header_tail, + os->lacing_fill+27); + os->lacing_fill=0; + os->laceptr=0; + os->clearflag=0; + + if(!os->header_tail){ + os->header_head=0; + break; + }else{ + + /* process/prepare next page, if any */ + + long pageno; + oggbyte_buffer ob; + ogg_page og; /* only for parsing header values */ + og.header=os->header_tail; /* only for parsing header values */ + pageno=ogg_page_pageno(&og); + + oggbyte_init(&ob,os->header_tail); + os->lacing_fill=oggbyte_read1(&ob,26); + + /* are we in sequence? */ + if(pageno!=os->pageno){ + if(os->pageno==-1) /* indicates seek or reset */ + os->holeflag=1; /* set for internal use */ + else + os->holeflag=2; /* set for external reporting */ + + os->body_tail=ogg_buffer_pretruncate(os->body_tail, + os->body_fill); + if(os->body_tail==0)os->body_head=0; + os->body_fill=0; + + } + + if(ogg_page_continued(&og)){ + if(os->body_fill==0){ + /* continued packet, but no preceeding data to continue */ + /* dump the first partial packet on the page */ + _next_lace(&ob,os); + os->body_tail= + ogg_buffer_pretruncate(os->body_tail,os->body_fill_next&FINMASK); + if(os->body_tail==0)os->body_head=0; + /* set span flag */ + if(!os->spanflag && !os->holeflag)os->spanflag=2; + } + }else{ + if(os->body_fill>0){ + /* preceeding data to continue, but not a continued page */ + /* dump body_fill */ + os->body_tail=ogg_buffer_pretruncate(os->body_tail, + os->body_fill); + if(os->body_tail==0)os->body_head=0; + os->body_fill=0; + + /* set espan flag */ + if(!os->spanflag && !os->holeflag)os->spanflag=2; + } + } + + if(os->laceptr<os->lacing_fill){ + os->granulepos=ogg_page_granulepos(&og); + + /* get current packet size & flag */ + _next_lace(&ob,os); + os->body_fill+=os->body_fill_next; /* addition handles the flag fine; + unsigned on purpose */ + /* ...and next packet size & flag */ + _next_lace(&ob,os); + + } + + os->pageno=pageno+1; + os->e_o_s=ogg_page_eos(&og); + os->b_o_s=ogg_page_bos(&og); + + } + } +} + +/* add the incoming page to the stream state; we decompose the page + into packet segments here as well. */ + +int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){ + + int serialno=ogg_page_serialno(og); + int version=ogg_page_version(og); + + /* check the serial number */ + if(serialno!=os->serialno){ + //ogg_page_release(og); + return OGG_ESERIAL; + } + if(version>0){ + //ogg_page_release(og); + return OGG_EVERSION; + } + + /* add to fifos */ + if(!os->body_tail){ + os->body_tail=og->body; + os->body_head=ogg_buffer_walk(og->body); + }else{ + os->body_head=ogg_buffer_cat(os->body_head,og->body); + } + if(!os->header_tail){ + os->header_tail=og->header; + os->header_head=ogg_buffer_walk(og->header); + os->lacing_fill=-27; + }else{ + os->header_head=ogg_buffer_cat(os->header_head,og->header); + } + + memset(og,0,sizeof(*og)); + return OGG_SUCCESS; +} + +int ogg_stream_reset(ogg_stream_state *os){ + + ogg_buffer_release(os->header_tail); + ogg_buffer_release(os->body_tail); + os->header_tail=os->header_head=0; + os->body_tail=os->body_head=0; + + os->e_o_s=0; + os->b_o_s=0; + os->pageno=-1; + os->packetno=0; + os->granulepos=0; + + os->body_fill=0; + os->lacing_fill=0; + + os->holeflag=0; + os->spanflag=0; + os->clearflag=0; + os->laceptr=0; + os->body_fill_next=0; + + return OGG_SUCCESS; +} + +int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){ + ogg_stream_reset(os); + os->serialno=serialno; + return OGG_SUCCESS; +} + +static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){ + + ogg_packet_release(op); + _span_queued_page(os); + + if(os->holeflag){ + int temp=os->holeflag; + if(os->clearflag) + os->holeflag=0; + else + os->holeflag=1; + if(temp==2){ + os->packetno++; + return OGG_HOLE; + } + } + if(os->spanflag){ + int temp=os->spanflag; + if(os->clearflag) + os->spanflag=0; + else + os->spanflag=1; + if(temp==2){ + os->packetno++; + return OGG_SPAN; + } + } + + if(!(os->body_fill&FINFLAG)) return 0; + if(!op && !adv)return 1; /* just using peek as an inexpensive way + to ask if there's a whole packet + waiting */ + if(op){ + op->b_o_s=os->b_o_s; + if(os->e_o_s && os->body_fill_next==0) + op->e_o_s=os->e_o_s; + else + op->e_o_s=0; + if( (os->body_fill&FINFLAG) && !(os->body_fill_next&FINFLAG) ) + op->granulepos=os->granulepos; + else + op->granulepos=-1; + op->packetno=os->packetno; + } + + if(adv){ + oggbyte_buffer ob; + oggbyte_init(&ob,os->header_tail); + + /* split the body contents off */ + if(op){ + op->packet=ogg_buffer_split(&os->body_tail,&os->body_head, + os->body_fill&FINMASK); + op->bytes=os->body_fill&FINMASK; + }else{ + os->body_tail=ogg_buffer_pretruncate(os->body_tail, + os->body_fill&FINMASK); + if(os->body_tail==0)os->body_head=0; + } + + /* update lacing pointers */ + os->body_fill=os->body_fill_next; + _next_lace(&ob,os); + }else{ + if(op){ + op->packet=ogg_buffer_sub(os->body_tail,os->body_fill&FINMASK); + op->bytes=os->body_fill&FINMASK; + } + } + + if(adv){ + os->packetno++; + os->b_o_s=0; + } + + return 1; +} + +int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){ + return _packetout(os,op,1); +} + +int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op){ + return _packetout(os,op,0); +} + +int ogg_packet_release(ogg_packet *op) { + if(op){ + ogg_buffer_release(op->packet); + memset(op, 0, sizeof(*op)); + } + return OGG_SUCCESS; +} + +int ogg_page_release(ogg_page *og) { + if(og){ + ogg_buffer_release(og->header); + ogg_buffer_release(og->body); + memset(og, 0, sizeof(*og)); + } + return OGG_SUCCESS; +} + +void ogg_page_dup(ogg_page *dup,ogg_page *orig){ + dup->header_len=orig->header_len; + dup->body_len=orig->body_len; + dup->header=ogg_buffer_dup(orig->header); + dup->body=ogg_buffer_dup(orig->body); +} + diff --git a/ohos-specific/tremolo/Tremolo/ivorbiscodec.h b/ohos-specific/tremolo/Tremolo/ivorbiscodec.h new file mode 100644 index 0000000000..5d1bf950b0 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/ivorbiscodec.h @@ -0,0 +1,124 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: libvorbis codec headers + + ************************************************************************/ + +#ifndef _vorbis_codec_h_ +#define _vorbis_codec_h_ + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include "ogg.h" + +struct vorbis_dsp_state; +typedef struct vorbis_dsp_state vorbis_dsp_state; + +typedef struct vorbis_info{ + int version; + int channels; + long rate; + + /* The below bitrate declarations are *hints*. + Combinations of the three values carry the following implications: + + all three set to the same value: + implies a fixed rate bitstream + only nominal set: + implies a VBR stream that averages the nominal bitrate. No hard + upper/lower limit + upper and or lower set: + implies a VBR bitstream that obeys the bitrate limits. nominal + may also be set to give a nominal rate. + none set: + the coder does not care to speculate. + */ + + long bitrate_upper; + long bitrate_nominal; + long bitrate_lower; + long bitrate_window; + + void *codec_setup; +} vorbis_info; + +typedef struct vorbis_comment{ + char **user_comments; + int *comment_lengths; + int comments; + char *vendor; + +} vorbis_comment; + + +/* Vorbis PRIMITIVES: general ***************************************/ + +extern void vorbis_info_init(vorbis_info *vi); +extern void vorbis_info_clear(vorbis_info *vi); +extern int vorbis_info_blocksize(vorbis_info *vi,int zo); +extern void vorbis_comment_init(vorbis_comment *vc); +extern void vorbis_comment_add(vorbis_comment *vc, char *comment); +extern void vorbis_comment_add_tag(vorbis_comment *vc, + char *tag, char *contents); +extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count); +extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag); +extern void vorbis_comment_clear(vorbis_comment *vc); + +/* Vorbis ERRORS and return codes ***********************************/ + +#define OV_FALSE -1 +#define OV_EOF -2 +#define OV_HOLE -3 + +#define OV_EREAD -128 +#define OV_EFAULT -129 +#define OV_EIMPL -130 +#define OV_EINVAL -131 +#define OV_ENOTVORBIS -132 +#define OV_EBADHEADER -133 +#define OV_EVERSION -134 +#define OV_ENOTAUDIO -135 +#define OV_EBADPACKET -136 +#define OV_EBADLINK -137 +#define OV_ENOSEEK -138 + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif + diff --git a/ohos-specific/tremolo/Tremolo/ivorbisfile.h b/ohos-specific/tremolo/Tremolo/ivorbisfile.h new file mode 100644 index 0000000000..8c4fe7747b --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/ivorbisfile.h @@ -0,0 +1,142 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: stdio-based convenience library for opening/seeking/decoding + + ************************************************************************/ + +#ifndef _OV_FILE_H_ +#define _OV_FILE_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include <stdio.h> +#include "ivorbiscodec.h" + +/* The function prototypes for the callbacks are basically the same as for + * the stdio functions fread, fseek, fclose, ftell. + * The one difference is that the FILE * arguments have been replaced with + * a void * - this is to be used as a pointer to whatever internal data these + * functions might need. In the stdio case, it's just a FILE * cast to a void * + * + * If you use other functions, check the docs for these functions and return + * the right values. For seek_func(), you *MUST* return -1 if the stream is + * unseekable + */ +typedef struct { + size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource); + int (*seek_func) (void *datasource, ogg_int64_t offset, int whence); + int (*close_func) (void *datasource); + long (*tell_func) (void *datasource); +} ov_callbacks; + +typedef struct OggVorbis_File { + void *datasource; /* Pointer to a FILE *, etc. */ + int seekable; + ogg_int64_t offset; + ogg_int64_t end; + ogg_sync_state *oy; + + /* If the FILE handle isn't seekable (eg, a pipe), only the current + stream appears */ + int links; + ogg_int64_t *offsets; + ogg_int64_t *dataoffsets; + ogg_uint32_t *serialnos; + ogg_int64_t *pcmlengths; + vorbis_info vi; + vorbis_comment vc; + + /* Decoding working state local storage */ + ogg_int64_t pcm_offset; + int ready_state; + ogg_uint32_t current_serialno; + int current_link; + + ogg_int64_t bittrack; + ogg_int64_t samptrack; + + ogg_stream_state *os; /* take physical pages, weld into a logical + stream of packets */ + vorbis_dsp_state *vd; /* central working state for the packet->PCM decoder */ + + ov_callbacks callbacks; + +} OggVorbis_File; + +extern int ov_clear(OggVorbis_File *vf); +extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes); +extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf, + char *initial, long ibytes, ov_callbacks callbacks); + +extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes); +extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf, + char *initial, long ibytes, ov_callbacks callbacks); +extern int ov_test_open(OggVorbis_File *vf); + +extern long ov_bitrate(OggVorbis_File *vf,int i); +extern long ov_bitrate_instant(OggVorbis_File *vf); +extern long ov_streams(OggVorbis_File *vf); +extern long ov_seekable(OggVorbis_File *vf); +extern long ov_serialnumber(OggVorbis_File *vf,int i); + +extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i); +extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i); +extern ogg_int64_t ov_time_total(OggVorbis_File *vf,int i); + +extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_time_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t pos); + +extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf); +extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf); +extern ogg_int64_t ov_time_tell(OggVorbis_File *vf); + +extern vorbis_info *ov_info(OggVorbis_File *vf,int link); +extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link); + +extern long ov_read(OggVorbis_File *vf,void *buffer,int length, + int *bitstream); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif + + diff --git a/ohos-specific/tremolo/Tremolo/lsp_lookup.h b/ohos-specific/tremolo/Tremolo/lsp_lookup.h new file mode 100644 index 0000000000..8338251a01 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/lsp_lookup.h @@ -0,0 +1,128 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: lookup data + + ************************************************************************/ + +#ifndef _V_LOOKUP_DATA_H_ +#define _V_LOOKUP_DATA_H_ + +#include "os_types.h" + +#define INVSQ_LOOKUP_I_SHIFT 10 +#define INVSQ_LOOKUP_I_MASK 1023 +static const long INVSQ_LOOKUP_I[64+1]={ + 92682, 91966, 91267, 90583, + 89915, 89261, 88621, 87995, + 87381, 86781, 86192, 85616, + 85051, 84497, 83953, 83420, + 82897, 82384, 81880, 81385, + 80899, 80422, 79953, 79492, + 79039, 78594, 78156, 77726, + 77302, 76885, 76475, 76072, + 75674, 75283, 74898, 74519, + 74146, 73778, 73415, 73058, + 72706, 72359, 72016, 71679, + 71347, 71019, 70695, 70376, + 70061, 69750, 69444, 69141, + 68842, 68548, 68256, 67969, + 67685, 67405, 67128, 66855, + 66585, 66318, 66054, 65794, + 65536, +}; + +static const long INVSQ_LOOKUP_IDel[64]={ + 716, 699, 684, 668, + 654, 640, 626, 614, + 600, 589, 576, 565, + 554, 544, 533, 523, + 513, 504, 495, 486, + 477, 469, 461, 453, + 445, 438, 430, 424, + 417, 410, 403, 398, + 391, 385, 379, 373, + 368, 363, 357, 352, + 347, 343, 337, 332, + 328, 324, 319, 315, + 311, 306, 303, 299, + 294, 292, 287, 284, + 280, 277, 273, 270, + 267, 264, 260, 258, +}; + +#define COS_LOOKUP_I_SHIFT 9 +#define COS_LOOKUP_I_MASK 511 +#define COS_LOOKUP_I_SZ 128 +static const ogg_int32_t COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={ + 16384, 16379, 16364, 16340, + 16305, 16261, 16207, 16143, + 16069, 15986, 15893, 15791, + 15679, 15557, 15426, 15286, + 15137, 14978, 14811, 14635, + 14449, 14256, 14053, 13842, + 13623, 13395, 13160, 12916, + 12665, 12406, 12140, 11866, + 11585, 11297, 11003, 10702, + 10394, 10080, 9760, 9434, + 9102, 8765, 8423, 8076, + 7723, 7366, 7005, 6639, + 6270, 5897, 5520, 5139, + 4756, 4370, 3981, 3590, + 3196, 2801, 2404, 2006, + 1606, 1205, 804, 402, + 0, -401, -803, -1204, + -1605, -2005, -2403, -2800, + -3195, -3589, -3980, -4369, + -4755, -5138, -5519, -5896, + -6269, -6638, -7004, -7365, + -7722, -8075, -8422, -8764, + -9101, -9433, -9759, -10079, + -10393, -10701, -11002, -11296, + -11584, -11865, -12139, -12405, + -12664, -12915, -13159, -13394, + -13622, -13841, -14052, -14255, + -14448, -14634, -14810, -14977, + -15136, -15285, -15425, -15556, + -15678, -15790, -15892, -15985, + -16068, -16142, -16206, -16260, + -16304, -16339, -16363, -16378, + -16383, +}; + +#endif + + + + + diff --git a/ohos-specific/tremolo/Tremolo/mapping0.c b/ohos-specific/tremolo/Tremolo/mapping0.c new file mode 100644 index 0000000000..ccc84daef2 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/mapping0.c @@ -0,0 +1,261 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: channel mapping 0 implementation + + ************************************************************************/ + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <math.h> +#include "ogg.h" +#include "os.h" +#include "ivorbiscodec.h" +#include "mdct.h" +#include "codec_internal.h" +#include "codebook.h" +#include "misc.h" + +void mapping_clear_info(vorbis_info_mapping *info){ + if(info){ + if(info->chmuxlist)_ogg_free(info->chmuxlist); + if(info->submaplist)_ogg_free(info->submaplist); + if(info->coupling)_ogg_free(info->coupling); + memset(info,0,sizeof(*info)); + } +} + +static int ilog(unsigned int v){ + int ret=0; + if(v)--v; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +/* also responsible for range checking */ +int mapping_info_unpack(vorbis_info_mapping *info,vorbis_info *vi, + oggpack_buffer *opb){ + int i; + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + memset(info,0,sizeof(*info)); + + if(oggpack_read(opb,1)) + info->submaps=oggpack_read(opb,4)+1; + else + info->submaps=1; + + if(oggpack_read(opb,1)){ + info->coupling_steps=oggpack_read(opb,8)+1; + info->coupling= + _ogg_malloc(info->coupling_steps*sizeof(*info->coupling)); + + for(i=0;i<info->coupling_steps;i++){ + int testM=info->coupling[i].mag=(unsigned char)(oggpack_read(opb,ilog(vi->channels))); + int testA=info->coupling[i].ang=(unsigned char)(oggpack_read(opb,ilog(vi->channels))); + + if(testM<0 || + testA<0 || + testM==testA || + testM>=vi->channels || + testA>=vi->channels) goto err_out; + } + + } + + if(oggpack_read(opb,2)>0)goto err_out; /* 2,3:reserved */ + + if(info->submaps>1){ + info->chmuxlist=_ogg_malloc(sizeof(*info->chmuxlist)*vi->channels); + for(i=0;i<vi->channels;i++){ + info->chmuxlist[i]=(unsigned char)(oggpack_read(opb,4)); + if(info->chmuxlist[i]>=info->submaps)goto err_out; + } + } + + info->submaplist=_ogg_malloc(sizeof(*info->submaplist)*info->submaps); + for(i=0;i<info->submaps;i++){ + int temp=oggpack_read(opb,8); + info->submaplist[i].floor=(char)oggpack_read(opb,8); + if(info->submaplist[i].floor>=ci->floors)goto err_out; + info->submaplist[i].residue=(char)oggpack_read(opb,8); + if(info->submaplist[i].residue>=ci->residues)goto err_out; + } + + return 0; + + err_out: + mapping_clear_info(info); + return -1; +} + +int mapping_inverse(vorbis_dsp_state *vd,vorbis_info_mapping *info){ + vorbis_info *vi=vd->vi; + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + + int i,j; + long n=ci->blocksizes[vd->W]; + + ogg_int32_t **pcmbundle= + alloca(sizeof(*pcmbundle)*vi->channels); + int *zerobundle= + alloca(sizeof(*zerobundle)*vi->channels); + int *nonzero= + alloca(sizeof(*nonzero)*vi->channels); + ogg_int32_t **floormemo= + alloca(sizeof(*floormemo)*vi->channels); + + /* recover the spectral envelope; store it in the PCM vector for now */ + for(i=0;i<vi->channels;i++){ + int submap=0; + int floorno; + + if(info->submaps>1) + submap=info->chmuxlist[i]; + floorno=info->submaplist[submap].floor; + + if(ci->floor_type[floorno]){ + /* floor 1 */ + floormemo[i]=alloca(sizeof(*floormemo[i])* + floor1_memosize(ci->floor_param[floorno])); + floormemo[i]=floor1_inverse1(vd,ci->floor_param[floorno],floormemo[i]); + }else{ + /* floor 0 */ + floormemo[i]=alloca(sizeof(*floormemo[i])* + floor0_memosize(ci->floor_param[floorno])); + floormemo[i]=floor0_inverse1(vd,ci->floor_param[floorno],floormemo[i]); + } + + if(floormemo[i]) + nonzero[i]=1; + else + nonzero[i]=0; + memset(vd->work[i],0,sizeof(*vd->work[i])*n/2); + } + + /* channel coupling can 'dirty' the nonzero listing */ + for(i=0;i<info->coupling_steps;i++){ + if(nonzero[info->coupling[i].mag] || + nonzero[info->coupling[i].ang]){ + nonzero[info->coupling[i].mag]=1; + nonzero[info->coupling[i].ang]=1; + } + } + + /* recover the residue into our working vectors */ + for(i=0;i<info->submaps;i++){ + int ch_in_bundle=0; + for(j=0;j<vi->channels;j++){ + if(!info->chmuxlist || info->chmuxlist[j]==i){ + if(nonzero[j]) + zerobundle[ch_in_bundle]=1; + else + zerobundle[ch_in_bundle]=0; + pcmbundle[ch_in_bundle++]=vd->work[j]; + } + } + + res_inverse(vd,ci->residue_param+info->submaplist[i].residue, + pcmbundle,zerobundle,ch_in_bundle); + } + + //for(j=0;j<vi->channels;j++) + //_analysis_output("coupled",seq+j,vb->pcm[j],-8,n/2,0,0); + + /* channel coupling */ + for(i=info->coupling_steps-1;i>=0;i--){ + ogg_int32_t *pcmM=vd->work[info->coupling[i].mag]; + ogg_int32_t *pcmA=vd->work[info->coupling[i].ang]; + + for(j=0;j<n/2;j++){ + ogg_int32_t mag=pcmM[j]; + ogg_int32_t ang=pcmA[j]; + + if(mag>0) + if(ang>0){ + pcmM[j]=mag; + pcmA[j]=mag-ang; + }else{ + pcmA[j]=mag; + pcmM[j]=mag+ang; + } + else + if(ang>0){ + pcmM[j]=mag; + pcmA[j]=mag+ang; + }else{ + pcmA[j]=mag; + pcmM[j]=mag-ang; + } + } + } + + //for(j=0;j<vi->channels;j++) + //_analysis_output("residue",seq+j,vb->pcm[j],-8,n/2,0,0); + + /* compute and apply spectral envelope */ + for(i=0;i<vi->channels;i++){ + ogg_int32_t *pcm=vd->work[i]; + int submap=0; + int floorno; + + if(info->submaps>1) + submap=info->chmuxlist[i]; + floorno=info->submaplist[submap].floor; + + if(ci->floor_type[floorno]){ + /* floor 1 */ + floor1_inverse2(vd,ci->floor_param[floorno],floormemo[i],pcm); + }else{ + /* floor 0 */ + floor0_inverse2(vd,ci->floor_param[floorno],floormemo[i],pcm); + } + } + + //for(j=0;j<vi->channels;j++) + //_analysis_output("mdct",seq+j,vb->pcm[j],-24,n/2,0,1); + + /* transform the PCM data; takes PCM vector, vb; modifies PCM vector */ + /* only MDCT right now.... */ + for(i=0;i<vi->channels;i++) + mdct_backward(n,vd->work[i]); + + //for(j=0;j<vi->channels;j++) + //_analysis_output("imdct",seq+j,vb->pcm[j],-24,n,0,0); + + /* all done! */ + return(0); +} diff --git a/ohos-specific/tremolo/Tremolo/mdct.c b/ohos-specific/tremolo/Tremolo/mdct.c new file mode 100644 index 0000000000..32b3525ca9 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/mdct.c @@ -0,0 +1,582 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: normalized modified discrete cosine transform + power of two length transform only [64 <= n ] + last mod: $Id: mdct.c,v 1.9.6.5 2003/04/29 04:03:27 xiphmont Exp $ + + Original algorithm adapted long ago from _The use of multirate filter + banks for coding of high quality digital audio_, by T. Sporer, + K. Brandenburg and B. Edler, collection of the European Signal + Processing Conference (EUSIPCO), Amsterdam, June 1992, Vol.1, pp + 211-214 + + The below code implements an algorithm that no longer looks much like + that presented in the paper, but the basic structure remains if you + dig deep enough to see it. + + This module DOES NOT INCLUDE code to generate/apply the window + function. Everybody has their own weird favorite including me... I + happen to like the properties of y=sin(.5PI*sin^2(x)), but others may + vehemently disagree. + + ************************************************************************/ + +#include "ivorbiscodec.h" +#include "os.h" +#include "misc.h" +#include "mdct.h" +#include "mdct_lookup.h" + +#include <stdio.h> + +#if defined(ONLY_C) +STIN void presymmetry(DATA_TYPE *in,int n2,int step){ + DATA_TYPE *aX; + DATA_TYPE *bX; + LOOKUP_T *T; + int n4=n2>>1; + + aX = in+n2-3; + T = sincos_lookup0; + + do{ + REG_TYPE s0= aX[0]; + REG_TYPE s2= aX[2]; + XPROD31( s0, s2, T[0], T[1], &aX[0], &aX[2] ); T+=step; + aX-=4; + }while(aX>=in+n4); + do{ + REG_TYPE s0= aX[0]; + REG_TYPE s2= aX[2]; + XPROD31( s0, s2, T[1], T[0], &aX[0], &aX[2] ); T-=step; + aX-=4; + }while(aX>=in); + + aX = in+n2-4; + bX = in; + T = sincos_lookup0; + do{ + REG_TYPE ri0= aX[0]; + REG_TYPE ri2= aX[2]; + REG_TYPE ro0= bX[0]; + REG_TYPE ro2= bX[2]; + + XNPROD31( ro2, ro0, T[1], T[0], &aX[0], &aX[2] ); T+=step; + XNPROD31( ri2, ri0, T[0], T[1], &bX[0], &bX[2] ); + + aX-=4; + bX+=4; + }while(aX>=bX); +} + +/* 8 point butterfly (in place) */ +STIN void mdct_butterfly_8(DATA_TYPE *x){ + + REG_TYPE s0 = x[0] + x[1]; + REG_TYPE s1 = x[0] - x[1]; + REG_TYPE s2 = x[2] + x[3]; + REG_TYPE s3 = x[2] - x[3]; + REG_TYPE s4 = x[4] + x[5]; + REG_TYPE s5 = x[4] - x[5]; + REG_TYPE s6 = x[6] + x[7]; + REG_TYPE s7 = x[6] - x[7]; + + x[0] = s5 + s3; + x[1] = s7 - s1; + x[2] = s5 - s3; + x[3] = s7 + s1; + x[4] = s4 - s0; + x[5] = s6 - s2; + x[6] = s4 + s0; + x[7] = s6 + s2; + MB(); +} + +/* 16 point butterfly (in place, 4 register) */ +STIN void mdct_butterfly_16(DATA_TYPE *x){ + + REG_TYPE s0, s1, s2, s3; + + s0 = x[ 8] - x[ 9]; x[ 8] += x[ 9]; + s1 = x[10] - x[11]; x[10] += x[11]; + s2 = x[ 1] - x[ 0]; x[ 9] = x[ 1] + x[0]; + s3 = x[ 3] - x[ 2]; x[11] = x[ 3] + x[2]; + x[ 0] = MULT31((s0 - s1) , cPI2_8); + x[ 1] = MULT31((s2 + s3) , cPI2_8); + x[ 2] = MULT31((s0 + s1) , cPI2_8); + x[ 3] = MULT31((s3 - s2) , cPI2_8); + MB(); + + s2 = x[12] - x[13]; x[12] += x[13]; + s3 = x[14] - x[15]; x[14] += x[15]; + s0 = x[ 4] - x[ 5]; x[13] = x[ 5] + x[ 4]; + s1 = x[ 7] - x[ 6]; x[15] = x[ 7] + x[ 6]; + x[ 4] = s2; x[ 5] = s1; + x[ 6] = s3; x[ 7] = s0; + MB(); + + mdct_butterfly_8(x); + mdct_butterfly_8(x+8); +} + +/* 32 point butterfly (in place, 4 register) */ +STIN void mdct_butterfly_32(DATA_TYPE *x){ + + REG_TYPE s0, s1, s2, s3; + + s0 = x[16] - x[17]; x[16] += x[17]; + s1 = x[18] - x[19]; x[18] += x[19]; + s2 = x[ 1] - x[ 0]; x[17] = x[ 1] + x[ 0]; + s3 = x[ 3] - x[ 2]; x[19] = x[ 3] + x[ 2]; + XNPROD31( s0, s1, cPI3_8, cPI1_8, &x[ 0], &x[ 2] ); + XPROD31 ( s2, s3, cPI1_8, cPI3_8, &x[ 1], &x[ 3] ); + MB(); + + s0 = x[20] - x[21]; x[20] += x[21]; + s1 = x[22] - x[23]; x[22] += x[23]; + s2 = x[ 5] - x[ 4]; x[21] = x[ 5] + x[ 4]; + s3 = x[ 7] - x[ 6]; x[23] = x[ 7] + x[ 6]; + x[ 4] = MULT31((s0 - s1) , cPI2_8); + x[ 5] = MULT31((s3 + s2) , cPI2_8); + x[ 6] = MULT31((s0 + s1) , cPI2_8); + x[ 7] = MULT31((s3 - s2) , cPI2_8); + MB(); + + s0 = x[24] - x[25]; x[24] += x[25]; + s1 = x[26] - x[27]; x[26] += x[27]; + s2 = x[ 9] - x[ 8]; x[25] = x[ 9] + x[ 8]; + s3 = x[11] - x[10]; x[27] = x[11] + x[10]; + XNPROD31( s0, s1, cPI1_8, cPI3_8, &x[ 8], &x[10] ); + XPROD31 ( s2, s3, cPI3_8, cPI1_8, &x[ 9], &x[11] ); + MB(); + + s0 = x[28] - x[29]; x[28] += x[29]; + s1 = x[30] - x[31]; x[30] += x[31]; + s2 = x[12] - x[13]; x[29] = x[13] + x[12]; + s3 = x[15] - x[14]; x[31] = x[15] + x[14]; + x[12] = s0; x[13] = s3; + x[14] = s1; x[15] = s2; + MB(); + + mdct_butterfly_16(x); + mdct_butterfly_16(x+16); +} + +/* N/stage point generic N stage butterfly (in place, 2 register) */ +STIN void mdct_butterfly_generic(DATA_TYPE *x,int points,int step){ + LOOKUP_T *T = sincos_lookup0; + DATA_TYPE *x1 = x + points - 4; + DATA_TYPE *x2 = x + (points>>1) - 4; + REG_TYPE s0, s1, s2, s3; + + do{ + s0 = x1[0] - x1[1]; x1[0] += x1[1]; + s1 = x1[3] - x1[2]; x1[2] += x1[3]; + s2 = x2[1] - x2[0]; x1[1] = x2[1] + x2[0]; + s3 = x2[3] - x2[2]; x1[3] = x2[3] + x2[2]; + XPROD31( s1, s0, T[0], T[1], &x2[0], &x2[2] ); + XPROD31( s2, s3, T[0], T[1], &x2[1], &x2[3] ); T+=step; + x1-=4; + x2-=4; + }while(T<sincos_lookup0+1024); + x1 = x + (points>>1) + (points>>2) - 4; + x2 = x + (points>>2) - 4; + T = sincos_lookup0+1024; + do{ + s0 = x1[0] - x1[1]; x1[0] += x1[1]; + s1 = x1[2] - x1[3]; x1[2] += x1[3]; + s2 = x2[0] - x2[1]; x1[1] = x2[1] + x2[0]; + s3 = x2[3] - x2[2]; x1[3] = x2[3] + x2[2]; + XNPROD31( s0, s1, T[0], T[1], &x2[0], &x2[2] ); + XNPROD31( s3, s2, T[0], T[1], &x2[1], &x2[3] ); T-=step; + x1-=4; + x2-=4; + }while(T>sincos_lookup0); +} + +STIN void mdct_butterflies(DATA_TYPE *x,int points,int shift){ + + int stages=7-shift; + int i,j; + + for(i=0;--stages>=0;i++){ + for(j=0;j<(1<<i);j++) + { + mdct_butterfly_generic(x+(points>>i)*j,points>>i,4<<(i+shift)); + } + } + + for(j=0;j<points;j+=32) + mdct_butterfly_32(x+j); +} + +static unsigned char bitrev[16]={0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15}; + +STIN int bitrev12(int x){ + return bitrev[x>>8]|(bitrev[(x&0x0f0)>>4]<<4)|(((int)bitrev[x&0x00f])<<8); +} + +STIN void mdct_bitreverse(DATA_TYPE *x,int n,int shift){ + int bit = 0; + DATA_TYPE *w = x+(n>>1); + + do{ + DATA_TYPE b = bitrev12(bit++); + DATA_TYPE *xx = x + (b>>shift); + REG_TYPE r; + + w -= 2; + + if(w>xx){ + + r = xx[0]; + xx[0] = w[0]; + w[0] = r; + + r = xx[1]; + xx[1] = w[1]; + w[1] = r; + } + }while(w>x); +} + +STIN void mdct_step7(DATA_TYPE *x,int n,int step){ + DATA_TYPE *w0 = x; + DATA_TYPE *w1 = x+(n>>1); + LOOKUP_T *T = (step>=4)?(sincos_lookup0+(step>>1)):sincos_lookup1; + LOOKUP_T *Ttop = T+1024; + REG_TYPE s0, s1, s2, s3; + + do{ + w1 -= 2; + + s0 = w0[0] + w1[0]; + s1 = w1[1] - w0[1]; + s2 = MULT32(s0, T[1]) + MULT32(s1, T[0]); + s3 = MULT32(s1, T[1]) - MULT32(s0, T[0]); + T+=step; + + s0 = (w0[1] + w1[1])>>1; + s1 = (w0[0] - w1[0])>>1; + w0[0] = s0 + s2; + w0[1] = s1 + s3; + w1[0] = s0 - s2; + w1[1] = s3 - s1; + + w0 += 2; + }while(T<Ttop); + do{ + w1 -= 2; + + s0 = w0[0] + w1[0]; + s1 = w1[1] - w0[1]; + T-=step; + s2 = MULT32(s0, T[0]) + MULT32(s1, T[1]); + s3 = MULT32(s1, T[0]) - MULT32(s0, T[1]); + + s0 = (w0[1] + w1[1])>>1; + s1 = (w0[0] - w1[0])>>1; + w0[0] = s0 + s2; + w0[1] = s1 + s3; + w1[0] = s0 - s2; + w1[1] = s3 - s1; + + w0 += 2; + }while(w0<w1); +} +#endif + +STIN void mdct_step8(DATA_TYPE *x, int n, int step){ + LOOKUP_T *T; + LOOKUP_T *V; + DATA_TYPE *iX =x+(n>>1); + + switch(step) { +#if defined(ONLY_C) + default: + T=(step>=4)?(sincos_lookup0+(step>>1)):sincos_lookup1; + do{ + REG_TYPE s0 = x[0]; + REG_TYPE s1 = -x[1]; + XPROD31( s0, s1, T[0], T[1], x, x+1); T+=step; + x +=2; + }while(x<iX); + break; +#endif + + case 1: + { + /* linear interpolation between table values: offset=0.5, step=1 */ + REG_TYPE t0,t1,v0,v1,s0,s1; + T = sincos_lookup0; + V = sincos_lookup1; + t0 = (*T++)>>1; + t1 = (*T++)>>1; + do{ + s0 = x[0]; + s1 = -x[1]; + t0 += (v0 = (*V++)>>1); + t1 += (v1 = (*V++)>>1); + XPROD31( s0, s1, t0, t1, x, x+1 ); + + s0 = x[2]; + s1 = -x[3]; + v0 += (t0 = (*T++)>>1); + v1 += (t1 = (*T++)>>1); + XPROD31( s0, s1, v0, v1, x+2, x+3 ); + + x += 4; + }while(x<iX); + break; + } + + case 0: + { + /* linear interpolation between table values: offset=0.25, step=0.5 */ + REG_TYPE t0,t1,v0,v1,q0,q1,s0,s1; + T = sincos_lookup0; + V = sincos_lookup1; + t0 = *T++; + t1 = *T++; + do{ + + + v0 = *V++; + v1 = *V++; + t0 += (q0 = (v0-t0)>>2); + t1 += (q1 = (v1-t1)>>2); + s0 = x[0]; + s1 = -x[1]; + XPROD31( s0, s1, t0, t1, x, x+1 ); + t0 = v0-q0; + t1 = v1-q1; + s0 = x[2]; + s1 = -x[3]; + XPROD31( s0, s1, t0, t1, x+2, x+3 ); + + t0 = *T++; + t1 = *T++; + v0 += (q0 = (t0-v0)>>2); + v1 += (q1 = (t1-v1)>>2); + s0 = x[4]; + s1 = -x[5]; + XPROD31( s0, s1, v0, v1, x+4, x+5 ); + v0 = t0-q0; + v1 = t1-q1; + s0 = x[6]; + s1 = -x[7]; + XPROD31( s0, s1, v0, v1, x+5, x+6 ); + + x+=8; + }while(x<iX); + break; + } + } +} + +extern int mdct_backwardARM(int n, DATA_TYPE *in); + +/* partial; doesn't perform last-step deinterleave/unrolling. That + can be done more efficiently during pcm output */ +void mdct_backward(int n, DATA_TYPE *in){ + int step; + +#if defined(ONLY_C) + int shift; + + for (shift=4;!(n&(1<<shift));shift++); + shift=13-shift; + step=2<<shift; + + presymmetry(in,n>>1,step); + mdct_butterflies(in,n>>1,shift); + mdct_bitreverse(in,n,shift); + mdct_step7(in,n,step); + mdct_step8(in,n,step>>2); +#else + step = mdct_backwardARM(n, in); + if (step <= 1) + mdct_step8(in,n,step); +#endif +} + +#if defined(ONLY_C) +void mdct_shift_right(int n, DATA_TYPE *in, DATA_TYPE *right){ + int i; + n>>=2; + in+=1; + + for(i=0;i<n;i++) + right[i]=in[i<<1]; +} +#endif + +extern ogg_int16_t *mdct_unroll_prelap(ogg_int16_t *out, + DATA_TYPE *post, + DATA_TYPE *l, + int step); +extern ogg_int16_t *mdct_unroll_part2(ogg_int16_t *out, + DATA_TYPE *post, + DATA_TYPE *l, + DATA_TYPE *r, + int step, + LOOKUP_T *wL, + LOOKUP_T *wR); +extern ogg_int16_t *mdct_unroll_part3(ogg_int16_t *out, + DATA_TYPE *post, + DATA_TYPE *l, + DATA_TYPE *r, + int step, + LOOKUP_T *wL, + LOOKUP_T *wR); +extern ogg_int16_t *mdct_unroll_postlap(ogg_int16_t *out, + DATA_TYPE *post, + DATA_TYPE *l, + int step); + +void mdct_unroll_lap(int n0,int n1, + int lW,int W, + DATA_TYPE *in, + DATA_TYPE *right, + LOOKUP_T *w0, + LOOKUP_T *w1, + ogg_int16_t *out, + int step, + int start, /* samples, this frame */ + int end /* samples, this frame */){ + + DATA_TYPE *l=in+(W&&lW ? n1>>1 : n0>>1); + DATA_TYPE *r=right+(lW ? n1>>2 : n0>>2); + DATA_TYPE *post; + LOOKUP_T *wR=(W && lW ? w1+(n1>>1) : w0+(n0>>1)); + LOOKUP_T *wL=(W && lW ? w1 : w0 ); + + int preLap=(lW && !W ? (n1>>2)-(n0>>2) : 0 ); + int halfLap=(lW && W ? (n1>>2) : (n0>>2) ); + int postLap=(!lW && W ? (n1>>2)-(n0>>2) : 0 ); + int n,off; + + /* preceeding direct-copy lapping from previous frame, if any */ + if(preLap){ + n = (end<preLap?end:preLap); + off = (start<preLap?start:preLap); + post = r-n; + r -= off; + start -= off; + end -= n; +#if defined(ONLY_C) + while(r>post){ + *out = CLIP_TO_15((*--r)>>9); + out+=step; + } +#else + out = mdct_unroll_prelap(out,post,r,step); + n -= off; + if (n < 0) + n = 0; + r -= n; +#endif + } + + /* cross-lap; two halves due to wrap-around */ + n = (end<halfLap?end:halfLap); + off = (start<halfLap?start:halfLap); + post = r-n; + r -= off; + l -= off*2; + start -= off; + wR -= off; + wL += off; + end -= n; +#if defined(ONLY_C) + while(r>post){ + l-=2; + *out = CLIP_TO_15((MULT31(*--r,*--wR) + MULT31(*l,*wL++))>>9); + out+=step; + } +#else + out = mdct_unroll_part2(out, post, l, r, step, wL, wR); + n -= off; + if (n < 0) + n = 0; + l -= 2*n; + r -= n; + wR -= n; + wL += n; +#endif + + n = (end<halfLap?end:halfLap); + off = (start<halfLap?start:halfLap); + post = r+n; + r += off; + l += off*2; + start -= off; + end -= n; + wR -= off; + wL += off; +#if defined(ONLY_C) + while(r<post){ + *out = CLIP_TO_15((MULT31(*r++,*--wR) - MULT31(*l,*wL++))>>9); + out+=step; + l+=2; + } +#else + out = mdct_unroll_part3(out, post, l, r, step, wL, wR); + n -= off; + if (n < 0) + n = 0; + l += 2*n; + r += n; + wR -= n; + wL += n; +#endif + + /* preceeding direct-copy lapping from previous frame, if any */ + if(postLap){ + n = (end<postLap?end:postLap); + off = (start<postLap?start:postLap); + post = l+n*2; + l += off*2; +#if defined(ONLY_C) + while(l<post){ + *out = CLIP_TO_15((-*l)>>9); + out+=step; + l+=2; + } +#else + out = mdct_unroll_postlap(out,post,l,step); +#endif + } +} + diff --git a/ohos-specific/tremolo/Tremolo/mdct.h b/ohos-specific/tremolo/Tremolo/mdct.h new file mode 100644 index 0000000000..08783590a8 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/mdct.h @@ -0,0 +1,79 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: modified discrete cosine transform prototypes + + ************************************************************************/ + +#ifndef _OGG_mdct_H_ +#define _OGG_mdct_H_ + +#include "ivorbiscodec.h" +#include "misc.h" + +#define DATA_TYPE ogg_int32_t +#define REG_TYPE register ogg_int32_t + +#ifdef _LOW_ACCURACY_ +#define cPI3_8 (0x0062) +#define cPI2_8 (0x00b5) +#define cPI1_8 (0x00ed) +#else +#define cPI3_8 (0x30fbc54d) +#define cPI2_8 (0x5a82799a) +#define cPI1_8 (0x7641af3d) +#endif + +extern void mdct_backward(int n, DATA_TYPE *in); +extern void mdct_shift_right(int n, DATA_TYPE *in, DATA_TYPE *right); +extern void mdct_unroll_lap(int n0,int n1, + int lW,int W, + DATA_TYPE *in,DATA_TYPE *right, + LOOKUP_T *w0,LOOKUP_T *w1, + ogg_int16_t *out, + int step, + int start,int end /* samples, this frame */); + +#endif + + + + + + + + + + + + diff --git a/ohos-specific/tremolo/Tremolo/mdctARM.s b/ohos-specific/tremolo/Tremolo/mdctARM.s new file mode 100644 index 0000000000..0fcc68e26b --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/mdctARM.s @@ -0,0 +1,1234 @@ +@ Tremolo library +@----------------------------------------------------------------------- +@ Copyright (C) 2002-2009, Xiph.org Foundation +@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd +@ All rights reserved. + +@ Redistribution and use in source and binary forms, with or without +@ modification, are permitted provided that the following conditions +@ are met: + +@ * Redistributions of source code must retain the above copyright +@ notice, this list of conditions and the following disclaimer. +@ * Redistributions in binary form must reproduce the above +@ copyright notice, this list of conditions and the following disclaimer +@ in the documentation and/or other materials provided with the +@ distribution. +@ * Neither the names of the Xiph.org Foundation nor Pinknoise +@ Productions Ltd nor the names of its contributors may be used to +@ endorse or promote products derived from this software without +@ specific prior written permission. +@ +@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@ ---------------------------------------------------------------------- + + .text + + @ full accuracy version + + .global mdct_backwardARM + .global mdct_shift_right + .global mdct_unroll_prelap + .global mdct_unroll_part2 + .global mdct_unroll_part3 + .global mdct_unroll_postlap + + .extern sincos_lookup0 + .extern sincos_lookup1 + .hidden sincos_lookup0 + .hidden sincos_lookup1 + +mdct_unroll_prelap: + @ r0 = out + @ r1 = post + @ r2 = r + @ r3 = step + STMFD r13!,{r4-r7,r14} + MVN r4, #0x8000 + MOV r3, r3, LSL #1 + SUB r1, r2, r1 @ r1 = r - post + SUBS r1, r1, #16 @ r1 = r - post - 16 + BLT unroll_over +unroll_loop: + LDMDB r2!,{r5,r6,r7,r12} + + MOV r5, r5, ASR #9 @ r5 = (*--r)>>9 + MOV r6, r6, ASR #9 @ r6 = (*--r)>>9 + MOV r7, r7, ASR #9 @ r7 = (*--r)>>9 + MOV r12,r12,ASR #9 @ r12= (*--r)>>9 + + MOV r14,r12,ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r12,r4, r14,ASR #31 + STRH r12,[r0], r3 + + MOV r14,r7, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r7, r4, r14,ASR #31 + STRH r7, [r0], r3 + + MOV r14,r6, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r6, r4, r14,ASR #31 + STRH r6, [r0], r3 + + MOV r14,r5, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r5, r4, r14,ASR #31 + STRH r5, [r0], r3 + + SUBS r1, r1, #16 + BGE unroll_loop + +unroll_over: + ADDS r1, r1, #16 + BLE unroll_end +unroll_loop2: + LDR r5,[r2,#-4]! + @ stall + @ stall (Xscale) + MOV r5, r5, ASR #9 @ r5 = (*--r)>>9 + MOV r14,r5, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r5, r4, r14,ASR #31 + STRH r5, [r0], r3 + SUBS r1, r1, #4 + BGT unroll_loop2 +unroll_end: + LDMFD r13!,{r4-r7,PC} + +mdct_unroll_postlap: + @ r0 = out + @ r1 = post + @ r2 = l + @ r3 = step + STMFD r13!,{r4-r7,r14} + MVN r4, #0x8000 + MOV r3, r3, LSL #1 + SUB r1, r1, r2 @ r1 = post - l + MOV r1, r1, ASR #1 @ r1 = (post - l)>>1 + SUBS r1, r1, #16 @ r1 = ((post - l)>>1) - 4 + BLT unroll_over3 +unroll_loop3: + LDR r12,[r2],#8 + LDR r7, [r2],#8 + LDR r6, [r2],#8 + LDR r5, [r2],#8 + + RSB r12,r12,#0 + RSB r5, r5, #0 + RSB r6, r6, #0 + RSB r7, r7, #0 + + MOV r12, r12,ASR #9 @ r12= (-*l)>>9 + MOV r5, r5, ASR #9 @ r5 = (-*l)>>9 + MOV r6, r6, ASR #9 @ r6 = (-*l)>>9 + MOV r7, r7, ASR #9 @ r7 = (-*l)>>9 + + MOV r14,r12,ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r12,r4, r14,ASR #31 + STRH r12,[r0], r3 + + MOV r14,r7, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r7, r4, r14,ASR #31 + STRH r7, [r0], r3 + + MOV r14,r6, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r6, r4, r14,ASR #31 + STRH r6, [r0], r3 + + MOV r14,r5, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r5, r4, r14,ASR #31 + STRH r5, [r0], r3 + + SUBS r1, r1, #16 + BGE unroll_loop3 + +unroll_over3: + ADDS r1, r1, #16 + BLE unroll_over4 +unroll_loop4: + LDR r5,[r2], #8 + @ stall + @ stall (Xscale) + RSB r5, r5, #0 + MOV r5, r5, ASR #9 @ r5 = (-*l)>>9 + MOV r14,r5, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r5, r4, r14,ASR #31 + STRH r5, [r0], r3 + SUBS r1, r1, #4 + BGT unroll_loop4 +unroll_over4: + LDMFD r13!,{r4-r7,PC} + +mdct_unroll_part2: + @ r0 = out + @ r1 = post + @ r2 = l + @ r3 = r + @ <> = step + @ <> = wL + @ <> = wR + MOV r12,r13 + STMFD r13!,{r4,r6-r11,r14} + LDMFD r12,{r8,r9,r10} @ r8 = step + @ r9 = wL + @ r10= wR + MVN r4, #0x8000 + MOV r8, r8, LSL #1 + SUBS r1, r3, r1 @ r1 = (r - post) + BLE unroll_over5 +unroll_loop5: + LDR r12,[r2, #-8]! @ r12= *l (but l -= 2 first) + LDR r11,[r9],#4 @ r11= *wL++ + LDR r7, [r3, #-4]! @ r7 = *--r + LDR r6, [r10,#-4]! @ r6 = *--wR + + @ Can save a cycle here, at the cost of 1bit errors in rounding + SMULL r14,r11,r12,r11 @ (r14,r11) = *l * *wL++ + SMULL r14,r6, r7, r6 @ (r14,r6) = *--r * *--wR + ADD r6, r6, r11 + MOV r6, r6, ASR #8 + MOV r14,r6, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r6, r4, r14,ASR #31 + STRH r6, [r0], r8 + + SUBS r1, r1, #4 + BGT unroll_loop5 + +unroll_over5: + LDMFD r13!,{r4,r6-r11,PC} + +mdct_unroll_part3: + @ r0 = out + @ r1 = post + @ r2 = l + @ r3 = r + @ <> = step + @ <> = wL + @ <> = wR + MOV r12,r13 + STMFD r13!,{r4,r6-r11,r14} + LDMFD r12,{r8,r9,r10} @ r8 = step + @ r9 = wL + @ r10= wR + MVN r4, #0x8000 + MOV r8, r8, LSL #1 + SUBS r1, r1, r3 @ r1 = (post - r) + BLE unroll_over6 +unroll_loop6: + LDR r12,[r2],#8 @ r12= *l (but l += 2 first) + LDR r11,[r9],#4 @ r11= *wL++ + LDR r7, [r3],#4 @ r7 = *r++ + LDR r6, [r10,#-4]! @ r6 = *--wR + + @ Can save a cycle here, at the cost of 1bit errors in rounding + SMULL r14,r11,r12,r11 @ (r14,r11) = *l * *wL++ + SMULL r14,r6, r7, r6 @ (r14,r6) = *--r * *--wR + SUB r6, r6, r11 + MOV r6, r6, ASR #8 + MOV r14,r6, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r6, r4, r14,ASR #31 + STRH r6, [r0], r8 + + SUBS r1, r1, #4 + BGT unroll_loop6 + +unroll_over6: + LDMFD r13!,{r4,r6-r11,PC} + +mdct_shift_right: + @ r0 = n + @ r1 = in + @ r2 = right + STMFD r13!,{r4-r11,r14} + + MOV r0, r0, LSR #2 @ n >>= 2 + ADD r1, r1, #4 + + SUBS r0, r0, #8 + BLT sr_less_than_8 +sr_loop: + LDR r3, [r1], #8 + LDR r4, [r1], #8 + LDR r5, [r1], #8 + LDR r6, [r1], #8 + LDR r7, [r1], #8 + LDR r8, [r1], #8 + LDR r12,[r1], #8 + LDR r14,[r1], #8 + SUBS r0, r0, #8 + STMIA r2!,{r3,r4,r5,r6,r7,r8,r12,r14} + BGE sr_loop +sr_less_than_8: + ADDS r0, r0, #8 + BEQ sr_end +sr_loop2: + LDR r3, [r1], #8 + SUBS r0, r0, #1 + STR r3, [r2], #4 + BGT sr_loop2 +sr_end: + LDMFD r13!,{r4-r11,PC} + +mdct_backwardARM: + @ r0 = n + @ r1 = in + STMFD r13!,{r4-r11,r14} + + MOV r2,#1<<4 @ r2 = 1<<shift + MOV r3,#13-4 @ r3 = 13-shift +find_shift_loop: + TST r0,r2 @ if (n & (1<<shift)) == 0 + MOV r2,r2,LSL #1 + SUBEQ r3,r3,#1 @ shift-- + BEQ find_shift_loop + MOV r2,#2 + MOV r2,r2,LSL r3 @ r2 = step = 2<<shift + + @ presymmetry + @ r0 = n (a multiple of 4) + @ r1 = in + @ r2 = step + @ r3 = shift + + ADD r4, r1, r0, LSL #1 @ r4 = aX = in+(n>>1) + ADD r14,r1, r0 @ r14= in+(n>>2) + SUB r4, r4, #3*4 @ r4 = aX = in+n2-3 + ADRL r7, .Lsincos_lookup + LDR r5, [r7] @ r5 = T=sincos_lookup0 + ADD r5, r7 + +presymmetry_loop1: + LDR r7, [r4,#8] @ r6 = s2 = aX[2] + LDR r11,[r5,#4] @ r11= T[1] + LDR r6, [r4] @ r6 = s0 = aX[0] + LDR r10,[r5],r2,LSL #2 @ r10= T[0] T += step + + @ XPROD31(s0, s2, T[0], T[1], 0xaX[0], &ax[2]) + SMULL r8, r9, r7, r11 @ (r8, r9) = s2*T[1] + @ stall + @ stall ? + SMLAL r8, r9, r6, r10 @ (r8, r9) += s0*T[0] + RSB r6, r6, #0 + @ stall ? + SMULL r8, r12,r7, r10 @ (r8, r12) = s2*T[0] + MOV r9, r9, LSL #1 + @ stall ? + SMLAL r8, r12,r6, r11 @ (r8, r12) -= s0*T[1] + STR r9, [r4],#-16 @ aX[0] = r9 + CMP r4,r14 + MOV r12,r12,LSL #1 + STR r12,[r4,#8+16] @ aX[2] = r12 + + BGE presymmetry_loop1 @ while (aX >= in+n4) + +presymmetry_loop2: + LDR r6,[r4] @ r6 = s0 = aX[0] + LDR r10,[r5,#4] @ r10= T[1] + LDR r7,[r4,#8] @ r6 = s2 = aX[2] + LDR r11,[r5],-r2,LSL #2 @ r11= T[0] T -= step + + @ XPROD31(s0, s2, T[1], T[0], 0xaX[0], &ax[2]) + SMULL r8, r9, r6, r10 @ (r8, r9) = s0*T[1] + @ stall + @ stall ? + SMLAL r8, r9, r7, r11 @ (r8, r9) += s2*T[0] + RSB r6, r6, #0 + @ stall ? + SMULL r8, r12,r7, r10 @ (r8, r12) = s2*T[1] + MOV r9, r9, LSL #1 + @ stall ? + SMLAL r8, r12,r6, r11 @ (r8, r12) -= s0*T[0] + STR r9, [r4],#-16 @ aX[0] = r9 + CMP r4,r1 + MOV r12,r12,LSL #1 + STR r12,[r4,#8+16] @ aX[2] = r12 + + BGE presymmetry_loop2 @ while (aX >= in) + + @ r0 = n + @ r1 = in + @ r2 = step + @ r3 = shift + STMFD r13!,{r3} + ADRL r4, .Lsincos_lookup + LDR r5, [r4] @ r5 = T=sincos_lookup0 + ADD r5, r4 + ADD r4, r1, r0, LSL #1 @ r4 = aX = in+(n>>1) + SUB r4, r4, #4*4 @ r4 = aX = in+(n>>1)-4 + LDR r11,[r5,#4] @ r11= T[1] + LDR r10,[r5],r2, LSL #2 @ r10= T[0] T += step +presymmetry_loop3: + LDR r8,[r1],#16 @ r8 = ro0 = bX[0] + LDR r9,[r1,#8-16] @ r9 = ro2 = bX[2] + LDR r6,[r4] @ r6 = ri0 = aX[0] + + @ XNPROD31( ro2, ro0, T[1], T[0], 0xaX[0], &aX[2] ) + @ aX[0] = (ro2*T[1] - ro0*T[0])>>31 aX[2] = (ro0*T[1] + ro2*T[0])>>31 + SMULL r14,r12,r8, r11 @ (r14,r12) = ro0*T[1] + RSB r8,r8,#0 @ r8 = -ro0 + @ Stall ? + SMLAL r14,r12,r9, r10 @ (r14,r12) += ro2*T[0] + LDR r7,[r4,#8] @ r7 = ri2 = aX[2] + @ Stall ? + SMULL r14,r3, r9, r11 @ (r14,r3) = ro2*T[1] + MOV r12,r12,LSL #1 + LDR r11,[r5,#4] @ r11= T[1] + SMLAL r14,r3, r8, r10 @ (r14,r3) -= ro0*T[0] + LDR r10,[r5],r2, LSL #2 @ r10= T[0] T += step + STR r12,[r4,#8] + MOV r3, r3, LSL #1 + STR r3, [r4],#-16 + + @ XNPROD31( ri2, ri0, T[0], T[1], 0xbX[0], &bX[2] ) + @ bX[0] = (ri2*T[0] - ri0*T[1])>>31 bX[2] = (ri0*T[0] + ri2*T[1])>>31 + SMULL r14,r12,r6, r10 @ (r14,r12) = ri0*T[0] + RSB r6,r6,#0 @ r6 = -ri0 + @ stall ? + SMLAL r14,r12,r7, r11 @ (r14,r12) += ri2*T[1] + @ stall ? + @ stall ? + SMULL r14,r3, r7, r10 @ (r14,r3) = ri2*T[0] + MOV r12,r12,LSL #1 + @ stall ? + SMLAL r14,r3, r6, r11 @ (r14,r3) -= ri0*T[1] + CMP r4,r1 + STR r12,[r1,#8-16] + MOV r3, r3, LSL #1 + STR r3, [r1,#-16] + + BGE presymmetry_loop3 + + SUB r1,r1,r0 @ r1 = in -= n>>2 (i.e. restore in) + + LDR r3,[r13] + STR r2,[r13,#-4]! + + @ mdct_butterflies + @ r0 = n = (points * 2) + @ r1 = in = x + @ r2 = i + @ r3 = shift + STMFD r13!,{r0-r1} + ADRL r4, .Lsincos_lookup + LDR r5, [r4] + ADD r5, r4 + RSBS r4,r3,#6 @ r4 = stages = 7-shift then --stages + BLE no_generics + MOV r14,#4 @ r14= 4 (i=0) + MOV r6, r14,LSL r3 @ r6 = (4<<i)<<shift +mdct_butterflies_loop1: + MOV r0, r0, LSR #1 @ r0 = points>>i = POINTS + MOV r2, r14,LSR #2 @ r2 = (1<<i)-j (j=0) + STMFD r13!,{r4,r14} +mdct_butterflies_loop2: + + @ mdct_butterfly_generic(x+POINTS*j, POINTS, 4<<(i+shift)) + @ mdct_butterfly_generic(r1, r0, r6) + @ r0 = points + @ r1 = x + @ preserve r2 (external loop counter) + @ preserve r3 + @ preserve r4 (external loop counter) + @ r5 = T = sincos_lookup0 + @ r6 = step + @ preserve r14 + + STR r2,[r13,#-4]! @ stack r2 + ADD r1,r1,r0,LSL #1 @ r1 = x2+4 = x + (POINTS>>1) + ADD r7,r1,r0,LSL #1 @ r7 = x1+4 = x + POINTS + ADD r12,r5,#1024*4 @ r12= sincos_lookup0+1024 + +mdct_bufferfly_generic_loop1: + LDMDB r7!,{r2,r3,r8,r11} @ r2 = x1[0] + @ r3 = x1[1] + @ r8 = x1[2] + @ r11= x1[3] x1 -= 4 + LDMDB r1!,{r4,r9,r10,r14} @ r4 = x2[0] + @ r9 = x2[1] + @ r10= x2[2] + @ r14= x2[3] x2 -= 4 + + SUB r2, r2, r3 @ r2 = s0 = x1[0] - x1[1] + ADD r3, r2, r3, LSL #1 @ r3 = x1[0] + x1[1] (-> x1[0]) + SUB r11,r11,r8 @ r11= s1 = x1[3] - x1[2] + ADD r8, r11,r8, LSL #1 @ r8 = x1[3] + x1[2] (-> x1[2]) + SUB r9, r9, r4 @ r9 = s2 = x2[1] - x2[0] + ADD r4, r9, r4, LSL #1 @ r4 = x2[1] + x2[0] (-> x1[1]) + SUB r14,r14,r10 @ r14= s3 = x2[3] - x2[2] + ADD r10,r14,r10,LSL #1 @ r10= x2[3] + x2[2] (-> x1[3]) + STMIA r7,{r3,r4,r8,r10} + + @ r0 = points + @ r1 = x2 + @ r2 = s0 + @ r3 free + @ r4 free + @ r5 = T + @ r6 = step + @ r7 = x1 + @ r8 free + @ r9 = s2 + @ r10 free + @ r11= s1 + @ r12= limit + @ r14= s3 + + LDR r8, [r5,#4] @ r8 = T[1] + LDR r10,[r5],r6,LSL #2 @ r10= T[0] T += step + + @ XPROD31(s1, s0, T[0], T[1], &x2[0], &x2[2]) + @ x2[0] = (s1*T[0] + s0*T[1])>>31 x2[2] = (s0*T[0] - s1*T[1])>>31 + @ stall Xscale + SMULL r4, r3, r2, r8 @ (r4, r3) = s0*T[1] + SMLAL r4, r3, r11,r10 @ (r4, r3) += s1*T[0] + RSB r11,r11,#0 + SMULL r11,r4, r8, r11 @ (r11,r4) = -s1*T[1] + SMLAL r11,r4, r2, r10 @ (r11,r4) += s0*T[0] + MOV r2, r3, LSL #1 @ r2 = r3<<1 = Value for x2[0] + + @ XPROD31(s2, s3, T[0], T[1], &x2[1], &x2[3]) + @ x2[1] = (s2*T[0] + s3*T[1])>>31 x2[3] = (s3*T[0] - s2*T[1])>>31 + SMULL r11,r3, r9, r10 @ (r11,r3) = s2*T[0] + MOV r4, r4, LSL #1 @ r4 = r4<<1 = Value for x2[2] + SMLAL r11,r3, r14,r8 @ (r11,r3) += s3*T[1] + RSB r9, r9, #0 + SMULL r10,r11,r14,r10 @ (r10,r11) = s3*T[0] + MOV r3, r3, LSL #1 @ r3 = r3<<1 = Value for x2[1] + SMLAL r10,r11,r9,r8 @ (r10,r11) -= s2*T[1] + CMP r5, r12 + MOV r11,r11,LSL #1 @ r11= r11<<1 = Value for x2[3] + + STMIA r1,{r2,r3,r4,r11} + + BLT mdct_bufferfly_generic_loop1 + + SUB r12,r12,#1024*4 +mdct_bufferfly_generic_loop2: + LDMDB r7!,{r2,r3,r9,r10} @ r2 = x1[0] + @ r3 = x1[1] + @ r9 = x1[2] + @ r10= x1[3] x1 -= 4 + LDMDB r1!,{r4,r8,r11,r14} @ r4 = x2[0] + @ r8 = x2[1] + @ r11= x2[2] + @ r14= x2[3] x2 -= 4 + + SUB r2, r2, r3 @ r2 = s0 = x1[0] - x1[1] + ADD r3, r2, r3, LSL #1 @ r3 = x1[0] + x1[1] (-> x1[0]) + SUB r9, r9,r10 @ r9 = s1 = x1[2] - x1[3] + ADD r10,r9,r10, LSL #1 @ r10= x1[2] + x1[3] (-> x1[2]) + SUB r4, r4, r8 @ r4 = s2 = x2[0] - x2[1] + ADD r8, r4, r8, LSL #1 @ r8 = x2[0] + x2[1] (-> x1[1]) + SUB r14,r14,r11 @ r14= s3 = x2[3] - x2[2] + ADD r11,r14,r11,LSL #1 @ r11= x2[3] + x2[2] (-> x1[3]) + STMIA r7,{r3,r8,r10,r11} + + @ r0 = points + @ r1 = x2 + @ r2 = s0 + @ r3 free + @ r4 = s2 + @ r5 = T + @ r6 = step + @ r7 = x1 + @ r8 free + @ r9 = s1 + @ r10 free + @ r11 free + @ r12= limit + @ r14= s3 + + LDR r8, [r5,#4] @ r8 = T[1] + LDR r10,[r5],-r6,LSL #2 @ r10= T[0] T -= step + + @ XNPROD31(s0, s1, T[0], T[1], &x2[0], &x2[2]) + @ x2[0] = (s0*T[0] - s1*T[1])>>31 x2[2] = (s1*T[0] + s0*T[1])>>31 + @ stall Xscale + SMULL r3, r11,r2, r8 @ (r3, r11) = s0*T[1] + SMLAL r3, r11,r9, r10 @ (r3, r11) += s1*T[0] + RSB r9, r9, #0 + SMULL r3, r2, r10,r2 @ (r3, r2) = s0*T[0] + SMLAL r3, r2, r9, r8 @ (r3, r2) += -s1*T[1] + MOV r9, r11,LSL #1 @ r9 = r11<<1 = Value for x2[2] + + @ XNPROD31(s3, s2, T[0], T[1], &x2[1], &x2[3]) + @ x2[1] = (s3*T[0] - s2*T[1])>>31 x2[3] = (s2*T[0] + s3*T[1])>>31 + SMULL r3, r11,r4, r10 @ (r3,r11) = s2*T[0] + MOV r2, r2, LSL #1 @ r2 = r2<<1 = Value for x2[0] + SMLAL r3, r11,r14,r8 @ (r3,r11) += s3*T[1] + RSB r4, r4, #0 + SMULL r10,r3,r14,r10 @ (r10,r3) = s3*T[0] + MOV r11,r11,LSL #1 @ r11= r11<<1 = Value for x2[3] + SMLAL r10,r3, r4, r8 @ (r10,r3) -= s2*T[1] + CMP r5, r12 + MOV r3, r3, LSL #1 @ r3 = r3<<1 = Value for x2[1] + + STMIA r1,{r2,r3,r9,r11} + + BGT mdct_bufferfly_generic_loop2 + + LDR r2,[r13],#4 @ unstack r2 + ADD r1, r1, r0, LSL #2 @ r1 = x+POINTS*j + @ stall Xscale + SUBS r2, r2, #1 @ r2-- (j++) + BGT mdct_butterflies_loop2 + + LDMFD r13!,{r4,r14} + + LDR r1,[r13,#4] + + SUBS r4, r4, #1 @ stages-- + MOV r14,r14,LSL #1 @ r14= 4<<i (i++) + MOV r6, r6, LSL #1 @ r6 = step <<= 1 (i++) + BGE mdct_butterflies_loop1 + LDMFD r13,{r0-r1} +no_generics: + @ mdct_butterflies part2 (loop around mdct_bufferfly_32) + @ r0 = points + @ r1 = in + @ r2 = step + @ r3 = shift + +mdct_bufferflies_loop3: + @ mdct_bufferfly_32 + + @ block1 + ADD r4, r1, #16*4 @ r4 = &in[16] + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[16] + @ r6 = x[17] + @ r9 = x[18] + @ r10= x[19] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[0] + @ r8 = x[1] + @ r11= x[2] + @ r12= x[3] + SUB r5, r5, r6 @ r5 = s0 = x[16] - x[17] + ADD r6, r5, r6, LSL #1 @ r6 = x[16] + x[17] -> x[16] + SUB r9, r9, r10 @ r9 = s1 = x[18] - x[19] + ADD r10,r9, r10,LSL #1 @ r10= x[18] + x[19] -> x[18] + SUB r8, r8, r7 @ r8 = s2 = x[ 1] - x[ 0] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 1] + x[ 0] -> x[17] + SUB r12,r12,r11 @ r12= s3 = x[ 3] - x[ 2] + ADD r11,r12,r11, LSL #1 @ r11= x[ 3] + x[ 2] -> x[19] + STMIA r4!,{r6,r7,r10,r11} + + LDR r6,cPI1_8 + LDR r7,cPI3_8 + + @ XNPROD31( s0, s1, cPI3_8, cPI1_8, &x[ 0], &x[ 2] ) + @ x[0] = s0*cPI3_8 - s1*cPI1_8 x[2] = s1*cPI3_8 + s0*cPI1_8 + @ stall Xscale + SMULL r14,r11,r5, r6 @ (r14,r11) = s0*cPI1_8 + SMLAL r14,r11,r9, r7 @ (r14,r11) += s1*cPI3_8 + RSB r9, r9, #0 + SMULL r14,r5, r7, r5 @ (r14,r5) = s0*cPI3_8 + SMLAL r14,r5, r9, r6 @ (r14,r5) -= s1*cPI1_8 + MOV r11,r11,LSL #1 + MOV r5, r5, LSL #1 + + @ XPROD31 ( s2, s3, cPI1_8, cPI3_8, &x[ 1], &x[ 3] ) + @ x[1] = s2*cPI1_8 + s3*cPI3_8 x[3] = s3*cPI1_8 - s2*cPI3_8 + SMULL r14,r9, r8, r6 @ (r14,r9) = s2*cPI1_8 + SMLAL r14,r9, r12,r7 @ (r14,r9) += s3*cPI3_8 + RSB r8,r8,#0 + SMULL r14,r12,r6, r12 @ (r14,r12) = s3*cPI1_8 + SMLAL r14,r12,r8, r7 @ (r14,r12) -= s2*cPI3_8 + MOV r9, r9, LSL #1 + MOV r12,r12,LSL #1 + STMIA r1!,{r5,r9,r11,r12} + + @ block2 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[20] + @ r6 = x[21] + @ r9 = x[22] + @ r10= x[23] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[4] + @ r8 = x[5] + @ r11= x[6] + @ r12= x[7] + SUB r5, r5, r6 @ r5 = s0 = x[20] - x[21] + ADD r6, r5, r6, LSL #1 @ r6 = x[20] + x[21] -> x[20] + SUB r9, r9, r10 @ r9 = s1 = x[22] - x[23] + ADD r10,r9, r10,LSL #1 @ r10= x[22] + x[23] -> x[22] + SUB r8, r8, r7 @ r8 = s2 = x[ 5] - x[ 4] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 5] + x[ 4] -> x[21] + SUB r12,r12,r11 @ r12= s3 = x[ 7] - x[ 6] + ADD r11,r12,r11, LSL #1 @ r11= x[ 7] + x[ 6] -> x[23] + LDR r14,cPI2_8 + STMIA r4!,{r6,r7,r10,r11} + + SUB r5, r5, r9 @ r5 = s0 - s1 + ADD r9, r5, r9, LSL #1 @ r9 = s0 + s1 + SMULL r6, r5, r14,r5 @ (r6,r5) = (s0-s1)*cPI2_8 + SUB r12,r12,r8 @ r12= s3 - s2 + ADD r8, r12,r8, LSL #1 @ r8 = s3 + s2 + + SMULL r6, r8, r14,r8 @ (r6,r8) = (s3+s2)*cPI2_8 + MOV r5, r5, LSL #1 + SMULL r6, r9, r14,r9 @ (r6,r9) = (s0+s1)*cPI2_8 + MOV r8, r8, LSL #1 + SMULL r6, r12,r14,r12 @ (r6,r12) = (s3-s2)*cPI2_8 + MOV r9, r9, LSL #1 + MOV r12,r12,LSL #1 + STMIA r1!,{r5,r8,r9,r12} + + @ block3 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[24] + @ r6 = x[25] + @ r9 = x[25] + @ r10= x[26] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[8] + @ r8 = x[9] + @ r11= x[10] + @ r12= x[11] + SUB r5, r5, r6 @ r5 = s0 = x[24] - x[25] + ADD r6, r5, r6, LSL #1 @ r6 = x[24] + x[25] -> x[25] + SUB r9, r9, r10 @ r9 = s1 = x[26] - x[27] + ADD r10,r9, r10,LSL #1 @ r10= x[26] + x[27] -> x[26] + SUB r8, r8, r7 @ r8 = s2 = x[ 9] - x[ 8] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 9] + x[ 8] -> x[25] + SUB r12,r12,r11 @ r12= s3 = x[11] - x[10] + ADD r11,r12,r11, LSL #1 @ r11= x[11] + x[10] -> x[27] + STMIA r4!,{r6,r7,r10,r11} + + LDR r6,cPI3_8 + LDR r7,cPI1_8 + + @ XNPROD31( s0, s1, cPI1_8, cPI3_8, &x[ 8], &x[10] ) + @ x[8] = s0*cPI1_8 - s1*cPI3_8 x[10] = s1*cPI1_8 + s0*cPI3_8 + @ stall Xscale + SMULL r14,r11,r5, r6 @ (r14,r11) = s0*cPI3_8 + SMLAL r14,r11,r9, r7 @ (r14,r11) += s1*cPI1_8 + RSB r9, r9, #0 + SMULL r14,r5, r7, r5 @ (r14,r5) = s0*cPI1_8 + SMLAL r14,r5, r9, r6 @ (r14,r5) -= s1*cPI3_8 + MOV r11,r11,LSL #1 + MOV r5, r5, LSL #1 + + @ XPROD31 ( s2, s3, cPI3_8, cPI1_8, &x[ 9], &x[11] ) + @ x[9] = s2*cPI3_8 + s3*cPI1_8 x[11] = s3*cPI3_8 - s2*cPI1_8 + SMULL r14,r9, r8, r6 @ (r14,r9) = s2*cPI3_8 + SMLAL r14,r9, r12,r7 @ (r14,r9) += s3*cPI1_8 + RSB r8,r8,#0 + SMULL r14,r12,r6, r12 @ (r14,r12) = s3*cPI3_8 + SMLAL r14,r12,r8, r7 @ (r14,r12) -= s2*cPI1_8 + MOV r9, r9, LSL #1 + MOV r12,r12,LSL #1 + STMIA r1!,{r5,r9,r11,r12} + + @ block4 + LDMIA r4,{r5,r6,r10,r11} @ r5 = x[28] + @ r6 = x[29] + @ r10= x[30] + @ r11= x[31] + LDMIA r1,{r8,r9,r12,r14} @ r8 = x[12] + @ r9 = x[13] + @ r12= x[14] + @ r14= x[15] + SUB r5, r5, r6 @ r5 = s0 = x[28] - x[29] + ADD r6, r5, r6, LSL #1 @ r6 = x[28] + x[29] -> x[28] + SUB r7, r14,r12 @ r7 = s3 = x[15] - x[14] + ADD r12,r7, r12, LSL #1 @ r12= x[15] + x[14] -> x[31] + SUB r10,r10,r11 @ r10= s1 = x[30] - x[31] + ADD r11,r10,r11,LSL #1 @ r11= x[30] + x[31] -> x[30] + SUB r14, r8, r9 @ r14= s2 = x[12] - x[13] + ADD r9, r14, r9, LSL #1 @ r9 = x[12] + x[13] -> x[29] + STMIA r4!,{r6,r9,r11,r12} + STMIA r1!,{r5,r7,r10,r14} + + @ mdct_butterfly16 (1st version) + @ block 1 + SUB r1,r1,#16*4 + ADD r4,r1,#8*4 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[ 8] + @ r6 = x[ 9] + @ r9 = x[10] + @ r10= x[11] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[0] + @ r8 = x[1] + @ r11= x[2] + @ r12= x[3] + SUB r5, r5, r6 @ r5 = s0 = x[ 8] - x[ 9] + ADD r6, r5, r6, LSL #1 @ r6 = x[ 8] + x[ 9] -> x[ 8] + SUB r9, r9, r10 @ r9 = s1 = x[10] - x[11] + ADD r10,r9, r10,LSL #1 @ r10= x[10] + x[11] -> x[10] + SUB r8, r8, r7 @ r8 = s2 = x[ 1] - x[ 0] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 1] + x[ 0] -> x[ 9] + SUB r12,r12,r11 @ r12= s3 = x[ 3] - x[ 2] + ADD r11,r12,r11, LSL #1 @ r11= x[ 3] + x[ 2] -> x[11] + LDR r14,cPI2_8 + STMIA r4!,{r6,r7,r10,r11} + + SUB r5, r5, r9 @ r5 = s0 - s1 + ADD r9, r5, r9, LSL #1 @ r9 = s0 + s1 + SMULL r6, r5, r14,r5 @ (r6,r5) = (s0-s1)*cPI2_8 + SUB r12,r12,r8 @ r12= s3 - s2 + ADD r8, r12,r8, LSL #1 @ r8 = s3 + s2 + + SMULL r6, r8, r14,r8 @ (r6,r8) = (s3+s2)*cPI2_8 + MOV r5, r5, LSL #1 + SMULL r6, r9, r14,r9 @ (r6,r9) = (s0+s1)*cPI2_8 + MOV r8, r8, LSL #1 + SMULL r6, r12,r14,r12 @ (r6,r12) = (s3-s2)*cPI2_8 + MOV r9, r9, LSL #1 + MOV r12,r12,LSL #1 + STMIA r1!,{r5,r8,r9,r12} + + @ block4 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[12] + @ r6 = x[13] + @ r9 = x[14] + @ r10= x[15] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[ 4] + @ r8 = x[ 5] + @ r11= x[ 6] + @ r12= x[ 7] + SUB r14,r7, r8 @ r14= s0 = x[ 4] - x[ 5] + ADD r8, r14,r8, LSL #1 @ r8 = x[ 4] + x[ 5] -> x[13] + SUB r7, r12,r11 @ r7 = s1 = x[ 7] - x[ 6] + ADD r11,r7, r11, LSL #1 @ r11= x[ 7] + x[ 6] -> x[15] + SUB r5, r5, r6 @ r5 = s2 = x[12] - x[13] + ADD r6, r5, r6, LSL #1 @ r6 = x[12] + x[13] -> x[12] + SUB r12,r9, r10 @ r12= s3 = x[14] - x[15] + ADD r10,r12,r10,LSL #1 @ r10= x[14] + x[15] -> x[14] + STMIA r4!,{r6,r8,r10,r11} + STMIA r1!,{r5,r7,r12,r14} + + @ mdct_butterfly_8 + LDMDB r1,{r6,r7,r8,r9,r10,r11,r12,r14} + @ r6 = x[0] + @ r7 = x[1] + @ r8 = x[2] + @ r9 = x[3] + @ r10= x[4] + @ r11= x[5] + @ r12= x[6] + @ r14= x[7] + ADD r6, r6, r7 @ r6 = s0 = x[0] + x[1] + SUB r7, r6, r7, LSL #1 @ r7 = s1 = x[0] - x[1] + ADD r8, r8, r9 @ r8 = s2 = x[2] + x[3] + SUB r9, r8, r9, LSL #1 @ r9 = s3 = x[2] - x[3] + ADD r10,r10,r11 @ r10= s4 = x[4] + x[5] + SUB r11,r10,r11,LSL #1 @ r11= s5 = x[4] - x[5] + ADD r12,r12,r14 @ r12= s6 = x[6] + x[7] + SUB r14,r12,r14,LSL #1 @ r14= s7 = x[6] - x[7] + + ADD r2, r11,r9 @ r2 = x[0] = s5 + s3 + SUB r4, r2, r9, LSL #1 @ r4 = x[2] = s5 - s3 + SUB r3, r14,r7 @ r3 = x[1] = s7 - s1 + ADD r5, r3, r7, LSL #1 @ r5 = x[3] = s7 + s1 + SUB r10,r10,r6 @ r10= x[4] = s4 - s0 + SUB r11,r12,r8 @ r11= x[5] = s6 - s2 + ADD r12,r10,r6, LSL #1 @ r12= x[6] = s4 + s0 + ADD r14,r11,r8, LSL #1 @ r14= x[7] = s6 + s2 + STMDB r1,{r2,r3,r4,r5,r10,r11,r12,r14} + + @ mdct_butterfly_8 + LDMIA r1,{r6,r7,r8,r9,r10,r11,r12,r14} + @ r6 = x[0] + @ r7 = x[1] + @ r8 = x[2] + @ r9 = x[3] + @ r10= x[4] + @ r11= x[5] + @ r12= x[6] + @ r14= x[7] + ADD r6, r6, r7 @ r6 = s0 = x[0] + x[1] + SUB r7, r6, r7, LSL #1 @ r7 = s1 = x[0] - x[1] + ADD r8, r8, r9 @ r8 = s2 = x[2] + x[3] + SUB r9, r8, r9, LSL #1 @ r9 = s3 = x[2] - x[3] + ADD r10,r10,r11 @ r10= s4 = x[4] + x[5] + SUB r11,r10,r11,LSL #1 @ r11= s5 = x[4] - x[5] + ADD r12,r12,r14 @ r12= s6 = x[6] + x[7] + SUB r14,r12,r14,LSL #1 @ r14= s7 = x[6] - x[7] + + ADD r2, r11,r9 @ r2 = x[0] = s5 + s3 + SUB r4, r2, r9, LSL #1 @ r4 = x[2] = s5 - s3 + SUB r3, r14,r7 @ r3 = x[1] = s7 - s1 + ADD r5, r3, r7, LSL #1 @ r5 = x[3] = s7 + s1 + SUB r10,r10,r6 @ r10= x[4] = s4 - s0 + SUB r11,r12,r8 @ r11= x[5] = s6 - s2 + ADD r12,r10,r6, LSL #1 @ r12= x[6] = s4 + s0 + ADD r14,r11,r8, LSL #1 @ r14= x[7] = s6 + s2 + STMIA r1,{r2,r3,r4,r5,r10,r11,r12,r14} + + @ block 2 + ADD r1,r1,#16*4-8*4 + ADD r4,r1,#8*4 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[ 8] + @ r6 = x[ 9] + @ r9 = x[10] + @ r10= x[11] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[0] + @ r8 = x[1] + @ r11= x[2] + @ r12= x[3] + SUB r5, r5, r6 @ r5 = s0 = x[ 8] - x[ 9] + ADD r6, r5, r6, LSL #1 @ r6 = x[ 8] + x[ 9] -> x[ 8] + SUB r9, r9, r10 @ r9 = s1 = x[10] - x[11] + ADD r10,r9, r10,LSL #1 @ r10= x[10] + x[11] -> x[10] + SUB r8, r8, r7 @ r8 = s2 = x[ 1] - x[ 0] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 1] + x[ 0] -> x[ 9] + SUB r12,r12,r11 @ r12= s3 = x[ 3] - x[ 2] + ADD r11,r12,r11, LSL #1 @ r11= x[ 3] + x[ 2] -> x[11] + LDR r14,cPI2_8 + STMIA r4!,{r6,r7,r10,r11} + + SUB r5, r5, r9 @ r5 = s0 - s1 + ADD r9, r5, r9, LSL #1 @ r9 = s0 + s1 + SMULL r6, r5, r14,r5 @ (r6,r5) = (s0-s1)*cPI2_8 + SUB r12,r12,r8 @ r12= s3 - s2 + ADD r8, r12,r8, LSL #1 @ r8 = s3 + s2 + + SMULL r6, r8, r14,r8 @ (r6,r8) = (s3+s2)*cPI2_8 + MOV r5, r5, LSL #1 + SMULL r6, r9, r14,r9 @ (r6,r9) = (s0+s1)*cPI2_8 + MOV r8, r8, LSL #1 + SMULL r6, r12,r14,r12 @ (r6,r12) = (s3-s2)*cPI2_8 + MOV r9, r9, LSL #1 + MOV r12,r12,LSL #1 + STMIA r1!,{r5,r8,r9,r12} + + @ block4 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[12] + @ r6 = x[13] + @ r9 = x[14] + @ r10= x[15] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[ 4] + @ r8 = x[ 5] + @ r11= x[ 6] + @ r12= x[ 7] + SUB r5, r5, r6 @ r5 = s2 = x[12] - x[13] + ADD r6, r5, r6, LSL #1 @ r6 = x[12] + x[13] -> x[12] + SUB r9, r9, r10 @ r9 = s3 = x[14] - x[15] + ADD r10,r9, r10,LSL #1 @ r10= x[14] + x[15] -> x[14] + SUB r14,r7, r8 @ r14= s0 = x[ 4] - x[ 5] + ADD r8, r14,r8, LSL #1 @ r8 = x[ 4] + x[ 5] -> x[13] + SUB r7, r12,r11 @ r7 = s1 = x[ 7] - x[ 6] + ADD r11,r7, r11, LSL #1 @ r11= x[ 7] + x[ 6] -> x[15] + STMIA r4!,{r6,r8,r10,r11} + STMIA r1!,{r5,r7,r9,r14} + + @ mdct_butterfly_8 + LDMDB r1,{r6,r7,r8,r9,r10,r11,r12,r14} + @ r6 = x[0] + @ r7 = x[1] + @ r8 = x[2] + @ r9 = x[3] + @ r10= x[4] + @ r11= x[5] + @ r12= x[6] + @ r14= x[7] + ADD r6, r6, r7 @ r6 = s0 = x[0] + x[1] + SUB r7, r6, r7, LSL #1 @ r7 = s1 = x[0] - x[1] + ADD r8, r8, r9 @ r8 = s2 = x[2] + x[3] + SUB r9, r8, r9, LSL #1 @ r9 = s3 = x[2] - x[3] + ADD r10,r10,r11 @ r10= s4 = x[4] + x[5] + SUB r11,r10,r11,LSL #1 @ r11= s5 = x[4] - x[5] + ADD r12,r12,r14 @ r12= s6 = x[6] + x[7] + SUB r14,r12,r14,LSL #1 @ r14= s7 = x[6] - x[7] + + ADD r2, r11,r9 @ r2 = x[0] = s5 + s3 + SUB r4, r2, r9, LSL #1 @ r4 = x[2] = s5 - s3 + SUB r3, r14,r7 @ r3 = x[1] = s7 - s1 + ADD r5, r3, r7, LSL #1 @ r5 = x[3] = s7 + s1 + SUB r10,r10,r6 @ r10= x[4] = s4 - s0 + SUB r11,r12,r8 @ r11= x[5] = s6 - s2 + ADD r12,r10,r6, LSL #1 @ r12= x[6] = s4 + s0 + ADD r14,r11,r8, LSL #1 @ r14= x[7] = s6 + s2 + STMDB r1,{r2,r3,r4,r5,r10,r11,r12,r14} + + @ mdct_butterfly_8 + LDMIA r1,{r6,r7,r8,r9,r10,r11,r12,r14} + @ r6 = x[0] + @ r7 = x[1] + @ r8 = x[2] + @ r9 = x[3] + @ r10= x[4] + @ r11= x[5] + @ r12= x[6] + @ r14= x[7] + ADD r6, r6, r7 @ r6 = s0 = x[0] + x[1] + SUB r7, r6, r7, LSL #1 @ r7 = s1 = x[0] - x[1] + ADD r8, r8, r9 @ r8 = s2 = x[2] + x[3] + SUB r9, r8, r9, LSL #1 @ r9 = s3 = x[2] - x[3] + ADD r10,r10,r11 @ r10= s4 = x[4] + x[5] + SUB r11,r10,r11,LSL #1 @ r11= s5 = x[4] - x[5] + ADD r12,r12,r14 @ r12= s6 = x[6] + x[7] + SUB r14,r12,r14,LSL #1 @ r14= s7 = x[6] - x[7] + + ADD r2, r11,r9 @ r2 = x[0] = s5 + s3 + SUB r4, r2, r9, LSL #1 @ r4 = x[2] = s5 - s3 + SUB r3, r14,r7 @ r3 = x[1] = s7 - s1 + ADD r5, r3, r7, LSL #1 @ r5 = x[3] = s7 + s1 + SUB r10,r10,r6 @ r10= x[4] = s4 - s0 + SUB r11,r12,r8 @ r11= x[5] = s6 - s2 + ADD r12,r10,r6, LSL #1 @ r12= x[6] = s4 + s0 + ADD r14,r11,r8, LSL #1 @ r14= x[7] = s6 + s2 + STMIA r1,{r2,r3,r4,r5,r10,r11,r12,r14} + + ADD r1,r1,#8*4 + SUBS r0,r0,#64 + BGT mdct_bufferflies_loop3 + + LDMFD r13,{r0-r3} + +mdct_bitreverseARM: + @ r0 = points = n + @ r1 = in + @ r2 = step + @ r3 = shift + + MOV r4, #0 @ r4 = bit = 0 + ADD r5, r1, r0, LSL #1 @ r5 = w = x + (n>>1) + ADR r6, bitrev + SUB r5, r5, #8 +brev_lp: + LDRB r7, [r6, r4, LSR #6] + AND r8, r4, #0x3f + LDRB r8, [r6, r8] + ADD r4, r4, #1 @ bit++ + @ stall XScale + ORR r7, r7, r8, LSL #6 @ r7 = bitrev[bit] + MOV r7, r7, LSR r3 + ADD r9, r1, r7, LSL #2 @ r9 = xx = x + (b>>shift) + CMP r5, r9 @ if (w > xx) + LDR r10,[r5],#-8 @ r10 = w[0] w -= 2 + LDRGT r11,[r5,#12] @ r11 = w[1] + LDRGT r12,[r9] @ r12 = xx[0] + LDRGT r14,[r9,#4] @ r14 = xx[1] + STRGT r10,[r9] @ xx[0]= w[0] + STRGT r11,[r9,#4] @ xx[1]= w[1] + STRGT r12,[r5,#8] @ w[0] = xx[0] + STRGT r14,[r5,#12] @ w[1] = xx[1] + CMP r5,r1 + BGT brev_lp + + @ mdct_step7 + @ r0 = points + @ r1 = in + @ r2 = step + @ r3 = shift + + CMP r2, #4 @ r5 = T = (step>=4) ? + ADR r7, .Lsincos_lookup @ sincos_lookup0 + + ADDLT r7, #4 @ sincos_lookup1 + LDR r5, [r7] + ADD r5, r7 + ADD r7, r1, r0, LSL #1 @ r7 = w1 = x + (n>>1) + ADDGE r5, r5, r2, LSL #1 @ (step>>1) + ADD r8, r5, #1024*4 @ r8 = Ttop +step7_loop1: + LDR r6, [r1] @ r6 = w0[0] + LDR r9, [r1,#4] @ r9 = w0[1] + LDR r10,[r7,#-8]! @ r10= w1[0] w1 -= 2 + LDR r11,[r7,#4] @ r11= w1[1] + LDR r14,[r5,#4] @ r14= T[1] + LDR r12,[r5],r2,LSL #2 @ r12= T[0] T += step + + ADD r6, r6, r10 @ r6 = s0 = w0[0] + w1[0] + SUB r10,r6, r10,LSL #1 @ r10= s1b= w0[0] - w1[0] + SUB r11,r11,r9 @ r11= s1 = w1[1] - w0[1] + ADD r9, r11,r9, LSL #1 @ r9 = s0b= w1[1] + w0[1] + + @ Can save 1 cycle by using SMULL SMLAL - at the cost of being + @ 1 off. + SMULL r0, r3, r6, r14 @ (r0,r3) = s0*T[1] + SMULL r0, r4, r11,r12 @ (r0,r4) += s1*T[0] = s2 + ADD r3, r3, r4 + SMULL r0, r14,r11,r14 @ (r0,r14) = s1*T[1] + SMULL r0, r12,r6, r12 @ (r0,r12) += s0*T[0] = s3 + SUB r14,r14,r12 + + @ r9 = s0b<<1 + @ r10= s1b<<1 + ADD r9, r3, r9, ASR #1 @ r9 = s0b + s2 + SUB r3, r9, r3, LSL #1 @ r3 = s0b - s2 + + SUB r12,r14,r10,ASR #1 @ r12= s3 - s1b + ADD r10,r14,r10,ASR #1 @ r10= s3 + s1b + STR r9, [r1],#4 + STR r10,[r1],#4 @ w0 += 2 + STR r3, [r7] + STR r12,[r7,#4] + + CMP r5,r8 + BLT step7_loop1 + +step7_loop2: + LDR r6, [r1] @ r6 = w0[0] + LDR r9, [r1,#4] @ r9 = w0[1] + LDR r10,[r7,#-8]! @ r10= w1[0] w1 -= 2 + LDR r11,[r7,#4] @ r11= w1[1] + LDR r14,[r5,-r2,LSL #2]! @ r12= T[1] T -= step + LDR r12,[r5,#4] @ r14= T[0] + + ADD r6, r6, r10 @ r6 = s0 = w0[0] + w1[0] + SUB r10,r6, r10,LSL #1 @ r10= s1b= w0[0] - w1[0] + SUB r11,r11,r9 @ r11= s1 = w1[1] - w0[1] + ADD r9, r11,r9, LSL #1 @ r9 = s0b= w1[1] + w0[1] + + @ Can save 1 cycle by using SMULL SMLAL - at the cost of being + @ 1 off. + SMULL r0, r3, r6, r14 @ (r0,r3) = s0*T[0] + SMULL r0, r4, r11,r12 @ (r0,r4) += s1*T[1] = s2 + ADD r3, r3, r4 + SMULL r0, r14,r11,r14 @ (r0,r14) = s1*T[0] + SMULL r0, r12,r6, r12 @ (r0,r12) += s0*T[1] = s3 + SUB r14,r14,r12 + + @ r9 = s0b<<1 + @ r10= s1b<<1 + ADD r9, r3, r9, ASR #1 @ r9 = s0b + s2 + SUB r3, r9, r3, LSL #1 @ r3 = s0b - s2 + + SUB r12,r14,r10,ASR #1 @ r12= s3 - s1b + ADD r10,r14,r10,ASR #1 @ r10= s3 + s1b + STR r9, [r1],#4 + STR r10,[r1],#4 @ w0 += 2 + STR r3, [r7] + STR r12,[r7,#4] + + CMP r1,r7 + BLT step7_loop2 + + LDMFD r13!,{r0-r3} + + @ r0 = points + @ r1 = in + @ r2 = step + @ r3 = shift + MOV r2, r2, ASR #2 @ r2 = step >>= 2 + CMP r2, #0 + CMPNE r2, #1 + BEQ mdct_end + + @ step > 1 (default case) + CMP r2, #4 @ r5 = T = (step>=4) ? + ADR r7, .Lsincos_lookup @ sincos_lookup0 + + ADDLT r7, #4 @ sincos_lookup1 + LDR r5, [r7] + ADD r5, r7 + ADD r7, r1, r0, LSL #1 @ r7 = iX = x + (n>>1) + ADDGE r5, r5, r2, LSL #1 @ (step>>1) +mdct_step8_default: + LDR r6, [r1],#4 @ r6 = s0 = x[0] + LDR r8, [r1],#4 @ r8 = -s1 = x[1] + LDR r12,[r5,#4] @ r12= T[1] + LDR r14,[r5],r2,LSL #2 @ r14= T[0] T += step + RSB r8, r8, #0 @ r8 = s1 + + @ XPROD31(s0, s1, T[0], T[1], x, x+1) + @ x[0] = s0 * T[0] + s1 * T[1] x[1] = s1 * T[0] - s0 * T[1] + SMULL r9, r10, r8, r12 @ (r9,r10) = s1 * T[1] + CMP r1, r7 + SMLAL r9, r10, r6, r14 @ (r9,r10) += s0 * T[0] + RSB r6, r6, #0 @ r6 = -s0 + SMULL r9, r11, r8, r14 @ (r9,r11) = s1 * T[0] + MOV r10,r10,LSL #1 + SMLAL r9, r11, r6, r12 @ (r9,r11) -= s0 * T[1] + STR r10,[r1,#-8] + MOV r11,r11,LSL #1 + STR r11,[r1,#-4] + BLT mdct_step8_default + +mdct_end: + MOV r0, r2 + LDMFD r13!,{r4-r11,PC} + +cPI1_8: + .word 0x7641af3d +cPI2_8: + .word 0x5a82799a +cPI3_8: + .word 0x30fbc54d +bitrev: + .byte 0 + .byte 32 + .byte 16 + .byte 48 + .byte 8 + .byte 40 + .byte 24 + .byte 56 + .byte 4 + .byte 36 + .byte 20 + .byte 52 + .byte 12 + .byte 44 + .byte 28 + .byte 60 + .byte 2 + .byte 34 + .byte 18 + .byte 50 + .byte 10 + .byte 42 + .byte 26 + .byte 58 + .byte 6 + .byte 38 + .byte 22 + .byte 54 + .byte 14 + .byte 46 + .byte 30 + .byte 62 + .byte 1 + .byte 33 + .byte 17 + .byte 49 + .byte 9 + .byte 41 + .byte 25 + .byte 57 + .byte 5 + .byte 37 + .byte 21 + .byte 53 + .byte 13 + .byte 45 + .byte 29 + .byte 61 + .byte 3 + .byte 35 + .byte 19 + .byte 51 + .byte 11 + .byte 43 + .byte 27 + .byte 59 + .byte 7 + .byte 39 + .byte 23 + .byte 55 + .byte 15 + .byte 47 + .byte 31 + .byte 63 + +.Lsincos_lookup: + .word sincos_lookup0-.Lsincos_lookup + .word sincos_lookup1-(.Lsincos_lookup+4) + + @ END diff --git a/ohos-specific/tremolo/Tremolo/mdctLARM.s b/ohos-specific/tremolo/Tremolo/mdctLARM.s new file mode 100644 index 0000000000..72a46473c5 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/mdctLARM.s @@ -0,0 +1,1206 @@ +@ Tremolo library +@----------------------------------------------------------------------- +@ Copyright (C) 2002-2009, Xiph.org Foundation +@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd +@ All rights reserved. + +@ Redistribution and use in source and binary forms, with or without +@ modification, are permitted provided that the following conditions +@ are met: + +@ * Redistributions of source code must retain the above copyright +@ notice, this list of conditions and the following disclaimer. +@ * Redistributions in binary form must reproduce the above +@ copyright notice, this list of conditions and the following disclaimer +@ in the documentation and/or other materials provided with the +@ distribution. +@ * Neither the names of the Xiph.org Foundation nor Pinknoise +@ Productions Ltd nor the names of its contributors may be used to +@ endorse or promote products derived from this software without +@ specific prior written permission. +@ +@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@ ---------------------------------------------------------------------- + + .text + + @ low accuracy version + + .global mdct_backwardARM + .global mdct_shift_right + .global mdct_unroll_prelap + .global mdct_unroll_part2 + .global mdct_unroll_part3 + .global mdct_unroll_postlap + + .extern sincos_lookup0 + .extern sincos_lookup1 + +mdct_unroll_prelap: + @ r0 = out + @ r1 = post + @ r2 = r + @ r3 = step + STMFD r13!,{r4-r7,r14} + MVN r4, #0x8000 + MOV r3, r3, LSL #1 + SUB r1, r2, r1 @ r1 = r - post + SUBS r1, r1, #16 @ r1 = r - post - 16 + BLT unroll_over +unroll_loop: + LDMDB r2!,{r5,r6,r7,r12} + + MOV r5, r5, ASR #9 @ r5 = (*--r)>>9 + MOV r6, r6, ASR #9 @ r6 = (*--r)>>9 + MOV r7, r7, ASR #9 @ r7 = (*--r)>>9 + MOV r12,r12,ASR #9 @ r12= (*--r)>>9 + + MOV r14,r12,ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r12,r4, r14,ASR #31 + STRH r12,[r0], r3 + + MOV r14,r7, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r7, r4, r14,ASR #31 + STRH r7, [r0], r3 + + MOV r14,r6, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r6, r4, r14,ASR #31 + STRH r6, [r0], r3 + + MOV r14,r5, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r5, r4, r14,ASR #31 + STRH r5, [r0], r3 + + SUBS r1, r1, #16 + BGE unroll_loop + +unroll_over: + ADDS r1, r1, #16 + BLE unroll_end +unroll_loop2: + LDR r5,[r2,#-4]! + @ stall + @ stall (Xscale) + MOV r5, r5, ASR #9 @ r5 = (*--r)>>9 + MOV r14,r5, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r5, r4, r14,ASR #31 + STRH r5, [r0], r3 + SUBS r1, r1, #4 + BGT unroll_loop2 +unroll_end: + LDMFD r13!,{r4-r7,PC} + +mdct_unroll_postlap: + @ r0 = out + @ r1 = post + @ r2 = l + @ r3 = step + STMFD r13!,{r4-r7,r14} + MVN r4, #0x8000 + MOV r3, r3, LSL #1 + SUB r1, r1, r2 @ r1 = post - l + MOV r1, r1, ASR #1 @ r1 = (post - l)>>1 + SUBS r1, r1, #16 @ r1 = ((post - l)>>1) - 4 + BLT unroll_over3 +unroll_loop3: + LDR r12,[r2],#8 + LDR r7, [r2],#8 + LDR r6, [r2],#8 + LDR r5, [r2],#8 + + RSB r12,r12,#0 + RSB r5, r5, #0 + RSB r6, r6, #0 + RSB r7, r7, #0 + + MOV r12, r12,ASR #9 @ r12= (-*l)>>9 + MOV r5, r5, ASR #9 @ r5 = (-*l)>>9 + MOV r6, r6, ASR #9 @ r6 = (-*l)>>9 + MOV r7, r7, ASR #9 @ r7 = (-*l)>>9 + + MOV r14,r12,ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r12,r4, r14,ASR #31 + STRH r12,[r0], r3 + + MOV r14,r7, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r7, r4, r14,ASR #31 + STRH r7, [r0], r3 + + MOV r14,r6, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r6, r4, r14,ASR #31 + STRH r6, [r0], r3 + + MOV r14,r5, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r5, r4, r14,ASR #31 + STRH r5, [r0], r3 + + SUBS r1, r1, #16 + BGE unroll_loop3 + +unroll_over3: + ADDS r1, r1, #16 + BLE unroll_over4 +unroll_loop4: + LDR r5,[r2], #8 + @ stall + @ stall (Xscale) + RSB r5, r5, #0 + MOV r5, r5, ASR #9 @ r5 = (-*l)>>9 + MOV r14,r5, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r5, r4, r14,ASR #31 + STRH r5, [r0], r3 + SUBS r1, r1, #4 + BGT unroll_loop4 +unroll_over4: + LDMFD r13!,{r4-r7,PC} + +mdct_unroll_part2: + @ r0 = out + @ r1 = post + @ r2 = l + @ r3 = r + @ <> = step + @ <> = wL + @ <> = wR + MOV r12,r13 + STMFD r13!,{r4,r6-r11,r14} + LDMFD r12,{r8,r9,r10} @ r8 = step + @ r9 = wL + @ r10= wR + MVN r4, #0x8000 + MOV r8, r8, LSL #1 + SUBS r1, r3, r1 @ r1 = (r - post) + BLE unroll_over5 +unroll_loop5: + LDR r12,[r2, #-8]! @ r12= *l (but l -= 2 first) + LDR r7, [r3, #-4]! @ r7 = *--r + LDRB r6, [r10,#-1]! @ r6 = *--wR + LDRB r11,[r9],#1 @ r11= *wL++ + + MOV r12, r12, ASR #8 + @ Can save a cycle here, at the cost of 1bit errors in rounding + MUL r11,r12,r11 @ r11 = *l * *wL++ + MOV r7, r7, ASR #8 + MLA r6, r7, r6, r11 @ r6 = *--r * *--wR + MOV r6, r6, ASR #9 + MOV r14,r6, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r6, r4, r14,ASR #31 + STRH r6, [r0], r8 + + SUBS r1, r1, #4 + BGT unroll_loop5 + +unroll_over5: + LDMFD r13!,{r4,r6-r11,PC} + +mdct_unroll_part3: + @ r0 = out + @ r1 = post + @ r2 = l + @ r3 = r + @ <> = step + @ <> = wL + @ <> = wR + MOV r12,r13 + STMFD r13!,{r4,r6-r11,r14} + LDMFD r12,{r8,r9,r10} @ r8 = step + @ r9 = wL + @ r10= wR + MVN r4, #0x8000 + MOV r8, r8, LSL #1 + SUBS r1, r1, r3 @ r1 = (post - r) + BLE unroll_over6 +unroll_loop6: + LDR r12,[r2],#8 @ r12= *l (but l += 2 first) + LDR r7, [r3],#4 @ r7 = *r++ + LDRB r11,[r9],#1 @ r11= *wL++ + LDRB r6, [r10,#-1]! @ r6 = *--wR + + @ Can save a cycle here, at the cost of 1bit errors in rounding + MOV r12,r12,ASR #8 + MUL r11,r12,r11 @ (r14,r11) = *l * *wL++ + MOV r7, r7, ASR #8 + MUL r6, r7, r6 @ (r14,r6) = *--r * *--wR + SUB r6, r6, r11 + MOV r6, r6, ASR #9 + MOV r14,r6, ASR #15 + TEQ r14,r14,ASR #31 @ if r14==0 || r14==-1 then in range + EORNE r6, r4, r14,ASR #31 + STRH r6, [r0], r8 + + SUBS r1, r1, #4 + BGT unroll_loop6 + +unroll_over6: + LDMFD r13!,{r4,r6-r11,PC} + +mdct_shift_right: + @ r0 = n + @ r1 = in + @ r2 = right + STMFD r13!,{r4-r11,r14} + + MOV r0, r0, LSR #2 @ n >>= 2 + ADD r1, r1, #4 + + SUBS r0, r0, #8 + BLT sr_less_than_8 +sr_loop: + LDR r3, [r1], #8 + LDR r4, [r1], #8 + LDR r5, [r1], #8 + LDR r6, [r1], #8 + LDR r7, [r1], #8 + LDR r8, [r1], #8 + LDR r12,[r1], #8 + LDR r14,[r1], #8 + SUBS r0, r0, #8 + STMIA r2!,{r3,r4,r5,r6,r7,r8,r12,r14} + BGE sr_loop +sr_less_than_8: + ADDS r0, r0, #8 + BEQ sr_end +sr_loop2: + LDR r3, [r1], #8 + SUBS r0, r0, #1 + STR r3, [r2], #4 + BGT sr_loop2 +sr_end: + LDMFD r13!,{r4-r11,PC} + +mdct_backwardARM: + @ r0 = n + @ r1 = in + STMFD r13!,{r4-r11,r14} + + MOV r2, #1<<4 @ r2 = 1<<shift + MOV r3, #13-4 @ r3 = 13-shift +find_shift_loop: + TST r0, r2 @ if (n & (1<<shift)) == 0 + MOV r2, r2, LSL #1 + SUBEQ r3, r3, #1 @ shift-- + BEQ find_shift_loop + MOV r2, #2 + MOV r2, r2, LSL r3 @ r2 = step = 2<<shift + + @ presymmetry + @ r0 = n (a multiple of 4) + @ r1 = in + @ r2 = step + @ r3 = shift + + ADD r4, r1, r0, LSL #1 @ r4 = aX = in+(n>>1) + ADD r14,r1, r0 @ r14= in+(n>>2) + SUB r4, r4, #3*4 @ r4 = aX = in+n2-3 + LDR r5, =sincos_lookup0 @ r5 = T=sincos_lookup0 + +presymmetry_loop1: + LDR r7, [r4,#8] @ r6 = s2 = aX[2] + LDRB r11,[r5,#1] @ r11= T[1] + LDR r6, [r4],#-16 @ r6 = s0 = aX[0] + LDRB r10,[r5],r2 @ r10= T[0] T += step + MOV r6, r6, ASR #8 + MOV r7, r7, ASR #8 + + @ XPROD31(s0, s2, T[0], T[1], 0xaX[0], &ax[2]) + MUL r9, r6, r10 @ r9 = s0*T[0] + RSB r6, r6, #0 + MLA r9, r7, r11,r9 @ r9 += s2*T[1] + CMP r4, r14 + MUL r12,r7, r10 @ r12 = s2*T[0] + STR r9, [r4,#16] @ aX[0] = r9 + MLA r12,r6, r11,r12 @ r12 -= s0*T[1] + STR r12,[r4,#8+16] @ aX[2] = r12 + + BGE presymmetry_loop1 @ while (aX >= in+n4) + +presymmetry_loop2: + LDR r6, [r4],#-16 @ r6 = s0 = aX[0] + LDRB r10,[r5,#1] @ r10= T[1] + LDR r7, [r4,#16+8] @ r6 = s2 = aX[2] + LDRB r11,[r5],-r2 @ r11= T[0] T -= step + MOV r6, r6, ASR #8 + MOV r7, r7, ASR #8 + + @ XPROD31(s0, s2, T[1], T[0], 0xaX[0], &ax[2]) + MUL r9, r6, r10 @ r9 = s0*T[1] + RSB r6, r6, #0 + MLA r9, r7, r11,r9 @ r9 += s2*T[0] + CMP r4, r1 + MUL r12,r7, r10 @ r12 = s2*T[1] + STR r9, [r4,#16] @ aX[0] = r9 + MLA r12,r6, r11,r12 @ r12 -= s0*T[0] + STR r12,[r4,#8+16] @ aX[2] = r12 + + BGE presymmetry_loop2 @ while (aX >= in) + + @ r0 = n + @ r1 = in + @ r2 = step + @ r3 = shift + STMFD r13!,{r3} + LDR r5, =sincos_lookup0 @ r5 = T=sincos_lookup0 + ADD r4, r1, r0, LSL #1 @ r4 = aX = in+(n>>1) + SUB r4, r4, #4*4 @ r4 = aX = in+(n>>1)-4 + LDRB r11,[r5,#1] @ r11= T[1] + LDRB r10,[r5],r2 @ r10= T[0] T += step +presymmetry_loop3: + LDR r8, [r1],#16 @ r8 = ro0 = bX[0] + LDR r9, [r1,#8-16] @ r9 = ro2 = bX[2] + LDR r6, [r4],#-16 @ r6 = ri0 = aX[0] + LDR r7, [r4,#8+16] @ r7 = ri2 = aX[2] + MOV r8, r8, ASR #8 + MOV r9, r9, ASR #8 + MOV r6, r6, ASR #8 + + @ XNPROD31( ro2, ro0, T[1], T[0], 0xaX[0], &aX[2] ) + @ aX[0] = (ro2*T[1] - ro0*T[0])>>31 aX[2] = (ro0*T[1] + ro2*T[0])>>31 + MUL r12,r8, r11 @ r12 = ro0*T[1] + MOV r7, r7, ASR #8 + MLA r12,r9, r10,r12 @ r12 += ro2*T[0] + RSB r8, r8, #0 @ r8 = -ro0 + MUL r3, r9, r11 @ r3 = ro2*T[1] + LDRB r11,[r5,#1] @ r11= T[1] + MLA r3, r8, r10,r3 @ r3 -= ro0*T[0] + LDRB r10,[r5],r2 @ r10= T[0] T += step + STR r12,[r4,#16+8] + STR r3, [r4,#16] + + @ XNPROD31( ri2, ri0, T[0], T[1], 0xbX[0], &bX[2] ) + @ bX[0] = (ri2*T[0] - ri0*T[1])>>31 bX[2] = (ri0*T[0] + ri2*T[1])>>31 + MUL r12,r6, r10 @ r12 = ri0*T[0] + RSB r6, r6, #0 @ r6 = -ri0 + MLA r12,r7, r11,r12 @ r12 += ri2*T[1] + CMP r4, r1 + MUL r3, r7, r10 @ r3 = ri2*T[0] + STR r12,[r1,#8-16] + MLA r3, r6, r11,r3 @ r3 -= ri0*T[1] + STR r3, [r1,#-16] + + BGE presymmetry_loop3 + + SUB r1,r1,r0 @ r1 = in -= n>>2 (i.e. restore in) + + LDR r3,[r13] + STR r2,[r13,#-4]! + + @ mdct_butterflies + @ r0 = n = (points * 2) + @ r1 = in = x + @ r2 = i + @ r3 = shift + STMFD r13!,{r0-r1} + RSBS r4,r3,#6 @ r4 = stages = 7-shift then --stages + LDR r5,=sincos_lookup0 + BLE no_generics + MOV r14,#4 @ r14= 4 (i=0) + MOV r6, r14,LSL r3 @ r6 = (4<<i)<<shift +mdct_butterflies_loop1: + MOV r0, r0, LSR #1 @ r0 = points>>i = POINTS + MOV r2, r14,LSR #2 @ r2 = (1<<i)-j (j=0) + STMFD r13!,{r4,r14} +mdct_butterflies_loop2: + + @ mdct_butterfly_generic(x+POINTS*j, POINTS, 4<<(i+shift)) + @ mdct_butterfly_generic(r1, r0, r6) + @ r0 = points + @ r1 = x + @ preserve r2 (external loop counter) + @ preserve r3 + @ preserve r4 (external loop counter) + @ r5 = T = sincos_lookup0 + @ r6 = step + @ preserve r14 + + STR r2,[r13,#-4]! @ stack r2 + ADD r1,r1,r0,LSL #1 @ r1 = x2+4 = x + (POINTS>>1) + ADD r7,r1,r0,LSL #1 @ r7 = x1+4 = x + POINTS + ADD r12,r5,#1024 @ r12= sincos_lookup0+1024 + +mdct_bufferfly_generic_loop1: + LDMDB r7!,{r2,r3,r8,r11} @ r2 = x1[0] + @ r3 = x1[1] + @ r8 = x1[2] + @ r11= x1[3] x1 -= 4 + LDMDB r1!,{r4,r9,r10,r14} @ r4 = x2[0] + @ r9 = x2[1] + @ r10= x2[2] + @ r14= x2[3] x2 -= 4 + + SUB r2, r2, r3 @ r2 = s0 = x1[0] - x1[1] + ADD r3, r2, r3, LSL #1 @ r3 = x1[0] + x1[1] (-> x1[0]) + SUB r11,r11,r8 @ r11= s1 = x1[3] - x1[2] + ADD r8, r11,r8, LSL #1 @ r8 = x1[3] + x1[2] (-> x1[2]) + SUB r9, r9, r4 @ r9 = s2 = x2[1] - x2[0] + ADD r4, r9, r4, LSL #1 @ r4 = x2[1] + x2[0] (-> x1[1]) + SUB r14,r14,r10 @ r14= s3 = x2[3] - x2[2] + ADD r10,r14,r10,LSL #1 @ r10= x2[3] + x2[2] (-> x1[3]) + STMIA r7,{r3,r4,r8,r10} + + @ r0 = points + @ r1 = x2 + @ r2 = s0 + @ r3 free + @ r4 free + @ r5 = T + @ r6 = step + @ r7 = x1 + @ r8 free + @ r9 = s2 + @ r10 free + @ r11= s1 + @ r12= limit + @ r14= s3 + + LDRB r8, [r5,#1] @ r8 = T[1] + LDRB r10,[r5],r6 @ r10= T[0] T += step + MOV r2, r2, ASR #8 + MOV r11,r11,ASR #8 + MOV r9, r9, ASR #8 + MOV r14,r14,ASR #8 + + @ XPROD31(s1, s0, T[0], T[1], &x2[0], &x2[2]) + @ x2[0] = (s1*T[0] + s0*T[1])>>31 x2[2] = (s0*T[0] - s1*T[1])>>31 + @ stall Xscale + MUL r3, r2, r8 @ r3 = s0*T[1] + MLA r3, r11,r10,r3 @ r3 += s1*T[0] + RSB r11,r11,#0 + MUL r4, r8, r11 @ r4 = -s1*T[1] + MLA r4, r2, r10,r4 @ r4 += s0*T[0] = Value for x2[2] + MOV r2, r3 @ r2 = r3 = Value for x2[0] + + @ XPROD31(s2, s3, T[0], T[1], &x2[1], &x2[3]) + @ x2[1] = (s2*T[0] + s3*T[1])>>31 x2[3] = (s3*T[0] - s2*T[1])>>31 + MUL r3, r9, r10 @ r3 = s2*T[0] + MLA r3, r14,r8, r3 @ r3 += s3*T[1] = Value for x2[1] + RSB r9, r9, #0 + MUL r11,r14,r10 @ r11 = s3*T[0] + MLA r11,r9, r8, r11 @ r11 -= s2*T[1] = Value for x2[3] + CMP r5, r12 + + STMIA r1,{r2,r3,r4,r11} + + BLT mdct_bufferfly_generic_loop1 + + SUB r12,r12,#1024 +mdct_bufferfly_generic_loop2: + LDMDB r7!,{r2,r3,r9,r10} @ r2 = x1[0] + @ r3 = x1[1] + @ r9 = x1[2] + @ r10= x1[3] x1 -= 4 + LDMDB r1!,{r4,r8,r11,r14} @ r4 = x2[0] + @ r8 = x2[1] + @ r11= x2[2] + @ r14= x2[3] x2 -= 4 + + SUB r2, r2, r3 @ r2 = s0 = x1[0] - x1[1] + ADD r3, r2, r3, LSL #1 @ r3 = x1[0] + x1[1] (-> x1[0]) + SUB r9, r9,r10 @ r9 = s1 = x1[2] - x1[3] + ADD r10,r9,r10, LSL #1 @ r10= x1[2] + x1[3] (-> x1[2]) + SUB r4, r4, r8 @ r4 = s2 = x2[0] - x2[1] + ADD r8, r4, r8, LSL #1 @ r8 = x2[0] + x2[1] (-> x1[1]) + SUB r14,r14,r11 @ r14= s3 = x2[3] - x2[2] + ADD r11,r14,r11,LSL #1 @ r11= x2[3] + x2[2] (-> x1[3]) + STMIA r7,{r3,r8,r10,r11} + + @ r0 = points + @ r1 = x2 + @ r2 = s0 + @ r3 free + @ r4 = s2 + @ r5 = T + @ r6 = step + @ r7 = x1 + @ r8 free + @ r9 = s1 + @ r10 free + @ r11 free + @ r12= limit + @ r14= s3 + + LDRB r8, [r5,#1] @ r8 = T[1] + LDRB r10,[r5],-r6 @ r10= T[0] T -= step + MOV r2, r2, ASR #8 + MOV r9, r9, ASR #8 + MOV r4, r4, ASR #8 + MOV r14,r14,ASR #8 + + @ XNPROD31(s0, s1, T[0], T[1], &x2[0], &x2[2]) + @ x2[0] = (s0*T[0] - s1*T[1])>>31 x2[2] = (s1*T[0] + s0*T[1])>>31 + @ stall Xscale + MUL r11,r2, r8 @ r11 = s0*T[1] + MLA r11,r9, r10,r11 @ r11 += s1*T[0] + RSB r9, r9, #0 + MUL r2, r10,r2 @ r2 = s0*T[0] + MLA r2, r9, r8, r2 @ r2 += -s1*T[1] = Value for x2[0] + MOV r9, r11 @ r9 = r11 = Value for x2[2] + + @ XNPROD31(s3, s2, T[0], T[1], &x2[1], &x2[3]) + @ x2[1] = (s3*T[0] - s2*T[1])>>31 x2[3] = (s2*T[0] + s3*T[1])>>31 + MUL r11,r4, r10 @ r11 = s2*T[0] + MLA r11,r14,r8, r11 @ r11 += s3*T[1] = Value for x2[3] + RSB r4, r4, #0 + MUL r3, r14,r10 @ r3 = s3*T[0] + MLA r3, r4, r8, r3 @ r3 -= s2*T[1] = Value for x2[1] + CMP r5, r12 + + STMIA r1,{r2,r3,r9,r11} + + BGT mdct_bufferfly_generic_loop2 + + LDR r2,[r13],#4 @ unstack r2 + ADD r1, r1, r0, LSL #2 @ r1 = x+POINTS*j + @ stall Xscale + SUBS r2, r2, #1 @ r2-- (j++) + BGT mdct_butterflies_loop2 + + LDMFD r13!,{r4,r14} + + LDR r1,[r13,#4] + + SUBS r4, r4, #1 @ stages-- + MOV r14,r14,LSL #1 @ r14= 4<<i (i++) + MOV r6, r6, LSL #1 @ r6 = step <<= 1 (i++) + BGE mdct_butterflies_loop1 + LDMFD r13,{r0-r1} + +no_generics: + @ mdct_butterflies part2 (loop around mdct_bufferfly_32) + @ r0 = points + @ r1 = in + @ r2 = step + @ r3 = shift + +mdct_bufferflies_loop3: + @ mdct_bufferfly_32 + + @ block1 + ADD r4, r1, #16*4 @ r4 = &in[16] + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[16] + @ r6 = x[17] + @ r9 = x[18] + @ r10= x[19] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[0] + @ r8 = x[1] + @ r11= x[2] + @ r12= x[3] + SUB r5, r5, r6 @ r5 = s0 = x[16] - x[17] + ADD r6, r5, r6, LSL #1 @ r6 = x[16] + x[17] -> x[16] + SUB r9, r9, r10 @ r9 = s1 = x[18] - x[19] + ADD r10,r9, r10,LSL #1 @ r10= x[18] + x[19] -> x[18] + SUB r8, r8, r7 @ r8 = s2 = x[ 1] - x[ 0] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 1] + x[ 0] -> x[17] + SUB r12,r12,r11 @ r12= s3 = x[ 3] - x[ 2] + ADD r11,r12,r11, LSL #1 @ r11= x[ 3] + x[ 2] -> x[19] + STMIA r4!,{r6,r7,r10,r11} + + MOV r6,#0xed @ r6 =cPI1_8 + MOV r7,#0x62 @ r7 =cPI3_8 + + MOV r5, r5, ASR #8 + MOV r9, r9, ASR #8 + MOV r8, r8, ASR #8 + MOV r12,r12,ASR #8 + + @ XNPROD31( s0, s1, cPI3_8, cPI1_8, &x[ 0], &x[ 2] ) + @ x[0] = s0*cPI3_8 - s1*cPI1_8 x[2] = s1*cPI3_8 + s0*cPI1_8 + @ stall Xscale + MUL r11,r5, r6 @ r11 = s0*cPI1_8 + MLA r11,r9, r7, r11 @ r11 += s1*cPI3_8 + RSB r9, r9, #0 + MUL r5, r7, r5 @ r5 = s0*cPI3_8 + MLA r5, r9, r6, r5 @ r5 -= s1*cPI1_8 + + @ XPROD31 ( s2, s3, cPI1_8, cPI3_8, &x[ 1], &x[ 3] ) + @ x[1] = s2*cPI1_8 + s3*cPI3_8 x[3] = s3*cPI1_8 - s2*cPI3_8 + MUL r9, r8, r6 @ r9 = s2*cPI1_8 + MLA r9, r12,r7, r9 @ r9 += s3*cPI3_8 + RSB r8,r8,#0 + MUL r12,r6, r12 @ r12 = s3*cPI1_8 + MLA r12,r8, r7, r12 @ r12 -= s2*cPI3_8 + STMIA r1!,{r5,r9,r11,r12} + + @ block2 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[20] + @ r6 = x[21] + @ r9 = x[22] + @ r10= x[23] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[4] + @ r8 = x[5] + @ r11= x[6] + @ r12= x[7] + SUB r5, r5, r6 @ r5 = s0 = x[20] - x[21] + ADD r6, r5, r6, LSL #1 @ r6 = x[20] + x[21] -> x[20] + SUB r9, r9, r10 @ r9 = s1 = x[22] - x[23] + ADD r10,r9, r10,LSL #1 @ r10= x[22] + x[23] -> x[22] + SUB r8, r8, r7 @ r8 = s2 = x[ 5] - x[ 4] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 5] + x[ 4] -> x[21] + SUB r12,r12,r11 @ r12= s3 = x[ 7] - x[ 6] + ADD r11,r12,r11, LSL #1 @ r11= x[ 7] + x[ 6] -> x[23] + MOV r14,#0xb5 @ cPI2_8 + STMIA r4!,{r6,r7,r10,r11} + + SUB r5, r5, r9 @ r5 = s0 - s1 + ADD r9, r5, r9, LSL #1 @ r9 = s0 + s1 + MOV r5, r5, ASR #8 + MUL r5, r14,r5 @ r5 = (s0-s1)*cPI2_8 + SUB r12,r12,r8 @ r12= s3 - s2 + ADD r8, r12,r8, LSL #1 @ r8 = s3 + s2 + + MOV r8, r8, ASR #8 + MUL r8, r14,r8 @ r8 = (s3+s2)*cPI2_8 + MOV r9, r9, ASR #8 + MUL r9, r14,r9 @ r9 = (s0+s1)*cPI2_8 + MOV r12,r12,ASR #8 + MUL r12,r14,r12 @ r12 = (s3-s2)*cPI2_8 + STMIA r1!,{r5,r8,r9,r12} + + @ block3 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[24] + @ r6 = x[25] + @ r9 = x[25] + @ r10= x[26] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[8] + @ r8 = x[9] + @ r11= x[10] + @ r12= x[11] + SUB r5, r5, r6 @ r5 = s0 = x[24] - x[25] + ADD r6, r5, r6, LSL #1 @ r6 = x[24] + x[25] -> x[25] + SUB r9, r9, r10 @ r9 = s1 = x[26] - x[27] + ADD r10,r9, r10,LSL #1 @ r10= x[26] + x[27] -> x[26] + SUB r8, r8, r7 @ r8 = s2 = x[ 9] - x[ 8] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 9] + x[ 8] -> x[25] + SUB r12,r12,r11 @ r12= s3 = x[11] - x[10] + ADD r11,r12,r11, LSL #1 @ r11= x[11] + x[10] -> x[27] + STMIA r4!,{r6,r7,r10,r11} + + MOV r6,#0x62 @ r6 = cPI3_8 + MOV r7,#0xED @ r7 = cPI1_8 + + @ XNPROD31( s0, s1, cPI1_8, cPI3_8, &x[ 8], &x[10] ) + @ x[8] = s0*cPI1_8 - s1*cPI3_8 x[10] = s1*cPI1_8 + s0*cPI3_8 + @ stall Xscale + MOV r5, r5, ASR #8 + MUL r11,r5, r6 @ r11 = s0*cPI3_8 + MOV r9, r9, ASR #8 + MLA r11,r9, r7, r11 @ r11 += s1*cPI1_8 + RSB r9, r9, #0 + MUL r5, r7, r5 @ r5 = s0*cPI1_8 + MLA r5, r9, r6, r5 @ r5 -= s1*cPI3_8 + + @ XPROD31 ( s2, s3, cPI3_8, cPI1_8, &x[ 9], &x[11] ) + @ x[9] = s2*cPI3_8 + s3*cPI1_8 x[11] = s3*cPI3_8 - s2*cPI1_8 + MOV r8, r8, ASR #8 + MUL r9, r8, r6 @ r9 = s2*cPI3_8 + MOV r12,r12,ASR #8 + MLA r9, r12,r7, r9 @ r9 += s3*cPI1_8 + RSB r8,r8,#0 + MUL r12,r6, r12 @ r12 = s3*cPI3_8 + MLA r12,r8, r7, r12 @ r12 -= s2*cPI1_8 + STMIA r1!,{r5,r9,r11,r12} + + @ block4 + LDMIA r4,{r5,r6,r10,r11} @ r5 = x[28] + @ r6 = x[29] + @ r10= x[30] + @ r11= x[31] + LDMIA r1,{r8,r9,r12,r14} @ r8 = x[12] + @ r9 = x[13] + @ r12= x[14] + @ r14= x[15] + SUB r5, r5, r6 @ r5 = s0 = x[28] - x[29] + ADD r6, r5, r6, LSL #1 @ r6 = x[28] + x[29] -> x[28] + SUB r7, r14,r12 @ r7 = s3 = x[15] - x[14] + ADD r12,r7, r12, LSL #1 @ r12= x[15] + x[14] -> x[31] + SUB r10,r10,r11 @ r10= s1 = x[30] - x[31] + ADD r11,r10,r11,LSL #1 @ r11= x[30] + x[31] -> x[30] + SUB r14, r8, r9 @ r14= s2 = x[12] - x[13] + ADD r9, r14, r9, LSL #1 @ r9 = x[12] + x[13] -> x[29] + STMIA r4!,{r6,r9,r11,r12} + STMIA r1!,{r5,r7,r10,r14} + + @ mdct_butterfly16 (1st version) + @ block 1 + SUB r1,r1,#16*4 + ADD r4,r1,#8*4 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[ 8] + @ r6 = x[ 9] + @ r9 = x[10] + @ r10= x[11] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[0] + @ r8 = x[1] + @ r11= x[2] + @ r12= x[3] + SUB r5, r5, r6 @ r5 = s0 = x[ 8] - x[ 9] + ADD r6, r5, r6, LSL #1 @ r6 = x[ 8] + x[ 9] -> x[ 8] + SUB r9, r9, r10 @ r9 = s1 = x[10] - x[11] + ADD r10,r9, r10,LSL #1 @ r10= x[10] + x[11] -> x[10] + SUB r8, r8, r7 @ r8 = s2 = x[ 1] - x[ 0] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 1] + x[ 0] -> x[ 9] + SUB r12,r12,r11 @ r12= s3 = x[ 3] - x[ 2] + ADD r11,r12,r11, LSL #1 @ r11= x[ 3] + x[ 2] -> x[11] + MOV r14,#0xB5 @ r14= cPI2_8 + STMIA r4!,{r6,r7,r10,r11} + + SUB r5, r5, r9 @ r5 = s0 - s1 + ADD r9, r5, r9, LSL #1 @ r9 = s0 + s1 + MOV r5, r5, ASR #8 + MUL r5, r14,r5 @ r5 = (s0-s1)*cPI2_8 + SUB r12,r12,r8 @ r12= s3 - s2 + ADD r8, r12,r8, LSL #1 @ r8 = s3 + s2 + + MOV r8, r8, ASR #8 + MUL r8, r14,r8 @ r8 = (s3+s2)*cPI2_8 + MOV r9, r9, ASR #8 + MUL r9, r14,r9 @ r9 = (s0+s1)*cPI2_8 + MOV r12,r12,ASR #8 + MUL r12,r14,r12 @ r12 = (s3-s2)*cPI2_8 + STMIA r1!,{r5,r8,r9,r12} + + @ block2 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[12] + @ r6 = x[13] + @ r9 = x[14] + @ r10= x[15] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[ 4] + @ r8 = x[ 5] + @ r11= x[ 6] + @ r12= x[ 7] + SUB r14,r7, r8 @ r14= s0 = x[ 4] - x[ 5] + ADD r8, r14,r8, LSL #1 @ r8 = x[ 4] + x[ 5] -> x[13] + SUB r7, r12,r11 @ r7 = s1 = x[ 7] - x[ 6] + ADD r11,r7, r11, LSL #1 @ r11= x[ 7] + x[ 6] -> x[15] + SUB r5, r5, r6 @ r5 = s2 = x[12] - x[13] + ADD r6, r5, r6, LSL #1 @ r6 = x[12] + x[13] -> x[12] + SUB r12,r9, r10 @ r12= s3 = x[14] - x[15] + ADD r10,r12,r10,LSL #1 @ r10= x[14] + x[15] -> x[14] + STMIA r4!,{r6,r8,r10,r11} + STMIA r1!,{r5,r7,r12,r14} + + @ mdct_butterfly_8 + LDMDB r1,{r6,r7,r8,r9,r10,r11,r12,r14} + @ r6 = x[0] + @ r7 = x[1] + @ r8 = x[2] + @ r9 = x[3] + @ r10= x[4] + @ r11= x[5] + @ r12= x[6] + @ r14= x[7] + ADD r6, r6, r7 @ r6 = s0 = x[0] + x[1] + SUB r7, r6, r7, LSL #1 @ r7 = s1 = x[0] - x[1] + ADD r8, r8, r9 @ r8 = s2 = x[2] + x[3] + SUB r9, r8, r9, LSL #1 @ r9 = s3 = x[2] - x[3] + ADD r10,r10,r11 @ r10= s4 = x[4] + x[5] + SUB r11,r10,r11,LSL #1 @ r11= s5 = x[4] - x[5] + ADD r12,r12,r14 @ r12= s6 = x[6] + x[7] + SUB r14,r12,r14,LSL #1 @ r14= s7 = x[6] - x[7] + + ADD r2, r11,r9 @ r2 = x[0] = s5 + s3 + SUB r4, r2, r9, LSL #1 @ r4 = x[2] = s5 - s3 + SUB r3, r14,r7 @ r3 = x[1] = s7 - s1 + ADD r5, r3, r7, LSL #1 @ r5 = x[3] = s7 + s1 + SUB r10,r10,r6 @ r10= x[4] = s4 - s0 + SUB r11,r12,r8 @ r11= x[5] = s6 - s2 + ADD r12,r10,r6, LSL #1 @ r12= x[6] = s4 + s0 + ADD r14,r11,r8, LSL #1 @ r14= x[7] = s6 + s2 + STMDB r1,{r2,r3,r4,r5,r10,r11,r12,r14} + + @ mdct_butterfly_8 + LDMIA r1,{r6,r7,r8,r9,r10,r11,r12,r14} + @ r6 = x[0] + @ r7 = x[1] + @ r8 = x[2] + @ r9 = x[3] + @ r10= x[4] + @ r11= x[5] + @ r12= x[6] + @ r14= x[7] + ADD r6, r6, r7 @ r6 = s0 = x[0] + x[1] + SUB r7, r6, r7, LSL #1 @ r7 = s1 = x[0] - x[1] + ADD r8, r8, r9 @ r8 = s2 = x[2] + x[3] + SUB r9, r8, r9, LSL #1 @ r9 = s3 = x[2] - x[3] + ADD r10,r10,r11 @ r10= s4 = x[4] + x[5] + SUB r11,r10,r11,LSL #1 @ r11= s5 = x[4] - x[5] + ADD r12,r12,r14 @ r12= s6 = x[6] + x[7] + SUB r14,r12,r14,LSL #1 @ r14= s7 = x[6] - x[7] + + ADD r2, r11,r9 @ r2 = x[0] = s5 + s3 + SUB r4, r2, r9, LSL #1 @ r4 = x[2] = s5 - s3 + SUB r3, r14,r7 @ r3 = x[1] = s7 - s1 + ADD r5, r3, r7, LSL #1 @ r5 = x[3] = s7 + s1 + SUB r10,r10,r6 @ r10= x[4] = s4 - s0 + SUB r11,r12,r8 @ r11= x[5] = s6 - s2 + ADD r12,r10,r6, LSL #1 @ r12= x[6] = s4 + s0 + ADD r14,r11,r8, LSL #1 @ r14= x[7] = s6 + s2 + STMIA r1,{r2,r3,r4,r5,r10,r11,r12,r14} + + @ mdct_butterfly16 (2nd version) + @ block 1 + ADD r1,r1,#16*4-8*4 + ADD r4,r1,#8*4 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[ 8] + @ r6 = x[ 9] + @ r9 = x[10] + @ r10= x[11] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[0] + @ r8 = x[1] + @ r11= x[2] + @ r12= x[3] + SUB r5, r5, r6 @ r5 = s0 = x[ 8] - x[ 9] + ADD r6, r5, r6, LSL #1 @ r6 = x[ 8] + x[ 9] -> x[ 8] + SUB r9, r9, r10 @ r9 = s1 = x[10] - x[11] + ADD r10,r9, r10,LSL #1 @ r10= x[10] + x[11] -> x[10] + SUB r8, r8, r7 @ r8 = s2 = x[ 1] - x[ 0] + ADD r7, r8, r7, LSL #1 @ r7 = x[ 1] + x[ 0] -> x[ 9] + SUB r12,r12,r11 @ r12= s3 = x[ 3] - x[ 2] + ADD r11,r12,r11, LSL #1 @ r11= x[ 3] + x[ 2] -> x[11] + MOV r14,#0xb5 @ r14= cPI2_8 + STMIA r4!,{r6,r7,r10,r11} + + SUB r5, r5, r9 @ r5 = s0 - s1 + ADD r9, r5, r9, LSL #1 @ r9 = s0 + s1 + MOV r5, r5, ASR #8 + MUL r5, r14,r5 @ r5 = (s0-s1)*cPI2_8 + SUB r12,r12,r8 @ r12= s3 - s2 + ADD r8, r12,r8, LSL #1 @ r8 = s3 + s2 + + MOV r8, r8, ASR #8 + MUL r8, r14,r8 @ r8 = (s3+s2)*cPI2_8 + MOV r9, r9, ASR #8 + MUL r9, r14,r9 @ r9 = (s0+s1)*cPI2_8 + MOV r12,r12,ASR #8 + MUL r12,r14,r12 @ r12 = (s3-s2)*cPI2_8 + STMIA r1!,{r5,r8,r9,r12} + + @ block2 + LDMIA r4,{r5,r6,r9,r10} @ r5 = x[12] + @ r6 = x[13] + @ r9 = x[14] + @ r10= x[15] + LDMIA r1,{r7,r8,r11,r12} @ r7 = x[ 4] + @ r8 = x[ 5] + @ r11= x[ 6] + @ r12= x[ 7] + SUB r5, r5, r6 @ r5 = s2 = x[12] - x[13] + ADD r6, r5, r6, LSL #1 @ r6 = x[12] + x[13] -> x[12] + SUB r9, r9, r10 @ r9 = s3 = x[14] - x[15] + ADD r10,r9, r10,LSL #1 @ r10= x[14] + x[15] -> x[14] + SUB r14,r7, r8 @ r14= s0 = x[ 4] - x[ 5] + ADD r8, r14,r8, LSL #1 @ r8 = x[ 4] + x[ 5] -> x[13] + SUB r7, r12,r11 @ r7 = s1 = x[ 7] - x[ 6] + ADD r11,r7, r11, LSL #1 @ r11= x[ 7] + x[ 6] -> x[15] + STMIA r4!,{r6,r8,r10,r11} + STMIA r1!,{r5,r7,r9,r14} + + @ mdct_butterfly_8 + LDMDB r1,{r6,r7,r8,r9,r10,r11,r12,r14} + @ r6 = x[0] + @ r7 = x[1] + @ r8 = x[2] + @ r9 = x[3] + @ r10= x[4] + @ r11= x[5] + @ r12= x[6] + @ r14= x[7] + ADD r6, r6, r7 @ r6 = s0 = x[0] + x[1] + SUB r7, r6, r7, LSL #1 @ r7 = s1 = x[0] - x[1] + ADD r8, r8, r9 @ r8 = s2 = x[2] + x[3] + SUB r9, r8, r9, LSL #1 @ r9 = s3 = x[2] - x[3] + ADD r10,r10,r11 @ r10= s4 = x[4] + x[5] + SUB r11,r10,r11,LSL #1 @ r11= s5 = x[4] - x[5] + ADD r12,r12,r14 @ r12= s6 = x[6] + x[7] + SUB r14,r12,r14,LSL #1 @ r14= s7 = x[6] - x[7] + + ADD r2, r11,r9 @ r2 = x[0] = s5 + s3 + SUB r4, r2, r9, LSL #1 @ r4 = x[2] = s5 - s3 + SUB r3, r14,r7 @ r3 = x[1] = s7 - s1 + ADD r5, r3, r7, LSL #1 @ r5 = x[3] = s7 + s1 + SUB r10,r10,r6 @ r10= x[4] = s4 - s0 + SUB r11,r12,r8 @ r11= x[5] = s6 - s2 + ADD r12,r10,r6, LSL #1 @ r12= x[6] = s4 + s0 + ADD r14,r11,r8, LSL #1 @ r14= x[7] = s6 + s2 + STMDB r1,{r2,r3,r4,r5,r10,r11,r12,r14} + + @ mdct_butterfly_8 + LDMIA r1,{r6,r7,r8,r9,r10,r11,r12,r14} + @ r6 = x[0] + @ r7 = x[1] + @ r8 = x[2] + @ r9 = x[3] + @ r10= x[4] + @ r11= x[5] + @ r12= x[6] + @ r14= x[7] + ADD r6, r6, r7 @ r6 = s0 = x[0] + x[1] + SUB r7, r6, r7, LSL #1 @ r7 = s1 = x[0] - x[1] + ADD r8, r8, r9 @ r8 = s2 = x[2] + x[3] + SUB r9, r8, r9, LSL #1 @ r9 = s3 = x[2] - x[3] + ADD r10,r10,r11 @ r10= s4 = x[4] + x[5] + SUB r11,r10,r11,LSL #1 @ r11= s5 = x[4] - x[5] + ADD r12,r12,r14 @ r12= s6 = x[6] + x[7] + SUB r14,r12,r14,LSL #1 @ r14= s7 = x[6] - x[7] + + ADD r2, r11,r9 @ r2 = x[0] = s5 + s3 + SUB r4, r2, r9, LSL #1 @ r4 = x[2] = s5 - s3 + SUB r3, r14,r7 @ r3 = x[1] = s7 - s1 + ADD r5, r3, r7, LSL #1 @ r5 = x[3] = s7 + s1 + SUB r10,r10,r6 @ r10= x[4] = s4 - s0 + SUB r11,r12,r8 @ r11= x[5] = s6 - s2 + ADD r12,r10,r6, LSL #1 @ r12= x[6] = s4 + s0 + ADD r14,r11,r8, LSL #1 @ r14= x[7] = s6 + s2 + STMIA r1,{r2,r3,r4,r5,r10,r11,r12,r14} + + ADD r1,r1,#8*4 + SUBS r0,r0,#64 + BGT mdct_bufferflies_loop3 + + LDMFD r13,{r0-r3} + +mdct_bitreverseARM: + @ r0 = points + @ r1 = in + @ r2 = step + @ r3 = shift + + MOV r4, #0 @ r4 = bit = 0 + ADD r5, r1, r0, LSL #1 @ r5 = w = x + (n>>1) + ADR r6, bitrev + SUB r3, r3, #2 @ r3 = shift -= 2 + SUB r5, r5, #8 +brev_lp: + LDRB r7, [r6, r4, LSR #6] + AND r8, r4, #0x3f + LDRB r8, [r6, r8] + ADD r4, r4, #1 @ bit++ + @ stall XScale + ORR r7, r7, r8, LSL #6 @ r7 = bitrev[bit] + ADD r9, r1, r7, LSR r3 @ r9 = xx = x + (b>>shift) + CMP r5, r9 @ if (w > xx) + LDR r10,[r5],#-8 @ r10 = w[0] w -= 2 + LDRGT r11,[r5,#12] @ r11 = w[1] + LDRGT r12,[r9] @ r12 = xx[0] + LDRGT r14,[r9,#4] @ r14 = xx[1] + STRGT r10,[r9] @ xx[0]= w[0] + STRGT r11,[r9,#4] @ xx[1]= w[1] + STRGT r12,[r5,#8] @ w[0] = xx[0] + STRGT r14,[r5,#12] @ w[1] = xx[1] + CMP r5,r1 + BGT brev_lp + + @ mdct_step7 + @ r0 = points + @ r1 = in + @ r2 = step + @ r3 = shift-2 + + CMP r2, #4 @ r5 = T = (step>=4) ? + LDRGE r5, =sincos_lookup0 @ sincos_lookup0 + + LDRLT r5, =sincos_lookup1 @ sincos_lookup0 + + ADD r7, r1, r0, LSL #1 @ r7 = w1 = x + (n>>1) + ADDGE r5, r5, r2, LSR #1 @ (step>>1) + ADD r8, r5, #1024 @ r8 = Ttop +step7_loop1: + LDR r6, [r1] @ r6 = w0[0] + LDR r9, [r1,#4] @ r9 = w0[1] + LDR r10,[r7,#-8]! @ r10= w1[0] w1 -= 2 + LDR r11,[r7,#4] @ r11= w1[1] + LDRB r14,[r5,#1] @ r14= T[1] + LDRB r12,[r5],r2 @ r12= T[0] T += step + + ADD r6, r6, r10 @ r6 = s0 = w0[0] + w1[0] + SUB r10,r6, r10,LSL #1 @ r10= s1b= w0[0] - w1[0] + SUB r11,r11,r9 @ r11= s1 = w1[1] - w0[1] + ADD r9, r11,r9, LSL #1 @ r9 = s0b= w1[1] + w0[1] + + MOV r6, r6, ASR #9 + MUL r3, r6, r14 @ r3 = s0*T[1] + MOV r11,r11,ASR #9 + MUL r4, r11,r12 @ r4 += s1*T[0] = s2 + ADD r3, r3, r4 + MUL r14,r11,r14 @ r14 = s1*T[1] + MUL r12,r6, r12 @ r12 += s0*T[0] = s3 + SUB r14,r14,r12 + + @ r9 = s0b<<1 + @ r10= s1b<<1 + ADD r9, r3, r9, ASR #1 @ r9 = s0b + s2 + SUB r3, r9, r3, LSL #1 @ r3 = s0b - s2 + + SUB r12,r14,r10,ASR #1 @ r12= s3 - s1b + ADD r10,r14,r10,ASR #1 @ r10= s3 + s1b + STR r9, [r1],#4 + STR r10,[r1],#4 @ w0 += 2 + STR r3, [r7] + STR r12,[r7,#4] + + CMP r5,r8 + BLT step7_loop1 + +step7_loop2: + LDR r6, [r1] @ r6 = w0[0] + LDR r9, [r1,#4] @ r9 = w0[1] + LDR r10,[r7,#-8]! @ r10= w1[0] w1 -= 2 + LDR r11,[r7,#4] @ r11= w1[1] + LDRB r14,[r5,-r2]! @ r12= T[1] T -= step + LDRB r12,[r5,#1] @ r14= T[0] + + ADD r6, r6, r10 @ r6 = s0 = w0[0] + w1[0] + SUB r10,r6, r10,LSL #1 @ r10= s1b= w0[0] - w1[0] + SUB r11,r11,r9 @ r11= s1 = w1[1] - w0[1] + ADD r9, r11,r9, LSL #1 @ r9 = s0b= w1[1] + w0[1] + + MOV r6, r6, ASR #9 + MUL r3, r6, r14 @ r3 = s0*T[0] + MOV r11,r11,ASR #9 + MUL r4, r11,r12 @ r4 += s1*T[1] = s2 + ADD r3, r3, r4 + MUL r14,r11,r14 @ r14 = s1*T[0] + MUL r12,r6, r12 @ r12 += s0*T[1] = s3 + SUB r14,r14,r12 + + @ r9 = s0b<<1 + @ r10= s1b<<1 + ADD r9, r3, r9, ASR #1 @ r9 = s0b + s2 + SUB r3, r9, r3, LSL #1 @ r3 = s0b - s2 + + SUB r12,r14,r10,ASR #1 @ r12= s3 - s1b + ADD r10,r14,r10,ASR #1 @ r10= s3 + s1b + STR r9, [r1],#4 + STR r10,[r1],#4 @ w0 += 2 + STR r3, [r7] + STR r12,[r7,#4] + + CMP r1,r7 + BLT step7_loop2 + + LDMFD r13!,{r0-r3} + + @ r0 = points + @ r1 = in + @ r2 = step + @ r3 = shift + MOV r2, r2, ASR #2 @ r2 = step >>= 2 + CMP r2, #0 + CMPNE r2, #1 + BEQ mdct_end + + @ step > 1 (default case) + CMP r2, #4 @ r5 = T = (step>=4) ? + LDRGE r5, =sincos_lookup0 @ sincos_lookup0 + + LDRLT r5, =sincos_lookup1 @ sincos_lookup1 + ADD r7, r1, r0, LSL #1 @ r7 = iX = x + (n>>1) + ADDGE r5, r5, r2, LSR #1 @ (step>>1) +mdct_step8_default: + LDR r6, [r1],#4 @ r6 = s0 = x[0] + LDR r8, [r1],#4 @ r8 = -s1 = x[1] + LDRB r12,[r5,#1] @ r12= T[1] + LDRB r14,[r5],r2 @ r14= T[0] T += step + RSB r8, r8, #0 @ r8 = s1 + + @ XPROD31(s0, s1, T[0], T[1], x, x+1) + @ x[0] = s0 * T[0] + s1 * T[1] x[1] = s1 * T[0] - s0 * T[1] + MOV r6, r6, ASR #8 + MOV r8, r8, ASR #8 + MUL r10,r8, r12 @ r10 = s1 * T[1] + CMP r1, r7 + MLA r10,r6, r14,r10 @ r10 += s0 * T[0] + RSB r6, r6, #0 @ r6 = -s0 + MUL r11,r8, r14 @ r11 = s1 * T[0] + MLA r11,r6, r12,r11 @ r11 -= s0 * T[1] + STR r10,[r1,#-8] + STR r11,[r1,#-4] + BLT mdct_step8_default + +mdct_end: + MOV r0, r2 + LDMFD r13!,{r4-r11,PC} + +bitrev: + .byte 0 + .byte 32 + .byte 16 + .byte 48 + .byte 8 + .byte 40 + .byte 24 + .byte 56 + .byte 4 + .byte 36 + .byte 20 + .byte 52 + .byte 12 + .byte 44 + .byte 28 + .byte 60 + .byte 2 + .byte 34 + .byte 18 + .byte 50 + .byte 10 + .byte 42 + .byte 26 + .byte 58 + .byte 6 + .byte 38 + .byte 22 + .byte 54 + .byte 14 + .byte 46 + .byte 30 + .byte 62 + .byte 1 + .byte 33 + .byte 17 + .byte 49 + .byte 9 + .byte 41 + .byte 25 + .byte 57 + .byte 5 + .byte 37 + .byte 21 + .byte 53 + .byte 13 + .byte 45 + .byte 29 + .byte 61 + .byte 3 + .byte 35 + .byte 19 + .byte 51 + .byte 11 + .byte 43 + .byte 27 + .byte 59 + .byte 7 + .byte 39 + .byte 23 + .byte 55 + .byte 15 + .byte 47 + .byte 31 + .byte 63 + + @ END diff --git a/ohos-specific/tremolo/Tremolo/mdct_lookup.h b/ohos-specific/tremolo/Tremolo/mdct_lookup.h new file mode 100644 index 0000000000..a25ea3e37e --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/mdct_lookup.h @@ -0,0 +1,559 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: sin,cos lookup tables + + ************************************************************************/ + +#include "os_types.h" + +/* {sin(2*i*PI/4096), cos(2*i*PI/4096)}, with i = 0 to 512 */ +LOOKUP_T sincos_lookup0[1026] = { + X(0x00000000), X(0x7fffffff), X(0x003243f5), X(0x7ffff621), + X(0x006487e3), X(0x7fffd886), X(0x0096cbc1), X(0x7fffa72c), + X(0x00c90f88), X(0x7fff6216), X(0x00fb5330), X(0x7fff0943), + X(0x012d96b1), X(0x7ffe9cb2), X(0x015fda03), X(0x7ffe1c65), + X(0x01921d20), X(0x7ffd885a), X(0x01c45ffe), X(0x7ffce093), + X(0x01f6a297), X(0x7ffc250f), X(0x0228e4e2), X(0x7ffb55ce), + X(0x025b26d7), X(0x7ffa72d1), X(0x028d6870), X(0x7ff97c18), + X(0x02bfa9a4), X(0x7ff871a2), X(0x02f1ea6c), X(0x7ff75370), + X(0x03242abf), X(0x7ff62182), X(0x03566a96), X(0x7ff4dbd9), + X(0x0388a9ea), X(0x7ff38274), X(0x03bae8b2), X(0x7ff21553), + X(0x03ed26e6), X(0x7ff09478), X(0x041f6480), X(0x7feeffe1), + X(0x0451a177), X(0x7fed5791), X(0x0483ddc3), X(0x7feb9b85), + X(0x04b6195d), X(0x7fe9cbc0), X(0x04e8543e), X(0x7fe7e841), + X(0x051a8e5c), X(0x7fe5f108), X(0x054cc7b1), X(0x7fe3e616), + X(0x057f0035), X(0x7fe1c76b), X(0x05b137df), X(0x7fdf9508), + X(0x05e36ea9), X(0x7fdd4eec), X(0x0615a48b), X(0x7fdaf519), + X(0x0647d97c), X(0x7fd8878e), X(0x067a0d76), X(0x7fd6064c), + X(0x06ac406f), X(0x7fd37153), X(0x06de7262), X(0x7fd0c8a3), + X(0x0710a345), X(0x7fce0c3e), X(0x0742d311), X(0x7fcb3c23), + X(0x077501be), X(0x7fc85854), X(0x07a72f45), X(0x7fc560cf), + X(0x07d95b9e), X(0x7fc25596), X(0x080b86c2), X(0x7fbf36aa), + X(0x083db0a7), X(0x7fbc040a), X(0x086fd947), X(0x7fb8bdb8), + X(0x08a2009a), X(0x7fb563b3), X(0x08d42699), X(0x7fb1f5fc), + X(0x09064b3a), X(0x7fae7495), X(0x09386e78), X(0x7faadf7c), + X(0x096a9049), X(0x7fa736b4), X(0x099cb0a7), X(0x7fa37a3c), + X(0x09cecf89), X(0x7f9faa15), X(0x0a00ece8), X(0x7f9bc640), + X(0x0a3308bd), X(0x7f97cebd), X(0x0a6522fe), X(0x7f93c38c), + X(0x0a973ba5), X(0x7f8fa4b0), X(0x0ac952aa), X(0x7f8b7227), + X(0x0afb6805), X(0x7f872bf3), X(0x0b2d7baf), X(0x7f82d214), + X(0x0b5f8d9f), X(0x7f7e648c), X(0x0b919dcf), X(0x7f79e35a), + X(0x0bc3ac35), X(0x7f754e80), X(0x0bf5b8cb), X(0x7f70a5fe), + X(0x0c27c389), X(0x7f6be9d4), X(0x0c59cc68), X(0x7f671a05), + X(0x0c8bd35e), X(0x7f62368f), X(0x0cbdd865), X(0x7f5d3f75), + X(0x0cefdb76), X(0x7f5834b7), X(0x0d21dc87), X(0x7f531655), + X(0x0d53db92), X(0x7f4de451), X(0x0d85d88f), X(0x7f489eaa), + X(0x0db7d376), X(0x7f434563), X(0x0de9cc40), X(0x7f3dd87c), + X(0x0e1bc2e4), X(0x7f3857f6), X(0x0e4db75b), X(0x7f32c3d1), + X(0x0e7fa99e), X(0x7f2d1c0e), X(0x0eb199a4), X(0x7f2760af), + X(0x0ee38766), X(0x7f2191b4), X(0x0f1572dc), X(0x7f1baf1e), + X(0x0f475bff), X(0x7f15b8ee), X(0x0f7942c7), X(0x7f0faf25), + X(0x0fab272b), X(0x7f0991c4), X(0x0fdd0926), X(0x7f0360cb), + X(0x100ee8ad), X(0x7efd1c3c), X(0x1040c5bb), X(0x7ef6c418), + X(0x1072a048), X(0x7ef05860), X(0x10a4784b), X(0x7ee9d914), + X(0x10d64dbd), X(0x7ee34636), X(0x11082096), X(0x7edc9fc6), + X(0x1139f0cf), X(0x7ed5e5c6), X(0x116bbe60), X(0x7ecf1837), + X(0x119d8941), X(0x7ec8371a), X(0x11cf516a), X(0x7ec14270), + X(0x120116d5), X(0x7eba3a39), X(0x1232d979), X(0x7eb31e78), + X(0x1264994e), X(0x7eabef2c), X(0x1296564d), X(0x7ea4ac58), + X(0x12c8106f), X(0x7e9d55fc), X(0x12f9c7aa), X(0x7e95ec1a), + X(0x132b7bf9), X(0x7e8e6eb2), X(0x135d2d53), X(0x7e86ddc6), + X(0x138edbb1), X(0x7e7f3957), X(0x13c0870a), X(0x7e778166), + X(0x13f22f58), X(0x7e6fb5f4), X(0x1423d492), X(0x7e67d703), + X(0x145576b1), X(0x7e5fe493), X(0x148715ae), X(0x7e57dea7), + X(0x14b8b17f), X(0x7e4fc53e), X(0x14ea4a1f), X(0x7e47985b), + X(0x151bdf86), X(0x7e3f57ff), X(0x154d71aa), X(0x7e37042a), + X(0x157f0086), X(0x7e2e9cdf), X(0x15b08c12), X(0x7e26221f), + X(0x15e21445), X(0x7e1d93ea), X(0x16139918), X(0x7e14f242), + X(0x16451a83), X(0x7e0c3d29), X(0x1676987f), X(0x7e0374a0), + X(0x16a81305), X(0x7dfa98a8), X(0x16d98a0c), X(0x7df1a942), + X(0x170afd8d), X(0x7de8a670), X(0x173c6d80), X(0x7ddf9034), + X(0x176dd9de), X(0x7dd6668f), X(0x179f429f), X(0x7dcd2981), + X(0x17d0a7bc), X(0x7dc3d90d), X(0x1802092c), X(0x7dba7534), + X(0x183366e9), X(0x7db0fdf8), X(0x1864c0ea), X(0x7da77359), + X(0x18961728), X(0x7d9dd55a), X(0x18c7699b), X(0x7d9423fc), + X(0x18f8b83c), X(0x7d8a5f40), X(0x192a0304), X(0x7d808728), + X(0x195b49ea), X(0x7d769bb5), X(0x198c8ce7), X(0x7d6c9ce9), + X(0x19bdcbf3), X(0x7d628ac6), X(0x19ef0707), X(0x7d58654d), + X(0x1a203e1b), X(0x7d4e2c7f), X(0x1a517128), X(0x7d43e05e), + X(0x1a82a026), X(0x7d3980ec), X(0x1ab3cb0d), X(0x7d2f0e2b), + X(0x1ae4f1d6), X(0x7d24881b), X(0x1b161479), X(0x7d19eebf), + X(0x1b4732ef), X(0x7d0f4218), X(0x1b784d30), X(0x7d048228), + X(0x1ba96335), X(0x7cf9aef0), X(0x1bda74f6), X(0x7ceec873), + X(0x1c0b826a), X(0x7ce3ceb2), X(0x1c3c8b8c), X(0x7cd8c1ae), + X(0x1c6d9053), X(0x7ccda169), X(0x1c9e90b8), X(0x7cc26de5), + X(0x1ccf8cb3), X(0x7cb72724), X(0x1d00843d), X(0x7cabcd28), + X(0x1d31774d), X(0x7ca05ff1), X(0x1d6265dd), X(0x7c94df83), + X(0x1d934fe5), X(0x7c894bde), X(0x1dc4355e), X(0x7c7da505), + X(0x1df5163f), X(0x7c71eaf9), X(0x1e25f282), X(0x7c661dbc), + X(0x1e56ca1e), X(0x7c5a3d50), X(0x1e879d0d), X(0x7c4e49b7), + X(0x1eb86b46), X(0x7c4242f2), X(0x1ee934c3), X(0x7c362904), + X(0x1f19f97b), X(0x7c29fbee), X(0x1f4ab968), X(0x7c1dbbb3), + X(0x1f7b7481), X(0x7c116853), X(0x1fac2abf), X(0x7c0501d2), + X(0x1fdcdc1b), X(0x7bf88830), X(0x200d888d), X(0x7bebfb70), + X(0x203e300d), X(0x7bdf5b94), X(0x206ed295), X(0x7bd2a89e), + X(0x209f701c), X(0x7bc5e290), X(0x20d0089c), X(0x7bb9096b), + X(0x21009c0c), X(0x7bac1d31), X(0x21312a65), X(0x7b9f1de6), + X(0x2161b3a0), X(0x7b920b89), X(0x219237b5), X(0x7b84e61f), + X(0x21c2b69c), X(0x7b77ada8), X(0x21f3304f), X(0x7b6a6227), + X(0x2223a4c5), X(0x7b5d039e), X(0x225413f8), X(0x7b4f920e), + X(0x22847de0), X(0x7b420d7a), X(0x22b4e274), X(0x7b3475e5), + X(0x22e541af), X(0x7b26cb4f), X(0x23159b88), X(0x7b190dbc), + X(0x2345eff8), X(0x7b0b3d2c), X(0x23763ef7), X(0x7afd59a4), + X(0x23a6887f), X(0x7aef6323), X(0x23d6cc87), X(0x7ae159ae), + X(0x24070b08), X(0x7ad33d45), X(0x243743fa), X(0x7ac50dec), + X(0x24677758), X(0x7ab6cba4), X(0x2497a517), X(0x7aa8766f), + X(0x24c7cd33), X(0x7a9a0e50), X(0x24f7efa2), X(0x7a8b9348), + X(0x25280c5e), X(0x7a7d055b), X(0x2558235f), X(0x7a6e648a), + X(0x2588349d), X(0x7a5fb0d8), X(0x25b84012), X(0x7a50ea47), + X(0x25e845b6), X(0x7a4210d8), X(0x26184581), X(0x7a332490), + X(0x26483f6c), X(0x7a24256f), X(0x26783370), X(0x7a151378), + X(0x26a82186), X(0x7a05eead), X(0x26d809a5), X(0x79f6b711), + X(0x2707ebc7), X(0x79e76ca7), X(0x2737c7e3), X(0x79d80f6f), + X(0x27679df4), X(0x79c89f6e), X(0x27976df1), X(0x79b91ca4), + X(0x27c737d3), X(0x79a98715), X(0x27f6fb92), X(0x7999dec4), + X(0x2826b928), X(0x798a23b1), X(0x2856708d), X(0x797a55e0), + X(0x288621b9), X(0x796a7554), X(0x28b5cca5), X(0x795a820e), + X(0x28e5714b), X(0x794a7c12), X(0x29150fa1), X(0x793a6361), + X(0x2944a7a2), X(0x792a37fe), X(0x29743946), X(0x7919f9ec), + X(0x29a3c485), X(0x7909a92d), X(0x29d34958), X(0x78f945c3), + X(0x2a02c7b8), X(0x78e8cfb2), X(0x2a323f9e), X(0x78d846fb), + X(0x2a61b101), X(0x78c7aba2), X(0x2a911bdc), X(0x78b6fda8), + X(0x2ac08026), X(0x78a63d11), X(0x2aefddd8), X(0x789569df), + X(0x2b1f34eb), X(0x78848414), X(0x2b4e8558), X(0x78738bb3), + X(0x2b7dcf17), X(0x786280bf), X(0x2bad1221), X(0x7851633b), + X(0x2bdc4e6f), X(0x78403329), X(0x2c0b83fa), X(0x782ef08b), + X(0x2c3ab2b9), X(0x781d9b65), X(0x2c69daa6), X(0x780c33b8), + X(0x2c98fbba), X(0x77fab989), X(0x2cc815ee), X(0x77e92cd9), + X(0x2cf72939), X(0x77d78daa), X(0x2d263596), X(0x77c5dc01), + X(0x2d553afc), X(0x77b417df), X(0x2d843964), X(0x77a24148), + X(0x2db330c7), X(0x7790583e), X(0x2de2211e), X(0x777e5cc3), + X(0x2e110a62), X(0x776c4edb), X(0x2e3fec8b), X(0x775a2e89), + X(0x2e6ec792), X(0x7747fbce), X(0x2e9d9b70), X(0x7735b6af), + X(0x2ecc681e), X(0x77235f2d), X(0x2efb2d95), X(0x7710f54c), + X(0x2f29ebcc), X(0x76fe790e), X(0x2f58a2be), X(0x76ebea77), + X(0x2f875262), X(0x76d94989), X(0x2fb5fab2), X(0x76c69647), + X(0x2fe49ba7), X(0x76b3d0b4), X(0x30133539), X(0x76a0f8d2), + X(0x3041c761), X(0x768e0ea6), X(0x30705217), X(0x767b1231), + X(0x309ed556), X(0x76680376), X(0x30cd5115), X(0x7654e279), + X(0x30fbc54d), X(0x7641af3d), X(0x312a31f8), X(0x762e69c4), + X(0x3158970e), X(0x761b1211), X(0x3186f487), X(0x7607a828), + X(0x31b54a5e), X(0x75f42c0b), X(0x31e39889), X(0x75e09dbd), + X(0x3211df04), X(0x75ccfd42), X(0x32401dc6), X(0x75b94a9c), + X(0x326e54c7), X(0x75a585cf), X(0x329c8402), X(0x7591aedd), + X(0x32caab6f), X(0x757dc5ca), X(0x32f8cb07), X(0x7569ca99), + X(0x3326e2c3), X(0x7555bd4c), X(0x3354f29b), X(0x75419de7), + X(0x3382fa88), X(0x752d6c6c), X(0x33b0fa84), X(0x751928e0), + X(0x33def287), X(0x7504d345), X(0x340ce28b), X(0x74f06b9e), + X(0x343aca87), X(0x74dbf1ef), X(0x3468aa76), X(0x74c7663a), + X(0x34968250), X(0x74b2c884), X(0x34c4520d), X(0x749e18cd), + X(0x34f219a8), X(0x7489571c), X(0x351fd918), X(0x74748371), + X(0x354d9057), X(0x745f9dd1), X(0x357b3f5d), X(0x744aa63f), + X(0x35a8e625), X(0x74359cbd), X(0x35d684a6), X(0x74208150), + X(0x36041ad9), X(0x740b53fb), X(0x3631a8b8), X(0x73f614c0), + X(0x365f2e3b), X(0x73e0c3a3), X(0x368cab5c), X(0x73cb60a8), + X(0x36ba2014), X(0x73b5ebd1), X(0x36e78c5b), X(0x73a06522), + X(0x3714f02a), X(0x738acc9e), X(0x37424b7b), X(0x73752249), + X(0x376f9e46), X(0x735f6626), X(0x379ce885), X(0x73499838), + X(0x37ca2a30), X(0x7333b883), X(0x37f76341), X(0x731dc70a), + X(0x382493b0), X(0x7307c3d0), X(0x3851bb77), X(0x72f1aed9), + X(0x387eda8e), X(0x72db8828), X(0x38abf0ef), X(0x72c54fc1), + X(0x38d8fe93), X(0x72af05a7), X(0x39060373), X(0x7298a9dd), + X(0x3932ff87), X(0x72823c67), X(0x395ff2c9), X(0x726bbd48), + X(0x398cdd32), X(0x72552c85), X(0x39b9bebc), X(0x723e8a20), + X(0x39e6975e), X(0x7227d61c), X(0x3a136712), X(0x7211107e), + X(0x3a402dd2), X(0x71fa3949), X(0x3a6ceb96), X(0x71e35080), + X(0x3a99a057), X(0x71cc5626), X(0x3ac64c0f), X(0x71b54a41), + X(0x3af2eeb7), X(0x719e2cd2), X(0x3b1f8848), X(0x7186fdde), + X(0x3b4c18ba), X(0x716fbd68), X(0x3b78a007), X(0x71586b74), + X(0x3ba51e29), X(0x71410805), X(0x3bd19318), X(0x7129931f), + X(0x3bfdfecd), X(0x71120cc5), X(0x3c2a6142), X(0x70fa74fc), + X(0x3c56ba70), X(0x70e2cbc6), X(0x3c830a50), X(0x70cb1128), + X(0x3caf50da), X(0x70b34525), X(0x3cdb8e09), X(0x709b67c0), + X(0x3d07c1d6), X(0x708378ff), X(0x3d33ec39), X(0x706b78e3), + X(0x3d600d2c), X(0x70536771), X(0x3d8c24a8), X(0x703b44ad), + X(0x3db832a6), X(0x7023109a), X(0x3de4371f), X(0x700acb3c), + X(0x3e10320d), X(0x6ff27497), X(0x3e3c2369), X(0x6fda0cae), + X(0x3e680b2c), X(0x6fc19385), X(0x3e93e950), X(0x6fa90921), + X(0x3ebfbdcd), X(0x6f906d84), X(0x3eeb889c), X(0x6f77c0b3), + X(0x3f1749b8), X(0x6f5f02b2), X(0x3f430119), X(0x6f463383), + X(0x3f6eaeb8), X(0x6f2d532c), X(0x3f9a5290), X(0x6f1461b0), + X(0x3fc5ec98), X(0x6efb5f12), X(0x3ff17cca), X(0x6ee24b57), + X(0x401d0321), X(0x6ec92683), X(0x40487f94), X(0x6eaff099), + X(0x4073f21d), X(0x6e96a99d), X(0x409f5ab6), X(0x6e7d5193), + X(0x40cab958), X(0x6e63e87f), X(0x40f60dfb), X(0x6e4a6e66), + X(0x4121589b), X(0x6e30e34a), X(0x414c992f), X(0x6e174730), + X(0x4177cfb1), X(0x6dfd9a1c), X(0x41a2fc1a), X(0x6de3dc11), + X(0x41ce1e65), X(0x6dca0d14), X(0x41f93689), X(0x6db02d29), + X(0x42244481), X(0x6d963c54), X(0x424f4845), X(0x6d7c3a98), + X(0x427a41d0), X(0x6d6227fa), X(0x42a5311b), X(0x6d48047e), + X(0x42d0161e), X(0x6d2dd027), X(0x42faf0d4), X(0x6d138afb), + X(0x4325c135), X(0x6cf934fc), X(0x4350873c), X(0x6cdece2f), + X(0x437b42e1), X(0x6cc45698), X(0x43a5f41e), X(0x6ca9ce3b), + X(0x43d09aed), X(0x6c8f351c), X(0x43fb3746), X(0x6c748b3f), + X(0x4425c923), X(0x6c59d0a9), X(0x4450507e), X(0x6c3f055d), + X(0x447acd50), X(0x6c242960), X(0x44a53f93), X(0x6c093cb6), + X(0x44cfa740), X(0x6bee3f62), X(0x44fa0450), X(0x6bd3316a), + X(0x452456bd), X(0x6bb812d1), X(0x454e9e80), X(0x6b9ce39b), + X(0x4578db93), X(0x6b81a3cd), X(0x45a30df0), X(0x6b66536b), + X(0x45cd358f), X(0x6b4af279), X(0x45f7526b), X(0x6b2f80fb), + X(0x4621647d), X(0x6b13fef5), X(0x464b6bbe), X(0x6af86c6c), + X(0x46756828), X(0x6adcc964), X(0x469f59b4), X(0x6ac115e2), + X(0x46c9405c), X(0x6aa551e9), X(0x46f31c1a), X(0x6a897d7d), + X(0x471cece7), X(0x6a6d98a4), X(0x4746b2bc), X(0x6a51a361), + X(0x47706d93), X(0x6a359db9), X(0x479a1d67), X(0x6a1987b0), + X(0x47c3c22f), X(0x69fd614a), X(0x47ed5be6), X(0x69e12a8c), + X(0x4816ea86), X(0x69c4e37a), X(0x48406e08), X(0x69a88c19), + X(0x4869e665), X(0x698c246c), X(0x48935397), X(0x696fac78), + X(0x48bcb599), X(0x69532442), X(0x48e60c62), X(0x69368bce), + X(0x490f57ee), X(0x6919e320), X(0x49389836), X(0x68fd2a3d), + X(0x4961cd33), X(0x68e06129), X(0x498af6df), X(0x68c387e9), + X(0x49b41533), X(0x68a69e81), X(0x49dd282a), X(0x6889a4f6), + X(0x4a062fbd), X(0x686c9b4b), X(0x4a2f2be6), X(0x684f8186), + X(0x4a581c9e), X(0x683257ab), X(0x4a8101de), X(0x68151dbe), + X(0x4aa9dba2), X(0x67f7d3c5), X(0x4ad2a9e2), X(0x67da79c3), + X(0x4afb6c98), X(0x67bd0fbd), X(0x4b2423be), X(0x679f95b7), + X(0x4b4ccf4d), X(0x67820bb7), X(0x4b756f40), X(0x676471c0), + X(0x4b9e0390), X(0x6746c7d8), X(0x4bc68c36), X(0x67290e02), + X(0x4bef092d), X(0x670b4444), X(0x4c177a6e), X(0x66ed6aa1), + X(0x4c3fdff4), X(0x66cf8120), X(0x4c6839b7), X(0x66b187c3), + X(0x4c9087b1), X(0x66937e91), X(0x4cb8c9dd), X(0x6675658c), + X(0x4ce10034), X(0x66573cbb), X(0x4d092ab0), X(0x66390422), + X(0x4d31494b), X(0x661abbc5), X(0x4d595bfe), X(0x65fc63a9), + X(0x4d8162c4), X(0x65ddfbd3), X(0x4da95d96), X(0x65bf8447), + X(0x4dd14c6e), X(0x65a0fd0b), X(0x4df92f46), X(0x65826622), + X(0x4e210617), X(0x6563bf92), X(0x4e48d0dd), X(0x6545095f), + X(0x4e708f8f), X(0x6526438f), X(0x4e984229), X(0x65076e25), + X(0x4ebfe8a5), X(0x64e88926), X(0x4ee782fb), X(0x64c99498), + X(0x4f0f1126), X(0x64aa907f), X(0x4f369320), X(0x648b7ce0), + X(0x4f5e08e3), X(0x646c59bf), X(0x4f857269), X(0x644d2722), + X(0x4faccfab), X(0x642de50d), X(0x4fd420a4), X(0x640e9386), + X(0x4ffb654d), X(0x63ef3290), X(0x50229da1), X(0x63cfc231), + X(0x5049c999), X(0x63b0426d), X(0x5070e92f), X(0x6390b34a), + X(0x5097fc5e), X(0x637114cc), X(0x50bf031f), X(0x635166f9), + X(0x50e5fd6d), X(0x6331a9d4), X(0x510ceb40), X(0x6311dd64), + X(0x5133cc94), X(0x62f201ac), X(0x515aa162), X(0x62d216b3), + X(0x518169a5), X(0x62b21c7b), X(0x51a82555), X(0x6292130c), + X(0x51ced46e), X(0x6271fa69), X(0x51f576ea), X(0x6251d298), + X(0x521c0cc2), X(0x62319b9d), X(0x524295f0), X(0x6211557e), + X(0x5269126e), X(0x61f1003f), X(0x528f8238), X(0x61d09be5), + X(0x52b5e546), X(0x61b02876), X(0x52dc3b92), X(0x618fa5f7), + X(0x53028518), X(0x616f146c), X(0x5328c1d0), X(0x614e73da), + X(0x534ef1b5), X(0x612dc447), X(0x537514c2), X(0x610d05b7), + X(0x539b2af0), X(0x60ec3830), X(0x53c13439), X(0x60cb5bb7), + X(0x53e73097), X(0x60aa7050), X(0x540d2005), X(0x60897601), + X(0x5433027d), X(0x60686ccf), X(0x5458d7f9), X(0x604754bf), + X(0x547ea073), X(0x60262dd6), X(0x54a45be6), X(0x6004f819), + X(0x54ca0a4b), X(0x5fe3b38d), X(0x54efab9c), X(0x5fc26038), + X(0x55153fd4), X(0x5fa0fe1f), X(0x553ac6ee), X(0x5f7f8d46), + X(0x556040e2), X(0x5f5e0db3), X(0x5585adad), X(0x5f3c7f6b), + X(0x55ab0d46), X(0x5f1ae274), X(0x55d05faa), X(0x5ef936d1), + X(0x55f5a4d2), X(0x5ed77c8a), X(0x561adcb9), X(0x5eb5b3a2), + X(0x56400758), X(0x5e93dc1f), X(0x566524aa), X(0x5e71f606), + X(0x568a34a9), X(0x5e50015d), X(0x56af3750), X(0x5e2dfe29), + X(0x56d42c99), X(0x5e0bec6e), X(0x56f9147e), X(0x5de9cc33), + X(0x571deefa), X(0x5dc79d7c), X(0x5742bc06), X(0x5da5604f), + X(0x57677b9d), X(0x5d8314b1), X(0x578c2dba), X(0x5d60baa7), + X(0x57b0d256), X(0x5d3e5237), X(0x57d5696d), X(0x5d1bdb65), + X(0x57f9f2f8), X(0x5cf95638), X(0x581e6ef1), X(0x5cd6c2b5), + X(0x5842dd54), X(0x5cb420e0), X(0x58673e1b), X(0x5c9170bf), + X(0x588b9140), X(0x5c6eb258), X(0x58afd6bd), X(0x5c4be5b0), + X(0x58d40e8c), X(0x5c290acc), X(0x58f838a9), X(0x5c0621b2), + X(0x591c550e), X(0x5be32a67), X(0x594063b5), X(0x5bc024f0), + X(0x59646498), X(0x5b9d1154), X(0x598857b2), X(0x5b79ef96), + X(0x59ac3cfd), X(0x5b56bfbd), X(0x59d01475), X(0x5b3381ce), + X(0x59f3de12), X(0x5b1035cf), X(0x5a1799d1), X(0x5aecdbc5), + X(0x5a3b47ab), X(0x5ac973b5), X(0x5a5ee79a), X(0x5aa5fda5), + X(0x5a82799a), X(0x5a82799a) + }; + + /* {sin((2*i+1)*PI/4096), cos((2*i+1)*PI/4096)}, with i = 0 to 511 */ +LOOKUP_T sincos_lookup1[1024] = { + X(0x001921fb), X(0x7ffffd88), X(0x004b65ee), X(0x7fffe9cb), + X(0x007da9d4), X(0x7fffc251), X(0x00afeda8), X(0x7fff8719), + X(0x00e23160), X(0x7fff3824), X(0x011474f6), X(0x7ffed572), + X(0x0146b860), X(0x7ffe5f03), X(0x0178fb99), X(0x7ffdd4d7), + X(0x01ab3e97), X(0x7ffd36ee), X(0x01dd8154), X(0x7ffc8549), + X(0x020fc3c6), X(0x7ffbbfe6), X(0x024205e8), X(0x7ffae6c7), + X(0x027447b0), X(0x7ff9f9ec), X(0x02a68917), X(0x7ff8f954), + X(0x02d8ca16), X(0x7ff7e500), X(0x030b0aa4), X(0x7ff6bcf0), + X(0x033d4abb), X(0x7ff58125), X(0x036f8a51), X(0x7ff4319d), + X(0x03a1c960), X(0x7ff2ce5b), X(0x03d407df), X(0x7ff1575d), + X(0x040645c7), X(0x7fefcca4), X(0x04388310), X(0x7fee2e30), + X(0x046abfb3), X(0x7fec7c02), X(0x049cfba7), X(0x7feab61a), + X(0x04cf36e5), X(0x7fe8dc78), X(0x05017165), X(0x7fe6ef1c), + X(0x0533ab20), X(0x7fe4ee06), X(0x0565e40d), X(0x7fe2d938), + X(0x05981c26), X(0x7fe0b0b1), X(0x05ca5361), X(0x7fde7471), + X(0x05fc89b8), X(0x7fdc247a), X(0x062ebf22), X(0x7fd9c0ca), + X(0x0660f398), X(0x7fd74964), X(0x06932713), X(0x7fd4be46), + X(0x06c5598a), X(0x7fd21f72), X(0x06f78af6), X(0x7fcf6ce8), + X(0x0729bb4e), X(0x7fcca6a7), X(0x075bea8c), X(0x7fc9ccb2), + X(0x078e18a7), X(0x7fc6df08), X(0x07c04598), X(0x7fc3dda9), + X(0x07f27157), X(0x7fc0c896), X(0x08249bdd), X(0x7fbd9fd0), + X(0x0856c520), X(0x7fba6357), X(0x0888ed1b), X(0x7fb7132b), + X(0x08bb13c5), X(0x7fb3af4e), X(0x08ed3916), X(0x7fb037bf), + X(0x091f5d06), X(0x7facac7f), X(0x09517f8f), X(0x7fa90d8e), + X(0x0983a0a7), X(0x7fa55aee), X(0x09b5c048), X(0x7fa1949e), + X(0x09e7de6a), X(0x7f9dbaa0), X(0x0a19fb04), X(0x7f99ccf4), + X(0x0a4c1610), X(0x7f95cb9a), X(0x0a7e2f85), X(0x7f91b694), + X(0x0ab0475c), X(0x7f8d8de1), X(0x0ae25d8d), X(0x7f895182), + X(0x0b147211), X(0x7f850179), X(0x0b4684df), X(0x7f809dc5), + X(0x0b7895f0), X(0x7f7c2668), X(0x0baaa53b), X(0x7f779b62), + X(0x0bdcb2bb), X(0x7f72fcb4), X(0x0c0ebe66), X(0x7f6e4a5e), + X(0x0c40c835), X(0x7f698461), X(0x0c72d020), X(0x7f64aabf), + X(0x0ca4d620), X(0x7f5fbd77), X(0x0cd6da2d), X(0x7f5abc8a), + X(0x0d08dc3f), X(0x7f55a7fa), X(0x0d3adc4e), X(0x7f507fc7), + X(0x0d6cda53), X(0x7f4b43f2), X(0x0d9ed646), X(0x7f45f47b), + X(0x0dd0d01f), X(0x7f409164), X(0x0e02c7d7), X(0x7f3b1aad), + X(0x0e34bd66), X(0x7f359057), X(0x0e66b0c3), X(0x7f2ff263), + X(0x0e98a1e9), X(0x7f2a40d2), X(0x0eca90ce), X(0x7f247ba5), + X(0x0efc7d6b), X(0x7f1ea2dc), X(0x0f2e67b8), X(0x7f18b679), + X(0x0f604faf), X(0x7f12b67c), X(0x0f923546), X(0x7f0ca2e7), + X(0x0fc41876), X(0x7f067bba), X(0x0ff5f938), X(0x7f0040f6), + X(0x1027d784), X(0x7ef9f29d), X(0x1059b352), X(0x7ef390ae), + X(0x108b8c9b), X(0x7eed1b2c), X(0x10bd6356), X(0x7ee69217), + X(0x10ef377d), X(0x7edff570), X(0x11210907), X(0x7ed94538), + X(0x1152d7ed), X(0x7ed28171), X(0x1184a427), X(0x7ecbaa1a), + X(0x11b66dad), X(0x7ec4bf36), X(0x11e83478), X(0x7ebdc0c6), + X(0x1219f880), X(0x7eb6aeca), X(0x124bb9be), X(0x7eaf8943), + X(0x127d7829), X(0x7ea85033), X(0x12af33ba), X(0x7ea1039b), + X(0x12e0ec6a), X(0x7e99a37c), X(0x1312a230), X(0x7e922fd6), + X(0x13445505), X(0x7e8aa8ac), X(0x137604e2), X(0x7e830dff), + X(0x13a7b1bf), X(0x7e7b5fce), X(0x13d95b93), X(0x7e739e1d), + X(0x140b0258), X(0x7e6bc8eb), X(0x143ca605), X(0x7e63e03b), + X(0x146e4694), X(0x7e5be40c), X(0x149fe3fc), X(0x7e53d462), + X(0x14d17e36), X(0x7e4bb13c), X(0x1503153a), X(0x7e437a9c), + X(0x1534a901), X(0x7e3b3083), X(0x15663982), X(0x7e32d2f4), + X(0x1597c6b7), X(0x7e2a61ed), X(0x15c95097), X(0x7e21dd73), + X(0x15fad71b), X(0x7e194584), X(0x162c5a3b), X(0x7e109a24), + X(0x165dd9f0), X(0x7e07db52), X(0x168f5632), X(0x7dff0911), + X(0x16c0cef9), X(0x7df62362), X(0x16f2443e), X(0x7ded2a47), + X(0x1723b5f9), X(0x7de41dc0), X(0x17552422), X(0x7ddafdce), + X(0x17868eb3), X(0x7dd1ca75), X(0x17b7f5a3), X(0x7dc883b4), + X(0x17e958ea), X(0x7dbf298d), X(0x181ab881), X(0x7db5bc02), + X(0x184c1461), X(0x7dac3b15), X(0x187d6c82), X(0x7da2a6c6), + X(0x18aec0db), X(0x7d98ff17), X(0x18e01167), X(0x7d8f4409), + X(0x19115e1c), X(0x7d85759f), X(0x1942a6f3), X(0x7d7b93da), + X(0x1973ebe6), X(0x7d719eba), X(0x19a52ceb), X(0x7d679642), + X(0x19d669fc), X(0x7d5d7a74), X(0x1a07a311), X(0x7d534b50), + X(0x1a38d823), X(0x7d4908d9), X(0x1a6a0929), X(0x7d3eb30f), + X(0x1a9b361d), X(0x7d3449f5), X(0x1acc5ef6), X(0x7d29cd8c), + X(0x1afd83ad), X(0x7d1f3dd6), X(0x1b2ea43a), X(0x7d149ad5), + X(0x1b5fc097), X(0x7d09e489), X(0x1b90d8bb), X(0x7cff1af5), + X(0x1bc1ec9e), X(0x7cf43e1a), X(0x1bf2fc3a), X(0x7ce94dfb), + X(0x1c240786), X(0x7cde4a98), X(0x1c550e7c), X(0x7cd333f3), + X(0x1c861113), X(0x7cc80a0f), X(0x1cb70f43), X(0x7cbcccec), + X(0x1ce80906), X(0x7cb17c8d), X(0x1d18fe54), X(0x7ca618f3), + X(0x1d49ef26), X(0x7c9aa221), X(0x1d7adb73), X(0x7c8f1817), + X(0x1dabc334), X(0x7c837ad8), X(0x1ddca662), X(0x7c77ca65), + X(0x1e0d84f5), X(0x7c6c06c0), X(0x1e3e5ee5), X(0x7c602fec), + X(0x1e6f342c), X(0x7c5445e9), X(0x1ea004c1), X(0x7c4848ba), + X(0x1ed0d09d), X(0x7c3c3860), X(0x1f0197b8), X(0x7c3014de), + X(0x1f325a0b), X(0x7c23de35), X(0x1f63178f), X(0x7c179467), + X(0x1f93d03c), X(0x7c0b3777), X(0x1fc4840a), X(0x7bfec765), + X(0x1ff532f2), X(0x7bf24434), X(0x2025dcec), X(0x7be5ade6), + X(0x205681f1), X(0x7bd9047c), X(0x208721f9), X(0x7bcc47fa), + X(0x20b7bcfe), X(0x7bbf7860), X(0x20e852f6), X(0x7bb295b0), + X(0x2118e3dc), X(0x7ba59fee), X(0x21496fa7), X(0x7b989719), + X(0x2179f64f), X(0x7b8b7b36), X(0x21aa77cf), X(0x7b7e4c45), + X(0x21daf41d), X(0x7b710a49), X(0x220b6b32), X(0x7b63b543), + X(0x223bdd08), X(0x7b564d36), X(0x226c4996), X(0x7b48d225), + X(0x229cb0d5), X(0x7b3b4410), X(0x22cd12bd), X(0x7b2da2fa), + X(0x22fd6f48), X(0x7b1feee5), X(0x232dc66d), X(0x7b1227d3), + X(0x235e1826), X(0x7b044dc7), X(0x238e646a), X(0x7af660c2), + X(0x23beab33), X(0x7ae860c7), X(0x23eeec78), X(0x7ada4dd8), + X(0x241f2833), X(0x7acc27f7), X(0x244f5e5c), X(0x7abdef25), + X(0x247f8eec), X(0x7aafa367), X(0x24afb9da), X(0x7aa144bc), + X(0x24dfdf20), X(0x7a92d329), X(0x250ffeb7), X(0x7a844eae), + X(0x25401896), X(0x7a75b74f), X(0x25702cb7), X(0x7a670d0d), + X(0x25a03b11), X(0x7a584feb), X(0x25d0439f), X(0x7a497feb), + X(0x26004657), X(0x7a3a9d0f), X(0x26304333), X(0x7a2ba75a), + X(0x26603a2c), X(0x7a1c9ece), X(0x26902b39), X(0x7a0d836d), + X(0x26c01655), X(0x79fe5539), X(0x26effb76), X(0x79ef1436), + X(0x271fda96), X(0x79dfc064), X(0x274fb3ae), X(0x79d059c8), + X(0x277f86b5), X(0x79c0e062), X(0x27af53a6), X(0x79b15435), + X(0x27df1a77), X(0x79a1b545), X(0x280edb23), X(0x79920392), + X(0x283e95a1), X(0x79823f20), X(0x286e49ea), X(0x797267f2), + X(0x289df7f8), X(0x79627e08), X(0x28cd9fc1), X(0x79528167), + X(0x28fd4140), X(0x79427210), X(0x292cdc6d), X(0x79325006), + X(0x295c7140), X(0x79221b4b), X(0x298bffb2), X(0x7911d3e2), + X(0x29bb87bc), X(0x790179cd), X(0x29eb0957), X(0x78f10d0f), + X(0x2a1a847b), X(0x78e08dab), X(0x2a49f920), X(0x78cffba3), + X(0x2a796740), X(0x78bf56f9), X(0x2aa8ced3), X(0x78ae9fb0), + X(0x2ad82fd2), X(0x789dd5cb), X(0x2b078a36), X(0x788cf94c), + X(0x2b36ddf7), X(0x787c0a36), X(0x2b662b0e), X(0x786b088c), + X(0x2b957173), X(0x7859f44f), X(0x2bc4b120), X(0x7848cd83), + X(0x2bf3ea0d), X(0x7837942b), X(0x2c231c33), X(0x78264849), + X(0x2c52478a), X(0x7814e9df), X(0x2c816c0c), X(0x780378f1), + X(0x2cb089b1), X(0x77f1f581), X(0x2cdfa071), X(0x77e05f91), + X(0x2d0eb046), X(0x77ceb725), X(0x2d3db928), X(0x77bcfc3f), + X(0x2d6cbb10), X(0x77ab2ee2), X(0x2d9bb5f6), X(0x77994f11), + X(0x2dcaa9d5), X(0x77875cce), X(0x2df996a3), X(0x7775581d), + X(0x2e287c5a), X(0x776340ff), X(0x2e575af3), X(0x77511778), + X(0x2e863267), X(0x773edb8b), X(0x2eb502ae), X(0x772c8d3a), + X(0x2ee3cbc1), X(0x771a2c88), X(0x2f128d99), X(0x7707b979), + X(0x2f41482e), X(0x76f5340e), X(0x2f6ffb7a), X(0x76e29c4b), + X(0x2f9ea775), X(0x76cff232), X(0x2fcd4c19), X(0x76bd35c7), + X(0x2ffbe95d), X(0x76aa670d), X(0x302a7f3a), X(0x76978605), + X(0x30590dab), X(0x768492b4), X(0x308794a6), X(0x76718d1c), + X(0x30b61426), X(0x765e7540), X(0x30e48c22), X(0x764b4b23), + X(0x3112fc95), X(0x76380ec8), X(0x31416576), X(0x7624c031), + X(0x316fc6be), X(0x76115f63), X(0x319e2067), X(0x75fdec60), + X(0x31cc7269), X(0x75ea672a), X(0x31fabcbd), X(0x75d6cfc5), + X(0x3228ff5c), X(0x75c32634), X(0x32573a3f), X(0x75af6a7b), + X(0x32856d5e), X(0x759b9c9b), X(0x32b398b3), X(0x7587bc98), + X(0x32e1bc36), X(0x7573ca75), X(0x330fd7e1), X(0x755fc635), + X(0x333debab), X(0x754bafdc), X(0x336bf78f), X(0x7537876c), + X(0x3399fb85), X(0x75234ce8), X(0x33c7f785), X(0x750f0054), + X(0x33f5eb89), X(0x74faa1b3), X(0x3423d78a), X(0x74e63108), + X(0x3451bb81), X(0x74d1ae55), X(0x347f9766), X(0x74bd199f), + X(0x34ad6b32), X(0x74a872e8), X(0x34db36df), X(0x7493ba34), + X(0x3508fa66), X(0x747eef85), X(0x3536b5be), X(0x746a12df), + X(0x356468e2), X(0x74552446), X(0x359213c9), X(0x744023bc), + X(0x35bfb66e), X(0x742b1144), X(0x35ed50c9), X(0x7415ece2), + X(0x361ae2d3), X(0x7400b69a), X(0x36486c86), X(0x73eb6e6e), + X(0x3675edd9), X(0x73d61461), X(0x36a366c6), X(0x73c0a878), + X(0x36d0d746), X(0x73ab2ab4), X(0x36fe3f52), X(0x73959b1b), + X(0x372b9ee3), X(0x737ff9ae), X(0x3758f5f2), X(0x736a4671), + X(0x37864477), X(0x73548168), X(0x37b38a6d), X(0x733eaa96), + X(0x37e0c7cc), X(0x7328c1ff), X(0x380dfc8d), X(0x7312c7a5), + X(0x383b28a9), X(0x72fcbb8c), X(0x38684c19), X(0x72e69db7), + X(0x389566d6), X(0x72d06e2b), X(0x38c278d9), X(0x72ba2cea), + X(0x38ef821c), X(0x72a3d9f7), X(0x391c8297), X(0x728d7557), + X(0x39497a43), X(0x7276ff0d), X(0x39766919), X(0x7260771b), + X(0x39a34f13), X(0x7249dd86), X(0x39d02c2a), X(0x72333251), + X(0x39fd0056), X(0x721c7580), X(0x3a29cb91), X(0x7205a716), + X(0x3a568dd4), X(0x71eec716), X(0x3a834717), X(0x71d7d585), + X(0x3aaff755), X(0x71c0d265), X(0x3adc9e86), X(0x71a9bdba), + X(0x3b093ca3), X(0x71929789), X(0x3b35d1a5), X(0x717b5fd3), + X(0x3b625d86), X(0x7164169d), X(0x3b8ee03e), X(0x714cbbeb), + X(0x3bbb59c7), X(0x71354fc0), X(0x3be7ca1a), X(0x711dd220), + X(0x3c143130), X(0x7106430e), X(0x3c408f03), X(0x70eea28e), + X(0x3c6ce38a), X(0x70d6f0a4), X(0x3c992ec0), X(0x70bf2d53), + X(0x3cc5709e), X(0x70a7589f), X(0x3cf1a91c), X(0x708f728b), + X(0x3d1dd835), X(0x70777b1c), X(0x3d49fde1), X(0x705f7255), + X(0x3d761a19), X(0x70475839), X(0x3da22cd7), X(0x702f2ccd), + X(0x3dce3614), X(0x7016f014), X(0x3dfa35c8), X(0x6ffea212), + X(0x3e262bee), X(0x6fe642ca), X(0x3e52187f), X(0x6fcdd241), + X(0x3e7dfb73), X(0x6fb5507a), X(0x3ea9d4c3), X(0x6f9cbd79), + X(0x3ed5a46b), X(0x6f841942), X(0x3f016a61), X(0x6f6b63d8), + X(0x3f2d26a0), X(0x6f529d40), X(0x3f58d921), X(0x6f39c57d), + X(0x3f8481dd), X(0x6f20dc92), X(0x3fb020ce), X(0x6f07e285), + X(0x3fdbb5ec), X(0x6eeed758), X(0x40074132), X(0x6ed5bb10), + X(0x4032c297), X(0x6ebc8db0), X(0x405e3a16), X(0x6ea34f3d), + X(0x4089a7a8), X(0x6e89ffb9), X(0x40b50b46), X(0x6e709f2a), + X(0x40e064ea), X(0x6e572d93), X(0x410bb48c), X(0x6e3daaf8), + X(0x4136fa27), X(0x6e24175c), X(0x416235b2), X(0x6e0a72c5), + X(0x418d6729), X(0x6df0bd35), X(0x41b88e84), X(0x6dd6f6b1), + X(0x41e3abbc), X(0x6dbd1f3c), X(0x420ebecb), X(0x6da336dc), + X(0x4239c7aa), X(0x6d893d93), X(0x4264c653), X(0x6d6f3365), + X(0x428fbabe), X(0x6d551858), X(0x42baa4e6), X(0x6d3aec6e), + X(0x42e584c3), X(0x6d20afac), X(0x43105a50), X(0x6d066215), + X(0x433b2585), X(0x6cec03af), X(0x4365e65b), X(0x6cd1947c), + X(0x43909ccd), X(0x6cb71482), X(0x43bb48d4), X(0x6c9c83c3), + X(0x43e5ea68), X(0x6c81e245), X(0x44108184), X(0x6c67300b), + X(0x443b0e21), X(0x6c4c6d1a), X(0x44659039), X(0x6c319975), + X(0x449007c4), X(0x6c16b521), X(0x44ba74bd), X(0x6bfbc021), + X(0x44e4d71c), X(0x6be0ba7b), X(0x450f2edb), X(0x6bc5a431), + X(0x45397bf4), X(0x6baa7d49), X(0x4563be60), X(0x6b8f45c7), + X(0x458df619), X(0x6b73fdae), X(0x45b82318), X(0x6b58a503), + X(0x45e24556), X(0x6b3d3bcb), X(0x460c5cce), X(0x6b21c208), + X(0x46366978), X(0x6b0637c1), X(0x46606b4e), X(0x6aea9cf8), + X(0x468a624a), X(0x6acef1b2), X(0x46b44e65), X(0x6ab335f4), + X(0x46de2f99), X(0x6a9769c1), X(0x470805df), X(0x6a7b8d1e), + X(0x4731d131), X(0x6a5fa010), X(0x475b9188), X(0x6a43a29a), + X(0x478546de), X(0x6a2794c1), X(0x47aef12c), X(0x6a0b7689), + X(0x47d8906d), X(0x69ef47f6), X(0x48022499), X(0x69d3090e), + X(0x482badab), X(0x69b6b9d3), X(0x48552b9b), X(0x699a5a4c), + X(0x487e9e64), X(0x697dea7b), X(0x48a805ff), X(0x69616a65), + X(0x48d16265), X(0x6944da10), X(0x48fab391), X(0x6928397e), + X(0x4923f97b), X(0x690b88b5), X(0x494d341e), X(0x68eec7b9), + X(0x49766373), X(0x68d1f68f), X(0x499f8774), X(0x68b5153a), + X(0x49c8a01b), X(0x689823bf), X(0x49f1ad61), X(0x687b2224), + X(0x4a1aaf3f), X(0x685e106c), X(0x4a43a5b0), X(0x6840ee9b), + X(0x4a6c90ad), X(0x6823bcb7), X(0x4a957030), X(0x68067ac3), + X(0x4abe4433), X(0x67e928c5), X(0x4ae70caf), X(0x67cbc6c0), + X(0x4b0fc99d), X(0x67ae54ba), X(0x4b387af9), X(0x6790d2b6), + X(0x4b6120bb), X(0x677340ba), X(0x4b89badd), X(0x67559eca), + X(0x4bb24958), X(0x6737ecea), X(0x4bdacc28), X(0x671a2b20), + X(0x4c034345), X(0x66fc596f), X(0x4c2baea9), X(0x66de77dc), + X(0x4c540e4e), X(0x66c0866d), X(0x4c7c622d), X(0x66a28524), + X(0x4ca4aa41), X(0x66847408), X(0x4ccce684), X(0x6666531d), + X(0x4cf516ee), X(0x66482267), X(0x4d1d3b7a), X(0x6629e1ec), + X(0x4d455422), X(0x660b91af), X(0x4d6d60df), X(0x65ed31b5), + X(0x4d9561ac), X(0x65cec204), X(0x4dbd5682), X(0x65b0429f), + X(0x4de53f5a), X(0x6591b38c), X(0x4e0d1c30), X(0x657314cf), + X(0x4e34ecfc), X(0x6554666d), X(0x4e5cb1b9), X(0x6535a86b), + X(0x4e846a60), X(0x6516dacd), X(0x4eac16eb), X(0x64f7fd98), + X(0x4ed3b755), X(0x64d910d1), X(0x4efb4b96), X(0x64ba147d), + X(0x4f22d3aa), X(0x649b08a0), X(0x4f4a4f89), X(0x647bed3f), + X(0x4f71bf2e), X(0x645cc260), X(0x4f992293), X(0x643d8806), + X(0x4fc079b1), X(0x641e3e38), X(0x4fe7c483), X(0x63fee4f8), + X(0x500f0302), X(0x63df7c4d), X(0x50363529), X(0x63c0043b), + X(0x505d5af1), X(0x63a07cc7), X(0x50847454), X(0x6380e5f6), + X(0x50ab814d), X(0x63613fcd), X(0x50d281d5), X(0x63418a50), + X(0x50f975e6), X(0x6321c585), X(0x51205d7b), X(0x6301f171), + X(0x5147388c), X(0x62e20e17), X(0x516e0715), X(0x62c21b7e), + X(0x5194c910), X(0x62a219aa), X(0x51bb7e75), X(0x628208a1), + X(0x51e22740), X(0x6261e866), X(0x5208c36a), X(0x6241b8ff), + X(0x522f52ee), X(0x62217a72), X(0x5255d5c5), X(0x62012cc2), + X(0x527c4bea), X(0x61e0cff5), X(0x52a2b556), X(0x61c06410), + X(0x52c91204), X(0x619fe918), X(0x52ef61ee), X(0x617f5f12), + X(0x5315a50e), X(0x615ec603), X(0x533bdb5d), X(0x613e1df0), + X(0x536204d7), X(0x611d66de), X(0x53882175), X(0x60fca0d2), + X(0x53ae3131), X(0x60dbcbd1), X(0x53d43406), X(0x60bae7e1), + X(0x53fa29ed), X(0x6099f505), X(0x542012e1), X(0x6078f344), + X(0x5445eedb), X(0x6057e2a2), X(0x546bbdd7), X(0x6036c325), + X(0x54917fce), X(0x601594d1), X(0x54b734ba), X(0x5ff457ad), + X(0x54dcdc96), X(0x5fd30bbc), X(0x5502775c), X(0x5fb1b104), + X(0x55280505), X(0x5f90478a), X(0x554d858d), X(0x5f6ecf53), + X(0x5572f8ed), X(0x5f4d4865), X(0x55985f20), X(0x5f2bb2c5), + X(0x55bdb81f), X(0x5f0a0e77), X(0x55e303e6), X(0x5ee85b82), + X(0x5608426e), X(0x5ec699e9), X(0x562d73b2), X(0x5ea4c9b3), + X(0x565297ab), X(0x5e82eae5), X(0x5677ae54), X(0x5e60fd84), + X(0x569cb7a8), X(0x5e3f0194), X(0x56c1b3a1), X(0x5e1cf71c), + X(0x56e6a239), X(0x5dfade20), X(0x570b8369), X(0x5dd8b6a7), + X(0x5730572e), X(0x5db680b4), X(0x57551d80), X(0x5d943c4e), + X(0x5779d65b), X(0x5d71e979), X(0x579e81b8), X(0x5d4f883b), + X(0x57c31f92), X(0x5d2d189a), X(0x57e7afe4), X(0x5d0a9a9a), + X(0x580c32a7), X(0x5ce80e41), X(0x5830a7d6), X(0x5cc57394), + X(0x58550f6c), X(0x5ca2ca99), X(0x58796962), X(0x5c801354), + X(0x589db5b3), X(0x5c5d4dcc), X(0x58c1f45b), X(0x5c3a7a05), + X(0x58e62552), X(0x5c179806), X(0x590a4893), X(0x5bf4a7d2), + X(0x592e5e19), X(0x5bd1a971), X(0x595265df), X(0x5bae9ce7), + X(0x59765fde), X(0x5b8b8239), X(0x599a4c12), X(0x5b68596d), + X(0x59be2a74), X(0x5b452288), X(0x59e1faff), X(0x5b21dd90), + X(0x5a05bdae), X(0x5afe8a8b), X(0x5a29727b), X(0x5adb297d), + X(0x5a4d1960), X(0x5ab7ba6c), X(0x5a70b258), X(0x5a943d5e), +}; diff --git a/ohos-specific/tremolo/Tremolo/misc.c b/ohos-specific/tremolo/Tremolo/misc.c new file mode 100644 index 0000000000..164250bc23 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/misc.c @@ -0,0 +1,229 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************/ + +#define HEAD_ALIGN 64 +#include <stdlib.h> +#include <string.h> +#include <stdio.h> +#define MISC_C +#include "misc.h" +//#include <sys/time.h> + +static void **pointers=NULL; +static long *insertlist=NULL; /* We can't embed this in the pointer list; + a pointer can have any value... */ + +static char **files=NULL; +static long *file_bytes=NULL; +static int filecount=0; + +static int ptop=0; +static int palloced=0; +static int pinsert=0; + +typedef struct { + char *file; + long line; + long ptr; + long bytes; +} head; + +long global_bytes=0; +long start_time=-1; + +static void *_insert(void *ptr,long bytes,char *file,long line){ + ((head *)ptr)->file=file; + ((head *)ptr)->line=line; + ((head *)ptr)->ptr=pinsert; + ((head *)ptr)->bytes=bytes-HEAD_ALIGN; + + if(pinsert>=palloced){ + palloced+=64; + if(pointers){ + pointers=(void **)realloc(pointers,sizeof(void **)*palloced); + insertlist=(long *)realloc(insertlist,sizeof(long *)*palloced); + }else{ + pointers=(void **)malloc(sizeof(void **)*palloced); + insertlist=(long *)malloc(sizeof(long *)*palloced); + } + } + + pointers[pinsert]=ptr; + + if(pinsert==ptop) + pinsert=++ptop; + else + pinsert=insertlist[pinsert]; + +#ifdef _VDBG_GRAPHFILE + { + FILE *out; + struct timeval tv; + static struct timezone tz; + int i; + char buffer[80]; + gettimeofday(&tv,&tz); + + for(i=0;i<filecount;i++) + if(!strcmp(file,files[i]))break; + + if(i==filecount){ + filecount++; + if(!files){ + files=malloc(filecount*sizeof(*files)); + file_bytes=malloc(filecount*sizeof(*file_bytes)); + }else{ + files=realloc(files,filecount*sizeof(*files)); + file_bytes=realloc(file_bytes,filecount*sizeof(*file_bytes)); + } + files[i]=strdup(file); + file_bytes[i]=0; + } + + file_bytes[i]+=bytes-HEAD_ALIGN; + + if(start_time==-1)start_time=(tv.tv_sec*1000)+(tv.tv_usec/1000); + + snprintf(buffer,80,"%s",file); + if(strchr(buffer,'.'))strchr(buffer,'.')[0]=0; + strcat(buffer,_VDBG_GRAPHFILE); + out=fopen(buffer,"a"); + fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), + file_bytes[i]-(bytes-HEAD_ALIGN)); + fprintf(out,"%ld, %ld # FILE %s LINE %ld\n", + -start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), + file_bytes[i],file,line); + fclose(out); + + out=fopen("total"_VDBG_GRAPHFILE,"a"); + fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), + global_bytes); + fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), + global_bytes+(bytes-HEAD_ALIGN)); + fclose(out); + } +#endif + + global_bytes+=(bytes-HEAD_ALIGN); + + return(void *)(((char *)ptr)+HEAD_ALIGN); +} + +static void _ripremove(void *ptr){ + int insert; + +#ifdef _VDBG_GRAPHFILE + { + FILE *out=fopen("total"_VDBG_GRAPHFILE,"a"); + struct timeval tv; + static struct timezone tz; + char buffer[80]; + char *file =((head *)ptr)->file; + long bytes =((head *)ptr)->bytes; + int i; + + gettimeofday(&tv,&tz); + fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), + global_bytes); + fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), + global_bytes-((head *)ptr)->bytes); + fclose(out); + + for(i=0;i<filecount;i++) + if(!strcmp(file,files[i]))break; + + snprintf(buffer,80,"%s",file); + if(strchr(buffer,'.'))strchr(buffer,'.')[0]=0; + strcat(buffer,_VDBG_GRAPHFILE); + out=fopen(buffer,"a"); + fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), + file_bytes[i]); + fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), + file_bytes[i]-bytes); + fclose(out); + + file_bytes[i]-=bytes; + + } +#endif + + global_bytes-=((head *)ptr)->bytes; + + insert=((head *)ptr)->ptr; + insertlist[insert]=pinsert; + pinsert=insert; + + if(pointers[insert]==NULL){ + fprintf(stderr,"DEBUGGING MALLOC ERROR: freeing previously freed memory\n"); + fprintf(stderr,"\t%s %ld\n",((head *)ptr)->file,((head *)ptr)->line); + } + + if(global_bytes<0){ + fprintf(stderr,"DEBUGGING MALLOC ERROR: freeing unmalloced memory\n"); + } + + pointers[insert]=NULL; +} + +void _VDBG_dump(void){ + int i; + for(i=0;i<ptop;i++){ + head *ptr=pointers[i]; + if(ptr) + fprintf(stderr,"unfreed bytes from %s:%ld\n", + ptr->file,ptr->line); + } + +} + +extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line){ + bytes+=HEAD_ALIGN; + if(ptr){ + ptr=(void *)(((char *)ptr)-HEAD_ALIGN); + _ripremove(ptr); + ptr=realloc(ptr,bytes); + }else{ + ptr=malloc(bytes); + memset(ptr,0,bytes); + } + return _insert(ptr,bytes,file,line); +} + +extern void _VDBG_free(void *ptr){ + if(ptr){ + ptr=(void *)(((char *)ptr)-HEAD_ALIGN); + _ripremove(ptr); + free(ptr); + } +} + diff --git a/ohos-specific/tremolo/Tremolo/misc.h b/ohos-specific/tremolo/Tremolo/misc.h new file mode 100644 index 0000000000..b75a6d829b --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/misc.h @@ -0,0 +1,213 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: miscellaneous math and prototypes + + ************************************************************************/ + +#ifndef _V_RANDOM_H_ +#define _V_RANDOM_H_ +#include "ivorbiscodec.h" +#include "os_types.h" + +/*#define _VDBG_GRAPHFILE "_0.m"*/ + + +#ifdef _VDBG_GRAPHFILE +extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line); +extern void _VDBG_free(void *ptr); + +#undef _ogg_malloc +#undef _ogg_calloc +#undef _ogg_realloc +#undef _ogg_free + +#define _ogg_malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__) +#define _ogg_calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__) +#define _ogg_realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__) +#define _ogg_free(x) _VDBG_free((x)) +#endif + +#include "asm_arm.h" + +#ifndef _V_WIDE_MATH +#define _V_WIDE_MATH + +#ifndef _LOW_ACCURACY_ +/* 64 bit multiply */ + +#include <endian.h> +#include <sys/types.h> + +#if BYTE_ORDER==LITTLE_ENDIAN +union magic { + struct { + ogg_int32_t lo; + ogg_int32_t hi; + } halves; + ogg_int64_t whole; +}; +#endif + +#if BYTE_ORDER==BIG_ENDIAN +union magic { + struct { + ogg_int32_t hi; + ogg_int32_t lo; + } halves; + ogg_int64_t whole; +}; +#endif + +static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { + union magic magic; + magic.whole = (ogg_int64_t)x * y; + return magic.halves.hi; +} + +static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { + return MULT32(x,y)<<1; +} + +static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { + union magic magic; + magic.whole = (ogg_int64_t)x * y; + return ((ogg_uint32_t)(magic.halves.lo)>>15) | ((magic.halves.hi)<<17); +} + +#else +/* 32 bit multiply, more portable but less accurate */ + +/* + * Note: Precision is biased towards the first argument therefore ordering + * is important. Shift values were chosen for the best sound quality after + * many listening tests. + */ + +/* + * For MULT32 and MULT31: The second argument is always a lookup table + * value already preshifted from 31 to 8 bits. We therefore take the + * opportunity to save on text space and use unsigned char for those + * tables in this case. + */ + +static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { + return (x >> 9) * y; /* y preshifted >>23 */ +} + +static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { + return (x >> 8) * y; /* y preshifted >>23 */ +} + +static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { + return (x >> 6) * y; /* y preshifted >>9 */ +} + +#endif + +/* + * This should be used as a memory barrier, forcing all cached values in + * registers to wr writen back to memory. Might or might not be beneficial + * depending on the architecture and compiler. + */ +#define MB() + +/* + * The XPROD functions are meant to optimize the cross products found all + * over the place in mdct.c by forcing memory operation ordering to avoid + * unnecessary register reloads as soon as memory is being written to. + * However this is only beneficial on CPUs with a sane number of general + * purpose registers which exclude the Intel x86. On Intel, better let the + * compiler actually reload registers directly from original memory by using + * macros. + */ + +#ifdef __i386__ + +#define XPROD32(_a, _b, _t, _v, _x, _y) \ + { *(_x)=MULT32(_a,_t)+MULT32(_b,_v); \ + *(_y)=MULT32(_b,_t)-MULT32(_a,_v); } +#define XPROD31(_a, _b, _t, _v, _x, _y) \ + { *(_x)=MULT31(_a,_t)+MULT31(_b,_v); \ + *(_y)=MULT31(_b,_t)-MULT31(_a,_v); } +#define XNPROD31(_a, _b, _t, _v, _x, _y) \ + { *(_x)=MULT31(_a,_t)-MULT31(_b,_v); \ + *(_y)=MULT31(_b,_t)+MULT31(_a,_v); } + +#else + +static inline void XPROD32(ogg_int32_t a, ogg_int32_t b, + ogg_int32_t t, ogg_int32_t v, + ogg_int32_t *x, ogg_int32_t *y) +{ + *x = MULT32(a, t) + MULT32(b, v); + *y = MULT32(b, t) - MULT32(a, v); +} + +static inline void XPROD31(ogg_int32_t a, ogg_int32_t b, + ogg_int32_t t, ogg_int32_t v, + ogg_int32_t *x, ogg_int32_t *y) +{ + *x = MULT31(a, t) + MULT31(b, v); + *y = MULT31(b, t) - MULT31(a, v); +} + +static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b, + ogg_int32_t t, ogg_int32_t v, + ogg_int32_t *x, ogg_int32_t *y) +{ + *x = MULT31(a, t) - MULT31(b, v); + *y = MULT31(b, t) + MULT31(a, v); +} + +#endif + +#endif + +#ifndef _V_CLIP_MATH +#define _V_CLIP_MATH + +static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) { + int ret=x; + ret-= ((x<=32767)-1)&(x-32767); + ret-= ((x>=-32768)-1)&(x+32768); + return(ret); +} + +#endif + +#endif + + + + diff --git a/ohos-specific/tremolo/Tremolo/ogg.h b/ohos-specific/tremolo/Tremolo/ogg.h new file mode 100644 index 0000000000..7f35bd4f0f --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/ogg.h @@ -0,0 +1,242 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: subsumed libogg includes + + ************************************************************************/ +#ifndef _OGG_H +#define _OGG_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "os_types.h" + +#ifndef ONLY_C +#define ARM_LITTLE_ENDIAN +#endif + +typedef struct ogg_buffer_state{ + struct ogg_buffer *unused_buffers; + struct ogg_reference *unused_references; + int outstanding; + int shutdown; +} ogg_buffer_state; + +typedef struct ogg_buffer { + unsigned char *data; + long size; + int refcount; + + union { + ogg_buffer_state *owner; + struct ogg_buffer *next; + } ptr; +} ogg_buffer; + +typedef struct ogg_reference { + ogg_buffer *buffer; + long begin; + long length; + + struct ogg_reference *next; +} ogg_reference; + +typedef struct oggpack_buffer { +#ifdef ARM_LITTLE_ENDIAN + int bitsLeftInSegment; + ogg_uint32_t *ptr; + long bitsLeftInWord; +#else + int headbit; + unsigned char *headptr; + long headend; +#endif /* ARM_LITTLE_ENDIAN */ + /* memory management */ + ogg_reference *head; + ogg_reference *tail; + + /* render the byte/bit counter API constant time */ + long count; /* doesn't count the tail */ +} oggpack_buffer; + +typedef struct oggbyte_buffer { + ogg_reference *baseref; + + ogg_reference *ref; + unsigned char *ptr; + long pos; + long end; +} oggbyte_buffer; + +typedef struct ogg_sync_state { + /* decode memory management pool */ + ogg_buffer_state *bufferpool; + + /* stream buffers */ + ogg_reference *fifo_head; + ogg_reference *fifo_tail; + long fifo_fill; + + /* stream sync management */ + int unsynced; + int headerbytes; + int bodybytes; + +} ogg_sync_state; + +typedef struct ogg_stream_state { + ogg_reference *header_head; + ogg_reference *header_tail; + ogg_reference *body_head; + ogg_reference *body_tail; + + int e_o_s; /* set when we have buffered the last + packet in the logical bitstream */ + int b_o_s; /* set after we've written the initial page + of a logical bitstream */ + long serialno; + long pageno; + ogg_int64_t packetno; /* sequence number for decode; the framing + knows where there's a hole in the data, + but we need coupling so that the codec + (which is in a seperate abstraction + layer) also knows about the gap */ + ogg_int64_t granulepos; + + int lacing_fill; + ogg_uint32_t body_fill; + + /* decode-side state data */ + int holeflag; + int spanflag; + int clearflag; + int laceptr; + ogg_uint32_t body_fill_next; + +} ogg_stream_state; + +typedef struct { + ogg_reference *packet; + long bytes; + long b_o_s; + long e_o_s; + ogg_int64_t granulepos; + ogg_int64_t packetno; /* sequence number for decode; the framing + knows where there's a hole in the data, + but we need coupling so that the codec + (which is in a seperate abstraction + layer) also knows about the gap */ +} ogg_packet; + +typedef struct { + ogg_reference *header; + int header_len; + ogg_reference *body; + long body_len; +} ogg_page; + +/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ + +extern void oggpack_readinit(oggpack_buffer *b,ogg_reference *r); +extern long oggpack_look(oggpack_buffer *b,int bits); +extern void oggpack_adv(oggpack_buffer *b,int bits); +extern long oggpack_read(oggpack_buffer *b,int bits); +extern long oggpack_bytes(oggpack_buffer *b); +extern long oggpack_bits(oggpack_buffer *b); +extern int oggpack_eop(oggpack_buffer *b); + +// Quick hack +#define oggpack_bytesleft(B) (((B)->bitsLeftInSegment+7)/8) + +/* Ogg BITSTREAM PRIMITIVES: decoding **************************/ + +extern void ogg_sync_init(ogg_sync_state *oy); +extern ogg_sync_state *ogg_sync_create(void); +extern int ogg_sync_clear(ogg_sync_state *oy); +extern int ogg_sync_destroy(ogg_sync_state *oy); +extern int ogg_sync_reset(ogg_sync_state *oy); + +extern unsigned char *ogg_sync_bufferin(ogg_sync_state *oy, long size); +extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes); +extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og); +extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og); +extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); +extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); +extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op); + +/* Ogg BITSTREAM PRIMITIVES: general ***************************/ + +extern void ogg_stream_init(ogg_stream_state *os, int serialno); +extern ogg_stream_state *ogg_stream_create(int serialno); +extern int ogg_stream_destroy(ogg_stream_state *os); +extern int ogg_stream_clear(ogg_stream_state *os); +extern int ogg_stream_reset(ogg_stream_state *os); +extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno); +extern int ogg_stream_eos(ogg_stream_state *os); + +extern int ogg_page_checksum_set(ogg_page *og); + +extern int ogg_page_version(ogg_page *og); +extern int ogg_page_continued(ogg_page *og); +extern int ogg_page_bos(ogg_page *og); +extern int ogg_page_eos(ogg_page *og); +extern ogg_int64_t ogg_page_granulepos(ogg_page *og); +extern ogg_uint32_t ogg_page_serialno(ogg_page *og); +extern ogg_uint32_t ogg_page_pageno(ogg_page *og); +extern int ogg_page_packets(ogg_page *og); +extern int ogg_page_getbuffer(ogg_page *og, unsigned char **buffer); + +extern int ogg_packet_release(ogg_packet *op); +extern int ogg_page_release(ogg_page *og); + +extern void ogg_page_dup(ogg_page *d, ogg_page *s); + +/* Ogg BITSTREAM PRIMITIVES: return codes ***************************/ + +#define OGG_SUCCESS 0 + +#define OGG_HOLE -10 +#define OGG_SPAN -11 +#define OGG_EVERSION -12 +#define OGG_ESERIAL -13 +#define OGG_EINVAL -14 +#define OGG_EEOS -15 + + +#ifdef __cplusplus +} +#endif + +#endif /* _OGG_H */ diff --git a/ohos-specific/tremolo/Tremolo/os.h b/ohos-specific/tremolo/Tremolo/os.h new file mode 100644 index 0000000000..ae9edd23a7 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/os.h @@ -0,0 +1,82 @@ +#ifndef _OS_H +#define _OS_H +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: #ifdef jail to whip a few platforms into the UNIX ideal. + + ************************************************************************/ + +#include <math.h> +#include "os_types.h" + +#ifndef _V_IFDEFJAIL_H_ +# define _V_IFDEFJAIL_H_ + +# ifdef __GNUC__ +# define STIN static __inline__ +# elif _WIN32 +# define STIN static __inline +# endif +#else +# define STIN static +#endif + +#ifndef M_PI +# define M_PI (3.1415926536f) +#endif + +#ifdef _WIN32 +# include <malloc.h> +# define rint(x) (floor((x)+0.5f)) +# define NO_FLOAT_MATH_LIB +# define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) +#endif + +#ifdef HAVE_ALLOCA_H +# include <alloca.h> +#endif + +#ifdef USE_MEMORY_H +# include <memory.h> +#endif + +#ifndef min +# define min(x,y) ((x)>(y)?(y):(x)) +#endif + +#ifndef max +# define max(x,y) ((x)<(y)?(y):(x)) +#endif + +#endif /* _OS_H */ diff --git a/ohos-specific/tremolo/Tremolo/os_types.h b/ohos-specific/tremolo/Tremolo/os_types.h new file mode 100644 index 0000000000..315227cfc3 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/os_types.h @@ -0,0 +1,124 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: #ifdef jail to whip a few platforms into the UNIX ideal. + + ************************************************************************/ +#ifndef _OS_TYPES_H +#define _OS_TYPES_H + +#ifdef _LOW_ACCURACY_ +# define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9)) +# define LOOKUP_T const unsigned char +#else +# define X(n) (n) +# define LOOKUP_T const ogg_int32_t +#endif + +/* make it easy on the folks that want to compile the libs with a + different malloc than stdlib */ +#define _ogg_malloc malloc +#define _ogg_calloc calloc +#define _ogg_realloc realloc +#define _ogg_free free + +#if defined (_WIN32_WCE) + + typedef unsigned short ogg_uint16_t; + typedef short ogg_int16_t; + typedef int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef __int64 ogg_int64_t; + + #define inline + +#elif defined(_WIN32) + +# ifndef __GNUC__ + /* MSVC/Borland */ + typedef __int64 ogg_int64_t; + typedef __int32 ogg_int32_t; + typedef unsigned __int32 ogg_uint32_t; + typedef __int16 ogg_int16_t; + typedef unsigned __int16 ogg_uint16_t; +# else + /* Cygwin */ + #include <_G_config.h> + typedef _G_int64_t ogg_int64_t; + typedef _G_int32_t ogg_int32_t; + typedef _G_uint32_t ogg_uint32_t; + typedef _G_int16_t ogg_int16_t; + typedef _G_uint16_t ogg_uint16_t; +# endif + +#elif defined(__MACOS__) + +# include <sys/types.h> + typedef SInt16 ogg_int16_t; + typedef UInt16 ogg_uint16_t; + typedef SInt32 ogg_int32_t; + typedef UInt32 ogg_uint32_t; + typedef SInt64 ogg_int64_t; + +#elif defined(__MACOSX__) /* MacOS X Framework build */ + +# include <sys/types.h> + typedef int16_t ogg_int16_t; + typedef u_int16_t ogg_uint16_t; + typedef int32_t ogg_int32_t; + typedef u_int32_t ogg_uint32_t; + typedef int64_t ogg_int64_t; + +#elif defined(__BEOS__) + + /* Be */ +# include <inttypes.h> + +#elif defined (__EMX__) + + /* OS/2 GCC */ + typedef short ogg_int16_t; + typedef unsigned short ogg_uint16_t; + typedef int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long ogg_int64_t; + +#else + +# include <sys/types.h> +# include "config_types.h" +# include <endian.h> + +#endif + +#endif /* _OS_TYPES_H */ diff --git a/ohos-specific/tremolo/Tremolo/res012.c b/ohos-specific/tremolo/Tremolo/res012.c new file mode 100644 index 0000000000..be279d036b --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/res012.c @@ -0,0 +1,247 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: residue backend 0, 1 and 2 implementation + + ************************************************************************/ + +#include <stdlib.h> +#include <string.h> +#include <math.h> +#include "ogg.h" +#include "ivorbiscodec.h" +#include "codec_internal.h" +#include "codebook.h" +#include "misc.h" +#include "os.h" + +void res_clear_info(vorbis_info_residue *info){ + if(info){ + if(info->stagemasks)_ogg_free(info->stagemasks); + if(info->stagebooks)_ogg_free(info->stagebooks); + memset(info,0,sizeof(*info)); + } +} + + +/* vorbis_info is for range checking */ +int res_unpack(vorbis_info_residue *info, + vorbis_info *vi,oggpack_buffer *opb){ + int j,k; + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + memset(info,0,sizeof(*info)); + + info->type=oggpack_read(opb,16); + if(info->type>2 || info->type<0)goto errout; + info->begin=oggpack_read(opb,24); + info->end=oggpack_read(opb,24); + info->grouping=oggpack_read(opb,24)+1; + info->partitions=(char)(oggpack_read(opb,6)+1); + info->groupbook=(unsigned char)oggpack_read(opb,8); + if(info->groupbook>=ci->books)goto errout; + + info->stagemasks=_ogg_malloc(info->partitions*sizeof(*info->stagemasks)); + info->stagebooks=_ogg_malloc(info->partitions*8*sizeof(*info->stagebooks)); + + for(j=0;j<info->partitions;j++){ + int cascade=oggpack_read(opb,3); + if(oggpack_read(opb,1)) + cascade|=(oggpack_read(opb,5)<<3); + info->stagemasks[j]=cascade; + } + + for(j=0;j<info->partitions;j++){ + for(k=0;k<8;k++){ + if((info->stagemasks[j]>>k)&1){ + unsigned char book=(unsigned char)oggpack_read(opb,8); + if(book>=ci->books)goto errout; + info->stagebooks[j*8+k]=book; + if(k+1>info->stages)info->stages=k+1; + }else + info->stagebooks[j*8+k]=0xff; + } + } + + if(oggpack_eop(opb))goto errout; + + return 0; + errout: + res_clear_info(info); + return 1; +} + +int res_inverse(vorbis_dsp_state *vd,vorbis_info_residue *info, + ogg_int32_t **in,int *nonzero,int ch){ + + int i,j,k,s,used=0; + codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup; + codebook *phrasebook=ci->book_param+info->groupbook; + int samples_per_partition=info->grouping; + int partitions_per_word=phrasebook->dim; + int pcmend=ci->blocksizes[vd->W]; + + if(info->type<2){ + int max=pcmend>>1; + int end=(info->end<max?info->end:max); + int n=end-info->begin; + + if(n>0){ + int partvals=n/samples_per_partition; + int partwords=(partvals+partitions_per_word-1)/partitions_per_word; + + for(i=0;i<ch;i++) + if(nonzero[i]) + in[used++]=in[i]; + ch=used; + + if(used){ + + char **partword=(char **)alloca(ch*sizeof(*partword)); + for(j=0;j<ch;j++) + partword[j]=(char *)alloca(partwords*partitions_per_word* + sizeof(*partword[j])); + + for(s=0;s<info->stages;s++){ + + for(i=0;i<partvals;){ + if(s==0){ + /* fetch the partition word for each channel */ + + partword[0][i+partitions_per_word-1]=1; + for(k=partitions_per_word-2;k>=0;k--) + partword[0][i+k]=partword[0][i+k+1]*info->partitions; + + for(j=1;j<ch;j++) + for(k=partitions_per_word-1;k>=0;k--) + partword[j][i+k]=partword[j-1][i+k]; + + for(j=0;j<ch;j++){ + int temp=vorbis_book_decode(phrasebook,&vd->opb); + if(temp==-1)goto eopbreak; + + /* this can be done quickly in assembly due to the quotient + always being at most six bits */ + for(k=0;k<partitions_per_word;k++){ + ogg_uint32_t div=partword[j][i+k]; + partword[j][i+k]=temp/div; + temp-=partword[j][i+k]*div; + } + + } + } + + /* now we decode residual values for the partitions */ + for(k=0;k<partitions_per_word && i<partvals;k++,i++) + for(j=0;j<ch;j++){ + long offset=info->begin+i*samples_per_partition; + int idx = (int)partword[j][i]; + if(idx < info->partitions && info->stagemasks[idx]&(1<<s)){ + codebook *stagebook=ci->book_param+ + info->stagebooks[(partword[j][i]<<3)+s]; + if(info->type){ + if(vorbis_book_decodev_add(stagebook,in[j]+offset,&vd->opb, + samples_per_partition,-8)==-1) + goto eopbreak; + }else{ + if(vorbis_book_decodevs_add(stagebook,in[j]+offset,&vd->opb, + samples_per_partition,-8)==-1) + goto eopbreak; + } + } + } + } + } + } + } + }else{ + int max=(pcmend*ch)>>1; + int end=(info->end<max?info->end:max); + int n=end-info->begin; + + if(n>0){ + int partvals=n/samples_per_partition; + int partwords=(partvals+partitions_per_word-1)/partitions_per_word; + + char *partword= + (char *)alloca(partwords*partitions_per_word*sizeof(*partword)); + int beginoff=info->begin/ch; + + for(i=0;i<ch;i++)if(nonzero[i])break; + if(i==ch)return(0); /* no nonzero vectors */ + + samples_per_partition/=ch; + + for(s=0;s<info->stages;s++){ + for(i=0;i<partvals;){ + + if(s==0){ + int temp; + partword[i+partitions_per_word-1]=1; + for(k=partitions_per_word-2;k>=0;k--) + partword[i+k]=partword[i+k+1]*info->partitions; + + /* fetch the partition word */ + temp=vorbis_book_decode(phrasebook,&vd->opb); + if(temp==-1)goto eopbreak; + + /* this can be done quickly in assembly due to the quotient + always being at most six bits */ + for(k=0;k<partitions_per_word;k++){ + ogg_uint32_t div=partword[i+k]; + partword[i+k]=temp/div; + temp-=partword[i+k]*div; + } + } + + /* now we decode residual values for the partitions */ + for(k=0;k<partitions_per_word && i<partvals;k++,i++){ + if(partword[i] >= 0 && partword[i] < info->partitions && + (info->stagemasks[(int)partword[i]] & (1 << s))){ + codebook *stagebook=ci->book_param+ + info->stagebooks[(partword[i]<<3)+s]; + if(vorbis_book_decodevv_add(stagebook,in, + i*samples_per_partition+beginoff,ch, + &vd->opb, + samples_per_partition,-8)==-1) + goto eopbreak; + } + } + } + } + } + } + eopbreak: + + return 0; +} + diff --git a/ohos-specific/tremolo/Tremolo/treminfo.c b/ohos-specific/tremolo/Tremolo/treminfo.c new file mode 100644 index 0000000000..4f7272869d --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/treminfo.c @@ -0,0 +1,395 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: maintain the info structure, info <-> header packets + + ************************************************************************/ + +/* general handling of the header and the vorbis_info structure (and + substructures) */ + +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include "ogg.h" +#include "ivorbiscodec.h" +#include "codec_internal.h" +#include "codebook.h" +#include "misc.h" +#include "os.h" + +/* helpers */ +static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){ + while(bytes--){ + *buf++=(char)oggpack_read(o,8); + } +} + +void vorbis_comment_init(vorbis_comment *vc){ + memset(vc,0,sizeof(*vc)); +} + +/* This is more or less the same as strncasecmp - but that doesn't exist + * everywhere, and this is a fairly trivial function, so we include it */ +static int tagcompare(const char *s1, const char *s2, int n){ + int c=0; + while(c < n){ + if(toupper(s1[c]) != toupper(s2[c])) + return !0; + c++; + } + return 0; +} + +char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count){ + long i; + int found = 0; + int taglen = strlen(tag)+1; /* +1 for the = we append */ + char *fulltag = (char *)alloca(taglen+ 1); + + strcpy(fulltag, tag); + strcat(fulltag, "="); + + for(i=0;i<vc->comments;i++){ + if(!tagcompare(vc->user_comments[i], fulltag, taglen)){ + if(count == found) + /* We return a pointer to the data, not a copy */ + return vc->user_comments[i] + taglen; + else + found++; + } + } + return NULL; /* didn't find anything */ +} + +int vorbis_comment_query_count(vorbis_comment *vc, char *tag){ + int i,count=0; + int taglen = strlen(tag)+1; /* +1 for the = we append */ + char *fulltag = (char *)alloca(taglen+1); + strcpy(fulltag,tag); + strcat(fulltag, "="); + + for(i=0;i<vc->comments;i++){ + if(!tagcompare(vc->user_comments[i], fulltag, taglen)) + count++; + } + + return count; +} + +void vorbis_comment_clear(vorbis_comment *vc){ + if(vc){ + long i; + for(i=0;i<vc->comments;i++) + if(vc->user_comments[i])_ogg_free(vc->user_comments[i]); + if(vc->user_comments)_ogg_free(vc->user_comments); + if(vc->comment_lengths)_ogg_free(vc->comment_lengths); + if(vc->vendor)_ogg_free(vc->vendor); + } + memset(vc,0,sizeof(*vc)); +} + +/* blocksize 0 is guaranteed to be short, 1 is guarantted to be long. + They may be equal, but short will never ge greater than long */ +int vorbis_info_blocksize(vorbis_info *vi,int zo){ + codec_setup_info *ci = (codec_setup_info *)vi->codec_setup; + return ci ? ci->blocksizes[zo] : -1; +} + +/* used by synthesis, which has a full, alloced vi */ +void vorbis_info_init(vorbis_info *vi){ + memset(vi,0,sizeof(*vi)); + vi->codec_setup=(codec_setup_info *)_ogg_calloc(1,sizeof(codec_setup_info)); +} + +void vorbis_info_clear(vorbis_info *vi){ + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + int i; + + if(ci){ + + if(ci->mode_param)_ogg_free(ci->mode_param); + + if(ci->map_param){ + for(i=0;i<ci->maps;i++) /* unpack does the range checking */ + mapping_clear_info(ci->map_param+i); + _ogg_free(ci->map_param); + } + + if(ci->floor_param){ + for(i=0;i<ci->floors;i++) /* unpack does the range checking */ + if(ci->floor_type[i]) + floor1_free_info(ci->floor_param[i]); + else + floor0_free_info(ci->floor_param[i]); + _ogg_free(ci->floor_param); + _ogg_free(ci->floor_type); + } + + if(ci->residue_param){ + for(i=0;i<ci->residues;i++) /* unpack does the range checking */ + res_clear_info(ci->residue_param+i); + _ogg_free(ci->residue_param); + } + + if(ci->book_param){ + for(i=0;i<ci->books;i++) + vorbis_book_clear(ci->book_param+i); + _ogg_free(ci->book_param); + } + + _ogg_free(ci); + } + + memset(vi,0,sizeof(*vi)); +} + +/* Header packing/unpacking ********************************************/ + +int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){ + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + if(!ci)return(OV_EFAULT); + + vi->version=oggpack_read(opb,32); + if(vi->version!=0)return(OV_EVERSION); + + vi->channels=oggpack_read(opb,8); + vi->rate=oggpack_read(opb,32); + + vi->bitrate_upper=oggpack_read(opb,32); + vi->bitrate_nominal=oggpack_read(opb,32); + vi->bitrate_lower=oggpack_read(opb,32); + + ci->blocksizes[0]=1<<oggpack_read(opb,4); + ci->blocksizes[1]=1<<oggpack_read(opb,4); + +#ifdef LIMIT_TO_64kHz + if(vi->rate>=64000 || ci->blocksizes[1]>4096)goto err_out; +#else + if(vi->rate<64000 && ci->blocksizes[1]>4096)goto err_out; +#endif + + if(vi->rate<1)goto err_out; + if(vi->channels<1)goto err_out; + if(ci->blocksizes[0]<64)goto err_out; + if(ci->blocksizes[1]<ci->blocksizes[0])goto err_out; + if(ci->blocksizes[1]>8192)goto err_out; + + if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ + + return(0); + err_out: + vorbis_info_clear(vi); + return(OV_EBADHEADER); +} + +int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){ + int i; + int vendorlen=oggpack_read(opb,32); + if(vendorlen<0)goto err_out; + vc->vendor=(char *)_ogg_calloc(vendorlen+1,1); + if(!vc->vendor)goto err_out; + _v_readstring(opb,vc->vendor,vendorlen); + vc->comments=oggpack_read(opb,32); + if(vc->comments<0)goto err_out; + vc->user_comments=(char **)_ogg_calloc(vc->comments+1,sizeof(*vc->user_comments)); + if (!vc->user_comments){ + vc->comments=0; + goto err_out; + } + vc->comment_lengths=(int *)_ogg_calloc(vc->comments+1, sizeof(*vc->comment_lengths)); + if (!vc->comment_lengths)goto err_out; + + for(i=0;i<vc->comments;i++){ + int len=oggpack_read(opb,32); + if(len<0)goto err_out; + vc->comment_lengths[i]=len; + vc->user_comments[i]=(char *)_ogg_calloc(len+1,1); + if(!vc->user_comments[i])goto err_out; + _v_readstring(opb,vc->user_comments[i],len); + } + if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ + + return(0); + err_out: + vorbis_comment_clear(vc); + return(OV_EBADHEADER); +} + +/* all of the real encoding details are here. The modes, books, + everything */ +int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){ + codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; + int i; + if(!ci)return(OV_EFAULT); + + /* codebooks */ + ci->books=oggpack_read(opb,8)+1; + ci->book_param=(codebook *)_ogg_calloc(ci->books,sizeof(*ci->book_param)); + if(!ci->book_param){ + ci->books=0; + goto err_out; + } + for(i=0;i<ci->books;i++) + if(vorbis_book_unpack(opb,ci->book_param+i))goto err_out; + + /* time backend settings, not actually used */ + i=oggpack_read(opb,6); + for(;i>=0;i--) + if(oggpack_read(opb,16)!=0)goto err_out; + + /* floor backend settings */ + ci->floors=oggpack_read(opb,6)+1; + ci->floor_param=_ogg_calloc(ci->floors, sizeof(*ci->floor_param)); + ci->floor_type=_ogg_calloc(ci->floors, sizeof(*ci->floor_type)); + if(!ci->floor_param || !ci->floor_type){ + ci->floors=0; + goto err_out; + } + for(i=0;i<ci->floors;i++){ + ci->floor_type[i]=(char)oggpack_read(opb,16); + if(ci->floor_type[i]<0 || ci->floor_type[i]>=VI_FLOORB)goto err_out; + if(ci->floor_type[i]) + ci->floor_param[i]=floor1_info_unpack(vi,opb); + else + ci->floor_param[i]=floor0_info_unpack(vi,opb); + if(!ci->floor_param[i])goto err_out; + } + + /* residue backend settings */ + ci->residues=oggpack_read(opb,6)+1; + ci->residue_param=_ogg_calloc(ci->residues, sizeof(*ci->residue_param)); + if (!ci->residue_param){ + ci->residues=0; + goto err_out; + } + for(i=0;i<ci->residues;i++) + if(res_unpack(ci->residue_param+i,vi,opb))goto err_out; + + /* map backend settings */ + ci->maps=oggpack_read(opb,6)+1; + ci->map_param=_ogg_calloc(ci->maps, sizeof(*ci->map_param)); + if (!ci->map_param){ + ci->maps=0; + goto err_out; + } + for(i=0;i<ci->maps;i++){ + if(oggpack_read(opb,16)!=0)goto err_out; + if(mapping_info_unpack(ci->map_param+i,vi,opb))goto err_out; + } + + /* mode settings */ + ci->modes=oggpack_read(opb,6)+1; + ci->mode_param= + (vorbis_info_mode *)_ogg_calloc(ci->modes, sizeof(*ci->mode_param)); + if (!ci->mode_param){ + ci->modes=0; + goto err_out; + } + for(i=0;i<ci->modes;i++){ + ci->mode_param[i].blockflag=(unsigned char)oggpack_read(opb,1); + if(oggpack_read(opb,16))goto err_out; + if(oggpack_read(opb,16))goto err_out; + ci->mode_param[i].mapping=(unsigned char)oggpack_read(opb,8); + if(ci->mode_param[i].mapping>=ci->maps)goto err_out; + } + + if(oggpack_read(opb,1)!=1)goto err_out; /* top level EOP check */ + + return(0); + err_out: + vorbis_info_clear(vi); + return(OV_EBADHEADER); +} + +/* The Vorbis header is in three packets; the initial small packet in + the first page that identifies basic parameters, a second packet + with bitstream comments and a third packet that holds the + codebook. */ + +int vorbis_dsp_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op){ + oggpack_buffer opb; + + if(op){ + oggpack_readinit(&opb,op->packet); + + /* Which of the three types of header is this? */ + /* Also verify header-ness, vorbis */ + { + char buffer[6]; + int packtype=oggpack_read(&opb,8); + memset(buffer,0,6); + _v_readstring(&opb,buffer,6); + if(memcmp(buffer,"vorbis",6)){ + /* not a vorbis header */ + return(OV_ENOTVORBIS); + } + switch(packtype){ + case 0x01: /* least significant *bit* is read first */ + if(!op->b_o_s){ + /* Not the initial packet */ + return(OV_EBADHEADER); + } + if(vi->rate!=0){ + /* previously initialized info header */ + return(OV_EBADHEADER); + } + + return(_vorbis_unpack_info(vi,&opb)); + + case 0x03: /* least significant *bit* is read first */ + if(vi->rate==0){ + /* um... we didn't get the initial header */ + return(OV_EBADHEADER); + } + + return(_vorbis_unpack_comment(vc,&opb)); + + case 0x05: /* least significant *bit* is read first */ + if(vi->rate==0 || vc->vendor==NULL){ + /* um... we didn;t get the initial header or comments yet */ + return(OV_EBADHEADER); + } + + return(_vorbis_unpack_books(vi,&opb)); + + default: + /* Not a valid vorbis header type */ + return(OV_EBADHEADER); + break; + } + } + } + return(OV_EBADHEADER); +} + diff --git a/ohos-specific/tremolo/Tremolo/vorbisfile.c b/ohos-specific/tremolo/Tremolo/vorbisfile.c new file mode 100644 index 0000000000..f896b43f60 --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/vorbisfile.c @@ -0,0 +1,1612 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: stdio-based convenience library for opening/seeking/decoding + last mod: $Id: vorbisfile.c,v 1.6.2.5 2003/11/20 06:16:17 xiphmont Exp $ + + ************************************************************************/ + +#include <stdlib.h> +#include <stdio.h> +//#include <gerrno.h> +#include <string.h> +#include <math.h> + +#include "codec_internal.h" +#include "ivorbisfile.h" + +#include "os.h" +#include "misc.h" + +int gerrno; + +#define NOTOPEN 0 +#define PARTOPEN 1 +#define OPENED 2 +#define STREAMSET 3 /* serialno and link set, but not to current link */ +#define LINKSET 4 /* serialno and link set to current link */ +#define INITSET 5 + +/* A 'chained bitstream' is a Vorbis bitstream that contains more than + one logical bitstream arranged end to end (the only form of Ogg + multiplexing allowed in a Vorbis bitstream; grouping [parallel + multiplexing] is not allowed in Vorbis) */ + +/* A Vorbis file can be played beginning to end (streamed) without + worrying ahead of time about chaining (see decoder_example.c). If + we have the whole file, however, and want random access + (seeking/scrubbing) or desire to know the total length/time of a + file, we need to account for the possibility of chaining. */ + +/* We can handle things a number of ways; we can determine the entire + bitstream structure right off the bat, or find pieces on demand. + This example determines and caches structure for the entire + bitstream, but builds a virtual decoder on the fly when moving + between links in the chain. */ + +/* There are also different ways to implement seeking. Enough + information exists in an Ogg bitstream to seek to + sample-granularity positions in the output. Or, one can seek by + picking some portion of the stream roughly in the desired area if + we only want coarse navigation through the stream. */ + +/************************************************************************* + * Many, many internal helpers. The intention is not to be confusing; + * rampant duplication and monolithic function implementation would be + * harder to understand anyway. The high level functions are last. Begin + * grokking near the end of the file */ + + +/* read a little more data from the file/pipe into the ogg_sync framer */ +static long _get_data(OggVorbis_File *vf){ + gerrno=0; + if(vf->datasource){ + unsigned char *buffer=ogg_sync_bufferin(vf->oy,CHUNKSIZE); + long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource); + if(bytes>0)ogg_sync_wrote(vf->oy,bytes); + if(bytes==0 && gerrno)return -1; + return bytes; + }else + return 0; +} + +/* save a tiny smidge of verbosity to make the code more readable */ +static void _seek_helper(OggVorbis_File *vf,ogg_int64_t offset){ + if(vf->datasource){ + (vf->callbacks.seek_func)(vf->datasource, offset, SEEK_SET); + vf->offset=offset; + ogg_sync_reset(vf->oy); + }else{ + /* shouldn't happen unless someone writes a broken callback */ + return; + } +} + +/* The read/seek functions track absolute position within the stream */ + +/* from the head of the stream, get the next page. boundary specifies + if the function is allowed to fetch more data from the stream (and + how much) or only use internally buffered data. + + boundary: -1) unbounded search + 0) read no additional data; use cached only + n) search for a new page beginning for n bytes + + return: <0) did not find a page (OV_FALSE, OV_EOF, OV_EREAD) + n) found a page at absolute offset n + + produces a refcounted page */ + +static ogg_int64_t _get_next_page(OggVorbis_File *vf,ogg_page *og, + ogg_int64_t boundary){ + if(boundary>0)boundary+=vf->offset; + while(1){ + long more; + + if(boundary>0 && vf->offset>=boundary)return OV_FALSE; + more=ogg_sync_pageseek(vf->oy,og); + + if(more<0){ + /* skipped n bytes */ + vf->offset-=more; + }else{ + if(more==0){ + /* send more paramedics */ + if(!boundary)return OV_FALSE; + { + long ret=_get_data(vf); + if(ret==0)return OV_EOF; + if(ret<0)return OV_EREAD; + } + }else{ + /* got a page. Return the offset at the page beginning, + advance the internal offset past the page end */ + ogg_int64_t ret=vf->offset; + vf->offset+=more; + return ret; + + } + } + } +} + +/* find the latest page beginning before the current stream cursor + position. Much dirtier than the above as Ogg doesn't have any + backward search linkage. no 'readp' as it will certainly have to + read. */ +/* returns offset or OV_EREAD, OV_FAULT and produces a refcounted page */ + +static ogg_int64_t _get_prev_page(OggVorbis_File *vf,ogg_page *og){ + ogg_int64_t begin=vf->offset; + ogg_int64_t end=begin; + ogg_int64_t ret; + ogg_int64_t offset=-1; + + while(offset==-1){ + begin-=CHUNKSIZE; + if(begin<0) + begin=0; + _seek_helper(vf,begin); + while(vf->offset<end){ + ret=_get_next_page(vf,og,end-vf->offset); + if(ret==OV_EREAD)return OV_EREAD; + if(ret<0){ + break; + }else{ + offset=ret; + } + } + } + + /* we have the offset. Actually snork and hold the page now */ + _seek_helper(vf,offset); + ret=_get_next_page(vf,og,CHUNKSIZE); + if(ret<0) + /* this shouldn't be possible */ + return OV_EFAULT; + + return offset; +} + +/* finds each bitstream link one at a time using a bisection search + (has to begin by knowing the offset of the lb's initial page). + Recurses for each link so it can alloc the link storage after + finding them all, then unroll and fill the cache at the same time */ +static int _bisect_forward_serialno(OggVorbis_File *vf, + ogg_int64_t begin, + ogg_int64_t searched, + ogg_int64_t end, + ogg_uint32_t currentno, + long m){ + ogg_int64_t endsearched=end; + ogg_int64_t next=end; + ogg_page og={0,0,0,0}; + ogg_int64_t ret; + + /* the below guards against garbage seperating the last and + first pages of two links. */ + while(searched<endsearched){ + ogg_int64_t bisect; + + if(endsearched-searched<CHUNKSIZE){ + bisect=searched; + }else{ + bisect=(searched+endsearched)/2; + } + + _seek_helper(vf,bisect); + ret=_get_next_page(vf,&og,-1); + if(ret==OV_EREAD)return OV_EREAD; + if(ret<0 || ogg_page_serialno(&og)!=currentno){ + endsearched=bisect; + if(ret>=0)next=ret; + }else{ + searched=ret+og.header_len+og.body_len; + } + ogg_page_release(&og); + } + + _seek_helper(vf,next); + ret=_get_next_page(vf,&og,-1); + if(ret==OV_EREAD)return OV_EREAD; + + if(searched>=end || ret<0){ + ogg_page_release(&og); + vf->links=m+1; + vf->offsets=_ogg_malloc((vf->links+1)*sizeof(*vf->offsets)); + vf->serialnos=_ogg_malloc(vf->links*sizeof(*vf->serialnos)); + vf->offsets[m+1]=searched; + }else{ + ret=_bisect_forward_serialno(vf,next,vf->offset, + end,ogg_page_serialno(&og),m+1); + ogg_page_release(&og); + if(ret==OV_EREAD)return OV_EREAD; + } + + vf->offsets[m]=begin; + vf->serialnos[m]=currentno; + return 0; +} + +static int _decode_clear(OggVorbis_File *vf){ + if(vf->ready_state==INITSET){ + vorbis_dsp_destroy(vf->vd); + vf->vd=0; + vf->ready_state=STREAMSET; + } + + if(vf->ready_state>=STREAMSET){ + vorbis_info_clear(&vf->vi); + vorbis_comment_clear(&vf->vc); + vf->ready_state=OPENED; + } + return 0; +} + +/* uses the local ogg_stream storage in vf; this is important for + non-streaming input sources */ +/* consumes the page that's passed in (if any) */ +/* state is LINKSET upon successful return */ + +static int _fetch_headers(OggVorbis_File *vf, + vorbis_info *vi, + vorbis_comment *vc, + ogg_uint32_t *serialno, + ogg_page *og_ptr){ + ogg_page og={0,0,0,0}; + ogg_packet op={0,0,0,0,0,0}; + int i,ret; + + if(vf->ready_state>OPENED)_decode_clear(vf); + + if(!og_ptr){ + ogg_int64_t llret=_get_next_page(vf,&og,CHUNKSIZE); + if(llret==OV_EREAD)return OV_EREAD; + if(llret<0)return OV_ENOTVORBIS; + og_ptr=&og; + } + + ogg_stream_reset_serialno(vf->os,ogg_page_serialno(og_ptr)); + if(serialno)*serialno=vf->os->serialno; + + /* extract the initial header from the first page and verify that the + Ogg bitstream is in fact Vorbis data */ + + vorbis_info_init(vi); + vorbis_comment_init(vc); + + i=0; + while(i<3){ + ogg_stream_pagein(vf->os,og_ptr); + while(i<3){ + int result=ogg_stream_packetout(vf->os,&op); + if(result==0)break; + if(result==-1){ + ret=OV_EBADHEADER; + goto bail_header; + } + if((ret=vorbis_dsp_headerin(vi,vc,&op))){ + goto bail_header; + } + i++; + } + if(i<3) + if(_get_next_page(vf,og_ptr,CHUNKSIZE)<0){ + ret=OV_EBADHEADER; + goto bail_header; + } + } + + ogg_packet_release(&op); + ogg_page_release(&og); + vf->ready_state=LINKSET; + return 0; + + bail_header: + ogg_packet_release(&op); + ogg_page_release(&og); + vorbis_info_clear(vi); + vorbis_comment_clear(vc); + vf->ready_state=OPENED; + + return ret; +} + +/* we no longer preload all vorbis_info (and the associated + codec_setup) structs. Call this to seek and fetch the info from + the bitstream, if needed */ +static int _set_link_number(OggVorbis_File *vf,int link){ + if(link != vf->current_link) _decode_clear(vf); + if(vf->ready_state<STREAMSET){ + _seek_helper(vf,vf->offsets[link]); + ogg_stream_reset_serialno(vf->os,vf->serialnos[link]); + vf->current_serialno=vf->serialnos[link]; + vf->current_link=link; + return _fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,NULL); + } + return 0; +} + +static int _set_link_number_preserve_pos(OggVorbis_File *vf,int link){ + ogg_int64_t pos=vf->offset; + int ret=_set_link_number(vf,link); + if(ret)return ret; + _seek_helper(vf,pos); + if(pos<vf->offsets[link] || pos>=vf->offsets[link+1]) + vf->ready_state=STREAMSET; + return 0; +} + +/* last step of the OggVorbis_File initialization; get all the offset + positions. Only called by the seekable initialization (local + stream storage is hacked slightly; pay attention to how that's + done) */ + +/* this is void and does not propogate errors up because we want to be + able to open and use damaged bitstreams as well as we can. Just + watch out for missing information for links in the OggVorbis_File + struct */ +static void _prefetch_all_offsets(OggVorbis_File *vf, ogg_int64_t dataoffset){ + ogg_page og={0,0,0,0}; + int i; + ogg_int64_t ret; + + vf->dataoffsets=_ogg_malloc(vf->links*sizeof(*vf->dataoffsets)); + vf->pcmlengths=_ogg_malloc(vf->links*2*sizeof(*vf->pcmlengths)); + + for(i=0;i<vf->links;i++){ + if(i==0){ + /* we already grabbed the initial header earlier. Just set the offset */ + vf->dataoffsets[i]=dataoffset; + _seek_helper(vf,dataoffset); + + }else{ + + /* seek to the location of the initial header */ + + _seek_helper(vf,vf->offsets[i]); + if(_fetch_headers(vf,&vf->vi,&vf->vc,NULL,NULL)<0){ + vf->dataoffsets[i]=-1; + }else{ + vf->dataoffsets[i]=vf->offset; + } + } + + /* fetch beginning PCM offset */ + + if(vf->dataoffsets[i]!=-1){ + ogg_int64_t accumulated=0,pos; + long lastblock=-1; + int result; + + ogg_stream_reset_serialno(vf->os,vf->serialnos[i]); + + while(1){ + ogg_packet op={0,0,0,0,0,0}; + + ret=_get_next_page(vf,&og,-1); + if(ret<0) + /* this should not be possible unless the file is + truncated/mangled */ + break; + + if(ogg_page_serialno(&og)!=vf->serialnos[i]) + break; + + pos=ogg_page_granulepos(&og); + + /* count blocksizes of all frames in the page */ + ogg_stream_pagein(vf->os,&og); + while((result=ogg_stream_packetout(vf->os,&op))){ + if(result>0){ /* ignore holes */ + long thisblock=vorbis_packet_blocksize(&vf->vi,&op); + if(lastblock!=-1) + accumulated+=(lastblock+thisblock)>>2; + lastblock=thisblock; + } + } + ogg_packet_release(&op); + + if(pos!=-1){ + /* pcm offset of last packet on the first audio page */ + accumulated= pos-accumulated; + break; + } + } + + /* less than zero? This is a stream with samples trimmed off + the beginning, a normal occurrence; set the offset to zero */ + if(accumulated<0)accumulated=0; + + vf->pcmlengths[i*2]=accumulated; + } + + /* get the PCM length of this link. To do this, + get the last page of the stream */ + { + ogg_int64_t end=vf->offsets[i+1]; + _seek_helper(vf,end); + + while(1){ + ret=_get_prev_page(vf,&og); + if(ret<0){ + /* this should not be possible */ + vorbis_info_clear(&vf->vi); + vorbis_comment_clear(&vf->vc); + break; + } + if(ogg_page_granulepos(&og)!=-1){ + vf->pcmlengths[i*2+1]=ogg_page_granulepos(&og)-vf->pcmlengths[i*2]; + break; + } + vf->offset=ret; + } + } + } + ogg_page_release(&og); +} + +static int _make_decode_ready(OggVorbis_File *vf){ + int i; + switch(vf->ready_state){ + case OPENED: + case STREAMSET: + for(i=0;i<vf->links;i++) + if(vf->offsets[i+1]>=vf->offset)break; + if(i==vf->links)return -1; + i=_set_link_number_preserve_pos(vf,i); + if(i)return i; + /* fall through */ + case LINKSET: + vf->vd=vorbis_dsp_create(&vf->vi); + vf->ready_state=INITSET; + vf->bittrack=0; + vf->samptrack=0; + case INITSET: + return 0; + default: + return -1; + } + +} + +static int _open_seekable2(OggVorbis_File *vf){ + ogg_uint32_t serialno=vf->current_serialno; + ogg_uint32_t tempserialno; + ogg_int64_t dataoffset=vf->offset, end; + ogg_page og={0,0,0,0}; + + /* we're partially open and have a first link header state in + storage in vf */ + /* we can seek, so set out learning all about this file */ + (vf->callbacks.seek_func)(vf->datasource,0,SEEK_END); + vf->offset=vf->end=(vf->callbacks.tell_func)(vf->datasource); + + /* We get the offset for the last page of the physical bitstream. + Most OggVorbis files will contain a single logical bitstream */ + end=_get_prev_page(vf,&og); + if(end<0)return (int)end; + + /* more than one logical bitstream? */ + tempserialno=ogg_page_serialno(&og); + ogg_page_release(&og); + + if(tempserialno!=serialno){ + + /* Chained bitstream. Bisect-search each logical bitstream + section. Do so based on serial number only */ + if(_bisect_forward_serialno(vf,0,0,end+1,serialno,0)<0)return OV_EREAD; + + }else{ + + /* Only one logical bitstream */ + if(_bisect_forward_serialno(vf,0,end,end+1,serialno,0))return OV_EREAD; + + } + + /* the initial header memory is referenced by vf after; don't free it */ + _prefetch_all_offsets(vf,dataoffset); + return ov_raw_seek(vf,0); +} + +/* fetch and process a packet. Handles the case where we're at a + bitstream boundary and dumps the decoding machine. If the decoding + machine is unloaded, it loads it. It also keeps pcm_offset up to + date (seek and read both use this. seek uses a special hack with + readp). + + return: <0) error, OV_HOLE (lost packet) or OV_EOF + 0) need more data (only if readp==0) + 1) got a packet +*/ + +static int _fetch_and_process_packet(OggVorbis_File *vf, + int readp, + int spanp){ + ogg_page og={0,0,0,0}; + ogg_packet op={0,0,0,0,0,0}; + int ret=0; + + /* handle one packet. Try to fetch it from current stream state */ + /* extract packets from page */ + while(1){ + + /* process a packet if we can. If the machine isn't loaded, + neither is a page */ + if(vf->ready_state==INITSET){ + while(1) { + int result=ogg_stream_packetout(vf->os,&op); + ogg_int64_t granulepos; + + if(result<0){ + ret=OV_HOLE; /* hole in the data. */ + goto cleanup; + } + if(result>0){ + /* got a packet. process it */ + granulepos=op.granulepos; + if(!vorbis_dsp_synthesis(vf->vd,&op,1)){ /* lazy check for lazy + header handling. The + header packets aren't + audio, so if/when we + submit them, + vorbis_synthesis will + reject them */ + + vf->samptrack+=vorbis_dsp_pcmout(vf->vd,NULL,0); + vf->bittrack+=op.bytes*8; + + /* update the pcm offset. */ + if(granulepos!=-1 && !op.e_o_s){ + int link=(vf->seekable?vf->current_link:0); + int i,samples; + + /* this packet has a pcm_offset on it (the last packet + completed on a page carries the offset) After processing + (above), we know the pcm position of the *last* sample + ready to be returned. Find the offset of the *first* + + As an aside, this trick is inaccurate if we begin + reading anew right at the last page; the end-of-stream + granulepos declares the last frame in the stream, and the + last packet of the last page may be a partial frame. + So, we need a previous granulepos from an in-sequence page + to have a reference point. Thus the !op.e_o_s clause + above */ + + if(vf->seekable && link>0) + granulepos-=vf->pcmlengths[link*2]; + if(granulepos<0)granulepos=0; /* actually, this + shouldn't be possible + here unless the stream + is very broken */ + + samples=vorbis_dsp_pcmout(vf->vd,NULL,0); + + granulepos-=samples; + for(i=0;i<link;i++) + granulepos+=vf->pcmlengths[i*2+1]; + vf->pcm_offset=granulepos; + } + ret=1; + goto cleanup; + } + } + else + break; + } + } + + if(vf->ready_state>=OPENED){ + int ret; + if(!readp){ + ret=0; + goto cleanup; + } + ret=(int)_get_next_page(vf,&og,-1); + if(ret<0){ + ret=OV_EOF; /* eof. leave unitialized */ + goto cleanup; + } + + /* bitrate tracking; add the header's bytes here, the body bytes + are done by packet above */ + vf->bittrack+=og.header_len*8; + + /* has our decoding just traversed a bitstream boundary? */ + if(vf->ready_state==INITSET){ + if(vf->current_serialno!=ogg_page_serialno(&og)){ + if(!spanp){ + ret=OV_EOF; + goto cleanup; + } + + _decode_clear(vf); + } + } + } + + /* Do we need to load a new machine before submitting the page? */ + /* This is different in the seekable and non-seekable cases. + + In the seekable case, we already have all the header + information loaded and cached; we just initialize the machine + with it and continue on our merry way. + + In the non-seekable (streaming) case, we'll only be at a + boundary if we just left the previous logical bitstream and + we're now nominally at the header of the next bitstream + */ + + if(vf->ready_state!=INITSET){ + int link,ret; + + if(vf->ready_state<STREAMSET){ + if(vf->seekable){ + vf->current_serialno=ogg_page_serialno(&og); + + /* match the serialno to bitstream section. We use this rather than + offset positions to avoid problems near logical bitstream + boundaries */ + for(link=0;link<vf->links;link++) + if(vf->serialnos[link]==vf->current_serialno)break; + if(link==vf->links){ + ret=OV_EBADLINK; /* sign of a bogus stream. error out, + leave machine uninitialized */ + goto cleanup; + } + + vf->current_link=link; + ret=_fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,&og); + if(ret) goto cleanup; + + }else{ + /* we're streaming */ + /* fetch the three header packets, build the info struct */ + + int ret=_fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,&og); + if(ret) goto cleanup; + vf->current_link++; + } + } + + if(_make_decode_ready(vf)) return OV_EBADLINK; + } + ogg_stream_pagein(vf->os,&og); + } + cleanup: + ogg_packet_release(&op); + ogg_page_release(&og); + return ret; +} + +/* if, eg, 64 bit stdio is configured by default, this will build with + fseek64 */ +static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){ + if(f==NULL)return -1; + return fseek(f,(long)off,whence); +} + +static int _ov_open1(void *f,OggVorbis_File *vf,char *initial, + long ibytes, ov_callbacks callbacks){ + int offsettest=(f?callbacks.seek_func(f,0,SEEK_CUR):-1); + int ret; + + memset(vf,0,sizeof(*vf)); + + /* Tremor assumes in multiple places that right shift of a signed + integer is an arithmetic shift */ + if( (-1>>1) != -1) return OV_EIMPL; + + vf->datasource=f; + vf->callbacks = callbacks; + + /* init the framing state */ + vf->oy=ogg_sync_create(); + + /* perhaps some data was previously read into a buffer for testing + against other stream types. Allow initialization from this + previously read data (as we may be reading from a non-seekable + stream) */ + if(initial){ + unsigned char *buffer=ogg_sync_bufferin(vf->oy,ibytes); + memcpy(buffer,initial,ibytes); + ogg_sync_wrote(vf->oy,ibytes); + } + + /* can we seek? Stevens suggests the seek test was portable */ + if(offsettest!=-1)vf->seekable=1; + + /* No seeking yet; Set up a 'single' (current) logical bitstream + entry for partial open */ + vf->links=1; + vf->os=ogg_stream_create(-1); /* fill in the serialno later */ + + /* Try to fetch the headers, maintaining all the storage */ + if((ret=_fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,NULL))<0){ + vf->datasource=NULL; + ov_clear(vf); + }else if(vf->ready_state < PARTOPEN) + vf->ready_state=PARTOPEN; + return ret; +} + +static int _ov_open2(OggVorbis_File *vf){ + if(vf->ready_state < OPENED) + vf->ready_state=OPENED; + if(vf->seekable){ + int ret=_open_seekable2(vf); + if(ret){ + vf->datasource=NULL; + ov_clear(vf); + } + return ret; + } + return 0; +} + + +/* clear out the OggVorbis_File struct */ +int ov_clear(OggVorbis_File *vf){ + if(vf){ + vorbis_dsp_destroy(vf->vd); + vf->vd=0; + ogg_stream_destroy(vf->os); + vorbis_info_clear(&vf->vi); + vorbis_comment_clear(&vf->vc); + if(vf->dataoffsets)_ogg_free(vf->dataoffsets); + if(vf->pcmlengths)_ogg_free(vf->pcmlengths); + if(vf->serialnos)_ogg_free(vf->serialnos); + if(vf->offsets)_ogg_free(vf->offsets); + ogg_sync_destroy(vf->oy); + + if(vf->datasource)(vf->callbacks.close_func)(vf->datasource); + memset(vf,0,sizeof(*vf)); + } +#ifdef DEBUG_LEAKS + _VDBG_dump(); +#endif + return 0; +} + +/* inspects the OggVorbis file and finds/documents all the logical + bitstreams contained in it. Tries to be tolerant of logical + bitstream sections that are truncated/woogie. + + return: -1) error + 0) OK +*/ + +int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, + ov_callbacks callbacks){ + int ret=_ov_open1(f,vf,initial,ibytes,callbacks); + if(ret)return ret; + return _ov_open2(vf); +} + +int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){ + ov_callbacks callbacks = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, + (int (*)(void *)) fclose, + (long (*)(void *)) ftell + }; + + return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks); +} + +/* Only partially open the vorbis file; test for Vorbisness, and load + the headers for the first chain. Do not seek (although test for + seekability). Use ov_test_open to finish opening the file, else + ov_clear to close/free it. Same return codes as open. */ + +int ov_test_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, + ov_callbacks callbacks) +{ + return _ov_open1(f,vf,initial,ibytes,callbacks); +} + +int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){ + ov_callbacks callbacks = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, + (int (*)(void *)) fclose, + (long (*)(void *)) ftell + }; + + return ov_test_callbacks((void *)f, vf, initial, ibytes, callbacks); +} + +int ov_test_open(OggVorbis_File *vf){ + if(vf->ready_state!=PARTOPEN)return OV_EINVAL; + return _ov_open2(vf); +} + +/* How many logical bitstreams in this physical bitstream? */ +long ov_streams(OggVorbis_File *vf){ + return vf->links; +} + +/* Is the FILE * associated with vf seekable? */ +long ov_seekable(OggVorbis_File *vf){ + return vf->seekable; +} + +/* returns the bitrate for a given logical bitstream or the entire + physical bitstream. If the file is open for random access, it will + find the *actual* average bitrate. If the file is streaming, it + returns the nominal bitrate (if set) else the average of the + upper/lower bounds (if set) else -1 (unset). + + If you want the actual bitrate field settings, get them from the + vorbis_info structs */ + +long ov_bitrate(OggVorbis_File *vf,int i){ + if(vf->ready_state<OPENED)return OV_EINVAL; + if(i>=vf->links)return OV_EINVAL; + if(!vf->seekable && i!=0)return ov_bitrate(vf,0); + if(i<0){ + ogg_int64_t bits=0; + int i; + for(i=0;i<vf->links;i++) + bits+=(vf->offsets[i+1]-vf->dataoffsets[i])*8; + /* This once read: return(rint(bits/ov_time_total(vf,-1))); + * gcc 3.x on x86 miscompiled this at optimisation level 2 and above, + * so this is slightly transformed to make it work. + */ + return (long)(bits*1000/ov_time_total(vf,-1)); + }else{ + if(vf->seekable){ + /* return the actual bitrate */ + return (long)((vf->offsets[i+1]-vf->dataoffsets[i])*8000/ov_time_total(vf,i)); + }else{ + /* return nominal if set */ + if(vf->vi.bitrate_nominal>0){ + return vf->vi.bitrate_nominal; + }else{ + if(vf->vi.bitrate_upper>0){ + if(vf->vi.bitrate_lower>0){ + return (vf->vi.bitrate_upper+vf->vi.bitrate_lower)/2; + }else{ + return vf->vi.bitrate_upper; + } + } + return OV_FALSE; + } + } + } +} + +/* returns the actual bitrate since last call. returns -1 if no + additional data to offer since last call (or at beginning of stream), + EINVAL if stream is only partially open +*/ +long ov_bitrate_instant(OggVorbis_File *vf){ + long ret; + if(vf->ready_state<OPENED)return OV_EINVAL; + if(vf->samptrack==0)return OV_FALSE; + ret=(long)(vf->bittrack/vf->samptrack*vf->vi.rate); + vf->bittrack=0; + vf->samptrack=0; + return ret; +} + +/* Guess */ +long ov_serialnumber(OggVorbis_File *vf,int i){ + if(i>=vf->links)return ov_serialnumber(vf,vf->links-1); + if(!vf->seekable && i>=0)return ov_serialnumber(vf,-1); + if(i<0){ + return vf->current_serialno; + }else{ + return vf->serialnos[i]; + } +} + +/* returns: total raw (compressed) length of content if i==-1 + raw (compressed) length of that logical bitstream for i==0 to n + OV_EINVAL if the stream is not seekable (we can't know the length) + or if stream is only partially open +*/ +ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i){ + if(vf->ready_state<OPENED)return OV_EINVAL; + if(!vf->seekable || i>=vf->links)return OV_EINVAL; + if(i<0){ + ogg_int64_t acc=0; + int i; + for(i=0;i<vf->links;i++) + acc+=ov_raw_total(vf,i); + return acc; + }else{ + return vf->offsets[i+1]-vf->offsets[i]; + } +} + +/* returns: total PCM length (samples) of content if i==-1 PCM length + (samples) of that logical bitstream for i==0 to n + OV_EINVAL if the stream is not seekable (we can't know the + length) or only partially open +*/ +ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i){ + if(vf->ready_state<OPENED)return OV_EINVAL; + if(!vf->seekable || i>=vf->links)return OV_EINVAL; + if(i<0){ + ogg_int64_t acc=0; + int i; + for(i=0;i<vf->links;i++) + acc+=ov_pcm_total(vf,i); + return acc; + }else{ + return vf->pcmlengths[i*2+1]; + } +} + +/* returns: total milliseconds of content if i==-1 + milliseconds in that logical bitstream for i==0 to n + OV_EINVAL if the stream is not seekable (we can't know the + length) or only partially open +*/ +ogg_int64_t ov_time_total(OggVorbis_File *vf,int i){ + if(vf->ready_state<OPENED)return OV_EINVAL; + if(!vf->seekable || i>=vf->links)return OV_EINVAL; + if(i<0){ + ogg_int64_t acc=0; + int i; + for(i=0;i<vf->links;i++) + acc+=ov_time_total(vf,i); + return acc; + }else{ + return ((ogg_int64_t)vf->pcmlengths[i*2+1])*1000/vf->vi.rate; + } +} + +/* seek to an offset relative to the *compressed* data. This also + scans packets to update the PCM cursor. It will cross a logical + bitstream boundary, but only if it can't get any packets out of the + tail of the bitstream we seek to (so no surprises). + + returns zero on success, nonzero on failure */ + +int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){ + ogg_stream_state *work_os=NULL; + ogg_page og={0,0,0,0}; + ogg_packet op={0,0,0,0,0,0}; + + if(vf->ready_state<OPENED)return OV_EINVAL; + if(!vf->seekable) + return OV_ENOSEEK; /* don't dump machine if we can't seek */ + + if(pos<0 || pos>vf->end)return OV_EINVAL; + + /* don't yet clear out decoding machine (if it's initialized), in + the case we're in the same link. Restart the decode lapping, and + let _fetch_and_process_packet deal with a potential bitstream + boundary */ + vf->pcm_offset=-1; + ogg_stream_reset_serialno(vf->os, + vf->current_serialno); /* must set serialno */ + vorbis_dsp_restart(vf->vd); + + _seek_helper(vf,pos); + + /* we need to make sure the pcm_offset is set, but we don't want to + advance the raw cursor past good packets just to get to the first + with a granulepos. That's not equivalent behavior to beginning + decoding as immediately after the seek position as possible. + + So, a hack. We use two stream states; a local scratch state and + the shared vf->os stream state. We use the local state to + scan, and the shared state as a buffer for later decode. + + Unfortuantely, on the last page we still advance to last packet + because the granulepos on the last page is not necessarily on a + packet boundary, and we need to make sure the granpos is + correct. + */ + + { + int lastblock=0; + int accblock=0; + int thisblock; + int eosflag; + + work_os=ogg_stream_create(vf->current_serialno); /* get the memory ready */ + while(1){ + if(vf->ready_state>=STREAMSET){ + /* snarf/scan a packet if we can */ + int result=ogg_stream_packetout(work_os,&op); + + if(result>0){ + + if(vf->vi.codec_setup){ + thisblock=vorbis_packet_blocksize(&vf->vi,&op); + if(thisblock<0){ + ogg_stream_packetout(vf->os,NULL); + thisblock=0; + }else{ + + if(eosflag) + ogg_stream_packetout(vf->os,NULL); + else + if(lastblock)accblock+=(lastblock+thisblock)>>2; + } + + if(op.granulepos!=-1){ + int i,link=vf->current_link; + ogg_int64_t granulepos=op.granulepos-vf->pcmlengths[link*2]; + if(granulepos<0)granulepos=0; + + for(i=0;i<link;i++) + granulepos+=vf->pcmlengths[i*2+1]; + vf->pcm_offset=granulepos-accblock; + break; + } + lastblock=thisblock; + continue; + }else + ogg_stream_packetout(vf->os,NULL); + } + } + + if(!lastblock){ + if(_get_next_page(vf,&og,-1)<0){ + vf->pcm_offset=ov_pcm_total(vf,-1); + break; + } + }else{ + /* huh? Bogus stream with packets but no granulepos */ + vf->pcm_offset=-1; + break; + } + + /* did we just grab a page from other than current link? */ + if(vf->ready_state>=STREAMSET) + if(vf->current_serialno!=ogg_page_serialno(&og)){ + _decode_clear(vf); /* clear out stream state */ + ogg_stream_destroy(work_os); + } + + if(vf->ready_state<STREAMSET){ + int link; + + vf->current_serialno=ogg_page_serialno(&og); + for(link=0;link<vf->links;link++) + if(vf->serialnos[link]==vf->current_serialno)break; + if(link==vf->links) + goto seek_error; /* sign of a bogus stream. error out, + leave machine uninitialized */ + + /* need to initialize machine to this link */ + { + int ret=_set_link_number_preserve_pos(vf,link); + if(ret) goto seek_error; + } + ogg_stream_reset_serialno(vf->os,vf->current_serialno); + ogg_stream_reset_serialno(work_os,vf->current_serialno); + + + } + + { + ogg_page dup; + ogg_page_dup(&dup,&og); + eosflag=ogg_page_eos(&og); + ogg_stream_pagein(vf->os,&og); + ogg_stream_pagein(work_os,&dup); + } + } + } + + ogg_packet_release(&op); + ogg_page_release(&og); + ogg_stream_destroy(work_os); + vf->bittrack=0; + vf->samptrack=0; + return 0; + + seek_error: + ogg_packet_release(&op); + ogg_page_release(&og); + + /* dump the machine so we're in a known state */ + vf->pcm_offset=-1; + ogg_stream_destroy(work_os); + _decode_clear(vf); + return OV_EBADLINK; +} + +/* Page granularity seek (faster than sample granularity because we + don't do the last bit of decode to find a specific sample). + + Seek to the last [granule marked] page preceeding the specified pos + location, such that decoding past the returned point will quickly + arrive at the requested position. */ +int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){ + int link=-1; + ogg_int64_t result=0; + ogg_int64_t total=ov_pcm_total(vf,-1); + ogg_page og={0,0,0,0}; + ogg_packet op={0,0,0,0,0,0}; + + if(vf->ready_state<OPENED)return OV_EINVAL; + if(!vf->seekable)return OV_ENOSEEK; + if(pos<0 || pos>total)return OV_EINVAL; + + /* which bitstream section does this pcm offset occur in? */ + for(link=vf->links-1;link>=0;link--){ + total-=vf->pcmlengths[link*2+1]; + if(pos>=total)break; + } + + + if(link!=vf->current_link){ + int ret=_set_link_number(vf,link); + if(ret) goto seek_error; + }else{ + vorbis_dsp_restart(vf->vd); + } + + ogg_stream_reset_serialno(vf->os,vf->serialnos[link]); + + /* search within the logical bitstream for the page with the highest + pcm_pos preceeding (or equal to) pos. There is a danger here; + missing pages or incorrect frame number information in the + bitstream could make our task impossible. Account for that (it + would be an error condition) */ + + /* new search algorithm by HB (Nicholas Vinen) */ + { + ogg_int64_t end=vf->offsets[link+1]; + ogg_int64_t begin=vf->offsets[link]; + ogg_int64_t begintime = vf->pcmlengths[link*2]; + ogg_int64_t endtime = vf->pcmlengths[link*2+1]+begintime; + ogg_int64_t target=pos-total+begintime; + ogg_int64_t best=begin; + + while(begin<end){ + ogg_int64_t bisect; + + if(end-begin<CHUNKSIZE){ + bisect=begin; + }else{ + /* take a (pretty decent) guess. */ + bisect=begin + + (target-begintime)*(end-begin)/(endtime-begintime) - CHUNKSIZE; + if(bisect<=begin) + bisect=begin+1; + } + + _seek_helper(vf,bisect); + + while(begin<end){ + result=_get_next_page(vf,&og,end-vf->offset); + if(result==OV_EREAD) goto seek_error; + if(result<0){ + if(bisect<=begin+1) + end=begin; /* found it */ + else{ + if(bisect==0) goto seek_error; + bisect-=CHUNKSIZE; + if(bisect<=begin)bisect=begin+1; + _seek_helper(vf,bisect); + } + }else{ + ogg_int64_t granulepos=ogg_page_granulepos(&og); + if(granulepos==-1)continue; + if(granulepos<target){ + best=result; /* raw offset of packet with granulepos */ + begin=vf->offset; /* raw offset of next page */ + begintime=granulepos; + + if(target-begintime>44100)break; + bisect=begin; /* *not* begin + 1 */ + }else{ + if(bisect<=begin+1) + end=begin; /* found it */ + else{ + if(end==vf->offset){ /* we're pretty close - we'd be stuck in */ + end=result; + bisect-=CHUNKSIZE; /* an endless loop otherwise. */ + if(bisect<=begin)bisect=begin+1; + _seek_helper(vf,bisect); + }else{ + end=result; + endtime=granulepos; + break; + } + } + } + } + } + } + + /* found our page. seek to it, update pcm offset. Easier case than + raw_seek, don't keep packets preceeding granulepos. */ + { + + /* seek */ + _seek_helper(vf,best); + vf->pcm_offset=-1; + + if(_get_next_page(vf,&og,-1)<0){ + ogg_page_release(&og); + return OV_EOF; /* shouldn't happen */ + } + + ogg_stream_pagein(vf->os,&og); + + /* pull out all but last packet; the one with granulepos */ + while(1){ + result=ogg_stream_packetpeek(vf->os,&op); + if(result==0){ + /* !!! the packet finishing this page originated on a + preceeding page. Keep fetching previous pages until we + get one with a granulepos or without the 'continued' flag + set. Then just use raw_seek for simplicity. */ + + _seek_helper(vf,best); + + while(1){ + result=_get_prev_page(vf,&og); + if(result<0) goto seek_error; + if(ogg_page_granulepos(&og)>-1 || + !ogg_page_continued(&og)){ + return ov_raw_seek(vf,result); + } + vf->offset=result; + } + } + if(result<0){ + result = OV_EBADPACKET; + goto seek_error; + } + if(op.granulepos!=-1){ + vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2]; + if(vf->pcm_offset<0)vf->pcm_offset=0; + vf->pcm_offset+=total; + break; + }else + result=ogg_stream_packetout(vf->os,NULL); + } + } + } + + /* verify result */ + if(vf->pcm_offset>pos || pos>ov_pcm_total(vf,-1)){ + result=OV_EFAULT; + goto seek_error; + } + vf->bittrack=0; + vf->samptrack=0; + + ogg_page_release(&og); + ogg_packet_release(&op); + return 0; + + seek_error: + + ogg_page_release(&og); + ogg_packet_release(&op); + + /* dump machine so we're in a known state */ + vf->pcm_offset=-1; + _decode_clear(vf); + return (int)result; +} + +/* seek to a sample offset relative to the decompressed pcm stream + returns zero on success, nonzero on failure */ + +int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ + ogg_packet op={0,0,0,0,0,0}; + ogg_page og={0,0,0,0}; + int thisblock,lastblock=0; + int ret=ov_pcm_seek_page(vf,pos); + if(ret<0)return ret; + if(_make_decode_ready(vf))return OV_EBADLINK; + + /* discard leading packets we don't need for the lapping of the + position we want; don't decode them */ + + while(1){ + + int ret=ogg_stream_packetpeek(vf->os,&op); + if(ret>0){ + thisblock=vorbis_packet_blocksize(&vf->vi,&op); + if(thisblock<0){ + ogg_stream_packetout(vf->os,NULL); + continue; /* non audio packet */ + } + if(lastblock)vf->pcm_offset+=(lastblock+thisblock)>>2; + + if(vf->pcm_offset+((thisblock+ + vorbis_info_blocksize(&vf->vi,1))>>2)>=pos)break; + + /* remove the packet from packet queue and track its granulepos */ + ogg_stream_packetout(vf->os,NULL); + vorbis_dsp_synthesis(vf->vd,&op,0); /* set up a vb with + only tracking, no + pcm_decode */ + + /* end of logical stream case is hard, especially with exact + length positioning. */ + + if(op.granulepos>-1){ + int i; + /* always believe the stream markers */ + vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2]; + if(vf->pcm_offset<0)vf->pcm_offset=0; + for(i=0;i<vf->current_link;i++) + vf->pcm_offset+=vf->pcmlengths[i*2+1]; + } + + lastblock=thisblock; + + }else{ + if(ret<0 && ret!=OV_HOLE)break; + + /* suck in a new page */ + if(_get_next_page(vf,&og,-1)<0)break; + if(vf->current_serialno!=ogg_page_serialno(&og))_decode_clear(vf); + + if(vf->ready_state<STREAMSET){ + int link,ret; + + vf->current_serialno=ogg_page_serialno(&og); + for(link=0;link<vf->links;link++) + if(vf->serialnos[link]==vf->current_serialno)break; + if(link==vf->links){ + ogg_page_release(&og); + ogg_packet_release(&op); + return OV_EBADLINK; + } + + + vf->current_link=link; + ret=_fetch_headers(vf,&vf->vi,&vf->vc,&vf->current_serialno,&og); + if(ret) return ret; + if(_make_decode_ready(vf))return OV_EBADLINK; + lastblock=0; + } + + ogg_stream_pagein(vf->os,&og); + } + } + + vf->bittrack=0; + vf->samptrack=0; + /* discard samples until we reach the desired position. Crossing a + logical bitstream boundary with abandon is OK. */ + while(vf->pcm_offset<pos){ + ogg_int64_t target=pos-vf->pcm_offset; + long samples=vorbis_dsp_pcmout(vf->vd,NULL,0); + + if(samples>target)samples=(long)target; + vorbis_dsp_read(vf->vd,samples); + vf->pcm_offset+=samples; + + if(samples<target) + if(_fetch_and_process_packet(vf,1,1)<=0) + vf->pcm_offset=ov_pcm_total(vf,-1); /* eof */ + } + + ogg_page_release(&og); + ogg_packet_release(&op); + return 0; +} + +/* seek to a playback time relative to the decompressed pcm stream + returns zero on success, nonzero on failure */ +int ov_time_seek(OggVorbis_File *vf,ogg_int64_t milliseconds){ + /* translate time to PCM position and call ov_pcm_seek */ + + int link=-1; + ogg_int64_t pcm_total=ov_pcm_total(vf,-1); + ogg_int64_t time_total=ov_time_total(vf,-1); + + if(vf->ready_state<OPENED)return OV_EINVAL; + if(!vf->seekable)return OV_ENOSEEK; + if(milliseconds<0 || milliseconds>time_total)return OV_EINVAL; + + /* which bitstream section does this time offset occur in? */ + for(link=vf->links-1;link>=0;link--){ + pcm_total-=vf->pcmlengths[link*2+1]; + time_total-=ov_time_total(vf,link); + if(milliseconds>=time_total)break; + } + + /* enough information to convert time offset to pcm offset */ + { + int ret=_set_link_number(vf,link); + if(ret)return ret; + return + ov_pcm_seek(vf,pcm_total+(milliseconds-time_total)* + vf->vi.rate/1000); + } +} + +/* page-granularity version of ov_time_seek + returns zero on success, nonzero on failure */ +int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t milliseconds){ + /* translate time to PCM position and call ov_pcm_seek */ + + int link=-1; + ogg_int64_t pcm_total=ov_pcm_total(vf,-1); + ogg_int64_t time_total=ov_time_total(vf,-1); + + if(vf->ready_state<OPENED)return OV_EINVAL; + if(!vf->seekable)return OV_ENOSEEK; + if(milliseconds<0 || milliseconds>time_total)return OV_EINVAL; + + /* which bitstream section does this time offset occur in? */ + for(link=vf->links-1;link>=0;link--){ + pcm_total-=vf->pcmlengths[link*2+1]; + time_total-=ov_time_total(vf,link); + if(milliseconds>=time_total)break; + } + + /* enough information to convert time offset to pcm offset */ + { + int ret=_set_link_number(vf,link); + if(ret)return ret; + return + ov_pcm_seek_page(vf,pcm_total+(milliseconds-time_total)* + vf->vi.rate/1000); + } +} + +/* tell the current stream offset cursor. Note that seek followed by + tell will likely not give the set offset due to caching */ +ogg_int64_t ov_raw_tell(OggVorbis_File *vf){ + if(vf->ready_state<OPENED)return OV_EINVAL; + return vf->offset; +} + +/* return PCM offset (sample) of next PCM sample to be read */ +ogg_int64_t ov_pcm_tell(OggVorbis_File *vf){ + if(vf->ready_state<OPENED)return OV_EINVAL; + return vf->pcm_offset; +} + +/* return time offset (milliseconds) of next PCM sample to be read */ +ogg_int64_t ov_time_tell(OggVorbis_File *vf){ + int link=0; + ogg_int64_t pcm_total=0; + ogg_int64_t time_total=0; + + if(vf->ready_state<OPENED)return OV_EINVAL; + if(vf->seekable){ + pcm_total=ov_pcm_total(vf,-1); + time_total=ov_time_total(vf,-1); + + /* which bitstream section does this time offset occur in? */ + for(link=vf->links-1;link>=0;link--){ + pcm_total-=vf->pcmlengths[link*2+1]; + time_total-=ov_time_total(vf,link); + if(vf->pcm_offset>=pcm_total)break; + } + } + + return time_total+(1000*vf->pcm_offset-pcm_total)/vf->vi.rate; +} + +/* link: -1) return the vorbis_info struct for the bitstream section + currently being decoded + 0-n) to request information for a specific bitstream section + + In the case of a non-seekable bitstream, any call returns the + current bitstream. NULL in the case that the machine is not + initialized */ + +vorbis_info *ov_info(OggVorbis_File *vf,int link){ + if(vf->seekable){ + if(link>=vf->links)return NULL; + if(link>=0){ + int ret=_set_link_number_preserve_pos(vf,link); + if(ret)return NULL; + } + } + return &vf->vi; +} + +/* grr, strong typing, grr, no templates/inheritence, grr */ +vorbis_comment *ov_comment(OggVorbis_File *vf,int link){ + if(vf->seekable){ + if(link>=vf->links)return NULL; + if(link>=0){ + int ret=_set_link_number_preserve_pos(vf,link); + if(ret)return NULL; + } + } + return &vf->vc; +} + +/* up to this point, everything could more or less hide the multiple + logical bitstream nature of chaining from the toplevel application + if the toplevel application didn't particularly care. However, at + the point that we actually read audio back, the multiple-section + nature must surface: Multiple bitstream sections do not necessarily + have to have the same number of channels or sampling rate. + + ov_read returns the sequential logical bitstream number currently + being decoded along with the PCM data in order that the toplevel + application can take action on channel/sample rate changes. This + number will be incremented even for streamed (non-seekable) streams + (for seekable streams, it represents the actual logical bitstream + index within the physical bitstream. Note that the accessor + functions above are aware of this dichotomy). + + input values: buffer) a buffer to hold packed PCM data for return + length) the byte length requested to be placed into buffer + + return values: <0) error/hole in data (OV_HOLE), partial open (OV_EINVAL) + 0) EOF + n) number of bytes of PCM actually returned. The + below works on a packet-by-packet basis, so the + return length is not related to the 'length' passed + in, just guaranteed to fit. + + *section) set to the logical bitstream number */ + +long ov_read(OggVorbis_File *vf,void *buffer,int bytes_req,int *bitstream){ + + long samples; + long channels; + + if(vf->ready_state<OPENED)return OV_EINVAL; + + while(1){ + if(vf->ready_state==INITSET){ + channels=vf->vi.channels; + samples=vorbis_dsp_pcmout(vf->vd,buffer,(bytes_req>>1)/channels); + if(samples){ + if(samples>0){ + vorbis_dsp_read(vf->vd,samples); + vf->pcm_offset+=samples; + if(bitstream)*bitstream=vf->current_link; + return samples*2*channels; + } + return samples; + } + } + + /* suck in another packet */ + { + int ret=_fetch_and_process_packet(vf,1,1); + if(ret==OV_EOF) + return 0; + if(ret<=0) + return ret; + } + + } +} diff --git a/ohos-specific/tremolo/Tremolo/window_lookup.h b/ohos-specific/tremolo/Tremolo/window_lookup.h new file mode 100644 index 0000000000..db3593d51e --- /dev/null +++ b/ohos-specific/tremolo/Tremolo/window_lookup.h @@ -0,0 +1,2107 @@ +/************************************************************************ + * Copyright (C) 2002-2009, Xiph.org Foundation + * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the names of the Xiph.org Foundation nor Pinknoise + * Productions Ltd nor the names of its contributors may be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ************************************************************************ + + function: window lookup tables + + ************************************************************************/ + + +#include "os_types.h" + +static LOOKUP_T vwin64[32] = { + X(0x001f0003), X(0x01168c98), X(0x030333c8), X(0x05dfe3a4), + X(0x09a49562), X(0x0e45df18), X(0x13b47ef2), X(0x19dcf676), + X(0x20a74d83), X(0x27f7137c), X(0x2fabb05a), X(0x37a1105a), + X(0x3fb0ab28), X(0x47b2dcd1), X(0x4f807bc6), X(0x56f48e70), + X(0x5dedfc79), X(0x64511653), X(0x6a08cfff), X(0x6f079328), + X(0x734796f4), X(0x76cab7f2), X(0x7999d6e8), X(0x7bc3cf9f), + X(0x7d5c20c1), X(0x7e7961df), X(0x7f33a567), X(0x7fa2e1d0), + X(0x7fdd78a5), X(0x7ff6ec6d), X(0x7ffed0e9), X(0x7ffffc3f), +}; + +static LOOKUP_T vwin128[64] = { + X(0x0007c04d), X(0x0045bb89), X(0x00c18b87), X(0x017ae294), + X(0x02714a4e), X(0x03a4217a), X(0x05129952), X(0x06bbb24f), + X(0x089e38a1), X(0x0ab8c073), X(0x0d09a228), X(0x0f8ef6bd), + X(0x12469488), X(0x152e0c7a), X(0x1842a81c), X(0x1b81686d), + X(0x1ee705d9), X(0x226ff15d), X(0x26185705), X(0x29dc21cc), + X(0x2db700fe), X(0x31a46f08), X(0x359fb9c1), X(0x39a40c0c), + X(0x3dac78b6), X(0x41b40674), X(0x45b5bcb0), X(0x49acb109), + X(0x4d94152b), X(0x516744bd), X(0x5521d320), X(0x58bf98a5), + X(0x5c3cbef4), X(0x5f95cc5d), X(0x62c7add7), X(0x65cfbf64), + X(0x68abd2ba), X(0x6b5a3405), X(0x6dd9acab), X(0x7029840d), + X(0x72497e38), X(0x7439d8ac), X(0x75fb4532), X(0x778ee30a), + X(0x78f6367e), X(0x7a331f1a), X(0x7b47cccd), X(0x7c36b416), + X(0x7d028192), X(0x7dae0d18), X(0x7e3c4caa), X(0x7eb04763), + X(0x7f0d08a7), X(0x7f5593b7), X(0x7f8cd7d5), X(0x7fb5a513), + X(0x7fd2a1fc), X(0x7fe64212), X(0x7ff2bd4c), X(0x7ffa0890), + X(0x7ffdcf39), X(0x7fff6dac), X(0x7fffed01), X(0x7fffffc4), +}; + +static LOOKUP_T vwin256[128] = { + X(0x0001f018), X(0x00117066), X(0x00306e9e), X(0x005ee5f1), + X(0x009ccf26), X(0x00ea208b), X(0x0146cdea), X(0x01b2c87f), + X(0x022dfedf), X(0x02b85ced), X(0x0351cbbd), X(0x03fa317f), + X(0x04b17167), X(0x05776b90), X(0x064bfcdc), X(0x072efedd), + X(0x082047b4), X(0x091fa9f1), X(0x0a2cf477), X(0x0b47f25d), + X(0x0c706ad2), X(0x0da620ff), X(0x0ee8d3ef), X(0x10383e75), + X(0x11941716), X(0x12fc0ff6), X(0x146fd6c8), X(0x15ef14c2), + X(0x17796e8e), X(0x190e844f), X(0x1aadf196), X(0x1c574d6e), + X(0x1e0a2a62), X(0x1fc61688), X(0x218a9b9c), X(0x23573f12), + X(0x252b823d), X(0x2706e269), X(0x28e8d913), X(0x2ad0dc0e), + X(0x2cbe5dc1), X(0x2eb0cd60), X(0x30a79733), X(0x32a224d5), + X(0x349fdd8b), X(0x36a02690), X(0x38a2636f), X(0x3aa5f65e), + X(0x3caa409e), X(0x3eaea2df), X(0x40b27da6), X(0x42b531b8), + X(0x44b62086), X(0x46b4ac99), X(0x48b03a05), X(0x4aa82ed5), + X(0x4c9bf37d), X(0x4e8af349), X(0x50749ccb), X(0x52586246), + X(0x5435ba1c), X(0x560c1f31), X(0x57db1152), X(0x59a21591), + X(0x5b60b6a3), X(0x5d168535), X(0x5ec31839), X(0x60660d36), + X(0x61ff0886), X(0x638db595), X(0x6511c717), X(0x668af734), + X(0x67f907b0), X(0x695bc207), X(0x6ab2f787), X(0x6bfe815a), + X(0x6d3e4090), X(0x6e721e16), X(0x6f9a0ab5), X(0x70b5fef8), + X(0x71c5fb16), X(0x72ca06cd), X(0x73c2313d), X(0x74ae90b2), + X(0x758f4275), X(0x76646a85), X(0x772e335c), X(0x77eccda0), + X(0x78a06fd7), X(0x79495613), X(0x79e7c19c), X(0x7a7bf894), + X(0x7b064596), X(0x7b86f757), X(0x7bfe6044), X(0x7c6cd615), + X(0x7cd2b16e), X(0x7d304d71), X(0x7d860756), X(0x7dd43e06), + X(0x7e1b51ad), X(0x7e5ba355), X(0x7e95947e), X(0x7ec986bb), + X(0x7ef7db4a), X(0x7f20f2b9), X(0x7f452c7f), X(0x7f64e6a7), + X(0x7f807d71), X(0x7f984aff), X(0x7faca700), X(0x7fbde662), + X(0x7fcc5b04), X(0x7fd85372), X(0x7fe21a99), X(0x7fe9f791), + X(0x7ff02d58), X(0x7ff4fa9e), X(0x7ff89990), X(0x7ffb3faa), + X(0x7ffd1d8b), X(0x7ffe5ecc), X(0x7fff29e0), X(0x7fff9ff3), + X(0x7fffdcd2), X(0x7ffff6d6), X(0x7ffffed0), X(0x7ffffffc), +}; + +static LOOKUP_T vwin512[256] = { + X(0x00007c06), X(0x00045c32), X(0x000c1c62), X(0x0017bc4c), + X(0x00273b7a), X(0x003a9955), X(0x0051d51c), X(0x006cede7), + X(0x008be2a9), X(0x00aeb22a), X(0x00d55b0d), X(0x00ffdbcc), + X(0x012e32b6), X(0x01605df5), X(0x01965b85), X(0x01d02939), + X(0x020dc4ba), X(0x024f2b83), X(0x02945ae6), X(0x02dd5004), + X(0x032a07d3), X(0x037a7f19), X(0x03ceb26e), X(0x04269e37), + X(0x04823eab), X(0x04e18fcc), X(0x05448d6d), X(0x05ab3329), + X(0x06157c68), X(0x0683645e), X(0x06f4e607), X(0x0769fc25), + X(0x07e2a146), X(0x085ecfbc), X(0x08de819f), X(0x0961b0cc), + X(0x09e856e3), X(0x0a726d46), X(0x0affed1d), X(0x0b90cf4c), + X(0x0c250c79), X(0x0cbc9d0b), X(0x0d577926), X(0x0df598aa), + X(0x0e96f337), X(0x0f3b8026), X(0x0fe3368f), X(0x108e0d42), + X(0x113bfaca), X(0x11ecf56b), X(0x12a0f324), X(0x1357e9ac), + X(0x1411ce70), X(0x14ce9698), X(0x158e3702), X(0x1650a444), + X(0x1715d2aa), X(0x17ddb638), X(0x18a842aa), X(0x19756b72), + X(0x1a4523b9), X(0x1b175e62), X(0x1bec0e04), X(0x1cc324f0), + X(0x1d9c9532), X(0x1e78508a), X(0x1f564876), X(0x20366e2e), + X(0x2118b2a2), X(0x21fd0681), X(0x22e35a37), X(0x23cb9dee), + X(0x24b5c18e), X(0x25a1b4c0), X(0x268f66f1), X(0x277ec74e), + X(0x286fc4cc), X(0x29624e23), X(0x2a5651d7), X(0x2b4bbe34), + X(0x2c428150), X(0x2d3a8913), X(0x2e33c332), X(0x2f2e1d35), + X(0x30298478), X(0x3125e62d), X(0x32232f61), X(0x33214cfc), + X(0x34202bc2), X(0x351fb85a), X(0x361fdf4f), X(0x37208d10), + X(0x3821adf7), X(0x39232e49), X(0x3a24fa3c), X(0x3b26fdf6), + X(0x3c292593), X(0x3d2b5d29), X(0x3e2d90c8), X(0x3f2fac7f), + X(0x40319c5f), X(0x41334c81), X(0x4234a905), X(0x43359e16), + X(0x443617f3), X(0x453602eb), X(0x46354b65), X(0x4733dde1), + X(0x4831a6ff), X(0x492e937f), X(0x4a2a9045), X(0x4b258a5f), + X(0x4c1f6f06), X(0x4d182ba2), X(0x4e0fadce), X(0x4f05e35b), + X(0x4ffaba53), X(0x50ee20fd), X(0x51e005e1), X(0x52d057ca), + X(0x53bf05ca), X(0x54abff3b), X(0x559733c7), X(0x56809365), + X(0x57680e62), X(0x584d955d), X(0x59311952), X(0x5a128b96), + X(0x5af1dddd), X(0x5bcf023a), X(0x5ca9eb27), X(0x5d828b81), + X(0x5e58d68d), X(0x5f2cbffc), X(0x5ffe3be9), X(0x60cd3edf), + X(0x6199bdda), X(0x6263ae45), X(0x632b0602), X(0x63efbb66), + X(0x64b1c53f), X(0x65711ad0), X(0x662db3d7), X(0x66e7888d), + X(0x679e91a5), X(0x6852c84e), X(0x69042635), X(0x69b2a582), + X(0x6a5e40dd), X(0x6b06f36c), X(0x6bacb8d2), X(0x6c4f8d30), + X(0x6cef6d26), X(0x6d8c55d4), X(0x6e2644d4), X(0x6ebd3840), + X(0x6f512ead), X(0x6fe2272e), X(0x7070214f), X(0x70fb1d17), + X(0x71831b06), X(0x72081c16), X(0x728a21b5), X(0x73092dc8), + X(0x738542a6), X(0x73fe631b), X(0x74749261), X(0x74e7d421), + X(0x75582c72), X(0x75c59fd5), X(0x76303333), X(0x7697ebdd), + X(0x76fccf85), X(0x775ee443), X(0x77be308a), X(0x781abb2e), + X(0x78748b59), X(0x78cba88e), X(0x79201aa7), X(0x7971e9cd), + X(0x79c11e79), X(0x7a0dc170), X(0x7a57dbc2), X(0x7a9f76c1), + X(0x7ae49c07), X(0x7b27556b), X(0x7b67ad02), X(0x7ba5ad1b), + X(0x7be1603a), X(0x7c1ad118), X(0x7c520a9e), X(0x7c8717e1), + X(0x7cba0421), X(0x7ceadac3), X(0x7d19a74f), X(0x7d46756e), + X(0x7d7150e5), X(0x7d9a4592), X(0x7dc15f69), X(0x7de6aa71), + X(0x7e0a32c0), X(0x7e2c0479), X(0x7e4c2bc7), X(0x7e6ab4db), + X(0x7e87abe9), X(0x7ea31d24), X(0x7ebd14be), X(0x7ed59edd), + X(0x7eecc7a3), X(0x7f029b21), X(0x7f17255a), X(0x7f2a723f), + X(0x7f3c8daa), X(0x7f4d835d), X(0x7f5d5f00), X(0x7f6c2c1b), + X(0x7f79f617), X(0x7f86c83a), X(0x7f92ada2), X(0x7f9db146), + X(0x7fa7ddf3), X(0x7fb13e46), X(0x7fb9dcb0), X(0x7fc1c36c), + X(0x7fc8fc83), X(0x7fcf91c7), X(0x7fd58cd2), X(0x7fdaf702), + X(0x7fdfd979), X(0x7fe43d1c), X(0x7fe82a8b), X(0x7febaa29), + X(0x7feec412), X(0x7ff1801c), X(0x7ff3e5d6), X(0x7ff5fc86), + X(0x7ff7cb29), X(0x7ff9586f), X(0x7ffaaaba), X(0x7ffbc81e), + X(0x7ffcb660), X(0x7ffd7af3), X(0x7ffe1afa), X(0x7ffe9b42), + X(0x7fff0047), X(0x7fff4e2f), X(0x7fff88c9), X(0x7fffb390), + X(0x7fffd1a6), X(0x7fffe5d7), X(0x7ffff296), X(0x7ffff9fd), + X(0x7ffffdcd), X(0x7fffff6d), X(0x7fffffed), X(0x7fffffff), +}; + +static LOOKUP_T vwin1024[512] = { + X(0x00001f02), X(0x0001170e), X(0x00030724), X(0x0005ef40), + X(0x0009cf59), X(0x000ea767), X(0x0014775e), X(0x001b3f2e), + X(0x0022fec8), X(0x002bb618), X(0x00356508), X(0x00400b81), + X(0x004ba968), X(0x00583ea0), X(0x0065cb0a), X(0x00744e84), + X(0x0083c8ea), X(0x00943a14), X(0x00a5a1da), X(0x00b80010), + X(0x00cb5488), X(0x00df9f10), X(0x00f4df76), X(0x010b1584), + X(0x01224101), X(0x013a61b2), X(0x01537759), X(0x016d81b6), + X(0x01888087), X(0x01a47385), X(0x01c15a69), X(0x01df34e6), + X(0x01fe02b1), X(0x021dc377), X(0x023e76e7), X(0x02601ca9), + X(0x0282b466), X(0x02a63dc1), X(0x02cab85d), X(0x02f023d6), + X(0x03167fcb), X(0x033dcbd3), X(0x03660783), X(0x038f3270), + X(0x03b94c29), X(0x03e4543a), X(0x04104a2e), X(0x043d2d8b), + X(0x046afdd5), X(0x0499ba8c), X(0x04c9632d), X(0x04f9f734), + X(0x052b7615), X(0x055ddf46), X(0x05913237), X(0x05c56e53), + X(0x05fa9306), X(0x06309fb6), X(0x066793c5), X(0x069f6e93), + X(0x06d82f7c), X(0x0711d5d9), X(0x074c60fe), X(0x0787d03d), + X(0x07c422e4), X(0x0801583e), X(0x083f6f91), X(0x087e681f), + X(0x08be4129), X(0x08fef9ea), X(0x0940919a), X(0x0983076d), + X(0x09c65a92), X(0x0a0a8a38), X(0x0a4f9585), X(0x0a957b9f), + X(0x0adc3ba7), X(0x0b23d4b9), X(0x0b6c45ee), X(0x0bb58e5a), + X(0x0bffad0f), X(0x0c4aa11a), X(0x0c966982), X(0x0ce3054d), + X(0x0d30737b), X(0x0d7eb308), X(0x0dcdc2eb), X(0x0e1da21a), + X(0x0e6e4f83), X(0x0ebfca11), X(0x0f1210ad), X(0x0f652238), + X(0x0fb8fd91), X(0x100da192), X(0x10630d11), X(0x10b93ee0), + X(0x111035cb), X(0x1167f09a), X(0x11c06e13), X(0x1219acf5), + X(0x1273abfb), X(0x12ce69db), X(0x1329e54a), X(0x13861cf3), + X(0x13e30f80), X(0x1440bb97), X(0x149f1fd8), X(0x14fe3ade), + X(0x155e0b40), X(0x15be8f92), X(0x161fc662), X(0x1681ae38), + X(0x16e4459b), X(0x17478b0b), X(0x17ab7d03), X(0x181019fb), + X(0x18756067), X(0x18db4eb3), X(0x1941e34a), X(0x19a91c92), + X(0x1a10f8ea), X(0x1a7976af), X(0x1ae29439), X(0x1b4c4fda), + X(0x1bb6a7e2), X(0x1c219a9a), X(0x1c8d2649), X(0x1cf9492e), + X(0x1d660188), X(0x1dd34d8e), X(0x1e412b74), X(0x1eaf996a), + X(0x1f1e959b), X(0x1f8e1e2f), X(0x1ffe3146), X(0x206ecd01), + X(0x20dfef78), X(0x215196c2), X(0x21c3c0f0), X(0x22366c10), + X(0x22a9962a), X(0x231d3d45), X(0x23915f60), X(0x2405fa7a), + X(0x247b0c8c), X(0x24f09389), X(0x25668d65), X(0x25dcf80c), + X(0x2653d167), X(0x26cb175e), X(0x2742c7d0), X(0x27bae09e), + X(0x28335fa2), X(0x28ac42b3), X(0x292587a5), X(0x299f2c48), + X(0x2a192e69), X(0x2a938bd1), X(0x2b0e4247), X(0x2b894f8d), + X(0x2c04b164), X(0x2c806588), X(0x2cfc69b2), X(0x2d78bb9a), + X(0x2df558f4), X(0x2e723f6f), X(0x2eef6cbb), X(0x2f6cde83), + X(0x2fea9270), X(0x30688627), X(0x30e6b74e), X(0x31652385), + X(0x31e3c86b), X(0x3262a39e), X(0x32e1b2b8), X(0x3360f352), + X(0x33e06303), X(0x345fff5e), X(0x34dfc5f8), X(0x355fb462), + X(0x35dfc82a), X(0x365ffee0), X(0x36e0560f), X(0x3760cb43), + X(0x37e15c05), X(0x386205df), X(0x38e2c657), X(0x39639af5), + X(0x39e4813e), X(0x3a6576b6), X(0x3ae678e3), X(0x3b678547), + X(0x3be89965), X(0x3c69b2c1), X(0x3ceacedc), X(0x3d6beb37), + X(0x3ded0557), X(0x3e6e1abb), X(0x3eef28e6), X(0x3f702d5a), + X(0x3ff1259a), X(0x40720f29), X(0x40f2e789), X(0x4173ac3f), + X(0x41f45ad0), X(0x4274f0c2), X(0x42f56b9a), X(0x4375c8e0), + X(0x43f6061d), X(0x447620db), X(0x44f616a5), X(0x4575e509), + X(0x45f58994), X(0x467501d6), X(0x46f44b62), X(0x477363cb), + X(0x47f248a6), X(0x4870f78e), X(0x48ef6e1a), X(0x496da9e8), + X(0x49eba897), X(0x4a6967c8), X(0x4ae6e521), X(0x4b641e47), + X(0x4be110e5), X(0x4c5dbaa7), X(0x4cda193f), X(0x4d562a5f), + X(0x4dd1ebbd), X(0x4e4d5b15), X(0x4ec87623), X(0x4f433aa9), + X(0x4fbda66c), X(0x5037b734), X(0x50b16acf), X(0x512abf0e), + X(0x51a3b1c5), X(0x521c40ce), X(0x52946a06), X(0x530c2b50), + X(0x53838292), X(0x53fa6db8), X(0x5470eab3), X(0x54e6f776), + X(0x555c91fc), X(0x55d1b844), X(0x56466851), X(0x56baa02f), + X(0x572e5deb), X(0x57a19f98), X(0x58146352), X(0x5886a737), + X(0x58f8696d), X(0x5969a81c), X(0x59da6177), X(0x5a4a93b4), + X(0x5aba3d0f), X(0x5b295bcb), X(0x5b97ee30), X(0x5c05f28d), + X(0x5c736738), X(0x5ce04a8d), X(0x5d4c9aed), X(0x5db856c1), + X(0x5e237c78), X(0x5e8e0a89), X(0x5ef7ff6f), X(0x5f6159b0), + X(0x5fca17d4), X(0x6032386e), X(0x6099ba15), X(0x61009b69), + X(0x6166db11), X(0x61cc77b9), X(0x62317017), X(0x6295c2e7), + X(0x62f96eec), X(0x635c72f1), X(0x63becdc8), X(0x64207e4b), + X(0x6481835a), X(0x64e1dbde), X(0x654186c8), X(0x65a0830e), + X(0x65fecfb1), X(0x665c6bb7), X(0x66b95630), X(0x67158e30), + X(0x677112d7), X(0x67cbe34b), X(0x6825feb9), X(0x687f6456), + X(0x68d81361), X(0x69300b1e), X(0x69874ada), X(0x69ddd1ea), + X(0x6a339fab), X(0x6a88b382), X(0x6add0cdb), X(0x6b30ab2a), + X(0x6b838dec), X(0x6bd5b4a6), X(0x6c271ee2), X(0x6c77cc36), + X(0x6cc7bc3d), X(0x6d16ee9b), X(0x6d6562fb), X(0x6db31911), + X(0x6e001099), X(0x6e4c4955), X(0x6e97c311), X(0x6ee27d9f), + X(0x6f2c78d9), X(0x6f75b4a2), X(0x6fbe30e4), X(0x7005ed91), + X(0x704ceaa1), X(0x70932816), X(0x70d8a5f8), X(0x711d6457), + X(0x7161634b), X(0x71a4a2f3), X(0x71e72375), X(0x7228e500), + X(0x7269e7c8), X(0x72aa2c0a), X(0x72e9b209), X(0x73287a12), + X(0x73668476), X(0x73a3d18f), X(0x73e061bc), X(0x741c3566), + X(0x74574cfa), X(0x7491a8ee), X(0x74cb49be), X(0x75042fec), + X(0x753c5c03), X(0x7573ce92), X(0x75aa882f), X(0x75e08979), + X(0x7615d313), X(0x764a65a7), X(0x767e41e5), X(0x76b16884), + X(0x76e3da40), X(0x771597dc), X(0x7746a221), X(0x7776f9dd), + X(0x77a69fe6), X(0x77d59514), X(0x7803da49), X(0x7831706a), + X(0x785e5861), X(0x788a9320), X(0x78b6219c), X(0x78e104cf), + X(0x790b3dbb), X(0x7934cd64), X(0x795db4d5), X(0x7985f51d), + X(0x79ad8f50), X(0x79d48486), X(0x79fad5de), X(0x7a208478), + X(0x7a45917b), X(0x7a69fe12), X(0x7a8dcb6c), X(0x7ab0fabb), + X(0x7ad38d36), X(0x7af5841a), X(0x7b16e0a3), X(0x7b37a416), + X(0x7b57cfb8), X(0x7b7764d4), X(0x7b9664b6), X(0x7bb4d0b0), + X(0x7bd2aa14), X(0x7beff23b), X(0x7c0caa7f), X(0x7c28d43c), + X(0x7c4470d2), X(0x7c5f81a5), X(0x7c7a081a), X(0x7c940598), + X(0x7cad7b8b), X(0x7cc66b5e), X(0x7cded680), X(0x7cf6be64), + X(0x7d0e247b), X(0x7d250a3c), X(0x7d3b711c), X(0x7d515a95), + X(0x7d66c822), X(0x7d7bbb3c), X(0x7d903563), X(0x7da43814), + X(0x7db7c4d0), X(0x7dcadd16), X(0x7ddd826a), X(0x7defb64d), + X(0x7e017a44), X(0x7e12cfd3), X(0x7e23b87f), X(0x7e3435cc), + X(0x7e444943), X(0x7e53f467), X(0x7e6338c0), X(0x7e7217d5), + X(0x7e80932b), X(0x7e8eac49), X(0x7e9c64b7), X(0x7ea9bdf8), + X(0x7eb6b994), X(0x7ec35910), X(0x7ecf9def), X(0x7edb89b6), + X(0x7ee71de9), X(0x7ef25c09), X(0x7efd4598), X(0x7f07dc16), + X(0x7f122103), X(0x7f1c15dc), X(0x7f25bc1f), X(0x7f2f1547), + X(0x7f3822cd), X(0x7f40e62b), X(0x7f4960d6), X(0x7f519443), + X(0x7f5981e7), X(0x7f612b31), X(0x7f689191), X(0x7f6fb674), + X(0x7f769b45), X(0x7f7d416c), X(0x7f83aa51), X(0x7f89d757), + X(0x7f8fc9df), X(0x7f958348), X(0x7f9b04ef), X(0x7fa0502e), + X(0x7fa56659), X(0x7faa48c7), X(0x7faef8c7), X(0x7fb377a7), + X(0x7fb7c6b3), X(0x7fbbe732), X(0x7fbfda67), X(0x7fc3a196), + X(0x7fc73dfa), X(0x7fcab0ce), X(0x7fcdfb4a), X(0x7fd11ea0), + X(0x7fd41c00), X(0x7fd6f496), X(0x7fd9a989), X(0x7fdc3bff), + X(0x7fdead17), X(0x7fe0fdee), X(0x7fe32f9d), X(0x7fe54337), + X(0x7fe739ce), X(0x7fe9146c), X(0x7fead41b), X(0x7fec79dd), + X(0x7fee06b2), X(0x7fef7b94), X(0x7ff0d97b), X(0x7ff22158), + X(0x7ff35417), X(0x7ff472a3), X(0x7ff57de0), X(0x7ff676ac), + X(0x7ff75de3), X(0x7ff8345a), X(0x7ff8fae4), X(0x7ff9b24b), + X(0x7ffa5b58), X(0x7ffaf6cd), X(0x7ffb8568), X(0x7ffc07e2), + X(0x7ffc7eed), X(0x7ffceb38), X(0x7ffd4d6d), X(0x7ffda631), + X(0x7ffdf621), X(0x7ffe3dd8), X(0x7ffe7dea), X(0x7ffeb6e7), + X(0x7ffee959), X(0x7fff15c4), X(0x7fff3ca9), X(0x7fff5e80), + X(0x7fff7bc0), X(0x7fff94d6), X(0x7fffaa2d), X(0x7fffbc29), + X(0x7fffcb29), X(0x7fffd786), X(0x7fffe195), X(0x7fffe9a3), + X(0x7fffeffa), X(0x7ffff4dd), X(0x7ffff889), X(0x7ffffb37), + X(0x7ffffd1a), X(0x7ffffe5d), X(0x7fffff29), X(0x7fffffa0), + X(0x7fffffdd), X(0x7ffffff7), X(0x7fffffff), X(0x7fffffff), +}; + +static LOOKUP_T vwin2048[1024] = { + X(0x000007c0), X(0x000045c4), X(0x0000c1ca), X(0x00017bd3), + X(0x000273de), X(0x0003a9eb), X(0x00051df9), X(0x0006d007), + X(0x0008c014), X(0x000aee1e), X(0x000d5a25), X(0x00100428), + X(0x0012ec23), X(0x00161216), X(0x001975fe), X(0x001d17da), + X(0x0020f7a8), X(0x00251564), X(0x0029710c), X(0x002e0a9e), + X(0x0032e217), X(0x0037f773), X(0x003d4ab0), X(0x0042dbca), + X(0x0048aabe), X(0x004eb788), X(0x00550224), X(0x005b8a8f), + X(0x006250c5), X(0x006954c1), X(0x0070967e), X(0x007815f9), + X(0x007fd32c), X(0x0087ce13), X(0x009006a9), X(0x00987ce9), + X(0x00a130cc), X(0x00aa224f), X(0x00b3516b), X(0x00bcbe1a), + X(0x00c66856), X(0x00d0501a), X(0x00da755f), X(0x00e4d81f), + X(0x00ef7853), X(0x00fa55f4), X(0x010570fc), X(0x0110c963), + X(0x011c5f22), X(0x01283232), X(0x0134428c), X(0x01409027), + X(0x014d1afb), X(0x0159e302), X(0x0166e831), X(0x01742a82), + X(0x0181a9ec), X(0x018f6665), X(0x019d5fe5), X(0x01ab9663), + X(0x01ba09d6), X(0x01c8ba34), X(0x01d7a775), X(0x01e6d18d), + X(0x01f63873), X(0x0205dc1e), X(0x0215bc82), X(0x0225d997), + X(0x02363350), X(0x0246c9a3), X(0x02579c86), X(0x0268abed), + X(0x0279f7cc), X(0x028b801a), X(0x029d44c9), X(0x02af45ce), + X(0x02c1831d), X(0x02d3fcaa), X(0x02e6b269), X(0x02f9a44c), + X(0x030cd248), X(0x03203c4f), X(0x0333e255), X(0x0347c44b), + X(0x035be225), X(0x03703bd5), X(0x0384d14d), X(0x0399a280), + X(0x03aeaf5e), X(0x03c3f7d9), X(0x03d97be4), X(0x03ef3b6e), + X(0x0405366a), X(0x041b6cc8), X(0x0431de78), X(0x04488b6c), + X(0x045f7393), X(0x047696dd), X(0x048df53b), X(0x04a58e9b), + X(0x04bd62ee), X(0x04d57223), X(0x04edbc28), X(0x050640ed), + X(0x051f0060), X(0x0537fa70), X(0x05512f0a), X(0x056a9e1e), + X(0x05844798), X(0x059e2b67), X(0x05b84978), X(0x05d2a1b8), + X(0x05ed3414), X(0x06080079), X(0x062306d3), X(0x063e470f), + X(0x0659c119), X(0x067574dd), X(0x06916247), X(0x06ad8941), + X(0x06c9e9b8), X(0x06e68397), X(0x070356c8), X(0x07206336), + X(0x073da8cb), X(0x075b2772), X(0x0778df15), X(0x0796cf9c), + X(0x07b4f8f3), X(0x07d35b01), X(0x07f1f5b1), X(0x0810c8eb), + X(0x082fd497), X(0x084f189e), X(0x086e94e9), X(0x088e495e), + X(0x08ae35e6), X(0x08ce5a68), X(0x08eeb6cc), X(0x090f4af8), + X(0x093016d3), X(0x09511a44), X(0x09725530), X(0x0993c77f), + X(0x09b57115), X(0x09d751d8), X(0x09f969ae), X(0x0a1bb87c), + X(0x0a3e3e26), X(0x0a60fa91), X(0x0a83eda2), X(0x0aa7173c), + X(0x0aca7743), X(0x0aee0d9b), X(0x0b11da28), X(0x0b35dccc), + X(0x0b5a156a), X(0x0b7e83e5), X(0x0ba3281f), X(0x0bc801fa), + X(0x0bed1159), X(0x0c12561c), X(0x0c37d025), X(0x0c5d7f55), + X(0x0c83638d), X(0x0ca97cae), X(0x0ccfca97), X(0x0cf64d2a), + X(0x0d1d0444), X(0x0d43efc7), X(0x0d6b0f92), X(0x0d926383), + X(0x0db9eb79), X(0x0de1a752), X(0x0e0996ee), X(0x0e31ba29), + X(0x0e5a10e2), X(0x0e829af6), X(0x0eab5841), X(0x0ed448a2), + X(0x0efd6bf4), X(0x0f26c214), X(0x0f504ade), X(0x0f7a062e), + X(0x0fa3f3df), X(0x0fce13cd), X(0x0ff865d2), X(0x1022e9ca), + X(0x104d9f8e), X(0x107886f9), X(0x10a39fe5), X(0x10ceea2c), + X(0x10fa65a6), X(0x1126122d), X(0x1151ef9a), X(0x117dfdc5), + X(0x11aa3c87), X(0x11d6abb6), X(0x12034b2c), X(0x12301ac0), + X(0x125d1a48), X(0x128a499b), X(0x12b7a891), X(0x12e536ff), + X(0x1312f4bb), X(0x1340e19c), X(0x136efd75), X(0x139d481e), + X(0x13cbc16a), X(0x13fa692f), X(0x14293f40), X(0x14584371), + X(0x14877597), X(0x14b6d585), X(0x14e6630d), X(0x15161e04), + X(0x1546063b), X(0x15761b85), X(0x15a65db3), X(0x15d6cc99), + X(0x16076806), X(0x16382fcd), X(0x166923bf), X(0x169a43ab), + X(0x16cb8f62), X(0x16fd06b5), X(0x172ea973), X(0x1760776b), + X(0x1792706e), X(0x17c49449), X(0x17f6e2cb), X(0x18295bc3), + X(0x185bfeff), X(0x188ecc4c), X(0x18c1c379), X(0x18f4e452), + X(0x19282ea4), X(0x195ba23c), X(0x198f3ee6), X(0x19c3046e), + X(0x19f6f2a1), X(0x1a2b094a), X(0x1a5f4833), X(0x1a93af28), + X(0x1ac83df3), X(0x1afcf460), X(0x1b31d237), X(0x1b66d744), + X(0x1b9c034e), X(0x1bd15621), X(0x1c06cf84), X(0x1c3c6f40), + X(0x1c72351e), X(0x1ca820e6), X(0x1cde3260), X(0x1d146953), + X(0x1d4ac587), X(0x1d8146c3), X(0x1db7eccd), X(0x1deeb76c), + X(0x1e25a667), X(0x1e5cb982), X(0x1e93f085), X(0x1ecb4b33), + X(0x1f02c953), X(0x1f3a6aaa), X(0x1f722efb), X(0x1faa160b), + X(0x1fe21f9e), X(0x201a4b79), X(0x2052995d), X(0x208b0910), + X(0x20c39a53), X(0x20fc4cea), X(0x21352097), X(0x216e151c), + X(0x21a72a3a), X(0x21e05fb5), X(0x2219b54d), X(0x22532ac3), + X(0x228cbfd8), X(0x22c6744d), X(0x230047e2), X(0x233a3a58), + X(0x23744b6d), X(0x23ae7ae3), X(0x23e8c878), X(0x242333ec), + X(0x245dbcfd), X(0x24986369), X(0x24d326f1), X(0x250e0750), + X(0x25490446), X(0x25841d90), X(0x25bf52ec), X(0x25faa417), + X(0x263610cd), X(0x267198cc), X(0x26ad3bcf), X(0x26e8f994), + X(0x2724d1d6), X(0x2760c451), X(0x279cd0c0), X(0x27d8f6e0), + X(0x2815366a), X(0x28518f1b), X(0x288e00ac), X(0x28ca8ad8), + X(0x29072d5a), X(0x2943e7eb), X(0x2980ba45), X(0x29bda422), + X(0x29faa53c), X(0x2a37bd4a), X(0x2a74ec07), X(0x2ab2312b), + X(0x2aef8c6f), X(0x2b2cfd8b), X(0x2b6a8437), X(0x2ba8202c), + X(0x2be5d120), X(0x2c2396cc), X(0x2c6170e7), X(0x2c9f5f29), + X(0x2cdd6147), X(0x2d1b76fa), X(0x2d599ff7), X(0x2d97dbf5), + X(0x2dd62aab), X(0x2e148bcf), X(0x2e52ff16), X(0x2e918436), + X(0x2ed01ae5), X(0x2f0ec2d9), X(0x2f4d7bc6), X(0x2f8c4562), + X(0x2fcb1f62), X(0x300a097a), X(0x3049035f), X(0x30880cc6), + X(0x30c72563), X(0x31064cea), X(0x3145830f), X(0x3184c786), + X(0x31c41a03), X(0x32037a39), X(0x3242e7dc), X(0x3282629f), + X(0x32c1ea36), X(0x33017e53), X(0x33411ea9), X(0x3380caec), + X(0x33c082ce), X(0x34004602), X(0x34401439), X(0x347fed27), + X(0x34bfd07e), X(0x34ffbdf0), X(0x353fb52e), X(0x357fb5ec), + X(0x35bfbfda), X(0x35ffd2aa), X(0x363fee0f), X(0x368011b9), + X(0x36c03d5a), X(0x370070a4), X(0x3740ab48), X(0x3780ecf7), + X(0x37c13562), X(0x3801843a), X(0x3841d931), X(0x388233f7), + X(0x38c2943d), X(0x3902f9b4), X(0x3943640d), X(0x3983d2f8), + X(0x39c44626), X(0x3a04bd48), X(0x3a45380e), X(0x3a85b62a), + X(0x3ac6374a), X(0x3b06bb20), X(0x3b47415c), X(0x3b87c9ae), + X(0x3bc853c7), X(0x3c08df57), X(0x3c496c0f), X(0x3c89f99f), + X(0x3cca87b6), X(0x3d0b1605), X(0x3d4ba43d), X(0x3d8c320e), + X(0x3dccbf27), X(0x3e0d4b3a), X(0x3e4dd5f6), X(0x3e8e5f0c), + X(0x3ecee62b), X(0x3f0f6b05), X(0x3f4fed49), X(0x3f906ca8), + X(0x3fd0e8d2), X(0x40116177), X(0x4051d648), X(0x409246f6), + X(0x40d2b330), X(0x41131aa7), X(0x41537d0c), X(0x4193da10), + X(0x41d43162), X(0x421482b4), X(0x4254cdb7), X(0x4295121b), + X(0x42d54f91), X(0x431585ca), X(0x4355b477), X(0x4395db49), + X(0x43d5f9f1), X(0x44161021), X(0x44561d8a), X(0x449621dd), + X(0x44d61ccc), X(0x45160e08), X(0x4555f544), X(0x4595d230), + X(0x45d5a47f), X(0x46156be3), X(0x4655280e), X(0x4694d8b2), + X(0x46d47d82), X(0x4714162f), X(0x4753a26d), X(0x479321ef), + X(0x47d29466), X(0x4811f987), X(0x48515104), X(0x48909a91), + X(0x48cfd5e1), X(0x490f02a7), X(0x494e2098), X(0x498d2f66), + X(0x49cc2ec7), X(0x4a0b1e6f), X(0x4a49fe11), X(0x4a88cd62), + X(0x4ac78c18), X(0x4b0639e6), X(0x4b44d683), X(0x4b8361a2), + X(0x4bc1dafa), X(0x4c004241), X(0x4c3e972c), X(0x4c7cd970), + X(0x4cbb08c5), X(0x4cf924e1), X(0x4d372d7a), X(0x4d752247), + X(0x4db30300), X(0x4df0cf5a), X(0x4e2e870f), X(0x4e6c29d6), + X(0x4ea9b766), X(0x4ee72f78), X(0x4f2491c4), X(0x4f61de02), + X(0x4f9f13ec), X(0x4fdc333b), X(0x50193ba8), X(0x50562ced), + X(0x509306c3), X(0x50cfc8e5), X(0x510c730d), X(0x514904f6), + X(0x51857e5a), X(0x51c1def5), X(0x51fe2682), X(0x523a54bc), + X(0x52766961), X(0x52b2642c), X(0x52ee44d9), X(0x532a0b26), + X(0x5365b6d0), X(0x53a14793), X(0x53dcbd2f), X(0x54181760), + X(0x545355e5), X(0x548e787d), X(0x54c97ee6), X(0x550468e1), + X(0x553f362c), X(0x5579e687), X(0x55b479b3), X(0x55eeef70), + X(0x5629477f), X(0x566381a1), X(0x569d9d97), X(0x56d79b24), + X(0x57117a0a), X(0x574b3a0a), X(0x5784dae9), X(0x57be5c69), + X(0x57f7be4d), X(0x5831005a), X(0x586a2254), X(0x58a32400), + X(0x58dc0522), X(0x5914c57f), X(0x594d64de), X(0x5985e305), + X(0x59be3fba), X(0x59f67ac3), X(0x5a2e93e9), X(0x5a668af2), + X(0x5a9e5fa6), X(0x5ad611ce), X(0x5b0da133), X(0x5b450d9d), + X(0x5b7c56d7), X(0x5bb37ca9), X(0x5bea7ede), X(0x5c215d41), + X(0x5c58179d), X(0x5c8eadbe), X(0x5cc51f6f), X(0x5cfb6c7c), + X(0x5d3194b2), X(0x5d6797de), X(0x5d9d75cf), X(0x5dd32e51), + X(0x5e08c132), X(0x5e3e2e43), X(0x5e737551), X(0x5ea8962d), + X(0x5edd90a7), X(0x5f12648e), X(0x5f4711b4), X(0x5f7b97ea), + X(0x5faff702), X(0x5fe42ece), X(0x60183f20), X(0x604c27cc), + X(0x607fe8a6), X(0x60b38180), X(0x60e6f22f), X(0x611a3a89), + X(0x614d5a62), X(0x61805190), X(0x61b31fe9), X(0x61e5c545), + X(0x62184179), X(0x624a945d), X(0x627cbdca), X(0x62aebd98), + X(0x62e0939f), X(0x63123fba), X(0x6343c1c1), X(0x6375198f), + X(0x63a646ff), X(0x63d749ec), X(0x64082232), X(0x6438cfad), + X(0x64695238), X(0x6499a9b3), X(0x64c9d5f9), X(0x64f9d6ea), + X(0x6529ac63), X(0x65595643), X(0x6588d46a), X(0x65b826b8), + X(0x65e74d0e), X(0x6616474b), X(0x66451552), X(0x6673b704), + X(0x66a22c44), X(0x66d074f4), X(0x66fe90f8), X(0x672c8033), + X(0x675a428a), X(0x6787d7e1), X(0x67b5401f), X(0x67e27b27), + X(0x680f88e1), X(0x683c6934), X(0x68691c05), X(0x6895a13e), + X(0x68c1f8c7), X(0x68ee2287), X(0x691a1e68), X(0x6945ec54), + X(0x69718c35), X(0x699cfdf5), X(0x69c8417f), X(0x69f356c0), + X(0x6a1e3da3), X(0x6a48f615), X(0x6a738002), X(0x6a9ddb5a), + X(0x6ac80808), X(0x6af205fd), X(0x6b1bd526), X(0x6b457575), + X(0x6b6ee6d8), X(0x6b982940), X(0x6bc13c9f), X(0x6bea20e5), + X(0x6c12d605), X(0x6c3b5bf1), X(0x6c63b29c), X(0x6c8bd9fb), + X(0x6cb3d200), X(0x6cdb9aa0), X(0x6d0333d0), X(0x6d2a9d86), + X(0x6d51d7b7), X(0x6d78e25a), X(0x6d9fbd67), X(0x6dc668d3), + X(0x6dece498), X(0x6e1330ad), X(0x6e394d0c), X(0x6e5f39ae), + X(0x6e84f68d), X(0x6eaa83a2), X(0x6ecfe0ea), X(0x6ef50e5e), + X(0x6f1a0bfc), X(0x6f3ed9bf), X(0x6f6377a4), X(0x6f87e5a8), + X(0x6fac23c9), X(0x6fd03206), X(0x6ff4105c), X(0x7017becc), + X(0x703b3d54), X(0x705e8bf5), X(0x7081aaaf), X(0x70a49984), + X(0x70c75874), X(0x70e9e783), X(0x710c46b2), X(0x712e7605), + X(0x7150757f), X(0x71724523), X(0x7193e4f6), X(0x71b554fd), + X(0x71d6953e), X(0x71f7a5bd), X(0x72188681), X(0x72393792), + X(0x7259b8f5), X(0x727a0ab2), X(0x729a2cd2), X(0x72ba1f5d), + X(0x72d9e25c), X(0x72f975d8), X(0x7318d9db), X(0x73380e6f), + X(0x735713a0), X(0x7375e978), X(0x73949003), X(0x73b3074c), + X(0x73d14f61), X(0x73ef684f), X(0x740d5222), X(0x742b0ce9), + X(0x744898b1), X(0x7465f589), X(0x74832381), X(0x74a022a8), + X(0x74bcf30e), X(0x74d994c3), X(0x74f607d8), X(0x75124c5f), + X(0x752e6268), X(0x754a4a05), X(0x7566034b), X(0x75818e4a), + X(0x759ceb16), X(0x75b819c4), X(0x75d31a66), X(0x75eded12), + X(0x760891dc), X(0x762308da), X(0x763d5221), X(0x76576dc8), + X(0x76715be4), X(0x768b1c8c), X(0x76a4afd9), X(0x76be15e0), + X(0x76d74ebb), X(0x76f05a82), X(0x7709394d), X(0x7721eb35), + X(0x773a7054), X(0x7752c8c4), X(0x776af49f), X(0x7782f400), + X(0x779ac701), X(0x77b26dbd), X(0x77c9e851), X(0x77e136d8), + X(0x77f8596f), X(0x780f5032), X(0x78261b3f), X(0x783cbab2), + X(0x78532eaa), X(0x78697745), X(0x787f94a0), X(0x789586db), + X(0x78ab4e15), X(0x78c0ea6d), X(0x78d65c03), X(0x78eba2f7), + X(0x7900bf68), X(0x7915b179), X(0x792a7949), X(0x793f16fb), + X(0x79538aaf), X(0x7967d488), X(0x797bf4a8), X(0x798feb31), + X(0x79a3b846), X(0x79b75c0a), X(0x79cad6a1), X(0x79de282e), + X(0x79f150d5), X(0x7a0450bb), X(0x7a172803), X(0x7a29d6d3), + X(0x7a3c5d50), X(0x7a4ebb9f), X(0x7a60f1e6), X(0x7a73004a), + X(0x7a84e6f2), X(0x7a96a604), X(0x7aa83da7), X(0x7ab9ae01), + X(0x7acaf73a), X(0x7adc1979), X(0x7aed14e6), X(0x7afde9a8), + X(0x7b0e97e8), X(0x7b1f1fcd), X(0x7b2f8182), X(0x7b3fbd2d), + X(0x7b4fd2f9), X(0x7b5fc30f), X(0x7b6f8d98), X(0x7b7f32bd), + X(0x7b8eb2a9), X(0x7b9e0d85), X(0x7bad437d), X(0x7bbc54b9), + X(0x7bcb4166), X(0x7bda09ae), X(0x7be8adbc), X(0x7bf72dbc), + X(0x7c0589d8), X(0x7c13c23d), X(0x7c21d716), X(0x7c2fc88f), + X(0x7c3d96d5), X(0x7c4b4214), X(0x7c58ca78), X(0x7c66302d), + X(0x7c737362), X(0x7c809443), X(0x7c8d92fc), X(0x7c9a6fbc), + X(0x7ca72aaf), X(0x7cb3c404), X(0x7cc03be8), X(0x7ccc9288), + X(0x7cd8c814), X(0x7ce4dcb9), X(0x7cf0d0a5), X(0x7cfca406), + X(0x7d08570c), X(0x7d13e9e5), X(0x7d1f5cbf), X(0x7d2aafca), + X(0x7d35e335), X(0x7d40f72e), X(0x7d4bebe4), X(0x7d56c188), + X(0x7d617848), X(0x7d6c1054), X(0x7d7689db), X(0x7d80e50e), + X(0x7d8b221b), X(0x7d954133), X(0x7d9f4286), X(0x7da92643), + X(0x7db2ec9b), X(0x7dbc95bd), X(0x7dc621da), X(0x7dcf9123), + X(0x7dd8e3c6), X(0x7de219f6), X(0x7deb33e2), X(0x7df431ba), + X(0x7dfd13af), X(0x7e05d9f2), X(0x7e0e84b4), X(0x7e171424), + X(0x7e1f8874), X(0x7e27e1d4), X(0x7e302074), X(0x7e384487), + X(0x7e404e3c), X(0x7e483dc4), X(0x7e501350), X(0x7e57cf11), + X(0x7e5f7138), X(0x7e66f9f4), X(0x7e6e6979), X(0x7e75bff5), + X(0x7e7cfd9a), X(0x7e842298), X(0x7e8b2f22), X(0x7e922366), + X(0x7e98ff97), X(0x7e9fc3e4), X(0x7ea6707f), X(0x7ead0598), + X(0x7eb38360), X(0x7eb9ea07), X(0x7ec039bf), X(0x7ec672b7), + X(0x7ecc9521), X(0x7ed2a12c), X(0x7ed8970a), X(0x7ede76ea), + X(0x7ee440fd), X(0x7ee9f573), X(0x7eef947d), X(0x7ef51e4b), + X(0x7efa930d), X(0x7efff2f2), X(0x7f053e2b), X(0x7f0a74e8), + X(0x7f0f9758), X(0x7f14a5ac), X(0x7f19a013), X(0x7f1e86bc), + X(0x7f2359d8), X(0x7f281995), X(0x7f2cc623), X(0x7f315fb1), + X(0x7f35e66e), X(0x7f3a5a8a), X(0x7f3ebc33), X(0x7f430b98), + X(0x7f4748e7), X(0x7f4b7450), X(0x7f4f8e01), X(0x7f539629), + X(0x7f578cf5), X(0x7f5b7293), X(0x7f5f4732), X(0x7f630b00), + X(0x7f66be2b), X(0x7f6a60df), X(0x7f6df34b), X(0x7f71759b), + X(0x7f74e7fe), X(0x7f784aa0), X(0x7f7b9daf), X(0x7f7ee156), + X(0x7f8215c3), X(0x7f853b22), X(0x7f88519f), X(0x7f8b5967), + X(0x7f8e52a6), X(0x7f913d87), X(0x7f941a36), X(0x7f96e8df), + X(0x7f99a9ad), X(0x7f9c5ccb), X(0x7f9f0265), X(0x7fa19aa5), + X(0x7fa425b5), X(0x7fa6a3c1), X(0x7fa914f3), X(0x7fab7974), + X(0x7fadd16f), X(0x7fb01d0d), X(0x7fb25c78), X(0x7fb48fd9), + X(0x7fb6b75a), X(0x7fb8d323), X(0x7fbae35d), X(0x7fbce831), + X(0x7fbee1c7), X(0x7fc0d047), X(0x7fc2b3d9), X(0x7fc48ca5), + X(0x7fc65ad3), X(0x7fc81e88), X(0x7fc9d7ee), X(0x7fcb872a), + X(0x7fcd2c63), X(0x7fcec7bf), X(0x7fd05966), X(0x7fd1e17c), + X(0x7fd36027), X(0x7fd4d58d), X(0x7fd641d3), X(0x7fd7a51e), + X(0x7fd8ff94), X(0x7fda5157), X(0x7fdb9a8e), X(0x7fdcdb5b), + X(0x7fde13e2), X(0x7fdf4448), X(0x7fe06caf), X(0x7fe18d3b), + X(0x7fe2a60e), X(0x7fe3b74b), X(0x7fe4c114), X(0x7fe5c38b), + X(0x7fe6bed2), X(0x7fe7b30a), X(0x7fe8a055), X(0x7fe986d4), + X(0x7fea66a7), X(0x7feb3ff0), X(0x7fec12cd), X(0x7fecdf5f), + X(0x7feda5c5), X(0x7fee6620), X(0x7fef208d), X(0x7fefd52c), + X(0x7ff0841c), X(0x7ff12d7a), X(0x7ff1d164), X(0x7ff26ff9), + X(0x7ff30955), X(0x7ff39d96), X(0x7ff42cd9), X(0x7ff4b739), + X(0x7ff53cd4), X(0x7ff5bdc5), X(0x7ff63a28), X(0x7ff6b217), + X(0x7ff725af), X(0x7ff7950a), X(0x7ff80043), X(0x7ff86773), + X(0x7ff8cab4), X(0x7ff92a21), X(0x7ff985d1), X(0x7ff9dddf), + X(0x7ffa3262), X(0x7ffa8374), X(0x7ffad12c), X(0x7ffb1ba1), + X(0x7ffb62ec), X(0x7ffba723), X(0x7ffbe85c), X(0x7ffc26b0), + X(0x7ffc6233), X(0x7ffc9afb), X(0x7ffcd11e), X(0x7ffd04b1), + X(0x7ffd35c9), X(0x7ffd647b), X(0x7ffd90da), X(0x7ffdbafa), + X(0x7ffde2f0), X(0x7ffe08ce), X(0x7ffe2ca7), X(0x7ffe4e8e), + X(0x7ffe6e95), X(0x7ffe8cce), X(0x7ffea94a), X(0x7ffec41b), + X(0x7ffedd52), X(0x7ffef4ff), X(0x7fff0b33), X(0x7fff1ffd), + X(0x7fff336e), X(0x7fff4593), X(0x7fff567d), X(0x7fff663a), + X(0x7fff74d8), X(0x7fff8265), X(0x7fff8eee), X(0x7fff9a81), + X(0x7fffa52b), X(0x7fffaef8), X(0x7fffb7f5), X(0x7fffc02d), + X(0x7fffc7ab), X(0x7fffce7c), X(0x7fffd4a9), X(0x7fffda3e), + X(0x7fffdf44), X(0x7fffe3c6), X(0x7fffe7cc), X(0x7fffeb60), + X(0x7fffee8a), X(0x7ffff153), X(0x7ffff3c4), X(0x7ffff5e3), + X(0x7ffff7b8), X(0x7ffff94b), X(0x7ffffaa1), X(0x7ffffbc1), + X(0x7ffffcb2), X(0x7ffffd78), X(0x7ffffe19), X(0x7ffffe9a), + X(0x7ffffeff), X(0x7fffff4e), X(0x7fffff89), X(0x7fffffb3), + X(0x7fffffd2), X(0x7fffffe6), X(0x7ffffff3), X(0x7ffffffa), + X(0x7ffffffe), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), +}; + +static LOOKUP_T vwin4096[2048] = { + X(0x000001f0), X(0x00001171), X(0x00003072), X(0x00005ef5), + X(0x00009cf8), X(0x0000ea7c), X(0x00014780), X(0x0001b405), + X(0x0002300b), X(0x0002bb91), X(0x00035698), X(0x0004011e), + X(0x0004bb25), X(0x000584ac), X(0x00065db3), X(0x0007463a), + X(0x00083e41), X(0x000945c7), X(0x000a5ccc), X(0x000b8350), + X(0x000cb954), X(0x000dfed7), X(0x000f53d8), X(0x0010b857), + X(0x00122c55), X(0x0013afd1), X(0x001542ca), X(0x0016e541), + X(0x00189735), X(0x001a58a7), X(0x001c2995), X(0x001e09ff), + X(0x001ff9e6), X(0x0021f948), X(0x00240826), X(0x00262680), + X(0x00285454), X(0x002a91a3), X(0x002cde6c), X(0x002f3aaf), + X(0x0031a66b), X(0x003421a0), X(0x0036ac4f), X(0x00394675), + X(0x003bf014), X(0x003ea92a), X(0x004171b7), X(0x004449bb), + X(0x00473135), X(0x004a2824), X(0x004d2e8a), X(0x00504463), + X(0x005369b2), X(0x00569e74), X(0x0059e2aa), X(0x005d3652), + X(0x0060996d), X(0x00640bf9), X(0x00678df7), X(0x006b1f66), + X(0x006ec045), X(0x00727093), X(0x00763051), X(0x0079ff7d), + X(0x007dde16), X(0x0081cc1d), X(0x0085c991), X(0x0089d671), + X(0x008df2bc), X(0x00921e71), X(0x00965991), X(0x009aa41a), + X(0x009efe0c), X(0x00a36766), X(0x00a7e028), X(0x00ac6850), + X(0x00b0ffde), X(0x00b5a6d1), X(0x00ba5d28), X(0x00bf22e4), + X(0x00c3f802), X(0x00c8dc83), X(0x00cdd065), X(0x00d2d3a8), + X(0x00d7e64a), X(0x00dd084c), X(0x00e239ac), X(0x00e77a69), + X(0x00ecca83), X(0x00f229f9), X(0x00f798ca), X(0x00fd16f5), + X(0x0102a479), X(0x01084155), X(0x010ded89), X(0x0113a913), + X(0x011973f3), X(0x011f4e27), X(0x012537af), X(0x012b308a), + X(0x013138b7), X(0x01375035), X(0x013d7702), X(0x0143ad1f), + X(0x0149f289), X(0x01504741), X(0x0156ab44), X(0x015d1e92), + X(0x0163a12a), X(0x016a330b), X(0x0170d433), X(0x017784a3), + X(0x017e4458), X(0x01851351), X(0x018bf18e), X(0x0192df0d), + X(0x0199dbcd), X(0x01a0e7cd), X(0x01a8030c), X(0x01af2d89), + X(0x01b66743), X(0x01bdb038), X(0x01c50867), X(0x01cc6fd0), + X(0x01d3e670), X(0x01db6c47), X(0x01e30153), X(0x01eaa593), + X(0x01f25907), X(0x01fa1bac), X(0x0201ed81), X(0x0209ce86), + X(0x0211beb8), X(0x0219be17), X(0x0221cca2), X(0x0229ea56), + X(0x02321733), X(0x023a5337), X(0x02429e60), X(0x024af8af), + X(0x02536220), X(0x025bdab3), X(0x02646267), X(0x026cf93a), + X(0x02759f2a), X(0x027e5436), X(0x0287185d), X(0x028feb9d), + X(0x0298cdf4), X(0x02a1bf62), X(0x02aabfe5), X(0x02b3cf7b), + X(0x02bcee23), X(0x02c61bdb), X(0x02cf58a2), X(0x02d8a475), + X(0x02e1ff55), X(0x02eb693e), X(0x02f4e230), X(0x02fe6a29), + X(0x03080127), X(0x0311a729), X(0x031b5c2d), X(0x03252031), + X(0x032ef334), X(0x0338d534), X(0x0342c630), X(0x034cc625), + X(0x0356d512), X(0x0360f2f6), X(0x036b1fce), X(0x03755b99), + X(0x037fa655), X(0x038a0001), X(0x0394689a), X(0x039ee020), + X(0x03a9668f), X(0x03b3fbe6), X(0x03bea024), X(0x03c95347), + X(0x03d4154d), X(0x03dee633), X(0x03e9c5f9), X(0x03f4b49b), + X(0x03ffb219), X(0x040abe71), X(0x0415d9a0), X(0x042103a5), + X(0x042c3c7d), X(0x04378428), X(0x0442daa2), X(0x044e3fea), + X(0x0459b3fd), X(0x046536db), X(0x0470c880), X(0x047c68eb), + X(0x0488181a), X(0x0493d60b), X(0x049fa2bc), X(0x04ab7e2a), + X(0x04b76854), X(0x04c36137), X(0x04cf68d1), X(0x04db7f21), + X(0x04e7a424), X(0x04f3d7d8), X(0x05001a3b), X(0x050c6b4a), + X(0x0518cb04), X(0x05253966), X(0x0531b66e), X(0x053e421a), + X(0x054adc68), X(0x05578555), X(0x05643cdf), X(0x05710304), + X(0x057dd7c1), X(0x058abb15), X(0x0597acfd), X(0x05a4ad76), + X(0x05b1bc7f), X(0x05beda14), X(0x05cc0635), X(0x05d940dd), + X(0x05e68a0b), X(0x05f3e1bd), X(0x060147f0), X(0x060ebca1), + X(0x061c3fcf), X(0x0629d176), X(0x06377194), X(0x06452027), + X(0x0652dd2c), X(0x0660a8a2), X(0x066e8284), X(0x067c6ad1), + X(0x068a6186), X(0x069866a1), X(0x06a67a1e), X(0x06b49bfc), + X(0x06c2cc38), X(0x06d10acf), X(0x06df57bf), X(0x06edb304), + X(0x06fc1c9d), X(0x070a9487), X(0x07191abe), X(0x0727af40), + X(0x0736520b), X(0x0745031c), X(0x0753c270), X(0x07629004), + X(0x07716bd6), X(0x078055e2), X(0x078f4e26), X(0x079e549f), + X(0x07ad694b), X(0x07bc8c26), X(0x07cbbd2e), X(0x07dafc5f), + X(0x07ea49b7), X(0x07f9a533), X(0x08090ed1), X(0x0818868c), + X(0x08280c62), X(0x0837a051), X(0x08474255), X(0x0856f26b), + X(0x0866b091), X(0x08767cc3), X(0x088656fe), X(0x08963f3f), + X(0x08a63584), X(0x08b639c8), X(0x08c64c0a), X(0x08d66c45), + X(0x08e69a77), X(0x08f6d69d), X(0x090720b3), X(0x091778b7), + X(0x0927dea5), X(0x0938527a), X(0x0948d433), X(0x095963cc), + X(0x096a0143), X(0x097aac94), X(0x098b65bb), X(0x099c2cb6), + X(0x09ad0182), X(0x09bde41a), X(0x09ced47d), X(0x09dfd2a5), + X(0x09f0de90), X(0x0a01f83b), X(0x0a131fa3), X(0x0a2454c3), + X(0x0a359798), X(0x0a46e820), X(0x0a584656), X(0x0a69b237), + X(0x0a7b2bc0), X(0x0a8cb2ec), X(0x0a9e47ba), X(0x0aafea24), + X(0x0ac19a29), X(0x0ad357c3), X(0x0ae522ef), X(0x0af6fbab), + X(0x0b08e1f1), X(0x0b1ad5c0), X(0x0b2cd712), X(0x0b3ee5e5), + X(0x0b510234), X(0x0b632bfd), X(0x0b75633b), X(0x0b87a7eb), + X(0x0b99fa08), X(0x0bac5990), X(0x0bbec67e), X(0x0bd140cf), + X(0x0be3c87e), X(0x0bf65d89), X(0x0c08ffeb), X(0x0c1bafa1), + X(0x0c2e6ca6), X(0x0c4136f6), X(0x0c540e8f), X(0x0c66f36c), + X(0x0c79e588), X(0x0c8ce4e1), X(0x0c9ff172), X(0x0cb30b37), + X(0x0cc6322c), X(0x0cd9664d), X(0x0ceca797), X(0x0cfff605), + X(0x0d135193), X(0x0d26ba3d), X(0x0d3a2fff), X(0x0d4db2d5), + X(0x0d6142ba), X(0x0d74dfac), X(0x0d8889a5), X(0x0d9c40a1), + X(0x0db0049d), X(0x0dc3d593), X(0x0dd7b380), X(0x0deb9e60), + X(0x0dff962f), X(0x0e139ae7), X(0x0e27ac85), X(0x0e3bcb05), + X(0x0e4ff662), X(0x0e642e98), X(0x0e7873a2), X(0x0e8cc57d), + X(0x0ea12423), X(0x0eb58f91), X(0x0eca07c2), X(0x0ede8cb1), + X(0x0ef31e5b), X(0x0f07bcba), X(0x0f1c67cb), X(0x0f311f88), + X(0x0f45e3ee), X(0x0f5ab4f7), X(0x0f6f92a0), X(0x0f847ce3), + X(0x0f9973bc), X(0x0fae7726), X(0x0fc3871e), X(0x0fd8a39d), + X(0x0fedcca1), X(0x10030223), X(0x1018441f), X(0x102d9291), + X(0x1042ed74), X(0x105854c3), X(0x106dc879), X(0x10834892), + X(0x1098d508), X(0x10ae6dd8), X(0x10c412fc), X(0x10d9c46f), + X(0x10ef822d), X(0x11054c30), X(0x111b2274), X(0x113104f5), + X(0x1146f3ac), X(0x115cee95), X(0x1172f5ab), X(0x118908e9), + X(0x119f284a), X(0x11b553ca), X(0x11cb8b62), X(0x11e1cf0f), + X(0x11f81ecb), X(0x120e7a90), X(0x1224e25a), X(0x123b5624), + X(0x1251d5e9), X(0x126861a3), X(0x127ef94e), X(0x12959ce3), + X(0x12ac4c5f), X(0x12c307bb), X(0x12d9cef2), X(0x12f0a200), + X(0x130780df), X(0x131e6b8a), X(0x133561fa), X(0x134c642c), + X(0x1363721a), X(0x137a8bbe), X(0x1391b113), X(0x13a8e214), + X(0x13c01eba), X(0x13d76702), X(0x13eebae5), X(0x14061a5e), + X(0x141d8567), X(0x1434fbfb), X(0x144c7e14), X(0x14640bae), + X(0x147ba4c1), X(0x14934949), X(0x14aaf941), X(0x14c2b4a2), + X(0x14da7b67), X(0x14f24d8a), X(0x150a2b06), X(0x152213d5), + X(0x153a07f1), X(0x15520755), X(0x156a11fb), X(0x158227dd), + X(0x159a48f5), X(0x15b2753d), X(0x15caacb1), X(0x15e2ef49), + X(0x15fb3d01), X(0x161395d2), X(0x162bf9b6), X(0x164468a8), + X(0x165ce2a1), X(0x1675679c), X(0x168df793), X(0x16a69280), + X(0x16bf385c), X(0x16d7e922), X(0x16f0a4cc), X(0x17096b54), + X(0x17223cb4), X(0x173b18e5), X(0x1753ffe2), X(0x176cf1a5), + X(0x1785ee27), X(0x179ef562), X(0x17b80750), X(0x17d123eb), + X(0x17ea4b2d), X(0x18037d10), X(0x181cb98d), X(0x1836009e), + X(0x184f523c), X(0x1868ae63), X(0x1882150a), X(0x189b862c), + X(0x18b501c4), X(0x18ce87c9), X(0x18e81836), X(0x1901b305), + X(0x191b582f), X(0x193507ad), X(0x194ec17a), X(0x1968858f), + X(0x198253e5), X(0x199c2c75), X(0x19b60f3a), X(0x19cffc2d), + X(0x19e9f347), X(0x1a03f482), X(0x1a1dffd7), X(0x1a381540), + X(0x1a5234b5), X(0x1a6c5e31), X(0x1a8691ac), X(0x1aa0cf21), + X(0x1abb1687), X(0x1ad567da), X(0x1aefc311), X(0x1b0a2826), + X(0x1b249712), X(0x1b3f0fd0), X(0x1b599257), X(0x1b741ea1), + X(0x1b8eb4a7), X(0x1ba95462), X(0x1bc3fdcd), X(0x1bdeb0de), + X(0x1bf96d91), X(0x1c1433dd), X(0x1c2f03bc), X(0x1c49dd27), + X(0x1c64c017), X(0x1c7fac85), X(0x1c9aa269), X(0x1cb5a1be), + X(0x1cd0aa7c), X(0x1cebbc9c), X(0x1d06d816), X(0x1d21fce4), + X(0x1d3d2aff), X(0x1d586260), X(0x1d73a2fe), X(0x1d8eecd4), + X(0x1daa3fda), X(0x1dc59c09), X(0x1de1015a), X(0x1dfc6fc5), + X(0x1e17e743), X(0x1e3367cd), X(0x1e4ef15b), X(0x1e6a83e7), + X(0x1e861f6a), X(0x1ea1c3da), X(0x1ebd7133), X(0x1ed9276b), + X(0x1ef4e67c), X(0x1f10ae5e), X(0x1f2c7f0a), X(0x1f485879), + X(0x1f643aa2), X(0x1f80257f), X(0x1f9c1908), X(0x1fb81536), + X(0x1fd41a00), X(0x1ff02761), X(0x200c3d4f), X(0x20285bc3), + X(0x204482b7), X(0x2060b221), X(0x207ce9fb), X(0x20992a3e), + X(0x20b572e0), X(0x20d1c3dc), X(0x20ee1d28), X(0x210a7ebe), + X(0x2126e895), X(0x21435aa6), X(0x215fd4ea), X(0x217c5757), + X(0x2198e1e8), X(0x21b57493), X(0x21d20f51), X(0x21eeb21b), + X(0x220b5ce7), X(0x22280fb0), X(0x2244ca6c), X(0x22618d13), + X(0x227e579f), X(0x229b2a06), X(0x22b80442), X(0x22d4e649), + X(0x22f1d015), X(0x230ec19d), X(0x232bbad9), X(0x2348bbc1), + X(0x2365c44c), X(0x2382d474), X(0x239fec30), X(0x23bd0b78), + X(0x23da3244), X(0x23f7608b), X(0x24149646), X(0x2431d36c), + X(0x244f17f5), X(0x246c63da), X(0x2489b711), X(0x24a71193), + X(0x24c47358), X(0x24e1dc57), X(0x24ff4c88), X(0x251cc3e2), + X(0x253a425e), X(0x2557c7f4), X(0x2575549a), X(0x2592e848), + X(0x25b082f7), X(0x25ce249e), X(0x25ebcd34), X(0x26097cb2), + X(0x2627330e), X(0x2644f040), X(0x2662b441), X(0x26807f07), + X(0x269e5089), X(0x26bc28c1), X(0x26da07a4), X(0x26f7ed2b), + X(0x2715d94d), X(0x2733cc02), X(0x2751c540), X(0x276fc500), + X(0x278dcb39), X(0x27abd7e2), X(0x27c9eaf3), X(0x27e80463), + X(0x28062429), X(0x28244a3e), X(0x28427697), X(0x2860a92d), + X(0x287ee1f7), X(0x289d20eb), X(0x28bb6603), X(0x28d9b134), + X(0x28f80275), X(0x291659c0), X(0x2934b709), X(0x29531a49), + X(0x29718378), X(0x298ff28b), X(0x29ae677b), X(0x29cce23e), + X(0x29eb62cb), X(0x2a09e91b), X(0x2a287523), X(0x2a4706dc), + X(0x2a659e3c), X(0x2a843b39), X(0x2aa2ddcd), X(0x2ac185ec), + X(0x2ae0338f), X(0x2afee6ad), X(0x2b1d9f3c), X(0x2b3c5d33), + X(0x2b5b208b), X(0x2b79e939), X(0x2b98b734), X(0x2bb78a74), + X(0x2bd662ef), X(0x2bf5409d), X(0x2c142374), X(0x2c330b6b), + X(0x2c51f87a), X(0x2c70ea97), X(0x2c8fe1b9), X(0x2caeddd6), + X(0x2ccddee7), X(0x2cece4e1), X(0x2d0befbb), X(0x2d2aff6d), + X(0x2d4a13ec), X(0x2d692d31), X(0x2d884b32), X(0x2da76de4), + X(0x2dc69540), X(0x2de5c13d), X(0x2e04f1d0), X(0x2e2426f0), + X(0x2e436095), X(0x2e629eb4), X(0x2e81e146), X(0x2ea1283f), + X(0x2ec07398), X(0x2edfc347), X(0x2eff1742), X(0x2f1e6f80), + X(0x2f3dcbf8), X(0x2f5d2ca0), X(0x2f7c916f), X(0x2f9bfa5c), + X(0x2fbb675d), X(0x2fdad869), X(0x2ffa4d76), X(0x3019c67b), + X(0x3039436f), X(0x3058c448), X(0x307848fc), X(0x3097d183), + X(0x30b75dd3), X(0x30d6ede2), X(0x30f681a6), X(0x31161917), + X(0x3135b42b), X(0x315552d8), X(0x3174f514), X(0x31949ad7), + X(0x31b44417), X(0x31d3f0ca), X(0x31f3a0e6), X(0x32135462), + X(0x32330b35), X(0x3252c555), X(0x327282b7), X(0x32924354), + X(0x32b20720), X(0x32d1ce13), X(0x32f19823), X(0x33116546), + X(0x33313573), X(0x3351089f), X(0x3370dec2), X(0x3390b7d1), + X(0x33b093c3), X(0x33d0728f), X(0x33f05429), X(0x3410388a), + X(0x34301fa7), X(0x34500977), X(0x346ff5ef), X(0x348fe506), + X(0x34afd6b3), X(0x34cfcaeb), X(0x34efc1a5), X(0x350fbad7), + X(0x352fb678), X(0x354fb47d), X(0x356fb4dd), X(0x358fb78e), + X(0x35afbc86), X(0x35cfc3bc), X(0x35efcd25), X(0x360fd8b8), + X(0x362fe66c), X(0x364ff636), X(0x3670080c), X(0x36901be5), + X(0x36b031b7), X(0x36d04978), X(0x36f0631e), X(0x37107ea0), + X(0x37309bf3), X(0x3750bb0e), X(0x3770dbe6), X(0x3790fe73), + X(0x37b122aa), X(0x37d14881), X(0x37f16fee), X(0x381198e8), + X(0x3831c365), X(0x3851ef5a), X(0x38721cbe), X(0x38924b87), + X(0x38b27bac), X(0x38d2ad21), X(0x38f2dfde), X(0x391313d8), + X(0x39334906), X(0x39537f5d), X(0x3973b6d4), X(0x3993ef60), + X(0x39b428f9), X(0x39d46393), X(0x39f49f25), X(0x3a14dba6), + X(0x3a35190a), X(0x3a555748), X(0x3a759657), X(0x3a95d62c), + X(0x3ab616be), X(0x3ad65801), X(0x3af699ed), X(0x3b16dc78), + X(0x3b371f97), X(0x3b576341), X(0x3b77a76c), X(0x3b97ec0d), + X(0x3bb8311b), X(0x3bd8768b), X(0x3bf8bc55), X(0x3c19026d), + X(0x3c3948ca), X(0x3c598f62), X(0x3c79d62b), X(0x3c9a1d1b), + X(0x3cba6428), X(0x3cdaab48), X(0x3cfaf271), X(0x3d1b3999), + X(0x3d3b80b6), X(0x3d5bc7be), X(0x3d7c0ea8), X(0x3d9c5569), + X(0x3dbc9bf7), X(0x3ddce248), X(0x3dfd2852), X(0x3e1d6e0c), + X(0x3e3db36c), X(0x3e5df866), X(0x3e7e3cf2), X(0x3e9e8106), + X(0x3ebec497), X(0x3edf079b), X(0x3eff4a09), X(0x3f1f8bd7), + X(0x3f3fccfa), X(0x3f600d69), X(0x3f804d1a), X(0x3fa08c02), + X(0x3fc0ca19), X(0x3fe10753), X(0x400143a7), X(0x40217f0a), + X(0x4041b974), X(0x4061f2da), X(0x40822b32), X(0x40a26272), + X(0x40c29891), X(0x40e2cd83), X(0x41030140), X(0x412333bd), + X(0x414364f1), X(0x416394d2), X(0x4183c355), X(0x41a3f070), + X(0x41c41c1b), X(0x41e4464a), X(0x42046ef4), X(0x42249610), + X(0x4244bb92), X(0x4264df72), X(0x428501a5), X(0x42a52222), + X(0x42c540de), X(0x42e55dd0), X(0x430578ed), X(0x4325922d), + X(0x4345a985), X(0x4365beeb), X(0x4385d255), X(0x43a5e3ba), + X(0x43c5f30f), X(0x43e6004b), X(0x44060b65), X(0x44261451), + X(0x44461b07), X(0x44661f7c), X(0x448621a7), X(0x44a6217d), + X(0x44c61ef6), X(0x44e61a07), X(0x450612a6), X(0x452608ca), + X(0x4545fc69), X(0x4565ed79), X(0x4585dbf1), X(0x45a5c7c6), + X(0x45c5b0ef), X(0x45e59761), X(0x46057b15), X(0x46255bfe), + X(0x46453a15), X(0x4665154f), X(0x4684eda2), X(0x46a4c305), + X(0x46c4956e), X(0x46e464d3), X(0x4704312b), X(0x4723fa6c), + X(0x4743c08d), X(0x47638382), X(0x47834344), X(0x47a2ffc9), + X(0x47c2b906), X(0x47e26ef2), X(0x48022183), X(0x4821d0b1), + X(0x48417c71), X(0x486124b9), X(0x4880c981), X(0x48a06abe), + X(0x48c00867), X(0x48dfa272), X(0x48ff38d6), X(0x491ecb8a), + X(0x493e5a84), X(0x495de5b9), X(0x497d6d22), X(0x499cf0b4), + X(0x49bc7066), X(0x49dbec2e), X(0x49fb6402), X(0x4a1ad7db), + X(0x4a3a47ad), X(0x4a59b370), X(0x4a791b1a), X(0x4a987ea1), + X(0x4ab7ddfd), X(0x4ad73924), X(0x4af6900c), X(0x4b15e2ad), + X(0x4b3530fc), X(0x4b547af1), X(0x4b73c082), X(0x4b9301a6), + X(0x4bb23e53), X(0x4bd17681), X(0x4bf0aa25), X(0x4c0fd937), + X(0x4c2f03ae), X(0x4c4e297f), X(0x4c6d4aa3), X(0x4c8c670f), + X(0x4cab7eba), X(0x4cca919c), X(0x4ce99fab), X(0x4d08a8de), + X(0x4d27ad2c), X(0x4d46ac8b), X(0x4d65a6f3), X(0x4d849c5a), + X(0x4da38cb7), X(0x4dc27802), X(0x4de15e31), X(0x4e003f3a), + X(0x4e1f1b16), X(0x4e3df1ba), X(0x4e5cc31e), X(0x4e7b8f3a), + X(0x4e9a5603), X(0x4eb91771), X(0x4ed7d37b), X(0x4ef68a18), + X(0x4f153b3f), X(0x4f33e6e7), X(0x4f528d08), X(0x4f712d97), + X(0x4f8fc88e), X(0x4fae5de1), X(0x4fcced8a), X(0x4feb777f), + X(0x5009fbb6), X(0x50287a28), X(0x5046f2cc), X(0x50656598), + X(0x5083d284), X(0x50a23988), X(0x50c09a9a), X(0x50def5b1), + X(0x50fd4ac7), X(0x511b99d0), X(0x5139e2c5), X(0x5158259e), + X(0x51766251), X(0x519498d6), X(0x51b2c925), X(0x51d0f334), + X(0x51ef16fb), X(0x520d3473), X(0x522b4b91), X(0x52495c4e), + X(0x526766a2), X(0x52856a83), X(0x52a367e9), X(0x52c15ecd), + X(0x52df4f24), X(0x52fd38e8), X(0x531b1c10), X(0x5338f892), + X(0x5356ce68), X(0x53749d89), X(0x539265eb), X(0x53b02788), + X(0x53cde257), X(0x53eb964f), X(0x54094369), X(0x5426e99c), + X(0x544488df), X(0x5462212c), X(0x547fb279), X(0x549d3cbe), + X(0x54babff4), X(0x54d83c12), X(0x54f5b110), X(0x55131ee7), + X(0x5530858d), X(0x554de4fc), X(0x556b3d2a), X(0x55888e11), + X(0x55a5d7a8), X(0x55c319e7), X(0x55e054c7), X(0x55fd883f), + X(0x561ab447), X(0x5637d8d8), X(0x5654f5ea), X(0x56720b75), + X(0x568f1971), X(0x56ac1fd7), X(0x56c91e9e), X(0x56e615c0), + X(0x57030534), X(0x571fecf2), X(0x573cccf3), X(0x5759a530), + X(0x577675a0), X(0x57933e3c), X(0x57affefd), X(0x57ccb7db), + X(0x57e968ce), X(0x580611cf), X(0x5822b2d6), X(0x583f4bdd), + X(0x585bdcdb), X(0x587865c9), X(0x5894e69f), X(0x58b15f57), + X(0x58cdcfe9), X(0x58ea384e), X(0x5906987d), X(0x5922f071), + X(0x593f4022), X(0x595b8788), X(0x5977c69c), X(0x5993fd57), + X(0x59b02bb2), X(0x59cc51a6), X(0x59e86f2c), X(0x5a04843c), + X(0x5a2090d0), X(0x5a3c94e0), X(0x5a589065), X(0x5a748359), + X(0x5a906db4), X(0x5aac4f70), X(0x5ac82884), X(0x5ae3f8ec), + X(0x5affc09f), X(0x5b1b7f97), X(0x5b3735cd), X(0x5b52e33a), + X(0x5b6e87d8), X(0x5b8a239f), X(0x5ba5b689), X(0x5bc1408f), + X(0x5bdcc1aa), X(0x5bf839d5), X(0x5c13a907), X(0x5c2f0f3b), + X(0x5c4a6c6a), X(0x5c65c08d), X(0x5c810b9e), X(0x5c9c4d97), + X(0x5cb78670), X(0x5cd2b623), X(0x5ceddcaa), X(0x5d08f9ff), + X(0x5d240e1b), X(0x5d3f18f8), X(0x5d5a1a8f), X(0x5d7512da), + X(0x5d9001d3), X(0x5daae773), X(0x5dc5c3b5), X(0x5de09692), + X(0x5dfb6004), X(0x5e162004), X(0x5e30d68d), X(0x5e4b8399), + X(0x5e662721), X(0x5e80c11f), X(0x5e9b518e), X(0x5eb5d867), + X(0x5ed055a4), X(0x5eeac940), X(0x5f053334), X(0x5f1f937b), + X(0x5f39ea0f), X(0x5f5436ea), X(0x5f6e7a06), X(0x5f88b35d), + X(0x5fa2e2e9), X(0x5fbd08a6), X(0x5fd7248d), X(0x5ff13698), + X(0x600b3ec2), X(0x60253d05), X(0x603f315b), X(0x60591bc0), + X(0x6072fc2d), X(0x608cd29e), X(0x60a69f0b), X(0x60c06171), + X(0x60da19ca), X(0x60f3c80f), X(0x610d6c3d), X(0x6127064d), + X(0x6140963a), X(0x615a1bff), X(0x61739797), X(0x618d08fc), + X(0x61a67029), X(0x61bfcd1a), X(0x61d91fc8), X(0x61f2682f), + X(0x620ba64a), X(0x6224da13), X(0x623e0386), X(0x6257229d), + X(0x62703754), X(0x628941a6), X(0x62a2418e), X(0x62bb3706), + X(0x62d4220a), X(0x62ed0296), X(0x6305d8a3), X(0x631ea42f), + X(0x63376533), X(0x63501bab), X(0x6368c793), X(0x638168e5), + X(0x6399ff9e), X(0x63b28bb8), X(0x63cb0d2f), X(0x63e383ff), + X(0x63fbf022), X(0x64145195), X(0x642ca853), X(0x6444f457), + X(0x645d359e), X(0x64756c22), X(0x648d97e0), X(0x64a5b8d3), + X(0x64bdcef6), X(0x64d5da47), X(0x64eddabf), X(0x6505d05c), + X(0x651dbb19), X(0x65359af2), X(0x654d6fe3), X(0x656539e7), + X(0x657cf8fb), X(0x6594ad1b), X(0x65ac5643), X(0x65c3f46e), + X(0x65db8799), X(0x65f30fc0), X(0x660a8ce0), X(0x6621fef3), + X(0x663965f7), X(0x6650c1e7), X(0x666812c1), X(0x667f5880), + X(0x66969320), X(0x66adc29e), X(0x66c4e6f7), X(0x66dc0026), + X(0x66f30e28), X(0x670a10fa), X(0x67210898), X(0x6737f4ff), + X(0x674ed62b), X(0x6765ac19), X(0x677c76c5), X(0x6793362c), + X(0x67a9ea4b), X(0x67c0931f), X(0x67d730a3), X(0x67edc2d6), + X(0x680449b3), X(0x681ac538), X(0x68313562), X(0x68479a2d), + X(0x685df396), X(0x6874419b), X(0x688a8438), X(0x68a0bb6a), + X(0x68b6e72e), X(0x68cd0782), X(0x68e31c63), X(0x68f925cd), + X(0x690f23be), X(0x69251633), X(0x693afd29), X(0x6950d89e), + X(0x6966a88f), X(0x697c6cf8), X(0x699225d9), X(0x69a7d32d), + X(0x69bd74f3), X(0x69d30b27), X(0x69e895c8), X(0x69fe14d2), + X(0x6a138844), X(0x6a28f01b), X(0x6a3e4c54), X(0x6a539ced), + X(0x6a68e1e4), X(0x6a7e1b37), X(0x6a9348e3), X(0x6aa86ae6), + X(0x6abd813d), X(0x6ad28be7), X(0x6ae78ae2), X(0x6afc7e2b), + X(0x6b1165c0), X(0x6b26419f), X(0x6b3b11c7), X(0x6b4fd634), + X(0x6b648ee6), X(0x6b793bda), X(0x6b8ddd0e), X(0x6ba27281), + X(0x6bb6fc31), X(0x6bcb7a1b), X(0x6bdfec3e), X(0x6bf45299), + X(0x6c08ad29), X(0x6c1cfbed), X(0x6c313ee4), X(0x6c45760a), + X(0x6c59a160), X(0x6c6dc0e4), X(0x6c81d493), X(0x6c95dc6d), + X(0x6ca9d86f), X(0x6cbdc899), X(0x6cd1acea), X(0x6ce5855f), + X(0x6cf951f7), X(0x6d0d12b1), X(0x6d20c78c), X(0x6d347087), + X(0x6d480da0), X(0x6d5b9ed6), X(0x6d6f2427), X(0x6d829d94), + X(0x6d960b1a), X(0x6da96cb9), X(0x6dbcc270), X(0x6dd00c3c), + X(0x6de34a1f), X(0x6df67c16), X(0x6e09a221), X(0x6e1cbc3f), + X(0x6e2fca6e), X(0x6e42ccaf), X(0x6e55c300), X(0x6e68ad60), + X(0x6e7b8bd0), X(0x6e8e5e4d), X(0x6ea124d8), X(0x6eb3df70), + X(0x6ec68e13), X(0x6ed930c3), X(0x6eebc77d), X(0x6efe5242), + X(0x6f10d111), X(0x6f2343e9), X(0x6f35aacb), X(0x6f4805b5), + X(0x6f5a54a8), X(0x6f6c97a2), X(0x6f7ecea4), X(0x6f90f9ae), + X(0x6fa318be), X(0x6fb52bd6), X(0x6fc732f4), X(0x6fd92e19), + X(0x6feb1d44), X(0x6ffd0076), X(0x700ed7ad), X(0x7020a2eb), + X(0x7032622f), X(0x7044157a), X(0x7055bcca), X(0x70675821), + X(0x7078e77e), X(0x708a6ae2), X(0x709be24c), X(0x70ad4dbd), + X(0x70bead36), X(0x70d000b5), X(0x70e1483d), X(0x70f283cc), + X(0x7103b363), X(0x7114d704), X(0x7125eead), X(0x7136fa60), + X(0x7147fa1c), X(0x7158ede4), X(0x7169d5b6), X(0x717ab193), + X(0x718b817d), X(0x719c4573), X(0x71acfd76), X(0x71bda988), + X(0x71ce49a8), X(0x71deddd7), X(0x71ef6617), X(0x71ffe267), + X(0x721052ca), X(0x7220b73e), X(0x72310fc6), X(0x72415c62), + X(0x72519d14), X(0x7261d1db), X(0x7271faba), X(0x728217b1), + X(0x729228c0), X(0x72a22dea), X(0x72b22730), X(0x72c21491), + X(0x72d1f611), X(0x72e1cbaf), X(0x72f1956c), X(0x7301534c), + X(0x7311054d), X(0x7320ab72), X(0x733045bc), X(0x733fd42d), + X(0x734f56c5), X(0x735ecd86), X(0x736e3872), X(0x737d9789), + X(0x738ceacf), X(0x739c3243), X(0x73ab6de7), X(0x73ba9dbe), + X(0x73c9c1c8), X(0x73d8da08), X(0x73e7e67f), X(0x73f6e72e), + X(0x7405dc17), X(0x7414c53c), X(0x7423a29f), X(0x74327442), + X(0x74413a26), X(0x744ff44d), X(0x745ea2b9), X(0x746d456c), + X(0x747bdc68), X(0x748a67ae), X(0x7498e741), X(0x74a75b23), + X(0x74b5c356), X(0x74c41fdb), X(0x74d270b6), X(0x74e0b5e7), + X(0x74eeef71), X(0x74fd1d57), X(0x750b3f9a), X(0x7519563c), + X(0x75276140), X(0x753560a8), X(0x75435477), X(0x75513cae), + X(0x755f1951), X(0x756cea60), X(0x757aafdf), X(0x758869d1), + X(0x75961837), X(0x75a3bb14), X(0x75b1526a), X(0x75bede3c), + X(0x75cc5e8d), X(0x75d9d35f), X(0x75e73cb5), X(0x75f49a91), + X(0x7601ecf6), X(0x760f33e6), X(0x761c6f65), X(0x76299f74), + X(0x7636c417), X(0x7643dd51), X(0x7650eb24), X(0x765ded93), + X(0x766ae4a0), X(0x7677d050), X(0x7684b0a4), X(0x7691859f), + X(0x769e4f45), X(0x76ab0d98), X(0x76b7c09c), X(0x76c46852), + X(0x76d104bf), X(0x76dd95e6), X(0x76ea1bc9), X(0x76f6966b), + X(0x770305d0), X(0x770f69fb), X(0x771bc2ef), X(0x772810af), + X(0x7734533e), X(0x77408aa0), X(0x774cb6d7), X(0x7758d7e8), + X(0x7764edd5), X(0x7770f8a2), X(0x777cf852), X(0x7788ece8), + X(0x7794d668), X(0x77a0b4d5), X(0x77ac8833), X(0x77b85085), + X(0x77c40dce), X(0x77cfc013), X(0x77db6756), X(0x77e7039b), + X(0x77f294e6), X(0x77fe1b3b), X(0x7809969c), X(0x7815070e), + X(0x78206c93), X(0x782bc731), X(0x783716ea), X(0x78425bc3), + X(0x784d95be), X(0x7858c4e1), X(0x7863e92d), X(0x786f02a8), + X(0x787a1156), X(0x78851539), X(0x78900e56), X(0x789afcb1), + X(0x78a5e04d), X(0x78b0b92f), X(0x78bb875b), X(0x78c64ad4), + X(0x78d1039e), X(0x78dbb1be), X(0x78e65537), X(0x78f0ee0e), + X(0x78fb7c46), X(0x7905ffe4), X(0x791078ec), X(0x791ae762), + X(0x79254b4a), X(0x792fa4a7), X(0x7939f380), X(0x794437d7), + X(0x794e71b0), X(0x7958a111), X(0x7962c5fd), X(0x796ce078), + X(0x7976f087), X(0x7980f62f), X(0x798af173), X(0x7994e258), + X(0x799ec8e2), X(0x79a8a515), X(0x79b276f7), X(0x79bc3e8b), + X(0x79c5fbd6), X(0x79cfaedc), X(0x79d957a2), X(0x79e2f62c), + X(0x79ec8a7f), X(0x79f6149f), X(0x79ff9492), X(0x7a090a5a), + X(0x7a1275fe), X(0x7a1bd781), X(0x7a252ee9), X(0x7a2e7c39), + X(0x7a37bf77), X(0x7a40f8a7), X(0x7a4a27ce), X(0x7a534cf0), + X(0x7a5c6813), X(0x7a65793b), X(0x7a6e806d), X(0x7a777dad), + X(0x7a807100), X(0x7a895a6b), X(0x7a9239f4), X(0x7a9b0f9e), + X(0x7aa3db6f), X(0x7aac9d6b), X(0x7ab55597), X(0x7abe03f9), + X(0x7ac6a895), X(0x7acf4370), X(0x7ad7d48f), X(0x7ae05bf6), + X(0x7ae8d9ac), X(0x7af14db5), X(0x7af9b815), X(0x7b0218d2), + X(0x7b0a6ff2), X(0x7b12bd78), X(0x7b1b016a), X(0x7b233bce), + X(0x7b2b6ca7), X(0x7b3393fc), X(0x7b3bb1d1), X(0x7b43c62c), + X(0x7b4bd111), X(0x7b53d286), X(0x7b5bca90), X(0x7b63b935), + X(0x7b6b9e78), X(0x7b737a61), X(0x7b7b4cf3), X(0x7b831634), + X(0x7b8ad629), X(0x7b928cd8), X(0x7b9a3a45), X(0x7ba1de77), + X(0x7ba97972), X(0x7bb10b3c), X(0x7bb893d9), X(0x7bc01350), + X(0x7bc789a6), X(0x7bcef6e0), X(0x7bd65b03), X(0x7bddb616), + X(0x7be5081c), X(0x7bec511c), X(0x7bf3911b), X(0x7bfac81f), + X(0x7c01f62c), X(0x7c091b49), X(0x7c10377b), X(0x7c174ac7), + X(0x7c1e5532), X(0x7c2556c4), X(0x7c2c4f80), X(0x7c333f6c), + X(0x7c3a268e), X(0x7c4104ec), X(0x7c47da8a), X(0x7c4ea76f), + X(0x7c556ba1), X(0x7c5c2724), X(0x7c62d9fe), X(0x7c698435), + X(0x7c7025cf), X(0x7c76bed0), X(0x7c7d4f40), X(0x7c83d723), + X(0x7c8a567f), X(0x7c90cd5a), X(0x7c973bb9), X(0x7c9da1a2), + X(0x7ca3ff1b), X(0x7caa542a), X(0x7cb0a0d3), X(0x7cb6e51e), + X(0x7cbd210f), X(0x7cc354ac), X(0x7cc97ffc), X(0x7ccfa304), + X(0x7cd5bdc9), X(0x7cdbd051), X(0x7ce1daa3), X(0x7ce7dcc3), + X(0x7cedd6b8), X(0x7cf3c888), X(0x7cf9b238), X(0x7cff93cf), + X(0x7d056d51), X(0x7d0b3ec5), X(0x7d110830), X(0x7d16c99a), + X(0x7d1c8306), X(0x7d22347c), X(0x7d27de00), X(0x7d2d7f9a), + X(0x7d33194f), X(0x7d38ab24), X(0x7d3e351f), X(0x7d43b748), + X(0x7d4931a2), X(0x7d4ea435), X(0x7d540f06), X(0x7d59721b), + X(0x7d5ecd7b), X(0x7d64212a), X(0x7d696d2f), X(0x7d6eb190), + X(0x7d73ee53), X(0x7d79237e), X(0x7d7e5117), X(0x7d837723), + X(0x7d8895a9), X(0x7d8dacae), X(0x7d92bc3a), X(0x7d97c451), + X(0x7d9cc4f9), X(0x7da1be39), X(0x7da6b017), X(0x7dab9a99), + X(0x7db07dc4), X(0x7db5599e), X(0x7dba2e2f), X(0x7dbefb7b), + X(0x7dc3c189), X(0x7dc8805e), X(0x7dcd3802), X(0x7dd1e879), + X(0x7dd691ca), X(0x7ddb33fb), X(0x7ddfcf12), X(0x7de46315), + X(0x7de8f00a), X(0x7ded75f8), X(0x7df1f4e3), X(0x7df66cd3), + X(0x7dfaddcd), X(0x7dff47d7), X(0x7e03aaf8), X(0x7e080735), + X(0x7e0c5c95), X(0x7e10ab1e), X(0x7e14f2d5), X(0x7e1933c1), + X(0x7e1d6de8), X(0x7e21a150), X(0x7e25cdff), X(0x7e29f3fc), + X(0x7e2e134c), X(0x7e322bf5), X(0x7e363dfd), X(0x7e3a496b), + X(0x7e3e4e45), X(0x7e424c90), X(0x7e464454), X(0x7e4a3595), + X(0x7e4e205a), X(0x7e5204aa), X(0x7e55e289), X(0x7e59b9ff), + X(0x7e5d8b12), X(0x7e6155c7), X(0x7e651a24), X(0x7e68d831), + X(0x7e6c8ff2), X(0x7e70416e), X(0x7e73ecac), X(0x7e7791b0), + X(0x7e7b3082), X(0x7e7ec927), X(0x7e825ba6), X(0x7e85e804), + X(0x7e896e48), X(0x7e8cee77), X(0x7e906899), X(0x7e93dcb2), + X(0x7e974aca), X(0x7e9ab2e5), X(0x7e9e150b), X(0x7ea17141), + X(0x7ea4c78e), X(0x7ea817f7), X(0x7eab6283), X(0x7eaea737), + X(0x7eb1e61a), X(0x7eb51f33), X(0x7eb85285), X(0x7ebb8019), + X(0x7ebea7f4), X(0x7ec1ca1d), X(0x7ec4e698), X(0x7ec7fd6d), + X(0x7ecb0ea1), X(0x7ece1a3a), X(0x7ed1203f), X(0x7ed420b6), + X(0x7ed71ba4), X(0x7eda110f), X(0x7edd00ff), X(0x7edfeb78), + X(0x7ee2d081), X(0x7ee5b01f), X(0x7ee88a5a), X(0x7eeb5f36), + X(0x7eee2eba), X(0x7ef0f8ed), X(0x7ef3bdd3), X(0x7ef67d73), + X(0x7ef937d3), X(0x7efbecf9), X(0x7efe9ceb), X(0x7f0147ae), + X(0x7f03ed4a), X(0x7f068dc4), X(0x7f092922), X(0x7f0bbf69), + X(0x7f0e50a1), X(0x7f10dcce), X(0x7f1363f7), X(0x7f15e622), + X(0x7f186355), X(0x7f1adb95), X(0x7f1d4ee9), X(0x7f1fbd57), + X(0x7f2226e4), X(0x7f248b96), X(0x7f26eb74), X(0x7f294683), + X(0x7f2b9cc9), X(0x7f2dee4d), X(0x7f303b13), X(0x7f328322), + X(0x7f34c680), X(0x7f370533), X(0x7f393f40), X(0x7f3b74ad), + X(0x7f3da581), X(0x7f3fd1c1), X(0x7f41f972), X(0x7f441c9c), + X(0x7f463b43), X(0x7f48556d), X(0x7f4a6b21), X(0x7f4c7c64), + X(0x7f4e893c), X(0x7f5091ae), X(0x7f5295c1), X(0x7f54957a), + X(0x7f5690e0), X(0x7f5887f7), X(0x7f5a7ac5), X(0x7f5c6951), + X(0x7f5e53a0), X(0x7f6039b8), X(0x7f621b9e), X(0x7f63f958), + X(0x7f65d2ed), X(0x7f67a861), X(0x7f6979ba), X(0x7f6b46ff), + X(0x7f6d1034), X(0x7f6ed560), X(0x7f709687), X(0x7f7253b1), + X(0x7f740ce1), X(0x7f75c21f), X(0x7f777370), X(0x7f7920d8), + X(0x7f7aca5f), X(0x7f7c7008), X(0x7f7e11db), X(0x7f7fafdd), + X(0x7f814a13), X(0x7f82e082), X(0x7f847331), X(0x7f860224), + X(0x7f878d62), X(0x7f8914f0), X(0x7f8a98d4), X(0x7f8c1912), + X(0x7f8d95b0), X(0x7f8f0eb5), X(0x7f908425), X(0x7f91f605), + X(0x7f93645c), X(0x7f94cf2f), X(0x7f963683), X(0x7f979a5d), + X(0x7f98fac4), X(0x7f9a57bb), X(0x7f9bb14a), X(0x7f9d0775), + X(0x7f9e5a41), X(0x7f9fa9b4), X(0x7fa0f5d3), X(0x7fa23ea4), + X(0x7fa3842b), X(0x7fa4c66f), X(0x7fa60575), X(0x7fa74141), + X(0x7fa879d9), X(0x7fa9af42), X(0x7faae182), X(0x7fac109e), + X(0x7fad3c9a), X(0x7fae657d), X(0x7faf8b4c), X(0x7fb0ae0b), + X(0x7fb1cdc0), X(0x7fb2ea70), X(0x7fb40420), X(0x7fb51ad5), + X(0x7fb62e95), X(0x7fb73f64), X(0x7fb84d48), X(0x7fb95846), + X(0x7fba6062), X(0x7fbb65a2), X(0x7fbc680c), X(0x7fbd67a3), + X(0x7fbe646d), X(0x7fbf5e70), X(0x7fc055af), X(0x7fc14a31), + X(0x7fc23bf9), X(0x7fc32b0d), X(0x7fc41773), X(0x7fc5012e), + X(0x7fc5e844), X(0x7fc6ccba), X(0x7fc7ae94), X(0x7fc88dd8), + X(0x7fc96a8a), X(0x7fca44af), X(0x7fcb1c4c), X(0x7fcbf167), + X(0x7fccc403), X(0x7fcd9425), X(0x7fce61d3), X(0x7fcf2d11), + X(0x7fcff5e3), X(0x7fd0bc4f), X(0x7fd1805a), X(0x7fd24207), + X(0x7fd3015c), X(0x7fd3be5d), X(0x7fd47910), X(0x7fd53178), + X(0x7fd5e79b), X(0x7fd69b7c), X(0x7fd74d21), X(0x7fd7fc8e), + X(0x7fd8a9c8), X(0x7fd954d4), X(0x7fd9fdb5), X(0x7fdaa471), + X(0x7fdb490b), X(0x7fdbeb89), X(0x7fdc8bef), X(0x7fdd2a42), + X(0x7fddc685), X(0x7fde60be), X(0x7fdef8f0), X(0x7fdf8f20), + X(0x7fe02353), X(0x7fe0b58d), X(0x7fe145d3), X(0x7fe1d428), + X(0x7fe26091), X(0x7fe2eb12), X(0x7fe373b0), X(0x7fe3fa6f), + X(0x7fe47f53), X(0x7fe50260), X(0x7fe5839b), X(0x7fe60308), + X(0x7fe680ab), X(0x7fe6fc88), X(0x7fe776a4), X(0x7fe7ef02), + X(0x7fe865a7), X(0x7fe8da97), X(0x7fe94dd6), X(0x7fe9bf68), + X(0x7fea2f51), X(0x7fea9d95), X(0x7feb0a39), X(0x7feb7540), + X(0x7febdeae), X(0x7fec4687), X(0x7fecaccf), X(0x7fed118b), + X(0x7fed74be), X(0x7fedd66c), X(0x7fee3698), X(0x7fee9548), + X(0x7feef27e), X(0x7fef4e3f), X(0x7fefa88e), X(0x7ff0016f), + X(0x7ff058e7), X(0x7ff0aef8), X(0x7ff103a6), X(0x7ff156f6), + X(0x7ff1a8eb), X(0x7ff1f988), X(0x7ff248d2), X(0x7ff296cc), + X(0x7ff2e37a), X(0x7ff32edf), X(0x7ff378ff), X(0x7ff3c1de), + X(0x7ff4097e), X(0x7ff44fe5), X(0x7ff49515), X(0x7ff4d911), + X(0x7ff51bde), X(0x7ff55d7f), X(0x7ff59df7), X(0x7ff5dd4a), + X(0x7ff61b7b), X(0x7ff6588d), X(0x7ff69485), X(0x7ff6cf65), + X(0x7ff70930), X(0x7ff741eb), X(0x7ff77998), X(0x7ff7b03b), + X(0x7ff7e5d7), X(0x7ff81a6f), X(0x7ff84e06), X(0x7ff880a1), + X(0x7ff8b241), X(0x7ff8e2ea), X(0x7ff912a0), X(0x7ff94165), + X(0x7ff96f3d), X(0x7ff99c2b), X(0x7ff9c831), X(0x7ff9f354), + X(0x7ffa1d95), X(0x7ffa46f9), X(0x7ffa6f81), X(0x7ffa9731), + X(0x7ffabe0d), X(0x7ffae416), X(0x7ffb0951), X(0x7ffb2dbf), + X(0x7ffb5164), X(0x7ffb7442), X(0x7ffb965d), X(0x7ffbb7b8), + X(0x7ffbd854), X(0x7ffbf836), X(0x7ffc175f), X(0x7ffc35d3), + X(0x7ffc5394), X(0x7ffc70a5), X(0x7ffc8d09), X(0x7ffca8c2), + X(0x7ffcc3d4), X(0x7ffcde3f), X(0x7ffcf809), X(0x7ffd1132), + X(0x7ffd29be), X(0x7ffd41ae), X(0x7ffd5907), X(0x7ffd6fc9), + X(0x7ffd85f9), X(0x7ffd9b97), X(0x7ffdb0a7), X(0x7ffdc52b), + X(0x7ffdd926), X(0x7ffdec99), X(0x7ffdff88), X(0x7ffe11f4), + X(0x7ffe23e0), X(0x7ffe354f), X(0x7ffe4642), X(0x7ffe56bc), + X(0x7ffe66bf), X(0x7ffe764e), X(0x7ffe856a), X(0x7ffe9416), + X(0x7ffea254), X(0x7ffeb026), X(0x7ffebd8e), X(0x7ffeca8f), + X(0x7ffed72a), X(0x7ffee362), X(0x7ffeef38), X(0x7ffefaaf), + X(0x7fff05c9), X(0x7fff1087), X(0x7fff1aec), X(0x7fff24f9), + X(0x7fff2eb1), X(0x7fff3816), X(0x7fff4128), X(0x7fff49eb), + X(0x7fff5260), X(0x7fff5a88), X(0x7fff6266), X(0x7fff69fc), + X(0x7fff714b), X(0x7fff7854), X(0x7fff7f1a), X(0x7fff859f), + X(0x7fff8be3), X(0x7fff91ea), X(0x7fff97b3), X(0x7fff9d41), + X(0x7fffa296), X(0x7fffa7b3), X(0x7fffac99), X(0x7fffb14b), + X(0x7fffb5c9), X(0x7fffba15), X(0x7fffbe31), X(0x7fffc21d), + X(0x7fffc5dc), X(0x7fffc96f), X(0x7fffccd8), X(0x7fffd016), + X(0x7fffd32d), X(0x7fffd61c), X(0x7fffd8e7), X(0x7fffdb8d), + X(0x7fffde0f), X(0x7fffe071), X(0x7fffe2b1), X(0x7fffe4d2), + X(0x7fffe6d5), X(0x7fffe8bb), X(0x7fffea85), X(0x7fffec34), + X(0x7fffedc9), X(0x7fffef45), X(0x7ffff0aa), X(0x7ffff1f7), + X(0x7ffff330), X(0x7ffff453), X(0x7ffff562), X(0x7ffff65f), + X(0x7ffff749), X(0x7ffff823), X(0x7ffff8ec), X(0x7ffff9a6), + X(0x7ffffa51), X(0x7ffffaee), X(0x7ffffb7e), X(0x7ffffc02), + X(0x7ffffc7a), X(0x7ffffce7), X(0x7ffffd4a), X(0x7ffffda3), + X(0x7ffffdf4), X(0x7ffffe3c), X(0x7ffffe7c), X(0x7ffffeb6), + X(0x7ffffee8), X(0x7fffff15), X(0x7fffff3c), X(0x7fffff5e), + X(0x7fffff7b), X(0x7fffff95), X(0x7fffffaa), X(0x7fffffbc), + X(0x7fffffcb), X(0x7fffffd7), X(0x7fffffe2), X(0x7fffffea), + X(0x7ffffff0), X(0x7ffffff5), X(0x7ffffff9), X(0x7ffffffb), + X(0x7ffffffd), X(0x7ffffffe), X(0x7fffffff), X(0x7fffffff), + X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), +}; + +#ifndef LIMIT_TO_64kHz + +static LOOKUP_T vwin8192[4096] = { + X(0x0000007c), X(0x0000045c), X(0x00000c1d), X(0x000017bd), + X(0x0000273e), X(0x00003a9f), X(0x000051e0), X(0x00006d02), + X(0x00008c03), X(0x0000aee5), X(0x0000d5a7), X(0x00010049), + X(0x00012ecb), X(0x0001612d), X(0x00019770), X(0x0001d193), + X(0x00020f96), X(0x00025178), X(0x0002973c), X(0x0002e0df), + X(0x00032e62), X(0x00037fc5), X(0x0003d509), X(0x00042e2c), + X(0x00048b30), X(0x0004ec13), X(0x000550d7), X(0x0005b97a), + X(0x000625fe), X(0x00069661), X(0x00070aa4), X(0x000782c8), + X(0x0007fecb), X(0x00087eae), X(0x00090271), X(0x00098a14), + X(0x000a1597), X(0x000aa4f9), X(0x000b383b), X(0x000bcf5d), + X(0x000c6a5f), X(0x000d0941), X(0x000dac02), X(0x000e52a3), + X(0x000efd23), X(0x000fab84), X(0x00105dc3), X(0x001113e3), + X(0x0011cde2), X(0x00128bc0), X(0x00134d7e), X(0x0014131b), + X(0x0014dc98), X(0x0015a9f4), X(0x00167b30), X(0x0017504a), + X(0x00182945), X(0x0019061e), X(0x0019e6d7), X(0x001acb6f), + X(0x001bb3e6), X(0x001ca03c), X(0x001d9071), X(0x001e8485), + X(0x001f7c79), X(0x0020784b), X(0x002177fc), X(0x00227b8c), + X(0x002382fb), X(0x00248e49), X(0x00259d76), X(0x0026b081), + X(0x0027c76b), X(0x0028e234), X(0x002a00dc), X(0x002b2361), + X(0x002c49c6), X(0x002d7409), X(0x002ea22a), X(0x002fd42a), + X(0x00310a08), X(0x003243c5), X(0x00338160), X(0x0034c2d9), + X(0x00360830), X(0x00375165), X(0x00389e78), X(0x0039ef6a), + X(0x003b4439), X(0x003c9ce6), X(0x003df971), X(0x003f59da), + X(0x0040be20), X(0x00422645), X(0x00439247), X(0x00450226), + X(0x004675e3), X(0x0047ed7e), X(0x004968f5), X(0x004ae84b), + X(0x004c6b7d), X(0x004df28d), X(0x004f7d7a), X(0x00510c44), + X(0x00529eeb), X(0x00543570), X(0x0055cfd1), X(0x00576e0f), + X(0x00591029), X(0x005ab621), X(0x005c5ff5), X(0x005e0da6), + X(0x005fbf33), X(0x0061749d), X(0x00632de4), X(0x0064eb06), + X(0x0066ac05), X(0x006870e0), X(0x006a3998), X(0x006c062b), + X(0x006dd69b), X(0x006faae6), X(0x0071830d), X(0x00735f10), + X(0x00753eef), X(0x007722a9), X(0x00790a3f), X(0x007af5b1), + X(0x007ce4fe), X(0x007ed826), X(0x0080cf29), X(0x0082ca08), + X(0x0084c8c2), X(0x0086cb57), X(0x0088d1c7), X(0x008adc11), + X(0x008cea37), X(0x008efc37), X(0x00911212), X(0x00932bc7), + X(0x00954957), X(0x00976ac2), X(0x00999006), X(0x009bb925), + X(0x009de61e), X(0x00a016f1), X(0x00a24b9e), X(0x00a48425), + X(0x00a6c086), X(0x00a900c0), X(0x00ab44d4), X(0x00ad8cc2), + X(0x00afd889), X(0x00b22829), X(0x00b47ba2), X(0x00b6d2f5), + X(0x00b92e21), X(0x00bb8d26), X(0x00bdf004), X(0x00c056ba), + X(0x00c2c149), X(0x00c52fb1), X(0x00c7a1f1), X(0x00ca180a), + X(0x00cc91fb), X(0x00cf0fc5), X(0x00d19166), X(0x00d416df), + X(0x00d6a031), X(0x00d92d5a), X(0x00dbbe5b), X(0x00de5333), + X(0x00e0ebe3), X(0x00e3886b), X(0x00e628c9), X(0x00e8ccff), + X(0x00eb750c), X(0x00ee20f0), X(0x00f0d0ab), X(0x00f3843d), + X(0x00f63ba5), X(0x00f8f6e4), X(0x00fbb5fa), X(0x00fe78e5), + X(0x01013fa7), X(0x01040a3f), X(0x0106d8ae), X(0x0109aaf2), + X(0x010c810c), X(0x010f5afb), X(0x011238c0), X(0x01151a5b), + X(0x0117ffcb), X(0x011ae910), X(0x011dd62a), X(0x0120c719), + X(0x0123bbdd), X(0x0126b476), X(0x0129b0e4), X(0x012cb126), + X(0x012fb53c), X(0x0132bd27), X(0x0135c8e6), X(0x0138d879), + X(0x013bebdf), X(0x013f031a), X(0x01421e28), X(0x01453d0a), + X(0x01485fbf), X(0x014b8648), X(0x014eb0a4), X(0x0151ded2), + X(0x015510d4), X(0x015846a8), X(0x015b8050), X(0x015ebdc9), + X(0x0161ff15), X(0x01654434), X(0x01688d24), X(0x016bd9e6), + X(0x016f2a7b), X(0x01727ee1), X(0x0175d718), X(0x01793321), + X(0x017c92fc), X(0x017ff6a7), X(0x01835e24), X(0x0186c972), + X(0x018a3890), X(0x018dab7f), X(0x0191223f), X(0x01949ccf), + X(0x01981b2f), X(0x019b9d5f), X(0x019f235f), X(0x01a2ad2f), + X(0x01a63acf), X(0x01a9cc3e), X(0x01ad617c), X(0x01b0fa8a), + X(0x01b49767), X(0x01b83813), X(0x01bbdc8d), X(0x01bf84d6), + X(0x01c330ee), X(0x01c6e0d4), X(0x01ca9488), X(0x01ce4c0b), + X(0x01d2075b), X(0x01d5c679), X(0x01d98964), X(0x01dd501d), + X(0x01e11aa3), X(0x01e4e8f6), X(0x01e8bb17), X(0x01ec9104), + X(0x01f06abd), X(0x01f44844), X(0x01f82996), X(0x01fc0eb5), + X(0x01fff7a0), X(0x0203e456), X(0x0207d4d9), X(0x020bc926), + X(0x020fc140), X(0x0213bd24), X(0x0217bcd4), X(0x021bc04e), + X(0x021fc793), X(0x0223d2a3), X(0x0227e17d), X(0x022bf421), + X(0x02300a90), X(0x023424c8), X(0x023842ca), X(0x023c6495), + X(0x02408a2a), X(0x0244b389), X(0x0248e0b0), X(0x024d11a0), + X(0x02514659), X(0x02557eda), X(0x0259bb24), X(0x025dfb35), + X(0x02623f0f), X(0x026686b1), X(0x026ad21a), X(0x026f214b), + X(0x02737443), X(0x0277cb02), X(0x027c2588), X(0x028083d5), + X(0x0284e5e9), X(0x02894bc2), X(0x028db562), X(0x029222c8), + X(0x029693f4), X(0x029b08e6), X(0x029f819d), X(0x02a3fe19), + X(0x02a87e5b), X(0x02ad0261), X(0x02b18a2c), X(0x02b615bb), + X(0x02baa50f), X(0x02bf3827), X(0x02c3cf03), X(0x02c869a3), + X(0x02cd0807), X(0x02d1aa2d), X(0x02d65017), X(0x02daf9c4), + X(0x02dfa734), X(0x02e45866), X(0x02e90d5b), X(0x02edc612), + X(0x02f2828b), X(0x02f742c6), X(0x02fc06c3), X(0x0300ce80), + X(0x030599ff), X(0x030a6940), X(0x030f3c40), X(0x03141302), + X(0x0318ed84), X(0x031dcbc6), X(0x0322adc8), X(0x0327938a), + X(0x032c7d0c), X(0x03316a4c), X(0x03365b4d), X(0x033b500c), + X(0x03404889), X(0x034544c6), X(0x034a44c0), X(0x034f4879), + X(0x03544ff0), X(0x03595b24), X(0x035e6a16), X(0x03637cc5), + X(0x03689331), X(0x036dad5a), X(0x0372cb40), X(0x0377ece2), + X(0x037d1240), X(0x03823b5a), X(0x03876830), X(0x038c98c1), + X(0x0391cd0e), X(0x03970516), X(0x039c40d8), X(0x03a18055), + X(0x03a6c38d), X(0x03ac0a7f), X(0x03b1552b), X(0x03b6a390), + X(0x03bbf5af), X(0x03c14b88), X(0x03c6a519), X(0x03cc0263), + X(0x03d16366), X(0x03d6c821), X(0x03dc3094), X(0x03e19cc0), + X(0x03e70ca2), X(0x03ec803d), X(0x03f1f78e), X(0x03f77296), + X(0x03fcf155), X(0x040273cb), X(0x0407f9f7), X(0x040d83d9), + X(0x04131170), X(0x0418a2bd), X(0x041e37c0), X(0x0423d077), + X(0x04296ce4), X(0x042f0d04), X(0x0434b0da), X(0x043a5863), + X(0x044003a0), X(0x0445b290), X(0x044b6534), X(0x04511b8b), + X(0x0456d595), X(0x045c9352), X(0x046254c1), X(0x046819e1), + X(0x046de2b4), X(0x0473af39), X(0x04797f6e), X(0x047f5355), + X(0x04852aec), X(0x048b0635), X(0x0490e52d), X(0x0496c7d6), + X(0x049cae2e), X(0x04a29836), X(0x04a885ed), X(0x04ae7753), + X(0x04b46c68), X(0x04ba652b), X(0x04c0619d), X(0x04c661bc), + X(0x04cc658a), X(0x04d26d04), X(0x04d8782c), X(0x04de8701), + X(0x04e49983), X(0x04eaafb0), X(0x04f0c98a), X(0x04f6e710), + X(0x04fd0842), X(0x05032d1e), X(0x050955a6), X(0x050f81d8), + X(0x0515b1b5), X(0x051be53d), X(0x05221c6e), X(0x05285748), + X(0x052e95cd), X(0x0534d7fa), X(0x053b1dd0), X(0x0541674e), + X(0x0547b475), X(0x054e0544), X(0x055459bb), X(0x055ab1d9), + X(0x05610d9e), X(0x05676d0a), X(0x056dd01c), X(0x057436d5), + X(0x057aa134), X(0x05810f38), X(0x058780e2), X(0x058df631), + X(0x05946f25), X(0x059aebbe), X(0x05a16bfa), X(0x05a7efdb), + X(0x05ae775f), X(0x05b50287), X(0x05bb9152), X(0x05c223c0), + X(0x05c8b9d0), X(0x05cf5382), X(0x05d5f0d6), X(0x05dc91cc), + X(0x05e33663), X(0x05e9de9c), X(0x05f08a75), X(0x05f739ee), + X(0x05fded07), X(0x0604a3c0), X(0x060b5e19), X(0x06121c11), + X(0x0618dda8), X(0x061fa2dd), X(0x06266bb1), X(0x062d3822), + X(0x06340831), X(0x063adbde), X(0x0641b328), X(0x06488e0e), + X(0x064f6c91), X(0x06564eaf), X(0x065d346a), X(0x06641dc0), + X(0x066b0ab1), X(0x0671fb3d), X(0x0678ef64), X(0x067fe724), + X(0x0686e27f), X(0x068de173), X(0x0694e400), X(0x069bea27), + X(0x06a2f3e6), X(0x06aa013d), X(0x06b1122c), X(0x06b826b3), + X(0x06bf3ed1), X(0x06c65a86), X(0x06cd79d1), X(0x06d49cb3), + X(0x06dbc32b), X(0x06e2ed38), X(0x06ea1adb), X(0x06f14c13), + X(0x06f880df), X(0x06ffb940), X(0x0706f535), X(0x070e34bd), + X(0x071577d9), X(0x071cbe88), X(0x072408c9), X(0x072b569d), + X(0x0732a802), X(0x0739fcf9), X(0x07415582), X(0x0748b19b), + X(0x07501145), X(0x0757747f), X(0x075edb49), X(0x076645a3), + X(0x076db38c), X(0x07752503), X(0x077c9a09), X(0x0784129e), + X(0x078b8ec0), X(0x07930e70), X(0x079a91ac), X(0x07a21876), + X(0x07a9a2cc), X(0x07b130ad), X(0x07b8c21b), X(0x07c05714), + X(0x07c7ef98), X(0x07cf8ba6), X(0x07d72b3f), X(0x07dece62), + X(0x07e6750e), X(0x07ee1f43), X(0x07f5cd01), X(0x07fd7e48), + X(0x08053316), X(0x080ceb6d), X(0x0814a74a), X(0x081c66af), + X(0x0824299a), X(0x082bf00c), X(0x0833ba03), X(0x083b8780), + X(0x08435882), X(0x084b2d09), X(0x08530514), X(0x085ae0a3), + X(0x0862bfb6), X(0x086aa24c), X(0x08728865), X(0x087a7201), + X(0x08825f1e), X(0x088a4fbe), X(0x089243de), X(0x089a3b80), + X(0x08a236a2), X(0x08aa3545), X(0x08b23767), X(0x08ba3d09), + X(0x08c2462a), X(0x08ca52c9), X(0x08d262e7), X(0x08da7682), + X(0x08e28d9c), X(0x08eaa832), X(0x08f2c645), X(0x08fae7d4), + X(0x09030cdf), X(0x090b3566), X(0x09136168), X(0x091b90e5), + X(0x0923c3dc), X(0x092bfa4d), X(0x09343437), X(0x093c719b), + X(0x0944b277), X(0x094cf6cc), X(0x09553e99), X(0x095d89dd), + X(0x0965d899), X(0x096e2acb), X(0x09768073), X(0x097ed991), + X(0x09873625), X(0x098f962e), X(0x0997f9ac), X(0x09a0609e), + X(0x09a8cb04), X(0x09b138dd), X(0x09b9aa29), X(0x09c21ee8), + X(0x09ca9719), X(0x09d312bc), X(0x09db91d0), X(0x09e41456), + X(0x09ec9a4b), X(0x09f523b1), X(0x09fdb087), X(0x0a0640cc), + X(0x0a0ed47f), X(0x0a176ba2), X(0x0a200632), X(0x0a28a42f), + X(0x0a31459a), X(0x0a39ea72), X(0x0a4292b5), X(0x0a4b3e65), + X(0x0a53ed80), X(0x0a5ca006), X(0x0a6555f7), X(0x0a6e0f51), + X(0x0a76cc16), X(0x0a7f8c44), X(0x0a884fda), X(0x0a9116d9), + X(0x0a99e140), X(0x0aa2af0e), X(0x0aab8043), X(0x0ab454df), + X(0x0abd2ce1), X(0x0ac60849), X(0x0acee716), X(0x0ad7c948), + X(0x0ae0aedf), X(0x0ae997d9), X(0x0af28437), X(0x0afb73f7), + X(0x0b04671b), X(0x0b0d5da0), X(0x0b165788), X(0x0b1f54d0), + X(0x0b285579), X(0x0b315983), X(0x0b3a60ec), X(0x0b436bb5), + X(0x0b4c79dd), X(0x0b558b63), X(0x0b5ea048), X(0x0b67b88a), + X(0x0b70d429), X(0x0b79f324), X(0x0b83157c), X(0x0b8c3b30), + X(0x0b95643f), X(0x0b9e90a8), X(0x0ba7c06c), X(0x0bb0f38a), + X(0x0bba2a01), X(0x0bc363d1), X(0x0bcca0f9), X(0x0bd5e17a), + X(0x0bdf2552), X(0x0be86c81), X(0x0bf1b706), X(0x0bfb04e2), + X(0x0c045613), X(0x0c0daa99), X(0x0c170274), X(0x0c205da3), + X(0x0c29bc25), X(0x0c331dfb), X(0x0c3c8323), X(0x0c45eb9e), + X(0x0c4f576a), X(0x0c58c688), X(0x0c6238f6), X(0x0c6baeb5), + X(0x0c7527c3), X(0x0c7ea421), X(0x0c8823cd), X(0x0c91a6c8), + X(0x0c9b2d10), X(0x0ca4b6a6), X(0x0cae4389), X(0x0cb7d3b8), + X(0x0cc16732), X(0x0ccafdf8), X(0x0cd49809), X(0x0cde3564), + X(0x0ce7d609), X(0x0cf179f7), X(0x0cfb212e), X(0x0d04cbad), + X(0x0d0e7974), X(0x0d182a83), X(0x0d21ded8), X(0x0d2b9673), + X(0x0d355154), X(0x0d3f0f7b), X(0x0d48d0e6), X(0x0d529595), + X(0x0d5c5d88), X(0x0d6628be), X(0x0d6ff737), X(0x0d79c8f2), + X(0x0d839dee), X(0x0d8d762c), X(0x0d9751aa), X(0x0da13068), + X(0x0dab1266), X(0x0db4f7a3), X(0x0dbee01e), X(0x0dc8cbd8), + X(0x0dd2bace), X(0x0ddcad02), X(0x0de6a272), X(0x0df09b1e), + X(0x0dfa9705), X(0x0e049627), X(0x0e0e9883), X(0x0e189e19), + X(0x0e22a6e8), X(0x0e2cb2f0), X(0x0e36c230), X(0x0e40d4a8), + X(0x0e4aea56), X(0x0e55033b), X(0x0e5f1f56), X(0x0e693ea7), + X(0x0e73612c), X(0x0e7d86e5), X(0x0e87afd3), X(0x0e91dbf3), + X(0x0e9c0b47), X(0x0ea63dcc), X(0x0eb07383), X(0x0ebaac6b), + X(0x0ec4e883), X(0x0ecf27cc), X(0x0ed96a44), X(0x0ee3afea), + X(0x0eedf8bf), X(0x0ef844c2), X(0x0f0293f2), X(0x0f0ce64e), + X(0x0f173bd6), X(0x0f21948a), X(0x0f2bf069), X(0x0f364f72), + X(0x0f40b1a5), X(0x0f4b1701), X(0x0f557f86), X(0x0f5feb32), + X(0x0f6a5a07), X(0x0f74cc02), X(0x0f7f4124), X(0x0f89b96b), + X(0x0f9434d8), X(0x0f9eb369), X(0x0fa9351e), X(0x0fb3b9f7), + X(0x0fbe41f3), X(0x0fc8cd11), X(0x0fd35b51), X(0x0fddecb2), + X(0x0fe88134), X(0x0ff318d6), X(0x0ffdb397), X(0x10085177), + X(0x1012f275), X(0x101d9691), X(0x10283dca), X(0x1032e81f), + X(0x103d9591), X(0x1048461e), X(0x1052f9c5), X(0x105db087), + X(0x10686a62), X(0x10732756), X(0x107de763), X(0x1088aa87), + X(0x109370c2), X(0x109e3a14), X(0x10a9067c), X(0x10b3d5f9), + X(0x10bea88b), X(0x10c97e31), X(0x10d456eb), X(0x10df32b8), + X(0x10ea1197), X(0x10f4f387), X(0x10ffd889), X(0x110ac09b), + X(0x1115abbe), X(0x112099ef), X(0x112b8b2f), X(0x11367f7d), + X(0x114176d9), X(0x114c7141), X(0x11576eb6), X(0x11626f36), + X(0x116d72c1), X(0x11787957), X(0x118382f6), X(0x118e8f9e), + X(0x11999f4f), X(0x11a4b208), X(0x11afc7c7), X(0x11bae08e), + X(0x11c5fc5a), X(0x11d11b2c), X(0x11dc3d02), X(0x11e761dd), + X(0x11f289ba), X(0x11fdb49b), X(0x1208e27e), X(0x12141362), + X(0x121f4748), X(0x122a7e2d), X(0x1235b812), X(0x1240f4f6), + X(0x124c34d9), X(0x125777b9), X(0x1262bd96), X(0x126e0670), + X(0x12795245), X(0x1284a115), X(0x128ff2e0), X(0x129b47a5), + X(0x12a69f63), X(0x12b1fa19), X(0x12bd57c7), X(0x12c8b86c), + X(0x12d41c08), X(0x12df829a), X(0x12eaec21), X(0x12f6589d), + X(0x1301c80c), X(0x130d3a6f), X(0x1318afc4), X(0x1324280b), + X(0x132fa344), X(0x133b216d), X(0x1346a286), X(0x1352268e), + X(0x135dad85), X(0x1369376a), X(0x1374c43c), X(0x138053fb), + X(0x138be6a5), X(0x13977c3b), X(0x13a314bc), X(0x13aeb026), + X(0x13ba4e79), X(0x13c5efb5), X(0x13d193d9), X(0x13dd3ae4), + X(0x13e8e4d6), X(0x13f491ad), X(0x1400416a), X(0x140bf40b), + X(0x1417a98f), X(0x142361f7), X(0x142f1d41), X(0x143adb6d), + X(0x14469c7a), X(0x14526067), X(0x145e2734), X(0x1469f0df), + X(0x1475bd69), X(0x14818cd0), X(0x148d5f15), X(0x14993435), + X(0x14a50c31), X(0x14b0e708), X(0x14bcc4b8), X(0x14c8a542), + X(0x14d488a5), X(0x14e06edf), X(0x14ec57f1), X(0x14f843d9), + X(0x15043297), X(0x1510242b), X(0x151c1892), X(0x15280fcd), + X(0x153409dc), X(0x154006bc), X(0x154c066e), X(0x155808f1), + X(0x15640e44), X(0x15701666), X(0x157c2157), X(0x15882f16), + X(0x15943fa2), X(0x15a052fb), X(0x15ac691f), X(0x15b8820f), + X(0x15c49dc8), X(0x15d0bc4c), X(0x15dcdd98), X(0x15e901ad), + X(0x15f52888), X(0x1601522b), X(0x160d7e93), X(0x1619adc1), + X(0x1625dfb3), X(0x16321469), X(0x163e4be2), X(0x164a861d), + X(0x1656c31a), X(0x166302d8), X(0x166f4555), X(0x167b8a92), + X(0x1687d28e), X(0x16941d47), X(0x16a06abe), X(0x16acbaf0), + X(0x16b90ddf), X(0x16c56388), X(0x16d1bbeb), X(0x16de1708), + X(0x16ea74dd), X(0x16f6d56a), X(0x170338ae), X(0x170f9ea8), + X(0x171c0758), X(0x172872bd), X(0x1734e0d6), X(0x174151a2), + X(0x174dc520), X(0x175a3b51), X(0x1766b432), X(0x17732fc4), + X(0x177fae05), X(0x178c2ef4), X(0x1798b292), X(0x17a538dd), + X(0x17b1c1d4), X(0x17be4d77), X(0x17cadbc5), X(0x17d76cbc), + X(0x17e4005e), X(0x17f096a7), X(0x17fd2f98), X(0x1809cb31), + X(0x1816696f), X(0x18230a53), X(0x182faddc), X(0x183c5408), + X(0x1848fcd8), X(0x1855a849), X(0x1862565d), X(0x186f0711), + X(0x187bba64), X(0x18887057), X(0x189528e9), X(0x18a1e418), + X(0x18aea1e3), X(0x18bb624b), X(0x18c8254e), X(0x18d4eaeb), + X(0x18e1b321), X(0x18ee7df1), X(0x18fb4b58), X(0x19081b57), + X(0x1914edec), X(0x1921c317), X(0x192e9ad6), X(0x193b7529), + X(0x19485210), X(0x19553189), X(0x19621393), X(0x196ef82e), + X(0x197bdf59), X(0x1988c913), X(0x1995b55c), X(0x19a2a432), + X(0x19af9595), X(0x19bc8983), X(0x19c97ffd), X(0x19d67900), + X(0x19e3748e), X(0x19f072a3), X(0x19fd7341), X(0x1a0a7665), + X(0x1a177c10), X(0x1a248440), X(0x1a318ef4), X(0x1a3e9c2c), + X(0x1a4babe7), X(0x1a58be24), X(0x1a65d2e2), X(0x1a72ea20), + X(0x1a8003de), X(0x1a8d201a), X(0x1a9a3ed5), X(0x1aa7600c), + X(0x1ab483bf), X(0x1ac1a9ee), X(0x1aced297), X(0x1adbfdba), + X(0x1ae92b56), X(0x1af65b69), X(0x1b038df4), X(0x1b10c2f5), + X(0x1b1dfa6b), X(0x1b2b3456), X(0x1b3870b5), X(0x1b45af87), + X(0x1b52f0ca), X(0x1b60347f), X(0x1b6d7aa4), X(0x1b7ac339), + X(0x1b880e3c), X(0x1b955bad), X(0x1ba2ab8b), X(0x1baffdd5), + X(0x1bbd528a), X(0x1bcaa9a9), X(0x1bd80332), X(0x1be55f24), + X(0x1bf2bd7d), X(0x1c001e3d), X(0x1c0d8164), X(0x1c1ae6ef), + X(0x1c284edf), X(0x1c35b932), X(0x1c4325e7), X(0x1c5094fe), + X(0x1c5e0677), X(0x1c6b7a4f), X(0x1c78f086), X(0x1c86691b), + X(0x1c93e40d), X(0x1ca1615c), X(0x1caee107), X(0x1cbc630c), + X(0x1cc9e76b), X(0x1cd76e23), X(0x1ce4f733), X(0x1cf2829a), + X(0x1d001057), X(0x1d0da06a), X(0x1d1b32d1), X(0x1d28c78c), + X(0x1d365e9a), X(0x1d43f7f9), X(0x1d5193a9), X(0x1d5f31aa), + X(0x1d6cd1f9), X(0x1d7a7497), X(0x1d881982), X(0x1d95c0ba), + X(0x1da36a3d), X(0x1db1160a), X(0x1dbec422), X(0x1dcc7482), + X(0x1dda272b), X(0x1de7dc1a), X(0x1df59350), X(0x1e034ccb), + X(0x1e11088a), X(0x1e1ec68c), X(0x1e2c86d1), X(0x1e3a4958), + X(0x1e480e20), X(0x1e55d527), X(0x1e639e6d), X(0x1e7169f1), + X(0x1e7f37b2), X(0x1e8d07b0), X(0x1e9ad9e8), X(0x1ea8ae5b), + X(0x1eb68507), X(0x1ec45dec), X(0x1ed23908), X(0x1ee0165b), + X(0x1eedf5e4), X(0x1efbd7a1), X(0x1f09bb92), X(0x1f17a1b6), + X(0x1f258a0d), X(0x1f337494), X(0x1f41614b), X(0x1f4f5032), + X(0x1f5d4147), X(0x1f6b3489), X(0x1f7929f7), X(0x1f872192), + X(0x1f951b56), X(0x1fa31744), X(0x1fb1155b), X(0x1fbf159a), + X(0x1fcd17ff), X(0x1fdb1c8b), X(0x1fe9233b), X(0x1ff72c0f), + X(0x20053706), X(0x20134420), X(0x2021535a), X(0x202f64b4), + X(0x203d782e), X(0x204b8dc6), X(0x2059a57c), X(0x2067bf4e), + X(0x2075db3b), X(0x2083f943), X(0x20921964), X(0x20a03b9e), + X(0x20ae5fef), X(0x20bc8657), X(0x20caaed5), X(0x20d8d967), + X(0x20e7060e), X(0x20f534c7), X(0x21036592), X(0x2111986e), + X(0x211fcd59), X(0x212e0454), X(0x213c3d5d), X(0x214a7873), + X(0x2158b594), X(0x2166f4c1), X(0x217535f8), X(0x21837938), + X(0x2191be81), X(0x21a005d0), X(0x21ae4f26), X(0x21bc9a81), + X(0x21cae7e0), X(0x21d93743), X(0x21e788a8), X(0x21f5dc0e), + X(0x22043174), X(0x221288da), X(0x2220e23e), X(0x222f3da0), + X(0x223d9afe), X(0x224bfa58), X(0x225a5bac), X(0x2268bef9), + X(0x2277243f), X(0x22858b7d), X(0x2293f4b0), X(0x22a25fda), + X(0x22b0ccf8), X(0x22bf3c09), X(0x22cdad0d), X(0x22dc2002), + X(0x22ea94e8), X(0x22f90bbe), X(0x23078482), X(0x2315ff33), + X(0x23247bd1), X(0x2332fa5b), X(0x23417acf), X(0x234ffd2c), + X(0x235e8173), X(0x236d07a0), X(0x237b8fb4), X(0x238a19ae), + X(0x2398a58c), X(0x23a7334d), X(0x23b5c2f1), X(0x23c45477), + X(0x23d2e7dd), X(0x23e17d22), X(0x23f01446), X(0x23fead47), + X(0x240d4825), X(0x241be4dd), X(0x242a8371), X(0x243923dd), + X(0x2447c622), X(0x24566a3e), X(0x24651031), X(0x2473b7f8), + X(0x24826194), X(0x24910d03), X(0x249fba44), X(0x24ae6957), + X(0x24bd1a39), X(0x24cbccea), X(0x24da816a), X(0x24e937b7), + X(0x24f7efcf), X(0x2506a9b3), X(0x25156560), X(0x252422d6), + X(0x2532e215), X(0x2541a31a), X(0x255065e4), X(0x255f2a74), + X(0x256df0c7), X(0x257cb8dd), X(0x258b82b4), X(0x259a4e4c), + X(0x25a91ba4), X(0x25b7eaba), X(0x25c6bb8e), X(0x25d58e1e), + X(0x25e46269), X(0x25f3386e), X(0x2602102d), X(0x2610e9a4), + X(0x261fc4d3), X(0x262ea1b7), X(0x263d8050), X(0x264c609e), + X(0x265b429e), X(0x266a2650), X(0x26790bb3), X(0x2687f2c6), + X(0x2696db88), X(0x26a5c5f7), X(0x26b4b213), X(0x26c39fda), + X(0x26d28f4c), X(0x26e18067), X(0x26f0732b), X(0x26ff6796), + X(0x270e5da7), X(0x271d555d), X(0x272c4eb7), X(0x273b49b5), + X(0x274a4654), X(0x27594495), X(0x27684475), X(0x277745f4), + X(0x27864910), X(0x27954dc9), X(0x27a4541e), X(0x27b35c0d), + X(0x27c26596), X(0x27d170b7), X(0x27e07d6f), X(0x27ef8bbd), + X(0x27fe9ba0), X(0x280dad18), X(0x281cc022), X(0x282bd4be), + X(0x283aeaeb), X(0x284a02a7), X(0x28591bf2), X(0x286836cb), + X(0x28775330), X(0x28867120), X(0x2895909b), X(0x28a4b19e), + X(0x28b3d42a), X(0x28c2f83d), X(0x28d21dd5), X(0x28e144f3), + X(0x28f06d94), X(0x28ff97b8), X(0x290ec35d), X(0x291df082), + X(0x292d1f27), X(0x293c4f4a), X(0x294b80eb), X(0x295ab407), + X(0x2969e89e), X(0x29791eaf), X(0x29885639), X(0x29978f3b), + X(0x29a6c9b3), X(0x29b605a0), X(0x29c54302), X(0x29d481d7), + X(0x29e3c21e), X(0x29f303d6), X(0x2a0246fd), X(0x2a118b94), + X(0x2a20d198), X(0x2a301909), X(0x2a3f61e6), X(0x2a4eac2c), + X(0x2a5df7dc), X(0x2a6d44f4), X(0x2a7c9374), X(0x2a8be359), + X(0x2a9b34a2), X(0x2aaa8750), X(0x2ab9db60), X(0x2ac930d1), + X(0x2ad887a3), X(0x2ae7dfd3), X(0x2af73962), X(0x2b06944e), + X(0x2b15f096), X(0x2b254e38), X(0x2b34ad34), X(0x2b440d89), + X(0x2b536f34), X(0x2b62d236), X(0x2b72368d), X(0x2b819c38), + X(0x2b910336), X(0x2ba06b86), X(0x2bafd526), X(0x2bbf4015), + X(0x2bceac53), X(0x2bde19de), X(0x2bed88b5), X(0x2bfcf8d7), + X(0x2c0c6a43), X(0x2c1bdcf7), X(0x2c2b50f3), X(0x2c3ac635), + X(0x2c4a3cbd), X(0x2c59b488), X(0x2c692d97), X(0x2c78a7e7), + X(0x2c882378), X(0x2c97a049), X(0x2ca71e58), X(0x2cb69da4), + X(0x2cc61e2c), X(0x2cd59ff0), X(0x2ce522ed), X(0x2cf4a723), + X(0x2d042c90), X(0x2d13b334), X(0x2d233b0d), X(0x2d32c41a), + X(0x2d424e5a), X(0x2d51d9cc), X(0x2d61666e), X(0x2d70f440), + X(0x2d808340), X(0x2d90136e), X(0x2d9fa4c7), X(0x2daf374c), + X(0x2dbecafa), X(0x2dce5fd1), X(0x2dddf5cf), X(0x2ded8cf4), + X(0x2dfd253d), X(0x2e0cbeab), X(0x2e1c593b), X(0x2e2bf4ed), + X(0x2e3b91c0), X(0x2e4b2fb1), X(0x2e5acec1), X(0x2e6a6eee), + X(0x2e7a1037), X(0x2e89b29b), X(0x2e995618), X(0x2ea8faad), + X(0x2eb8a05a), X(0x2ec8471c), X(0x2ed7eef4), X(0x2ee797df), + X(0x2ef741dc), X(0x2f06eceb), X(0x2f16990a), X(0x2f264639), + X(0x2f35f475), X(0x2f45a3bd), X(0x2f555412), X(0x2f650570), + X(0x2f74b7d8), X(0x2f846b48), X(0x2f941fbe), X(0x2fa3d53a), + X(0x2fb38bbb), X(0x2fc3433f), X(0x2fd2fbc5), X(0x2fe2b54c), + X(0x2ff26fd3), X(0x30022b58), X(0x3011e7db), X(0x3021a55a), + X(0x303163d4), X(0x30412348), X(0x3050e3b5), X(0x3060a519), + X(0x30706773), X(0x30802ac3), X(0x308fef06), X(0x309fb43d), + X(0x30af7a65), X(0x30bf417d), X(0x30cf0985), X(0x30ded27a), + X(0x30ee9c5d), X(0x30fe672b), X(0x310e32e3), X(0x311dff85), + X(0x312dcd0f), X(0x313d9b80), X(0x314d6ad7), X(0x315d3b12), + X(0x316d0c30), X(0x317cde31), X(0x318cb113), X(0x319c84d4), + X(0x31ac5974), X(0x31bc2ef1), X(0x31cc054b), X(0x31dbdc7f), + X(0x31ebb48e), X(0x31fb8d74), X(0x320b6733), X(0x321b41c7), + X(0x322b1d31), X(0x323af96e), X(0x324ad67e), X(0x325ab45f), + X(0x326a9311), X(0x327a7291), X(0x328a52e0), X(0x329a33fb), + X(0x32aa15e1), X(0x32b9f892), X(0x32c9dc0c), X(0x32d9c04d), + X(0x32e9a555), X(0x32f98b22), X(0x330971b4), X(0x33195909), + X(0x3329411f), X(0x333929f6), X(0x3349138c), X(0x3358fde1), + X(0x3368e8f2), X(0x3378d4c0), X(0x3388c147), X(0x3398ae89), + X(0x33a89c82), X(0x33b88b32), X(0x33c87a98), X(0x33d86ab2), + X(0x33e85b80), X(0x33f84d00), X(0x34083f30), X(0x34183210), + X(0x3428259f), X(0x343819db), X(0x34480ec3), X(0x34580455), + X(0x3467fa92), X(0x3477f176), X(0x3487e902), X(0x3497e134), + X(0x34a7da0a), X(0x34b7d384), X(0x34c7cda0), X(0x34d7c85e), + X(0x34e7c3bb), X(0x34f7bfb7), X(0x3507bc50), X(0x3517b985), + X(0x3527b756), X(0x3537b5c0), X(0x3547b4c3), X(0x3557b45d), + X(0x3567b48d), X(0x3577b552), X(0x3587b6aa), X(0x3597b895), + X(0x35a7bb12), X(0x35b7be1e), X(0x35c7c1b9), X(0x35d7c5e1), + X(0x35e7ca96), X(0x35f7cfd6), X(0x3607d5a0), X(0x3617dbf3), + X(0x3627e2cd), X(0x3637ea2d), X(0x3647f212), X(0x3657fa7b), + X(0x36680366), X(0x36780cd2), X(0x368816bf), X(0x3698212b), + X(0x36a82c14), X(0x36b83779), X(0x36c8435a), X(0x36d84fb4), + X(0x36e85c88), X(0x36f869d2), X(0x37087793), X(0x371885c9), + X(0x37289473), X(0x3738a38f), X(0x3748b31d), X(0x3758c31a), + X(0x3768d387), X(0x3778e461), X(0x3788f5a7), X(0x37990759), + X(0x37a91975), X(0x37b92bf9), X(0x37c93ee4), X(0x37d95236), + X(0x37e965ed), X(0x37f97a08), X(0x38098e85), X(0x3819a363), + X(0x3829b8a2), X(0x3839ce3f), X(0x3849e43a), X(0x3859fa91), + X(0x386a1143), X(0x387a284f), X(0x388a3fb4), X(0x389a5770), + X(0x38aa6f83), X(0x38ba87ea), X(0x38caa0a5), X(0x38dab9b2), + X(0x38ead311), X(0x38faecbf), X(0x390b06bc), X(0x391b2107), + X(0x392b3b9e), X(0x393b5680), X(0x394b71ac), X(0x395b8d20), + X(0x396ba8dc), X(0x397bc4dd), X(0x398be124), X(0x399bfdae), + X(0x39ac1a7a), X(0x39bc3788), X(0x39cc54d5), X(0x39dc7261), + X(0x39ec902a), X(0x39fcae2f), X(0x3a0ccc70), X(0x3a1ceaea), + X(0x3a2d099c), X(0x3a3d2885), X(0x3a4d47a5), X(0x3a5d66f9), + X(0x3a6d8680), X(0x3a7da63a), X(0x3a8dc625), X(0x3a9de63f), + X(0x3aae0688), X(0x3abe26fe), X(0x3ace47a0), X(0x3ade686d), + X(0x3aee8963), X(0x3afeaa82), X(0x3b0ecbc7), X(0x3b1eed32), + X(0x3b2f0ec2), X(0x3b3f3075), X(0x3b4f524a), X(0x3b5f7440), + X(0x3b6f9656), X(0x3b7fb889), X(0x3b8fdada), X(0x3b9ffd46), + X(0x3bb01fce), X(0x3bc0426e), X(0x3bd06526), X(0x3be087f6), + X(0x3bf0aada), X(0x3c00cdd4), X(0x3c10f0e0), X(0x3c2113fe), + X(0x3c31372d), X(0x3c415a6b), X(0x3c517db7), X(0x3c61a110), + X(0x3c71c475), X(0x3c81e7e4), X(0x3c920b5c), X(0x3ca22edc), + X(0x3cb25262), X(0x3cc275ee), X(0x3cd2997e), X(0x3ce2bd11), + X(0x3cf2e0a6), X(0x3d03043b), X(0x3d1327cf), X(0x3d234b61), + X(0x3d336ef0), X(0x3d43927a), X(0x3d53b5ff), X(0x3d63d97c), + X(0x3d73fcf1), X(0x3d84205c), X(0x3d9443bd), X(0x3da46711), + X(0x3db48a58), X(0x3dc4ad91), X(0x3dd4d0ba), X(0x3de4f3d1), + X(0x3df516d7), X(0x3e0539c9), X(0x3e155ca6), X(0x3e257f6d), + X(0x3e35a21d), X(0x3e45c4b4), X(0x3e55e731), X(0x3e660994), + X(0x3e762bda), X(0x3e864e03), X(0x3e96700d), X(0x3ea691f7), + X(0x3eb6b3bf), X(0x3ec6d565), X(0x3ed6f6e8), X(0x3ee71845), + X(0x3ef7397c), X(0x3f075a8c), X(0x3f177b73), X(0x3f279c30), + X(0x3f37bcc2), X(0x3f47dd27), X(0x3f57fd5f), X(0x3f681d68), + X(0x3f783d40), X(0x3f885ce7), X(0x3f987c5c), X(0x3fa89b9c), + X(0x3fb8baa7), X(0x3fc8d97c), X(0x3fd8f819), X(0x3fe9167e), + X(0x3ff934a8), X(0x40095296), X(0x40197049), X(0x40298dbd), + X(0x4039aaf2), X(0x4049c7e7), X(0x4059e49a), X(0x406a010a), + X(0x407a1d36), X(0x408a391d), X(0x409a54bd), X(0x40aa7015), + X(0x40ba8b25), X(0x40caa5ea), X(0x40dac063), X(0x40eada90), + X(0x40faf46e), X(0x410b0dfe), X(0x411b273d), X(0x412b402a), + X(0x413b58c4), X(0x414b710a), X(0x415b88fa), X(0x416ba093), + X(0x417bb7d5), X(0x418bcebe), X(0x419be54c), X(0x41abfb7e), + X(0x41bc1153), X(0x41cc26ca), X(0x41dc3be2), X(0x41ec5099), + X(0x41fc64ef), X(0x420c78e1), X(0x421c8c6f), X(0x422c9f97), + X(0x423cb258), X(0x424cc4b2), X(0x425cd6a2), X(0x426ce827), + X(0x427cf941), X(0x428d09ee), X(0x429d1a2c), X(0x42ad29fb), + X(0x42bd3959), X(0x42cd4846), X(0x42dd56bf), X(0x42ed64c3), + X(0x42fd7252), X(0x430d7f6a), X(0x431d8c0a), X(0x432d9831), + X(0x433da3dd), X(0x434daf0d), X(0x435db9c0), X(0x436dc3f5), + X(0x437dcdab), X(0x438dd6df), X(0x439ddf92), X(0x43ade7c1), + X(0x43bdef6c), X(0x43cdf691), X(0x43ddfd2f), X(0x43ee0345), + X(0x43fe08d2), X(0x440e0dd4), X(0x441e124b), X(0x442e1634), + X(0x443e198f), X(0x444e1c5a), X(0x445e1e95), X(0x446e203e), + X(0x447e2153), X(0x448e21d5), X(0x449e21c0), X(0x44ae2115), + X(0x44be1fd1), X(0x44ce1df4), X(0x44de1b7d), X(0x44ee186a), + X(0x44fe14ba), X(0x450e106b), X(0x451e0b7e), X(0x452e05ef), + X(0x453dffbf), X(0x454df8eb), X(0x455df173), X(0x456de956), + X(0x457de092), X(0x458dd726), X(0x459dcd10), X(0x45adc251), + X(0x45bdb6e5), X(0x45cdaacd), X(0x45dd9e06), X(0x45ed9091), + X(0x45fd826a), X(0x460d7392), X(0x461d6407), X(0x462d53c8), + X(0x463d42d4), X(0x464d3129), X(0x465d1ec6), X(0x466d0baa), + X(0x467cf7d3), X(0x468ce342), X(0x469ccdf3), X(0x46acb7e7), + X(0x46bca11c), X(0x46cc8990), X(0x46dc7143), X(0x46ec5833), + X(0x46fc3e5f), X(0x470c23c6), X(0x471c0867), X(0x472bec40), + X(0x473bcf50), X(0x474bb196), X(0x475b9311), X(0x476b73c0), + X(0x477b53a1), X(0x478b32b4), X(0x479b10f6), X(0x47aaee67), + X(0x47bacb06), X(0x47caa6d1), X(0x47da81c7), X(0x47ea5be7), + X(0x47fa3530), X(0x480a0da1), X(0x4819e537), X(0x4829bbf3), + X(0x483991d3), X(0x484966d6), X(0x48593afb), X(0x48690e3f), + X(0x4878e0a3), X(0x4888b225), X(0x489882c4), X(0x48a8527e), + X(0x48b82153), X(0x48c7ef41), X(0x48d7bc47), X(0x48e78863), + X(0x48f75396), X(0x49071ddc), X(0x4916e736), X(0x4926afa2), + X(0x4936771f), X(0x49463dac), X(0x49560347), X(0x4965c7ef), + X(0x49758ba4), X(0x49854e63), X(0x4995102c), X(0x49a4d0fe), + X(0x49b490d7), X(0x49c44fb6), X(0x49d40d9a), X(0x49e3ca82), + X(0x49f3866c), X(0x4a034159), X(0x4a12fb45), X(0x4a22b430), + X(0x4a326c19), X(0x4a4222ff), X(0x4a51d8e1), X(0x4a618dbd), + X(0x4a714192), X(0x4a80f45f), X(0x4a90a623), X(0x4aa056dd), + X(0x4ab0068b), X(0x4abfb52c), X(0x4acf62c0), X(0x4adf0f44), + X(0x4aeebab9), X(0x4afe651c), X(0x4b0e0e6c), X(0x4b1db6a9), + X(0x4b2d5dd1), X(0x4b3d03e2), X(0x4b4ca8dd), X(0x4b5c4cbf), + X(0x4b6bef88), X(0x4b7b9136), X(0x4b8b31c8), X(0x4b9ad13d), + X(0x4baa6f93), X(0x4bba0ccb), X(0x4bc9a8e2), X(0x4bd943d7), + X(0x4be8dda9), X(0x4bf87658), X(0x4c080de1), X(0x4c17a444), + X(0x4c27397f), X(0x4c36cd92), X(0x4c46607b), X(0x4c55f239), + X(0x4c6582cb), X(0x4c75122f), X(0x4c84a065), X(0x4c942d6c), + X(0x4ca3b942), X(0x4cb343e6), X(0x4cc2cd57), X(0x4cd25594), + X(0x4ce1dc9c), X(0x4cf1626d), X(0x4d00e707), X(0x4d106a68), + X(0x4d1fec8f), X(0x4d2f6d7a), X(0x4d3eed2a), X(0x4d4e6b9d), + X(0x4d5de8d1), X(0x4d6d64c5), X(0x4d7cdf79), X(0x4d8c58eb), + X(0x4d9bd11a), X(0x4dab4804), X(0x4dbabdaa), X(0x4dca3209), + X(0x4dd9a520), X(0x4de916ef), X(0x4df88774), X(0x4e07f6ae), + X(0x4e17649c), X(0x4e26d13c), X(0x4e363c8f), X(0x4e45a692), + X(0x4e550f44), X(0x4e6476a4), X(0x4e73dcb2), X(0x4e83416c), + X(0x4e92a4d1), X(0x4ea206df), X(0x4eb16796), X(0x4ec0c6f5), + X(0x4ed024fa), X(0x4edf81a5), X(0x4eeedcf3), X(0x4efe36e5), + X(0x4f0d8f79), X(0x4f1ce6ad), X(0x4f2c3c82), X(0x4f3b90f4), + X(0x4f4ae405), X(0x4f5a35b1), X(0x4f6985fa), X(0x4f78d4dc), + X(0x4f882257), X(0x4f976e6a), X(0x4fa6b914), X(0x4fb60254), + X(0x4fc54a28), X(0x4fd49090), X(0x4fe3d58b), X(0x4ff31917), + X(0x50025b33), X(0x50119bde), X(0x5020db17), X(0x503018dd), + X(0x503f552f), X(0x504e900b), X(0x505dc971), X(0x506d0160), + X(0x507c37d7), X(0x508b6cd3), X(0x509aa055), X(0x50a9d25b), + X(0x50b902e4), X(0x50c831ef), X(0x50d75f7b), X(0x50e68b87), + X(0x50f5b612), X(0x5104df1a), X(0x5114069f), X(0x51232ca0), + X(0x5132511a), X(0x5141740f), X(0x5150957b), X(0x515fb55f), + X(0x516ed3b8), X(0x517df087), X(0x518d0bca), X(0x519c257f), + X(0x51ab3da7), X(0x51ba543f), X(0x51c96947), X(0x51d87cbd), + X(0x51e78ea1), X(0x51f69ef1), X(0x5205adad), X(0x5214bad3), + X(0x5223c662), X(0x5232d05a), X(0x5241d8b9), X(0x5250df7d), + X(0x525fe4a7), X(0x526ee835), X(0x527dea26), X(0x528cea78), + X(0x529be92c), X(0x52aae63f), X(0x52b9e1b0), X(0x52c8db80), + X(0x52d7d3ac), X(0x52e6ca33), X(0x52f5bf15), X(0x5304b251), + X(0x5313a3e5), X(0x532293d0), X(0x53318212), X(0x53406ea8), + X(0x534f5993), X(0x535e42d2), X(0x536d2a62), X(0x537c1043), + X(0x538af475), X(0x5399d6f6), X(0x53a8b7c4), X(0x53b796e0), + X(0x53c67447), X(0x53d54ffa), X(0x53e429f6), X(0x53f3023b), + X(0x5401d8c8), X(0x5410ad9c), X(0x541f80b5), X(0x542e5213), + X(0x543d21b5), X(0x544bef9a), X(0x545abbc0), X(0x54698627), + X(0x54784ece), X(0x548715b3), X(0x5495dad6), X(0x54a49e35), + X(0x54b35fd0), X(0x54c21fa6), X(0x54d0ddb5), X(0x54df99fd), + X(0x54ee547c), X(0x54fd0d32), X(0x550bc41d), X(0x551a793d), + X(0x55292c91), X(0x5537de16), X(0x55468dce), X(0x55553bb6), + X(0x5563e7cd), X(0x55729213), X(0x55813a87), X(0x558fe127), + X(0x559e85f2), X(0x55ad28e9), X(0x55bbca08), X(0x55ca6950), + X(0x55d906c0), X(0x55e7a257), X(0x55f63c13), X(0x5604d3f4), + X(0x561369f8), X(0x5621fe1f), X(0x56309067), X(0x563f20d1), + X(0x564daf5a), X(0x565c3c02), X(0x566ac6c7), X(0x56794faa), + X(0x5687d6a8), X(0x56965bc1), X(0x56a4def4), X(0x56b36040), + X(0x56c1dfa4), X(0x56d05d1f), X(0x56ded8af), X(0x56ed5255), + X(0x56fbca0f), X(0x570a3fdc), X(0x5718b3bc), X(0x572725ac), + X(0x573595ad), X(0x574403bd), X(0x57526fdb), X(0x5760da07), + X(0x576f423f), X(0x577da883), X(0x578c0cd1), X(0x579a6f29), + X(0x57a8cf8a), X(0x57b72df2), X(0x57c58a61), X(0x57d3e4d6), + X(0x57e23d50), X(0x57f093cd), X(0x57fee84e), X(0x580d3ad1), + X(0x581b8b54), X(0x5829d9d8), X(0x5838265c), X(0x584670dd), + X(0x5854b95c), X(0x5862ffd8), X(0x5871444f), X(0x587f86c1), + X(0x588dc72c), X(0x589c0591), X(0x58aa41ed), X(0x58b87c40), + X(0x58c6b489), X(0x58d4eac7), X(0x58e31ef9), X(0x58f1511f), + X(0x58ff8137), X(0x590daf40), X(0x591bdb3a), X(0x592a0524), + X(0x59382cfc), X(0x594652c2), X(0x59547675), X(0x59629815), + X(0x5970b79f), X(0x597ed513), X(0x598cf071), X(0x599b09b7), + X(0x59a920e5), X(0x59b735f9), X(0x59c548f4), X(0x59d359d2), + X(0x59e16895), X(0x59ef753b), X(0x59fd7fc4), X(0x5a0b882d), + X(0x5a198e77), X(0x5a2792a0), X(0x5a3594a9), X(0x5a43948e), + X(0x5a519251), X(0x5a5f8df0), X(0x5a6d876a), X(0x5a7b7ebe), + X(0x5a8973ec), X(0x5a9766f2), X(0x5aa557d0), X(0x5ab34685), + X(0x5ac1330f), X(0x5acf1d6f), X(0x5add05a3), X(0x5aeaebaa), + X(0x5af8cf84), X(0x5b06b12f), X(0x5b1490ab), X(0x5b226df7), + X(0x5b304912), X(0x5b3e21fc), X(0x5b4bf8b2), X(0x5b59cd35), + X(0x5b679f84), X(0x5b756f9e), X(0x5b833d82), X(0x5b91092e), + X(0x5b9ed2a3), X(0x5bac99e0), X(0x5bba5ee3), X(0x5bc821ac), + X(0x5bd5e23a), X(0x5be3a08c), X(0x5bf15ca1), X(0x5bff1679), + X(0x5c0cce12), X(0x5c1a836c), X(0x5c283686), X(0x5c35e760), + X(0x5c4395f7), X(0x5c51424c), X(0x5c5eec5e), X(0x5c6c942b), + X(0x5c7a39b4), X(0x5c87dcf7), X(0x5c957df3), X(0x5ca31ca8), + X(0x5cb0b915), X(0x5cbe5338), X(0x5ccbeb12), X(0x5cd980a1), + X(0x5ce713e5), X(0x5cf4a4dd), X(0x5d023387), X(0x5d0fbfe4), + X(0x5d1d49f2), X(0x5d2ad1b1), X(0x5d38571f), X(0x5d45da3c), + X(0x5d535b08), X(0x5d60d981), X(0x5d6e55a7), X(0x5d7bcf78), + X(0x5d8946f5), X(0x5d96bc1c), X(0x5da42eec), X(0x5db19f65), + X(0x5dbf0d86), X(0x5dcc794e), X(0x5dd9e2bd), X(0x5de749d1), + X(0x5df4ae8a), X(0x5e0210e7), X(0x5e0f70e7), X(0x5e1cce8a), + X(0x5e2a29ce), X(0x5e3782b4), X(0x5e44d93a), X(0x5e522d5f), + X(0x5e5f7f23), X(0x5e6cce85), X(0x5e7a1b85), X(0x5e876620), + X(0x5e94ae58), X(0x5ea1f42a), X(0x5eaf3797), X(0x5ebc789d), + X(0x5ec9b73c), X(0x5ed6f372), X(0x5ee42d41), X(0x5ef164a5), + X(0x5efe999f), X(0x5f0bcc2f), X(0x5f18fc52), X(0x5f262a09), + X(0x5f335553), X(0x5f407e2f), X(0x5f4da49d), X(0x5f5ac89b), + X(0x5f67ea29), X(0x5f750946), X(0x5f8225f2), X(0x5f8f402b), + X(0x5f9c57f2), X(0x5fa96d44), X(0x5fb68023), X(0x5fc3908c), + X(0x5fd09e7f), X(0x5fdda9fc), X(0x5feab302), X(0x5ff7b990), + X(0x6004bda5), X(0x6011bf40), X(0x601ebe62), X(0x602bbb09), + X(0x6038b534), X(0x6045ace4), X(0x6052a216), X(0x605f94cb), + X(0x606c8502), X(0x607972b9), X(0x60865df2), X(0x609346aa), + X(0x60a02ce1), X(0x60ad1096), X(0x60b9f1c9), X(0x60c6d079), + X(0x60d3aca5), X(0x60e0864d), X(0x60ed5d70), X(0x60fa320d), + X(0x61070424), X(0x6113d3b4), X(0x6120a0bc), X(0x612d6b3c), + X(0x613a3332), X(0x6146f89f), X(0x6153bb82), X(0x61607bd9), + X(0x616d39a5), X(0x6179f4e5), X(0x6186ad98), X(0x619363bd), + X(0x61a01753), X(0x61acc85b), X(0x61b976d3), X(0x61c622bc), + X(0x61d2cc13), X(0x61df72d8), X(0x61ec170c), X(0x61f8b8ad), + X(0x620557ba), X(0x6211f434), X(0x621e8e18), X(0x622b2568), + X(0x6237ba21), X(0x62444c44), X(0x6250dbd0), X(0x625d68c4), + X(0x6269f320), X(0x62767ae2), X(0x6283000b), X(0x628f829a), + X(0x629c028e), X(0x62a87fe6), X(0x62b4faa2), X(0x62c172c2), + X(0x62cde844), X(0x62da5b29), X(0x62e6cb6e), X(0x62f33915), + X(0x62ffa41c), X(0x630c0c83), X(0x63187248), X(0x6324d56d), + X(0x633135ef), X(0x633d93ce), X(0x6349ef0b), X(0x635647a3), + X(0x63629d97), X(0x636ef0e6), X(0x637b418f), X(0x63878f92), + X(0x6393daef), X(0x63a023a4), X(0x63ac69b1), X(0x63b8ad15), + X(0x63c4edd1), X(0x63d12be3), X(0x63dd674b), X(0x63e9a008), + X(0x63f5d61a), X(0x64020980), X(0x640e3a39), X(0x641a6846), + X(0x642693a5), X(0x6432bc56), X(0x643ee258), X(0x644b05ab), + X(0x6457264e), X(0x64634441), X(0x646f5f83), X(0x647b7814), + X(0x64878df3), X(0x6493a120), X(0x649fb199), X(0x64abbf5f), + X(0x64b7ca71), X(0x64c3d2ce), X(0x64cfd877), X(0x64dbdb69), + X(0x64e7dba6), X(0x64f3d92b), X(0x64ffd3fa), X(0x650bcc11), + X(0x6517c16f), X(0x6523b415), X(0x652fa402), X(0x653b9134), + X(0x65477bad), X(0x6553636a), X(0x655f486d), X(0x656b2ab3), + X(0x65770a3d), X(0x6582e70a), X(0x658ec11a), X(0x659a986d), + X(0x65a66d00), X(0x65b23ed5), X(0x65be0deb), X(0x65c9da41), + X(0x65d5a3d7), X(0x65e16aac), X(0x65ed2ebf), X(0x65f8f011), + X(0x6604aea1), X(0x66106a6e), X(0x661c2377), X(0x6627d9be), + X(0x66338d40), X(0x663f3dfd), X(0x664aebf5), X(0x66569728), + X(0x66623f95), X(0x666de53b), X(0x6679881b), X(0x66852833), + X(0x6690c583), X(0x669c600b), X(0x66a7f7ca), X(0x66b38cc0), + X(0x66bf1eec), X(0x66caae4f), X(0x66d63ae6), X(0x66e1c4b3), + X(0x66ed4bb4), X(0x66f8cfea), X(0x67045153), X(0x670fcfef), + X(0x671b4bbe), X(0x6726c4bf), X(0x67323af3), X(0x673dae58), + X(0x67491eee), X(0x67548cb5), X(0x675ff7ab), X(0x676b5fd2), + X(0x6776c528), X(0x678227ad), X(0x678d8761), X(0x6798e443), + X(0x67a43e52), X(0x67af958f), X(0x67bae9f9), X(0x67c63b8f), + X(0x67d18a52), X(0x67dcd640), X(0x67e81f59), X(0x67f3659d), + X(0x67fea90c), X(0x6809e9a5), X(0x68152768), X(0x68206254), + X(0x682b9a68), X(0x6836cfa6), X(0x6842020b), X(0x684d3199), + X(0x68585e4d), X(0x68638829), X(0x686eaf2b), X(0x6879d354), + X(0x6884f4a2), X(0x68901316), X(0x689b2eb0), X(0x68a6476d), + X(0x68b15d50), X(0x68bc7056), X(0x68c78080), X(0x68d28dcd), + X(0x68dd983e), X(0x68e89fd0), X(0x68f3a486), X(0x68fea65d), + X(0x6909a555), X(0x6914a16f), X(0x691f9aa9), X(0x692a9104), + X(0x69358480), X(0x6940751b), X(0x694b62d5), X(0x69564daf), + X(0x696135a7), X(0x696c1abe), X(0x6976fcf3), X(0x6981dc46), + X(0x698cb8b6), X(0x69979243), X(0x69a268ed), X(0x69ad3cb4), + X(0x69b80d97), X(0x69c2db96), X(0x69cda6b0), X(0x69d86ee5), + X(0x69e33436), X(0x69edf6a1), X(0x69f8b626), X(0x6a0372c5), + X(0x6a0e2c7e), X(0x6a18e350), X(0x6a23973c), X(0x6a2e4840), + X(0x6a38f65d), X(0x6a43a191), X(0x6a4e49de), X(0x6a58ef42), + X(0x6a6391be), X(0x6a6e3151), X(0x6a78cdfa), X(0x6a8367ba), + X(0x6a8dfe90), X(0x6a98927c), X(0x6aa3237d), X(0x6aadb194), + X(0x6ab83cc0), X(0x6ac2c500), X(0x6acd4a55), X(0x6ad7ccbf), + X(0x6ae24c3c), X(0x6aecc8cd), X(0x6af74271), X(0x6b01b929), + X(0x6b0c2cf4), X(0x6b169dd1), X(0x6b210bc1), X(0x6b2b76c2), + X(0x6b35ded6), X(0x6b4043fc), X(0x6b4aa632), X(0x6b55057a), + X(0x6b5f61d3), X(0x6b69bb3d), X(0x6b7411b7), X(0x6b7e6541), + X(0x6b88b5db), X(0x6b930385), X(0x6b9d4e3f), X(0x6ba79607), + X(0x6bb1dadf), X(0x6bbc1cc6), X(0x6bc65bbb), X(0x6bd097bf), + X(0x6bdad0d0), X(0x6be506f0), X(0x6bef3a1d), X(0x6bf96a58), + X(0x6c0397a0), X(0x6c0dc1f5), X(0x6c17e957), X(0x6c220dc6), + X(0x6c2c2f41), X(0x6c364dc9), X(0x6c40695c), X(0x6c4a81fc), + X(0x6c5497a7), X(0x6c5eaa5d), X(0x6c68ba1f), X(0x6c72c6eb), + X(0x6c7cd0c3), X(0x6c86d7a6), X(0x6c90db92), X(0x6c9adc8a), + X(0x6ca4da8b), X(0x6caed596), X(0x6cb8cdab), X(0x6cc2c2ca), + X(0x6cccb4f2), X(0x6cd6a424), X(0x6ce0905e), X(0x6cea79a1), + X(0x6cf45fee), X(0x6cfe4342), X(0x6d0823a0), X(0x6d120105), + X(0x6d1bdb73), X(0x6d25b2e8), X(0x6d2f8765), X(0x6d3958ea), + X(0x6d432777), X(0x6d4cf30a), X(0x6d56bba5), X(0x6d608147), + X(0x6d6a43f0), X(0x6d7403a0), X(0x6d7dc056), X(0x6d877a13), + X(0x6d9130d6), X(0x6d9ae4a0), X(0x6da4956f), X(0x6dae4345), + X(0x6db7ee20), X(0x6dc19601), X(0x6dcb3ae7), X(0x6dd4dcd3), + X(0x6dde7bc4), X(0x6de817bb), X(0x6df1b0b6), X(0x6dfb46b7), + X(0x6e04d9bc), X(0x6e0e69c7), X(0x6e17f6d5), X(0x6e2180e9), + X(0x6e2b0801), X(0x6e348c1d), X(0x6e3e0d3d), X(0x6e478b62), + X(0x6e51068a), X(0x6e5a7eb7), X(0x6e63f3e7), X(0x6e6d661b), + X(0x6e76d552), X(0x6e80418e), X(0x6e89aacc), X(0x6e93110f), + X(0x6e9c7454), X(0x6ea5d49d), X(0x6eaf31e9), X(0x6eb88c37), + X(0x6ec1e389), X(0x6ecb37de), X(0x6ed48936), X(0x6eddd790), + X(0x6ee722ee), X(0x6ef06b4d), X(0x6ef9b0b0), X(0x6f02f315), + X(0x6f0c327c), X(0x6f156ee6), X(0x6f1ea852), X(0x6f27dec1), + X(0x6f311232), X(0x6f3a42a5), X(0x6f43701a), X(0x6f4c9a91), + X(0x6f55c20a), X(0x6f5ee686), X(0x6f680803), X(0x6f712682), + X(0x6f7a4203), X(0x6f835a86), X(0x6f8c700b), X(0x6f958291), + X(0x6f9e921a), X(0x6fa79ea4), X(0x6fb0a830), X(0x6fb9aebd), + X(0x6fc2b24c), X(0x6fcbb2dd), X(0x6fd4b06f), X(0x6fddab03), + X(0x6fe6a299), X(0x6fef9730), X(0x6ff888c9), X(0x70017763), + X(0x700a62ff), X(0x70134b9c), X(0x701c313b), X(0x702513dc), + X(0x702df37e), X(0x7036d021), X(0x703fa9c6), X(0x7048806d), + X(0x70515415), X(0x705a24bf), X(0x7062f26b), X(0x706bbd17), + X(0x707484c6), X(0x707d4976), X(0x70860b28), X(0x708ec9dc), + X(0x70978591), X(0x70a03e48), X(0x70a8f400), X(0x70b1a6bb), + X(0x70ba5677), X(0x70c30335), X(0x70cbacf5), X(0x70d453b6), + X(0x70dcf77a), X(0x70e59840), X(0x70ee3607), X(0x70f6d0d1), + X(0x70ff689d), X(0x7107fd6b), X(0x71108f3b), X(0x71191e0d), + X(0x7121a9e2), X(0x712a32b9), X(0x7132b892), X(0x713b3b6e), + X(0x7143bb4c), X(0x714c382d), X(0x7154b211), X(0x715d28f7), + X(0x71659ce0), X(0x716e0dcc), X(0x71767bbb), X(0x717ee6ac), + X(0x71874ea1), X(0x718fb399), X(0x71981594), X(0x71a07493), + X(0x71a8d094), X(0x71b1299a), X(0x71b97fa2), X(0x71c1d2af), + X(0x71ca22bf), X(0x71d26fd2), X(0x71dab9ea), X(0x71e30106), + X(0x71eb4526), X(0x71f3864a), X(0x71fbc472), X(0x7203ff9e), + X(0x720c37cf), X(0x72146d05), X(0x721c9f3f), X(0x7224ce7e), + X(0x722cfac2), X(0x7235240b), X(0x723d4a59), X(0x72456dad), + X(0x724d8e05), X(0x7255ab63), X(0x725dc5c7), X(0x7265dd31), + X(0x726df1a0), X(0x72760315), X(0x727e1191), X(0x72861d12), + X(0x728e259a), X(0x72962b28), X(0x729e2dbd), X(0x72a62d59), + X(0x72ae29fc), X(0x72b623a5), X(0x72be1a56), X(0x72c60e0e), + X(0x72cdfece), X(0x72d5ec95), X(0x72ddd764), X(0x72e5bf3b), + X(0x72eda41a), X(0x72f58601), X(0x72fd64f1), X(0x730540e9), + X(0x730d19e9), X(0x7314eff3), X(0x731cc305), X(0x73249321), + X(0x732c6046), X(0x73342a75), X(0x733bf1ad), X(0x7343b5ef), + X(0x734b773b), X(0x73533591), X(0x735af0f2), X(0x7362a95d), + X(0x736a5ed3), X(0x73721153), X(0x7379c0df), X(0x73816d76), + X(0x73891719), X(0x7390bdc7), X(0x73986181), X(0x73a00247), + X(0x73a7a01a), X(0x73af3af8), X(0x73b6d2e4), X(0x73be67dc), + X(0x73c5f9e1), X(0x73cd88f3), X(0x73d51513), X(0x73dc9e40), + X(0x73e4247c), X(0x73eba7c5), X(0x73f3281c), X(0x73faa582), + X(0x74021ff7), X(0x7409977b), X(0x74110c0d), X(0x74187daf), + X(0x741fec61), X(0x74275822), X(0x742ec0f3), X(0x743626d5), + X(0x743d89c7), X(0x7444e9c9), X(0x744c46dd), X(0x7453a101), + X(0x745af837), X(0x74624c7f), X(0x74699dd8), X(0x7470ec44), + X(0x747837c2), X(0x747f8052), X(0x7486c5f5), X(0x748e08ac), + X(0x74954875), X(0x749c8552), X(0x74a3bf43), X(0x74aaf648), + X(0x74b22a62), X(0x74b95b90), X(0x74c089d2), X(0x74c7b52a), + X(0x74cedd97), X(0x74d6031a), X(0x74dd25b2), X(0x74e44561), + X(0x74eb6226), X(0x74f27c02), X(0x74f992f5), X(0x7500a6ff), + X(0x7507b820), X(0x750ec659), X(0x7515d1aa), X(0x751cda14), + X(0x7523df96), X(0x752ae231), X(0x7531e1e5), X(0x7538deb2), + X(0x753fd89a), X(0x7546cf9b), X(0x754dc3b7), X(0x7554b4ed), + X(0x755ba33e), X(0x75628eaa), X(0x75697732), X(0x75705cd5), + X(0x75773f95), X(0x757e1f71), X(0x7584fc6a), X(0x758bd67f), + X(0x7592adb2), X(0x75998203), X(0x75a05371), X(0x75a721fe), + X(0x75adeda9), X(0x75b4b673), X(0x75bb7c5c), X(0x75c23f65), + X(0x75c8ff8d), X(0x75cfbcd6), X(0x75d6773f), X(0x75dd2ec8), + X(0x75e3e373), X(0x75ea953f), X(0x75f1442d), X(0x75f7f03d), + X(0x75fe996f), X(0x76053fc5), X(0x760be33d), X(0x761283d8), + X(0x76192197), X(0x761fbc7b), X(0x76265482), X(0x762ce9af), + X(0x76337c01), X(0x763a0b78), X(0x76409814), X(0x764721d7), + X(0x764da8c1), X(0x76542cd1), X(0x765aae08), X(0x76612c67), + X(0x7667a7ee), X(0x766e209d), X(0x76749675), X(0x767b0975), + X(0x7681799f), X(0x7687e6f3), X(0x768e5170), X(0x7694b918), + X(0x769b1deb), X(0x76a17fe9), X(0x76a7df13), X(0x76ae3b68), + X(0x76b494ea), X(0x76baeb98), X(0x76c13f74), X(0x76c7907c), + X(0x76cddeb3), X(0x76d42a18), X(0x76da72ab), X(0x76e0b86d), + X(0x76e6fb5e), X(0x76ed3b7f), X(0x76f378d0), X(0x76f9b352), + X(0x76ffeb05), X(0x77061fe8), X(0x770c51fe), X(0x77128145), + X(0x7718adbf), X(0x771ed76c), X(0x7724fe4c), X(0x772b225f), + X(0x773143a7), X(0x77376223), X(0x773d7dd3), X(0x774396ba), + X(0x7749acd5), X(0x774fc027), X(0x7755d0af), X(0x775bde6f), + X(0x7761e965), X(0x7767f193), X(0x776df6fa), X(0x7773f998), + X(0x7779f970), X(0x777ff681), X(0x7785f0cd), X(0x778be852), + X(0x7791dd12), X(0x7797cf0d), X(0x779dbe43), X(0x77a3aab6), + X(0x77a99465), X(0x77af7b50), X(0x77b55f79), X(0x77bb40e0), + X(0x77c11f85), X(0x77c6fb68), X(0x77ccd48a), X(0x77d2aaec), + X(0x77d87e8d), X(0x77de4f6f), X(0x77e41d92), X(0x77e9e8f5), + X(0x77efb19b), X(0x77f57782), X(0x77fb3aad), X(0x7800fb1a), + X(0x7806b8ca), X(0x780c73bf), X(0x78122bf7), X(0x7817e175), + X(0x781d9438), X(0x78234440), X(0x7828f18f), X(0x782e9c25), + X(0x78344401), X(0x7839e925), X(0x783f8b92), X(0x78452b46), + X(0x784ac844), X(0x7850628b), X(0x7855fa1c), X(0x785b8ef8), + X(0x7861211e), X(0x7866b090), X(0x786c3d4d), X(0x7871c757), + X(0x78774ead), X(0x787cd351), X(0x78825543), X(0x7887d483), + X(0x788d5111), X(0x7892caef), X(0x7898421c), X(0x789db69a), + X(0x78a32868), X(0x78a89787), X(0x78ae03f8), X(0x78b36dbb), + X(0x78b8d4d1), X(0x78be393a), X(0x78c39af6), X(0x78c8fa06), + X(0x78ce566c), X(0x78d3b026), X(0x78d90736), X(0x78de5b9c), + X(0x78e3ad58), X(0x78e8fc6c), X(0x78ee48d7), X(0x78f3929b), + X(0x78f8d9b7), X(0x78fe1e2c), X(0x79035ffb), X(0x79089f24), + X(0x790ddba8), X(0x79131587), X(0x79184cc2), X(0x791d8159), + X(0x7922b34d), X(0x7927e29e), X(0x792d0f4d), X(0x7932395a), + X(0x793760c6), X(0x793c8591), X(0x7941a7bd), X(0x7946c749), + X(0x794be435), X(0x7950fe84), X(0x79561634), X(0x795b2b47), + X(0x79603dbc), X(0x79654d96), X(0x796a5ad4), X(0x796f6576), + X(0x79746d7e), X(0x797972eb), X(0x797e75bf), X(0x798375f9), + X(0x7988739b), X(0x798d6ea5), X(0x79926717), X(0x79975cf2), + X(0x799c5037), X(0x79a140e6), X(0x79a62f00), X(0x79ab1a85), + X(0x79b00376), X(0x79b4e9d3), X(0x79b9cd9d), X(0x79beaed4), + X(0x79c38d79), X(0x79c8698d), X(0x79cd4310), X(0x79d21a03), + X(0x79d6ee66), X(0x79dbc03a), X(0x79e08f7f), X(0x79e55c36), + X(0x79ea265f), X(0x79eeedfc), X(0x79f3b30c), X(0x79f87590), + X(0x79fd3589), X(0x7a01f2f7), X(0x7a06addc), X(0x7a0b6636), + X(0x7a101c08), X(0x7a14cf52), X(0x7a198013), X(0x7a1e2e4d), + X(0x7a22da01), X(0x7a27832f), X(0x7a2c29d7), X(0x7a30cdfa), + X(0x7a356f99), X(0x7a3a0eb4), X(0x7a3eab4c), X(0x7a434561), + X(0x7a47dcf5), X(0x7a4c7207), X(0x7a510498), X(0x7a5594a9), + X(0x7a5a223a), X(0x7a5ead4d), X(0x7a6335e0), X(0x7a67bbf6), + X(0x7a6c3f8f), X(0x7a70c0ab), X(0x7a753f4b), X(0x7a79bb6f), + X(0x7a7e3519), X(0x7a82ac48), X(0x7a8720fe), X(0x7a8b933b), + X(0x7a9002ff), X(0x7a94704b), X(0x7a98db20), X(0x7a9d437e), + X(0x7aa1a967), X(0x7aa60cd9), X(0x7aaa6dd7), X(0x7aaecc61), + X(0x7ab32877), X(0x7ab7821b), X(0x7abbd94b), X(0x7ac02e0a), + X(0x7ac48058), X(0x7ac8d035), X(0x7acd1da3), X(0x7ad168a1), + X(0x7ad5b130), X(0x7ad9f751), X(0x7ade3b05), X(0x7ae27c4c), + X(0x7ae6bb27), X(0x7aeaf796), X(0x7aef319a), X(0x7af36934), + X(0x7af79e64), X(0x7afbd12c), X(0x7b00018a), X(0x7b042f81), + X(0x7b085b10), X(0x7b0c8439), X(0x7b10aafc), X(0x7b14cf5a), + X(0x7b18f153), X(0x7b1d10e8), X(0x7b212e1a), X(0x7b2548e9), + X(0x7b296155), X(0x7b2d7761), X(0x7b318b0b), X(0x7b359c55), + X(0x7b39ab3f), X(0x7b3db7cb), X(0x7b41c1f8), X(0x7b45c9c8), + X(0x7b49cf3b), X(0x7b4dd251), X(0x7b51d30b), X(0x7b55d16b), + X(0x7b59cd70), X(0x7b5dc71b), X(0x7b61be6d), X(0x7b65b366), + X(0x7b69a608), X(0x7b6d9653), X(0x7b718447), X(0x7b756fe5), + X(0x7b79592e), X(0x7b7d4022), X(0x7b8124c3), X(0x7b850710), + X(0x7b88e70a), X(0x7b8cc4b3), X(0x7b90a00a), X(0x7b947911), + X(0x7b984fc8), X(0x7b9c242f), X(0x7b9ff648), X(0x7ba3c612), + X(0x7ba79390), X(0x7bab5ec1), X(0x7baf27a5), X(0x7bb2ee3f), + X(0x7bb6b28e), X(0x7bba7493), X(0x7bbe344e), X(0x7bc1f1c1), + X(0x7bc5acec), X(0x7bc965cf), X(0x7bcd1c6c), X(0x7bd0d0c3), + X(0x7bd482d4), X(0x7bd832a1), X(0x7bdbe02a), X(0x7bdf8b70), + X(0x7be33473), X(0x7be6db34), X(0x7bea7fb4), X(0x7bee21f4), + X(0x7bf1c1f3), X(0x7bf55fb3), X(0x7bf8fb35), X(0x7bfc9479), + X(0x7c002b7f), X(0x7c03c04a), X(0x7c0752d8), X(0x7c0ae32b), + X(0x7c0e7144), X(0x7c11fd23), X(0x7c1586c9), X(0x7c190e36), + X(0x7c1c936c), X(0x7c20166b), X(0x7c239733), X(0x7c2715c6), + X(0x7c2a9224), X(0x7c2e0c4e), X(0x7c318444), X(0x7c34fa07), + X(0x7c386d98), X(0x7c3bdef8), X(0x7c3f4e26), X(0x7c42bb25), + X(0x7c4625f4), X(0x7c498e95), X(0x7c4cf507), X(0x7c50594c), + X(0x7c53bb65), X(0x7c571b51), X(0x7c5a7913), X(0x7c5dd4aa), + X(0x7c612e17), X(0x7c64855b), X(0x7c67da76), X(0x7c6b2d6a), + X(0x7c6e7e37), X(0x7c71ccdd), X(0x7c75195e), X(0x7c7863ba), + X(0x7c7babf1), X(0x7c7ef206), X(0x7c8235f7), X(0x7c8577c6), + X(0x7c88b774), X(0x7c8bf502), X(0x7c8f306f), X(0x7c9269bd), + X(0x7c95a0ec), X(0x7c98d5fe), X(0x7c9c08f2), X(0x7c9f39cb), + X(0x7ca26887), X(0x7ca59528), X(0x7ca8bfb0), X(0x7cabe81d), + X(0x7caf0e72), X(0x7cb232af), X(0x7cb554d4), X(0x7cb874e2), + X(0x7cbb92db), X(0x7cbeaebe), X(0x7cc1c88d), X(0x7cc4e047), + X(0x7cc7f5ef), X(0x7ccb0984), X(0x7cce1b08), X(0x7cd12a7b), + X(0x7cd437dd), X(0x7cd74330), X(0x7cda4c74), X(0x7cdd53aa), + X(0x7ce058d3), X(0x7ce35bef), X(0x7ce65cff), X(0x7ce95c04), + X(0x7cec58ff), X(0x7cef53f0), X(0x7cf24cd7), X(0x7cf543b7), + X(0x7cf8388f), X(0x7cfb2b60), X(0x7cfe1c2b), X(0x7d010af1), + X(0x7d03f7b2), X(0x7d06e26f), X(0x7d09cb29), X(0x7d0cb1e0), + X(0x7d0f9696), X(0x7d12794b), X(0x7d1559ff), X(0x7d1838b4), + X(0x7d1b156a), X(0x7d1df022), X(0x7d20c8dd), X(0x7d239f9b), + X(0x7d26745e), X(0x7d294725), X(0x7d2c17f1), X(0x7d2ee6c4), + X(0x7d31b39f), X(0x7d347e81), X(0x7d37476b), X(0x7d3a0e5f), + X(0x7d3cd35d), X(0x7d3f9665), X(0x7d425779), X(0x7d451699), + X(0x7d47d3c6), X(0x7d4a8f01), X(0x7d4d484b), X(0x7d4fffa3), + X(0x7d52b50c), X(0x7d556885), X(0x7d581a0f), X(0x7d5ac9ac), + X(0x7d5d775c), X(0x7d60231f), X(0x7d62ccf6), X(0x7d6574e3), + X(0x7d681ae6), X(0x7d6abeff), X(0x7d6d612f), X(0x7d700178), + X(0x7d729fd9), X(0x7d753c54), X(0x7d77d6e9), X(0x7d7a6f9a), + X(0x7d7d0666), X(0x7d7f9b4f), X(0x7d822e55), X(0x7d84bf79), + X(0x7d874ebc), X(0x7d89dc1e), X(0x7d8c67a1), X(0x7d8ef144), + X(0x7d91790a), X(0x7d93fef2), X(0x7d9682fd), X(0x7d99052d), + X(0x7d9b8581), X(0x7d9e03fb), X(0x7da0809b), X(0x7da2fb62), + X(0x7da57451), X(0x7da7eb68), X(0x7daa60a8), X(0x7dacd413), + X(0x7daf45a9), X(0x7db1b56a), X(0x7db42357), X(0x7db68f71), + X(0x7db8f9b9), X(0x7dbb6230), X(0x7dbdc8d6), X(0x7dc02dac), + X(0x7dc290b3), X(0x7dc4f1eb), X(0x7dc75156), X(0x7dc9aef4), + X(0x7dcc0ac5), X(0x7dce64cc), X(0x7dd0bd07), X(0x7dd31379), + X(0x7dd56821), X(0x7dd7bb01), X(0x7dda0c1a), X(0x7ddc5b6b), + X(0x7ddea8f7), X(0x7de0f4bd), X(0x7de33ebe), X(0x7de586fc), + X(0x7de7cd76), X(0x7dea122e), X(0x7dec5525), X(0x7dee965a), + X(0x7df0d5d0), X(0x7df31386), X(0x7df54f7e), X(0x7df789b8), + X(0x7df9c235), X(0x7dfbf8f5), X(0x7dfe2dfa), X(0x7e006145), + X(0x7e0292d5), X(0x7e04c2ac), X(0x7e06f0cb), X(0x7e091d32), + X(0x7e0b47e1), X(0x7e0d70db), X(0x7e0f981f), X(0x7e11bdaf), + X(0x7e13e18a), X(0x7e1603b3), X(0x7e182429), X(0x7e1a42ed), + X(0x7e1c6001), X(0x7e1e7b64), X(0x7e209518), X(0x7e22ad1d), + X(0x7e24c375), X(0x7e26d81f), X(0x7e28eb1d), X(0x7e2afc70), + X(0x7e2d0c17), X(0x7e2f1a15), X(0x7e31266a), X(0x7e333115), + X(0x7e353a1a), X(0x7e374177), X(0x7e39472e), X(0x7e3b4b3f), + X(0x7e3d4dac), X(0x7e3f4e75), X(0x7e414d9a), X(0x7e434b1e), + X(0x7e4546ff), X(0x7e474140), X(0x7e4939e0), X(0x7e4b30e2), + X(0x7e4d2644), X(0x7e4f1a09), X(0x7e510c30), X(0x7e52fcbc), + X(0x7e54ebab), X(0x7e56d900), X(0x7e58c4bb), X(0x7e5aaedd), + X(0x7e5c9766), X(0x7e5e7e57), X(0x7e6063b2), X(0x7e624776), + X(0x7e6429a5), X(0x7e660a3f), X(0x7e67e945), X(0x7e69c6b8), + X(0x7e6ba299), X(0x7e6d7ce7), X(0x7e6f55a5), X(0x7e712cd3), + X(0x7e730272), X(0x7e74d682), X(0x7e76a904), X(0x7e7879f9), + X(0x7e7a4962), X(0x7e7c173f), X(0x7e7de392), X(0x7e7fae5a), + X(0x7e817799), X(0x7e833f50), X(0x7e85057f), X(0x7e86ca27), + X(0x7e888d49), X(0x7e8a4ee5), X(0x7e8c0efd), X(0x7e8dcd91), + X(0x7e8f8aa1), X(0x7e914630), X(0x7e93003c), X(0x7e94b8c8), + X(0x7e966fd4), X(0x7e982560), X(0x7e99d96e), X(0x7e9b8bfe), + X(0x7e9d3d10), X(0x7e9eeca7), X(0x7ea09ac2), X(0x7ea24762), + X(0x7ea3f288), X(0x7ea59c35), X(0x7ea7446a), X(0x7ea8eb27), + X(0x7eaa906c), X(0x7eac343c), X(0x7eadd696), X(0x7eaf777b), + X(0x7eb116ed), X(0x7eb2b4eb), X(0x7eb45177), X(0x7eb5ec91), + X(0x7eb7863b), X(0x7eb91e74), X(0x7ebab53e), X(0x7ebc4a99), + X(0x7ebdde87), X(0x7ebf7107), X(0x7ec1021b), X(0x7ec291c3), + X(0x7ec42001), X(0x7ec5acd5), X(0x7ec7383f), X(0x7ec8c241), + X(0x7eca4adb), X(0x7ecbd20d), X(0x7ecd57da), X(0x7ecedc41), + X(0x7ed05f44), X(0x7ed1e0e2), X(0x7ed3611d), X(0x7ed4dff6), + X(0x7ed65d6d), X(0x7ed7d983), X(0x7ed95438), X(0x7edacd8f), + X(0x7edc4586), X(0x7eddbc20), X(0x7edf315c), X(0x7ee0a53c), + X(0x7ee217c1), X(0x7ee388ea), X(0x7ee4f8b9), X(0x7ee6672f), + X(0x7ee7d44c), X(0x7ee94012), X(0x7eeaaa80), X(0x7eec1397), + X(0x7eed7b59), X(0x7eeee1c6), X(0x7ef046df), X(0x7ef1aaa5), + X(0x7ef30d18), X(0x7ef46e39), X(0x7ef5ce09), X(0x7ef72c88), + X(0x7ef889b8), X(0x7ef9e599), X(0x7efb402c), X(0x7efc9972), + X(0x7efdf16b), X(0x7eff4818), X(0x7f009d79), X(0x7f01f191), + X(0x7f03445f), X(0x7f0495e4), X(0x7f05e620), X(0x7f073516), + X(0x7f0882c5), X(0x7f09cf2d), X(0x7f0b1a51), X(0x7f0c6430), + X(0x7f0daccc), X(0x7f0ef425), X(0x7f103a3b), X(0x7f117f11), + X(0x7f12c2a5), X(0x7f1404fa), X(0x7f15460f), X(0x7f1685e6), + X(0x7f17c47f), X(0x7f1901db), X(0x7f1a3dfb), X(0x7f1b78e0), + X(0x7f1cb28a), X(0x7f1deafa), X(0x7f1f2231), X(0x7f20582f), + X(0x7f218cf5), X(0x7f22c085), X(0x7f23f2de), X(0x7f252401), + X(0x7f2653f0), X(0x7f2782ab), X(0x7f28b032), X(0x7f29dc87), + X(0x7f2b07aa), X(0x7f2c319c), X(0x7f2d5a5e), X(0x7f2e81f0), + X(0x7f2fa853), X(0x7f30cd88), X(0x7f31f18f), X(0x7f33146a), + X(0x7f343619), X(0x7f35569c), X(0x7f3675f6), X(0x7f379425), + X(0x7f38b12c), X(0x7f39cd0a), X(0x7f3ae7c0), X(0x7f3c0150), + X(0x7f3d19ba), X(0x7f3e30fe), X(0x7f3f471e), X(0x7f405c1a), + X(0x7f416ff3), X(0x7f4282a9), X(0x7f43943e), X(0x7f44a4b2), + X(0x7f45b405), X(0x7f46c239), X(0x7f47cf4e), X(0x7f48db45), + X(0x7f49e61f), X(0x7f4aefdc), X(0x7f4bf87e), X(0x7f4d0004), + X(0x7f4e0670), X(0x7f4f0bc2), X(0x7f500ffb), X(0x7f51131c), + X(0x7f521525), X(0x7f531618), X(0x7f5415f4), X(0x7f5514bb), + X(0x7f56126e), X(0x7f570f0c), X(0x7f580a98), X(0x7f590511), + X(0x7f59fe78), X(0x7f5af6ce), X(0x7f5bee14), X(0x7f5ce44a), + X(0x7f5dd972), X(0x7f5ecd8b), X(0x7f5fc097), X(0x7f60b296), + X(0x7f61a389), X(0x7f629370), X(0x7f63824e), X(0x7f647021), + X(0x7f655ceb), X(0x7f6648ad), X(0x7f673367), X(0x7f681d19), + X(0x7f6905c6), X(0x7f69ed6d), X(0x7f6ad40f), X(0x7f6bb9ad), + X(0x7f6c9e48), X(0x7f6d81e0), X(0x7f6e6475), X(0x7f6f460a), + X(0x7f70269d), X(0x7f710631), X(0x7f71e4c6), X(0x7f72c25c), + X(0x7f739ef4), X(0x7f747a8f), X(0x7f75552e), X(0x7f762ed1), + X(0x7f770779), X(0x7f77df27), X(0x7f78b5db), X(0x7f798b97), + X(0x7f7a605a), X(0x7f7b3425), X(0x7f7c06fa), X(0x7f7cd8d9), + X(0x7f7da9c2), X(0x7f7e79b7), X(0x7f7f48b8), X(0x7f8016c5), + X(0x7f80e3e0), X(0x7f81b009), X(0x7f827b40), X(0x7f834588), + X(0x7f840edf), X(0x7f84d747), X(0x7f859ec1), X(0x7f86654d), + X(0x7f872aec), X(0x7f87ef9e), X(0x7f88b365), X(0x7f897641), + X(0x7f8a3832), X(0x7f8af93a), X(0x7f8bb959), X(0x7f8c7890), + X(0x7f8d36df), X(0x7f8df448), X(0x7f8eb0ca), X(0x7f8f6c67), + X(0x7f90271e), X(0x7f90e0f2), X(0x7f9199e2), X(0x7f9251f0), + X(0x7f93091b), X(0x7f93bf65), X(0x7f9474ce), X(0x7f952958), + X(0x7f95dd01), X(0x7f968fcd), X(0x7f9741ba), X(0x7f97f2ca), + X(0x7f98a2fd), X(0x7f995254), X(0x7f9a00d0), X(0x7f9aae71), + X(0x7f9b5b38), X(0x7f9c0726), X(0x7f9cb23b), X(0x7f9d5c78), + X(0x7f9e05de), X(0x7f9eae6e), X(0x7f9f5627), X(0x7f9ffd0b), + X(0x7fa0a31b), X(0x7fa14856), X(0x7fa1ecbf), X(0x7fa29054), + X(0x7fa33318), X(0x7fa3d50b), X(0x7fa4762c), X(0x7fa5167e), + X(0x7fa5b601), X(0x7fa654b5), X(0x7fa6f29b), X(0x7fa78fb3), + X(0x7fa82bff), X(0x7fa8c77f), X(0x7fa96234), X(0x7fa9fc1e), + X(0x7faa953e), X(0x7fab2d94), X(0x7fabc522), X(0x7fac5be8), + X(0x7facf1e6), X(0x7fad871d), X(0x7fae1b8f), X(0x7faeaf3b), + X(0x7faf4222), X(0x7fafd445), X(0x7fb065a4), X(0x7fb0f641), + X(0x7fb1861b), X(0x7fb21534), X(0x7fb2a38c), X(0x7fb33124), + X(0x7fb3bdfb), X(0x7fb44a14), X(0x7fb4d56f), X(0x7fb5600c), + X(0x7fb5e9ec), X(0x7fb6730f), X(0x7fb6fb76), X(0x7fb78323), + X(0x7fb80a15), X(0x7fb8904d), X(0x7fb915cc), X(0x7fb99a92), + X(0x7fba1ea0), X(0x7fbaa1f7), X(0x7fbb2497), X(0x7fbba681), + X(0x7fbc27b5), X(0x7fbca835), X(0x7fbd2801), X(0x7fbda719), + X(0x7fbe257e), X(0x7fbea331), X(0x7fbf2032), X(0x7fbf9c82), + X(0x7fc01821), X(0x7fc09311), X(0x7fc10d52), X(0x7fc186e4), + X(0x7fc1ffc8), X(0x7fc277ff), X(0x7fc2ef89), X(0x7fc36667), + X(0x7fc3dc9a), X(0x7fc45221), X(0x7fc4c6ff), X(0x7fc53b33), + X(0x7fc5aebe), X(0x7fc621a0), X(0x7fc693db), X(0x7fc7056f), + X(0x7fc7765c), X(0x7fc7e6a3), X(0x7fc85645), X(0x7fc8c542), + X(0x7fc9339b), X(0x7fc9a150), X(0x7fca0e63), X(0x7fca7ad3), + X(0x7fcae6a2), X(0x7fcb51cf), X(0x7fcbbc5c), X(0x7fcc2649), + X(0x7fcc8f97), X(0x7fccf846), X(0x7fcd6058), X(0x7fcdc7cb), + X(0x7fce2ea2), X(0x7fce94dd), X(0x7fcefa7b), X(0x7fcf5f7f), + X(0x7fcfc3e8), X(0x7fd027b7), X(0x7fd08aed), X(0x7fd0ed8b), + X(0x7fd14f90), X(0x7fd1b0fd), X(0x7fd211d4), X(0x7fd27214), + X(0x7fd2d1bf), X(0x7fd330d4), X(0x7fd38f55), X(0x7fd3ed41), + X(0x7fd44a9a), X(0x7fd4a761), X(0x7fd50395), X(0x7fd55f37), + X(0x7fd5ba48), X(0x7fd614c9), X(0x7fd66eba), X(0x7fd6c81b), + X(0x7fd720ed), X(0x7fd77932), X(0x7fd7d0e8), X(0x7fd82812), + X(0x7fd87eae), X(0x7fd8d4bf), X(0x7fd92a45), X(0x7fd97f40), + X(0x7fd9d3b0), X(0x7fda2797), X(0x7fda7af5), X(0x7fdacdca), + X(0x7fdb2018), X(0x7fdb71dd), X(0x7fdbc31c), X(0x7fdc13d5), + X(0x7fdc6408), X(0x7fdcb3b6), X(0x7fdd02df), X(0x7fdd5184), + X(0x7fdd9fa5), X(0x7fdded44), X(0x7fde3a60), X(0x7fde86fb), + X(0x7fded314), X(0x7fdf1eac), X(0x7fdf69c4), X(0x7fdfb45d), + X(0x7fdffe76), X(0x7fe04811), X(0x7fe0912e), X(0x7fe0d9ce), + X(0x7fe121f0), X(0x7fe16996), X(0x7fe1b0c1), X(0x7fe1f770), + X(0x7fe23da4), X(0x7fe2835f), X(0x7fe2c89f), X(0x7fe30d67), + X(0x7fe351b5), X(0x7fe3958c), X(0x7fe3d8ec), X(0x7fe41bd4), + X(0x7fe45e46), X(0x7fe4a042), X(0x7fe4e1c8), X(0x7fe522da), + X(0x7fe56378), X(0x7fe5a3a1), X(0x7fe5e358), X(0x7fe6229b), + X(0x7fe6616d), X(0x7fe69fcc), X(0x7fe6ddbb), X(0x7fe71b39), + X(0x7fe75847), X(0x7fe794e5), X(0x7fe7d114), X(0x7fe80cd5), + X(0x7fe84827), X(0x7fe8830c), X(0x7fe8bd84), X(0x7fe8f78f), + X(0x7fe9312f), X(0x7fe96a62), X(0x7fe9a32b), X(0x7fe9db8a), + X(0x7fea137e), X(0x7fea4b09), X(0x7fea822b), X(0x7feab8e5), + X(0x7feaef37), X(0x7feb2521), X(0x7feb5aa4), X(0x7feb8fc1), + X(0x7febc478), X(0x7febf8ca), X(0x7fec2cb6), X(0x7fec603e), + X(0x7fec9363), X(0x7fecc623), X(0x7fecf881), X(0x7fed2a7c), + X(0x7fed5c16), X(0x7fed8d4e), X(0x7fedbe24), X(0x7fedee9b), + X(0x7fee1eb1), X(0x7fee4e68), X(0x7fee7dc0), X(0x7feeacb9), + X(0x7feedb54), X(0x7fef0991), X(0x7fef3771), X(0x7fef64f5), + X(0x7fef921d), X(0x7fefbee8), X(0x7fefeb59), X(0x7ff0176f), + X(0x7ff0432a), X(0x7ff06e8c), X(0x7ff09995), X(0x7ff0c444), + X(0x7ff0ee9c), X(0x7ff1189b), X(0x7ff14243), X(0x7ff16b94), + X(0x7ff1948e), X(0x7ff1bd32), X(0x7ff1e581), X(0x7ff20d7b), + X(0x7ff2351f), X(0x7ff25c70), X(0x7ff2836d), X(0x7ff2aa17), + X(0x7ff2d06d), X(0x7ff2f672), X(0x7ff31c24), X(0x7ff34185), + X(0x7ff36695), X(0x7ff38b55), X(0x7ff3afc4), X(0x7ff3d3e4), + X(0x7ff3f7b4), X(0x7ff41b35), X(0x7ff43e69), X(0x7ff4614e), + X(0x7ff483e6), X(0x7ff4a631), X(0x7ff4c82f), X(0x7ff4e9e1), + X(0x7ff50b47), X(0x7ff52c62), X(0x7ff54d33), X(0x7ff56db9), + X(0x7ff58df5), X(0x7ff5ade7), X(0x7ff5cd90), X(0x7ff5ecf1), + X(0x7ff60c09), X(0x7ff62ada), X(0x7ff64963), X(0x7ff667a5), + X(0x7ff685a1), X(0x7ff6a357), X(0x7ff6c0c7), X(0x7ff6ddf1), + X(0x7ff6fad7), X(0x7ff71778), X(0x7ff733d6), X(0x7ff74fef), + X(0x7ff76bc6), X(0x7ff78759), X(0x7ff7a2ab), X(0x7ff7bdba), + X(0x7ff7d888), X(0x7ff7f315), X(0x7ff80d61), X(0x7ff8276c), + X(0x7ff84138), X(0x7ff85ac4), X(0x7ff87412), X(0x7ff88d20), + X(0x7ff8a5f0), X(0x7ff8be82), X(0x7ff8d6d7), X(0x7ff8eeef), + X(0x7ff906c9), X(0x7ff91e68), X(0x7ff935cb), X(0x7ff94cf2), + X(0x7ff963dd), X(0x7ff97a8f), X(0x7ff99105), X(0x7ff9a742), + X(0x7ff9bd45), X(0x7ff9d30f), X(0x7ff9e8a0), X(0x7ff9fdf9), + X(0x7ffa131a), X(0x7ffa2803), X(0x7ffa3cb4), X(0x7ffa512f), + X(0x7ffa6573), X(0x7ffa7981), X(0x7ffa8d59), X(0x7ffaa0fc), + X(0x7ffab46a), X(0x7ffac7a3), X(0x7ffadaa8), X(0x7ffaed78), + X(0x7ffb0015), X(0x7ffb127f), X(0x7ffb24b6), X(0x7ffb36bb), + X(0x7ffb488d), X(0x7ffb5a2e), X(0x7ffb6b9d), X(0x7ffb7cdb), + X(0x7ffb8de9), X(0x7ffb9ec6), X(0x7ffbaf73), X(0x7ffbbff1), + X(0x7ffbd03f), X(0x7ffbe05e), X(0x7ffbf04f), X(0x7ffc0012), + X(0x7ffc0fa6), X(0x7ffc1f0d), X(0x7ffc2e47), X(0x7ffc3d54), + X(0x7ffc4c35), X(0x7ffc5ae9), X(0x7ffc6971), X(0x7ffc77ce), + X(0x7ffc8600), X(0x7ffc9407), X(0x7ffca1e4), X(0x7ffcaf96), + X(0x7ffcbd1f), X(0x7ffcca7e), X(0x7ffcd7b4), X(0x7ffce4c1), + X(0x7ffcf1a5), X(0x7ffcfe62), X(0x7ffd0af6), X(0x7ffd1763), + X(0x7ffd23a9), X(0x7ffd2fc8), X(0x7ffd3bc1), X(0x7ffd4793), + X(0x7ffd533f), X(0x7ffd5ec5), X(0x7ffd6a27), X(0x7ffd7563), + X(0x7ffd807a), X(0x7ffd8b6e), X(0x7ffd963d), X(0x7ffda0e8), + X(0x7ffdab70), X(0x7ffdb5d5), X(0x7ffdc017), X(0x7ffdca36), + X(0x7ffdd434), X(0x7ffdde0f), X(0x7ffde7c9), X(0x7ffdf161), + X(0x7ffdfad8), X(0x7ffe042f), X(0x7ffe0d65), X(0x7ffe167b), + X(0x7ffe1f71), X(0x7ffe2848), X(0x7ffe30ff), X(0x7ffe3997), + X(0x7ffe4211), X(0x7ffe4a6c), X(0x7ffe52a9), X(0x7ffe5ac8), + X(0x7ffe62c9), X(0x7ffe6aae), X(0x7ffe7275), X(0x7ffe7a1f), + X(0x7ffe81ad), X(0x7ffe891f), X(0x7ffe9075), X(0x7ffe97b0), + X(0x7ffe9ece), X(0x7ffea5d2), X(0x7ffeacbb), X(0x7ffeb38a), + X(0x7ffeba3e), X(0x7ffec0d8), X(0x7ffec758), X(0x7ffecdbf), + X(0x7ffed40d), X(0x7ffeda41), X(0x7ffee05d), X(0x7ffee660), + X(0x7ffeec4b), X(0x7ffef21f), X(0x7ffef7da), X(0x7ffefd7e), + X(0x7fff030b), X(0x7fff0881), X(0x7fff0de0), X(0x7fff1328), + X(0x7fff185b), X(0x7fff1d77), X(0x7fff227e), X(0x7fff276f), + X(0x7fff2c4b), X(0x7fff3112), X(0x7fff35c4), X(0x7fff3a62), + X(0x7fff3eeb), X(0x7fff4360), X(0x7fff47c2), X(0x7fff4c0f), + X(0x7fff504a), X(0x7fff5471), X(0x7fff5885), X(0x7fff5c87), + X(0x7fff6076), X(0x7fff6452), X(0x7fff681d), X(0x7fff6bd6), + X(0x7fff6f7d), X(0x7fff7313), X(0x7fff7698), X(0x7fff7a0c), + X(0x7fff7d6f), X(0x7fff80c2), X(0x7fff8404), X(0x7fff8736), + X(0x7fff8a58), X(0x7fff8d6b), X(0x7fff906e), X(0x7fff9362), + X(0x7fff9646), X(0x7fff991c), X(0x7fff9be3), X(0x7fff9e9c), + X(0x7fffa146), X(0x7fffa3e2), X(0x7fffa671), X(0x7fffa8f1), + X(0x7fffab65), X(0x7fffadca), X(0x7fffb023), X(0x7fffb26f), + X(0x7fffb4ae), X(0x7fffb6e0), X(0x7fffb906), X(0x7fffbb20), + X(0x7fffbd2e), X(0x7fffbf30), X(0x7fffc126), X(0x7fffc311), + X(0x7fffc4f1), X(0x7fffc6c5), X(0x7fffc88f), X(0x7fffca4d), + X(0x7fffcc01), X(0x7fffcdab), X(0x7fffcf4a), X(0x7fffd0e0), + X(0x7fffd26b), X(0x7fffd3ec), X(0x7fffd564), X(0x7fffd6d2), + X(0x7fffd838), X(0x7fffd993), X(0x7fffdae6), X(0x7fffdc31), + X(0x7fffdd72), X(0x7fffdeab), X(0x7fffdfdb), X(0x7fffe104), + X(0x7fffe224), X(0x7fffe33c), X(0x7fffe44d), X(0x7fffe556), + X(0x7fffe657), X(0x7fffe751), X(0x7fffe844), X(0x7fffe930), + X(0x7fffea15), X(0x7fffeaf3), X(0x7fffebca), X(0x7fffec9b), + X(0x7fffed66), X(0x7fffee2a), X(0x7fffeee8), X(0x7fffefa0), + X(0x7ffff053), X(0x7ffff0ff), X(0x7ffff1a6), X(0x7ffff247), + X(0x7ffff2e4), X(0x7ffff37a), X(0x7ffff40c), X(0x7ffff499), + X(0x7ffff520), X(0x7ffff5a3), X(0x7ffff621), X(0x7ffff69b), + X(0x7ffff710), X(0x7ffff781), X(0x7ffff7ee), X(0x7ffff857), + X(0x7ffff8bb), X(0x7ffff91c), X(0x7ffff979), X(0x7ffff9d2), + X(0x7ffffa27), X(0x7ffffa79), X(0x7ffffac8), X(0x7ffffb13), + X(0x7ffffb5b), X(0x7ffffba0), X(0x7ffffbe2), X(0x7ffffc21), + X(0x7ffffc5d), X(0x7ffffc96), X(0x7ffffccd), X(0x7ffffd01), + X(0x7ffffd32), X(0x7ffffd61), X(0x7ffffd8e), X(0x7ffffdb8), + X(0x7ffffde0), X(0x7ffffe07), X(0x7ffffe2b), X(0x7ffffe4d), + X(0x7ffffe6d), X(0x7ffffe8b), X(0x7ffffea8), X(0x7ffffec3), + X(0x7ffffedc), X(0x7ffffef4), X(0x7fffff0a), X(0x7fffff1f), + X(0x7fffff33), X(0x7fffff45), X(0x7fffff56), X(0x7fffff66), + X(0x7fffff75), X(0x7fffff82), X(0x7fffff8f), X(0x7fffff9a), + X(0x7fffffa5), X(0x7fffffaf), X(0x7fffffb8), X(0x7fffffc0), + X(0x7fffffc8), X(0x7fffffce), X(0x7fffffd5), X(0x7fffffda), + X(0x7fffffdf), X(0x7fffffe4), X(0x7fffffe8), X(0x7fffffeb), + X(0x7fffffef), X(0x7ffffff1), X(0x7ffffff4), X(0x7ffffff6), + X(0x7ffffff8), X(0x7ffffff9), X(0x7ffffffb), X(0x7ffffffc), + X(0x7ffffffd), X(0x7ffffffd), X(0x7ffffffe), X(0x7fffffff), + X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), + X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), + X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), X(0x7fffffff), +}; + +#endif diff --git a/opengles/.htaccess b/opengles/.htaccess new file mode 100644 index 0000000000..4533707588 --- /dev/null +++ b/opengles/.htaccess @@ -0,0 +1,4 @@ +Options +Indexes + +# Rewrites from old opengl.org GL and khronos.org ES/SC registries +# are done in those locations on a per-file/pattern basis. diff --git a/opengles/ABI/ext/3dlabs.txt b/opengles/ABI/ext/3dlabs.txt new file mode 100644 index 0000000000..5ce11ecf57 --- /dev/null +++ b/opengles/ABI/ext/3dlabs.txt @@ -0,0 +1,32 @@ +From: Barthold Lichtenbelt <barthold.lichtenbelt 'at' 3dlabs.com> +Date: Wed, 01 Dec 1999 10:32:55 -0700 + +3Dlabs extension support for: + +Permedia3 Create!, Oxygen VX1, Oxygen GVX1, Oxygen GVX210 +--------------------------------------------------------- + +GL_Autodesk_valid_back_buffer_hint * +GL_EXT_bgra +GL_EXT_blend_minmax +GL_EXT_blend_subtract +GL_EXT_paletted_texture +GL_EXT_polygon_offset +GL_EXT_shared_texture_palette +GL_EXT_texture3D +GL_EXT_texture_edge_clamp +GL_EXT_texture_env_add +GL_EXT_texture_env_combine +GL_EXT_texture_object +GL_EXT_vertex_array +GL_KTX_buffer_region * +GL_WIN_swap_hint + +* WinNT only. All other ones are for Win9x and WinNT. + +OpenGL extensions for Permedia3 Create! and Oxygen VX1 only +----------------------------------------------------------- + +GL_ARB_multitexture +GL_Autodesk_facet_normal +GL_SGIS_multitexture diff --git a/opengles/ABI/ext/compaq.txt b/opengles/ABI/ext/compaq.txt new file mode 100644 index 0000000000..a9d76db91d --- /dev/null +++ b/opengles/ABI/ext/compaq.txt @@ -0,0 +1,7 @@ +From: "Stockwell, Bruce" <Bruce.Stockwell 'at' compaq.com> +Date: Tue, 30 Nov 1999 10:16:29 -0500 + +PowerStorm 300/350 extension support (Tru64 UNIX and Windows NT): + +GL_EXT_texture_object +GL_EXT_vertex_array diff --git a/opengles/ABI/ext/intergraph.txt b/opengles/ABI/ext/intergraph.txt new file mode 100644 index 0000000000..83bd28ed2e --- /dev/null +++ b/opengles/ABI/ext/intergraph.txt @@ -0,0 +1,49 @@ +From: "Kirkland, Dale L" <dlkirkla 'at' intense3d.com> +Date: Thu, 9 Dec 1999 15:23:34 -0600 + +Intergraph extension support: + +GL_Autodesk_valid_back_buffer_hint +GL_EXT_422_pixels +GL_EXT_bgra +GL_EXT_blend_color +GL_EXT_blend_func_separate +GL_EXT_blend_minmax +GL_EXT_blend_subtract +GL_EXT_color_matrix +GL_EXT_color_subtable +GL_EXT_color_table +GL_EXT_convolution +GL_EXT_convolution_border_modes +GL_EXT_fog_function +GL_EXT_fog_offset +GL_EXT_generate_mipmap +GL_EXT_interlace +GL_EXT_multisample +GL_EXT_occlusion_test +GL_EXT_packed_pixels +GL_EXT_pixel_texture +GL_EXT_rescale_normal +GL_EXT_separate_specular_color +GL_EXT_swap_control +GL_EXT_texture3D +GL_EXT_texture_border_clamp +GL_EXT_texture_color_table +GL_EXT_texture_edge_clamp +GL_EXT_texture_lod +GL_EXT_texture_object +GL_HP_occlusion_test +GL_I3D_color_clamp +GL_I3D_interlace_read +GL_KTX_buffer_region +GL_SGIS_fog_function +GL_SGIS_generate_mipmap +GL_SGIS_multisample +GL_SGIS_texture_border_clamp +GL_SGIX_fog_offset +GL_SGIX_interlace +GL_SGIX_pixel_texture +GL_SGI_color_matrix +GL_SGI_color_table +GL_SGI_texture_color_table +GL_WIN_swap_hint diff --git a/opengles/ABI/ext/mesa.txt b/opengles/ABI/ext/mesa.txt new file mode 100644 index 0000000000..29b7cff036 --- /dev/null +++ b/opengles/ABI/ext/mesa.txt @@ -0,0 +1,29 @@ +From: Brian Paul <brian_paul 'at' avid.com> +Date: Tue, 14 Sep 1999 16:27:11 -0400 + +Mesa 3.1 extension support:1 + +GL_ARB_multitexture +GL_EXT_abgr +GL_EXT_blend_color +GL_EXT_blend_logic_op +GL_EXT_blend_minmax +GL_EXT_blend_subtract +GL_EXT_clip_volume_hint +GL_EXT_compiled_vertex_array +GL_EXT_paletted_texture +GL_EXT_point_parameters +GL_EXT_polygon_offset +GL_EXT_rescale_normal +GL_EXT_shared_texture_palette +GL_EXT_stencil_wrap +GL_EXT_texture3D +GL_EXT_texture_object +GL_EXT_vertex_array +GL_EXT_vertex_array_set +GL_INGR_blend_func_separate +GL_MESA_resize_buffers +GL_MESA_window_pos +GL_NV_texgen_reflection +GL_PGI_misc_hints +GL_SGIS_texture_edge_clamp diff --git a/opengles/ABI/ext/sgi.txt b/opengles/ABI/ext/sgi.txt new file mode 100644 index 0000000000..aa0ac70f94 --- /dev/null +++ b/opengles/ABI/ext/sgi.txt @@ -0,0 +1,77 @@ +From: Jon Leech <ljp 'at' sgi.com> +Date: September 10, 1999 + +Silicon Graphics extension support (various platforms): + IR2 Extreme Impact Indy O2 + --- ------- ------ ---- -- +GL_EXT_abgr X X X X X +GL_EXT_blend_color X X X X X +GL_EXT_blend_logic_op X X X X X +GL_EXT_blend_minmax X X X X X +GL_EXT_blend_subtract X X X X X +GL_EXT_convolution X X X X X +GL_EXT_copy_texture X X X X X +GL_EXT_histogram X X X X X +GL_EXT_packed_pixels X X X X X +GL_EXT_polygon_offset X X X X X +GL_EXT_subtexture X X X X X +GL_EXT_texture X X X X X +GL_EXT_texture3D X X X X X +GL_EXT_texture_object X X X X X +GL_EXT_vertex_array X X X X X +GL_SGI_color_matrix X X X X X +GL_SGI_color_table X X X X X +GL_SGI_texture_color_table X X X X X +GL_SGIS_detail_texture X X +GL_SGIS_fog_function X +GL_SGIS_multisample X +GL_SGIS_point_line_texgen X +GL_SGIS_point_parameters X +GL_SGIS_sharpen_texture X +GL_SGIS_texture_border_clamp X +GL_SGIS_texture_edge_clamp X X +GL_SGIS_texture_filter4 X X X X +GL_SGIS_texture_lod X X +GL_SGIS_texture_select X X +GL_SGIX_calligraphic_fragment X +GL_SGIX_clipmap X +GL_SGIX_fog_offset X +GL_SGIX_instruments X +GL_SGIX_interlace X X +GL_SGIX_ir_instrument1 X +GL_SGIX_flush_raster X +GL_SGIX_list_priority X +GL_SGIX_pixel_texture X +GL_SGIX_reference_plane X +GL_SGIX_shadow X +GL_SGIX_shadow_ambient X +GL_SGIX_sprite X +GL_SGIX_subdiv_patch X X X +GL_SGIX_texture_add_env X +GL_SGIX_texture_lod_bias X +GL_SGIX_texture_multi_buffer X +GL_SGIX_texture_scale_bias X X X X +GL_SGIX_depth_texture X + +GLX_EXT_import_context X X X X X +GLX_EXT_visual_info X X X X X +GLX_EXT_visual_rating X X X X X +GLX_SGI_make_current_read X X X +GLX_SGI_swap_control X X X X X +GLX_SGI_video_sync X X X X X +GLX_SGIS_multisample X +GLX_SGIX_dm_pbuffer X +GLX_SGIX_fbconfig X X X X X +GLX_SGIX_hyperpipe X +GLX_SGIX_pbuffer X X X +GLX_SGIX_swap_barrier X +GLX_SGIX_swap_group X X X X X +GLX_SGIX_video_resize X +GLX_SGIX_video_source X + +GLU_EXT_abgr X X X X X +GLU_EXT_nurbs_tessellator X X X X X +GLU_EXT_object_space_tess X X X X X +GLU_EXT_packed_pixels X X X X X +GLU_EXT_texture X X X X X +GLU_SGI_filter4_parameters X X X X X diff --git a/opengles/ABI/ext/sun_ultra.txt b/opengles/ABI/ext/sun_ultra.txt new file mode 100644 index 0000000000..73f0d1b3ea --- /dev/null +++ b/opengles/ABI/ext/sun_ultra.txt @@ -0,0 +1,39 @@ +From: Ron Bielaski <Ron.Bielaski 'at' Eng.Sun.COM> +Date: Mon, 13 Sep 1999 07:56:04 -0700 (PDT) + +Sun Ultra extension support: + +GL_ARB_imaging +GL_EXT_abgr +GL_EXT_blend_color +GL_EXT_blend_logic_op +GL_EXT_blend_minmax +GL_EXT_blend_subtract +GL_EXT_convolution +GL_EXT_histogram +GL_EXT_multi_draw_arrays +GL_EXT_pixel_transform +GL_EXT_polygon_offset +GL_EXT_rescale_normal +GL_EXT_texture3D +GL_HP_convolution_border_modes +GL_HP_occlusion_test +GL_SGI_color_table +GL_SGI_texture_color_table +GL_SUNX_constant_data +GL_SUNX_geometry_compression +GL_SUNX_surface_hint +GL_SUN_convolution_border_modes +GL_SUN_global_alpha +GL_SUN_multi_draw_arrays +GL_SUN_triangle_list +GL_SUN_vertex + +GLX_SGIX_fbconfig +GLX_SGIX_pbuffer +GLX_SGI_make_current_read +GLX_SUN_get_transparent_index +GLX_SUN_init_threads + +GLU_EXT_nurbs_tessellator +GLU_EXT_object_space_tess diff --git a/opengles/ABI/ext/xig.txt b/opengles/ABI/ext/xig.txt new file mode 100644 index 0000000000..f0372e8e79 --- /dev/null +++ b/opengles/ABI/ext/xig.txt @@ -0,0 +1,29 @@ +From: Thomas Roell <roell 'at' xig.com> +Date: Mon, 13 Sep 1999 08:43:28 -0600 (MDT) + +Xi Graphics extension support: + +GL_ARB_multitexture +GL_EXT_abgr +GL_EXT_bgra +GL_EXT_blend_color +GL_EXT_blend_subtract +GL_EXT_compiled_vertex_array +GL_EXT_copy_texture +GL_EXT_draw_range_elements +GL_EXT_separate_specular_color +GL_EXT_stencil_wrap +GL_EXT_subtexture +GL_EXT_texture +GL_EXT_texture_clamp_to_edge +GL_EXT_texture_env_add +GL_EXT_texture_env_combine +GL_EXT_texture_object + +GLX_EXT_import_context +GLX_EXT_visual_info +GLX_EXT_visual_rating +GLX_SGI_swap_control + +GLU_EXT_nurbs_tessellator +GLU_EXT_object_space_tess diff --git a/opengles/ABI/index.php b/opengles/ABI/index.php new file mode 100644 index 0000000000..ef5dfa2ca8 --- /dev/null +++ b/opengles/ABI/index.php @@ -0,0 +1,690 @@ +<?php +$static_title = 'OpenGL® Application Binary Interface for Linux'; +$static_breadcrumb = array( + '/registry/' => 'Registry', + '/registry/OpenGL' => 'OpenGL', + 'NOLINK' => 'ABI' +); +include_once("../../../assets/static_pages/khr_page_top.php"); +?> + + +<h1 style="text-align:center"> + OpenGL® Application Binary Interface for Linux <br/> + <span style="font-size:12px"> (formerly Linux/OpenGL Base) </span> +</h1> + +<p style="text-align:center">Version 1.0<br/> + Approved June 20, 2000<br/> + Editor: Jon Leech, SGI </p> + +<hr/> + +<h6>Latest News</h6> + +<p> Version 1.0 is complete. It was approved on June 20, 2000; all + submitted votes were in favor. </p> + +<hr/> + +<h6>Index</h6> + + <ul> + <li><a href="#1">1. Overview and Goals </a></li> + <li><a href="#2">2. Calling Conventions</a></li> + <li><a href="#3">3. Libraries</a></li> + <li><a href="#4">4. Header Files</a></li> + <li><a href="#5">5. Extension Headers</a></li> + <li><a href="#6">6. Feedback and Mailing Lists</a></li> + <li><a href="#app">Appendix: Open Issues</a></li> + <li><a href="#log">Change Log</a></li> + </ul> + +<p> <a name="1"></a></p> +<h6>1. Overview and Goals </h6> + +<p> 1.1. This document is intended to solve two related problems. First, + defining the ABI and runtime environment for applications using + OpenGL under X11 on Linux. This will enable applications using the + OpenGL API for rendering to run on a variety of underlying + implementations transparently. The intent is to address all of open + source, commercial closed binary, OpenGL SI-based, and Mesa-based + implementations. </p> + +<p> Second, defining the SDK for developing apps using OpenGL. This + includes header file locations, conventions for use of extensions, + etc. </p> + +<p> It has similar goals to the <a href="http://www.linuxbase.org">Linux + Standard Base</a>, but focused much + more narrowly: on the OpenGL API. Representatives from LSB are + involved and ultimately this effort should be part of LSB. </p> + +<p> We do not exactly track all LSB practice (particularly naming + conventions for libraries) because LSB itself is not complete, and + because existing practice with other OpenGL implementations suggests + preferred methods which may differ from LSB. </p> + +<p> 1.2. Things we do <b>not</b> attempt to address include: </p> + + <ul> + <li> Internal implementation dependent issues - details of direct + rendering, loadable driver modules, etc. Such details are + hidden from the public interfaces by the implementation, + and are irrelevant to applications using the ABI. </li> + <li> Operating systems other than Linux. Other platforms such as BSD + are welcome to use whatever comes out of this project, but we + are explicitly not trying to solve this problem for every free + OS in the world. </li> + <li> Changes to the OpenGL API. The definition of OpenGL is + controlled by the OpenGL Architecture Review Board, and we in no + way challenge this. A single GLX extension is required; this + extension has already been approved by the ARB. </li> + <li> Use of 3D outside the X11/GLX context. There are a variety of + approaches (fxMesa, GGI, etc.) that again are welcome to use + relevant parts of this project, but whose support is not part of + its goals. </li> + </ul> + +<p> 1.3. We believe all critical decisions have been made. Some + remaining comments (previously identified as open issues) of + interest are identified in the <a href="#app">appendix</a>. We + recognize that some decisions are largely arbitrary (filenames and + file locations, for example) and in those cases have been guided by + existing practice (<i>in other words, complaining about arbitrary + decisions is unlikely to change them</i>). </p> + +<p> 1.4. Participants in this effort to date include people working at + or involved with the following companies and open source projects + (as well as a large number of individuals with unknown + affiliations): </p> + + <blockquote> + 3Dfx, Alias/Wavefront, Apple, Avid, Compaq, Debian, HP, IBM, Intel, + Linux Standard Base, Loki Games, Mesa, Metro Link, NVIDIA, Nichimen, + Parametric Technology Corporation, Precision Insight, SGI, Sharp + Eye, Sun, XFree86, Xi Graphics.</blockquote> + +<p> <a name="2"></a></p> +<h6>2. Calling Conventions</h6> + +<p> 2.1. OpenGL already includes its own datatypes (<tt>GLint, + GLshort,</tt> etc.) used in the API. Guaranteed minimum sizes are + stated (see table 2.2 of the OpenGL 1.2 Specification), but the + actual choice of C datatype is left to the implementation. For our + purposes, however, all implementations on a given binary + architecture must have common definitions of these datatypes. </p> + +<p> For the IA32 architecture, the definitions should be: </p> + +<table border="1" class="center-table"> + <tr><td>GL datatype</td> + <td>Description</td> + <td>gcc equivalent for IA32</td></tr> + <tr><td><tt>GLboolean</tt></td> + <td>8-bit boolean</td> + <td><tt>unsigned char</tt></td></tr> + <tr><td><tt>GLbyte</tt></td> + <td>signed 8-bit 2's-complement integer</td> + <td><tt>signed char</tt></td></tr> + <tr><td><tt>GLubyte</tt></td> + <td>unsigned 8-bit integer</td> + <td><tt>unsigned char</tt></td></tr> + <tr><td><tt>GLshort</tt></td> + <td>signed 16-bit 2's-complement integer</td> + <td><tt>short</tt></td></tr> + <tr><td><tt>GLushort</tt></td> + <td>unsigned 16-bit integer</td> + <td><tt>unsigned short</tt></td></tr> + <tr><td><tt>GLint</tt></td> + <td>signed 32-bit 2's-complement integer</td> + <td><tt>int</tt></td></tr> + <tr><td><tt>GLuint</tt></td> + <td>unsigned 32-bit integer</td> + <td><tt>unsigned int</tt></td></tr> + <tr><td><tt>GLsizei</tt></td> + <td>non-negative 32-bit binary integer size</td> + <td><tt>int</tt></td></tr> + <tr><td><tt>GLenum</tt></td> + <td>enumerated 32-bit value</td> + <td><tt>unsigned int</tt></td></tr> + <tr><td><tt>GLbitfield</tt></td> + <td>32 bit bitfield</td> + <td><tt>unsigned int</tt></td></tr> + <tr><td><tt>GLfloat</tt></td> + <td>32-bit IEEE754 floating-point</td> + <td><tt>float</tt></td></tr> + <tr><td><tt>GLclampf</tt></td> + <td>Same as GLfloat, but in range [0, 1]</td> + <td><tt>float</tt></td></tr> + <tr><td><tt>GLdouble</tt></td> + <td>64-bit IEEE754 floating-point</td> + <td><tt>double</tt></td></tr> + <tr><td><tt>GLclampd</tt></td> + <td>Same as GLdouble, but in range [0, 1]</td> + <td><tt>double</tt></td></tr> +</table> + +<p> <a href="#issue2.1">Issues</a></p> + +<p> 2.2. Assembly-level call conventions must be shared. Since the + OpenGL implementation may use C++ code internally (e.g. for GLU), + this is potentially a serious problem. Static linking of C++ + libraries used by OpenGL libraries may be required of the + implementation (also see the <a href="#3">Libraries</a> section + below). </p> + +<p> <a href="#issue2.2">Issues</a> </p> + +<p> <a name="3"></a></p> +<h6>3. Libraries</h6> + +<p> 3.1. There are two link-level libraries. <tt>libGL</tt> includes the + OpenGL and GLX entry points and in general depends on underlying + hardware and/or X server dependent code that may or may not be + incorporated into this library. <tt>libGLU</tt> includes the GLU + utility routines and should be hardware independent, using only the + OpenGL API. </p> + +<p> Each library has two names: the link name used + on the ld command line, and the <tt>DT_SONAME</tt> within that + library (specified by the <i>-soname</i> switch when linking the + library), defining where it's looked up at runtime. Both forms must + exist so that both linking and running will operate properly. The + library names are: </p> + +<table cellspacing="1" border="1" class="center-table"> + <tr><td>Link name</td> + <td>Runtime name (<tt>DT_SONAME</tt>)</td> + </tr> + <tr><td><tt>libGL.so<tt></td> + <td><tt>libGL.so.1<tt></td> + </tr> + <tr><td><tt>libGLU.so<tt></td> + <td><tt>libGLU.so.1<tt></td> + </tr> +</table> + +<p> <tt>libGL.so</tt> and <tt>libGLU.so</tt> should + be symbolic links pointing to the runtime names, so that + future versions of the standard can be implemented transparently + to applications by changing the link. </p> + +<p> <a href="#issue3.1">Issues</a> </p> + +<p> 3.2. These libraries must be located in <tt>/usr/lib</tt>. The + X-specific library direction (<tt>/usr/lib/X11</tt>) was also + considered, but existing practice on Linux and other platforms + indicates that <tt>/usr/lib</tt> is preferable. </p> + +<p> <a href="#issue3.2">Issues</a> + +<p> 3.3. C++ runtime environments are likely to be incompatible + cross-platform, including both the standard C++ library location and + entry points, and the semantics of issues such as static + constructors and destructors. The LSB apparently mandates static + linking of libraries which aren't already in LSB, but this could + lead to problems with multiple C++ RTLs present in the same app + using C++. We'll have to tread carefully here until this issue + is more completely understood. </p> + +<p> <a href="#issue3.3">Issues</a> </p> + +<p> 3.4. The libraries must export all OpenGL 1.2, + GLU 1.3, GLX 1.3, and <tt>ARB_multitexture</tt> entry points + statically. </p> + +<p> It's possible (but unlikely) that additional ARB or vendor + extensions will be mandated before the ABI is finalized. + Applications should not expect to link statically against any entry + points not specified here. </p> + +<p> 3.5. Because non-ARB extensions vary so widely and are constantly + increasing in number, it's infeasible to require that they all be + supported, and extensions can always be added to hardware drivers + after the base link libraries are released. These drivers are + dynamically loaded by <tt>libGL</tt>, so extensions not in the base + library must also be obtained dynamically. </p> + +<p> 3.6. To perform the dynamic query, + <tt>libGL</tt> also must export an entry point called </p> + + <blockquote> + <tt>void (*glXGetProcAddressARB(const GLubyte *))();</tt> + </blockquote> + +<p> The <a href="http://www.opengl.org/registry/specs/ARB/get_proc_address.txt">full specification</a> + of this function is available separately. It takes the string name + of a GL or GLX entry point and returns a pointer to a function + implementing that entry point. It is functionally identical to the + <tt>wglGetProcAddress</tt> query defined by the Windows OpenGL + library, except that the function pointers returned are <i>context + independent</i>, unlike the WGL query. </p> + +<p> All OpenGL and GLX entry points may be queried with this extension; + GLU extensions cannot, because GLU is a client-side library that + cannot easily be extended. </p> + +<p> <a href="#issue3.6">Issues</a> </p> + +<p> 3.7. Thread safety (the ability to issue OpenGL calls to different + graphics contexts from different application threads) is required. + Multithreaded applications must use <b>-lpthread</b>. </p> + +<p> 3.8. <tt>libGL</tt> and <tt>libGLU</tt> must be + transitively linked with any libraries they require in their own + internal implementation, so that applications don't fail on some + implementations due to not pulling in libraries needed not by the + app, but by the implementation. </p> + +<p> <a name="4"></a></p> +<h6>4. Header Files</h6> + +<p> 4.1. The following header files are required: </p> + + <ul> + <li> <tt><GL/gl.h></tt> - OpenGL </li> + <li> <tt><GL/glx.h></tt> - GLX </li> + <li> <tt><GL/glu.h></tt> - GLU </li> + <li> <tt><GL/glext.h></tt> - OpenGL Extensions </li> + <li> <tt><GL/glxext.h></tt> - GLX Extensions </li> + </ul> + +<p> These headers should properly define prototypes and enumerants for + use by applications written in either C or C++. Other language + bindings are not addressed at this time. </p> + +<p> 4.2. These header files must be located in <tt>/usr/include/GL</tt>. + <tt>/usr/include/X11/GL</tt> was considered and rejected for the + same reasons as library locations in section 3.2 above. </p> + +<p> 4.3. The required headers must not pull in + internal headers or headers from other packages where that would + cause unexpected namespace pollution (for example, on IRIX + <tt>glx.h</tt> pulls in <tt><X11/Xmd.h></tt>). Likewise the + required headers must be protected against multiple inclusion and + should not themselves include any headers that are not so protected. + However, <tt>glx.h</tt> is allowed to include + <tt><X11/Xlib.h></tt> and <tt><X11/Xutil.h></tt>. </p> + +<p> 4.4. <tt>glx.h</tt> must include the prototype of the + <tt>glXGetProcAddressARB</tt> extension described above. </p> + +<p> 4.5. All OpenGL 1.2 and <tt>ARB_multitexture</tt>, GLU 1.3, and GLX + 1.3 entry points and enumerants must be present in the corresponding + header files <tt>gl.h</tt>, <tt>glu.h</tt>, and <tt>glx.h</tt>, + <b>even if</b> only OpenGL 1.1 is implemented at runtime by the + associated runtime libraries. </p> + +<p> <a href="#issue4.5">Issues</a> </p> + +<p> 4.6. Non-ARB OpenGL extensions are + defined in <tt>glext.h</tt>, and non-ARB GLX extensions in + <tt>glxext.h</tt>. If these extensions are also defined in one of + the other required headers, this must be done conditionally so that + multiple definition problems don't occur. </p> + +<p> <a href="#issue4.6">Issues</a> </p> + +<p> 4.7. Vendor-specific shortcuts, such as macros for higher + performance GL entry points, are intrinsically unportable. These + should <b>not</b> be present in the required header files, but + instead in a vendor-specific header file that requires explicit + effort to access, such as defining a vendor-specific preprocessor + symbol. Likewise vendors who are not willing to include their + extensions in <tt>glext.h</tt> must isolate those extensions in + vendor-specific headers. </p> + +<p> 4.8. <tt>gl.h</tt> must define the symbol + <tt>GL_OGLBASE_VERSION</tt>. This symbol must be an integer defining + the version of the ABI supported by the headers. Its value is + <i>1000 * major_version + minor_version</i> where + <i>major_version</i> and <i>minor_version</i> are the major and + minor revision numbers of this ABI standard. The primary purpose of + the symbol is to provide a compile-time test by which application + code knows whether the ABI guarantees are in force. </p> + +<p> <a href="#issue4.8">Issues</a> </p> + +<p> <a name="5"></a></p> +<h6>5. Extension Headers</h6> + +<p> 5.1. Providing prototypes and enumerants for OpenGL extensions is + challenging because of the expected wide variety of hardware + drivers, continuing creation of extensions, and multiple sources of + header files on Linux OpenGL implementations. Some extensions will + be supported only for a specific implementation, and some will be + supported only for a specific hardware driver within that + implementation. This situation does not lend itself easily to + independent maintenance of header files definining the extensions. + </p> + +<p> Instead, we require a single header file defining <b>all</b> OpenGL + extensions be supplied from a central point and updated on a + continuing basis as new extensions are added to the OpenGL <a + href="http://www.opengl.org/registry/">extension registry</a> (which + is similarly centrally maintained). The central point is in the + registry at <a href="http://www.opengl.org/registry/"> + http://www.opengl.org/registry/</a>. </p> + +<p> The <a href="../api/glext.h">latest version of + <tt>glext.h</tt></a> is available in the registry. It is + automatically generated from the master OpenGL function and + enumerant registries, and is updated as new extensions are + registered. The header is intended to be useful on other platforms + than Linux, particularly Windows; please let us know (via feedback + to OpenGL.org forums) if it needs enhancement for use on another + platform. The generator scripts and ".spec" files used in + generating glext.h are also available. </p> + +<p> Likewise for GLX, a single header defining + all GLX extensions, <a href="../api/glxext.h"><tt>glxext.h</tt></a>, + is required and is maintained centrally. </p> + +<p> The registry also contains a header defining WGL + extensions, <a href="../api/wglext.h"><tt>wglext.h</tt></a>, but this is + only for use on Windows; <tt>wglext.h</tt> is <b>not</b> required by + or useful for the Linux ABI. </p> + +<p> <a href="#issue5.1">Issues</a> </p> + +<p> 5.2. The centrally maintained <tt>glext.h</tt> will be continually + updated, so version creep is expected. This could cause problems for + open source projects distributing source code. The proper solution + is for users to update glext.h to the latest version, but versioning + has proven helpful with other extensible aspects of OpenGL. + Therefore <tt>glext.h</tt> must include a preprocessor version + symbol <tt>GL_GLEXT_VERSION</tt>, enabling apps to do something + like: </p> + +<blockquote> + <tt> + #include <GL/glext.h><br> + #if GL_GLEXT_VERSION < 42<br> + #error "I need a newer <GL/glext.h>. Please download it from http://www.opengl.org/registry/ABI/"<br> + #endif + </tt> +</blockquote> + +<p> <a href="#issue5.2">Issues</a> </p> + +<p> 5.3. Only extensions whose fully documented specifications have been + made available to the extension registry and whose authors have + committed to shipping them in their drivers will be included in + <tt>glext.h</tt> and <tt>glxext.h</tt>. The structure of each + extension defined in these headers should resemble: </p> + +<blockquote> + <tt> + #ifndef GL_EXT_<i>extensionname</i><br> + #define GL_EXT_<i>extensionname</i> 1<br> + <i> Define enumerants specific to this extension</i><br> + <i> Typedef function pointers for entry points specifically to + this extension, dynamically obtained + with glXGetProcAddressARB</i><br> + #ifdef GL_GLEXT_PROTOTYPES<br> + <i> Define prototypes specific to this extension</i><br> + #endif<br> + #endif + </tt> +</blockquote> + +<p> Benign redefinition of the enumerants is allowable, so these may be + outside protective <tt>#ifndef</tt> statements (this structure + results from the generator scripts used in the OpenGL SI to build + <tt>glext.h</tt>, and also because some enums may be defined by + multiple different extensions, so it could make sense to segregate + them). </p> + +<p> Function pointer typedefs will use the Windows convention (e.g. the + typedef for a function <tt>glFooARB</tt> will be + <tt>PFNGLFOOARBPROC</tt>) for application source code portability. + </p> + +<p> Normally, prototypes are present in + the header files, but are not visible due to conditional compilation. + To define prototypes as well as typedefs, the application must + <tt>#define GL_GLEXT_PROTOTYPES</tt> prior to including + <tt>gl.h</tt> or <tt>glx.h</tt>. <i>(Note: consistency suggests + using <tt>GLX_GLXEXT_PROTOTYPES</tt> for <tt>glxext.h</tt> - + TBD)</i>. </p> + +<p> The preprocessor symbol protecting the extension declaration + must be the same as the name string identifying the extension at + runtime and in the extension registry. </p> + +<p> <b>All</b> OpenGL and GLX extensions that are shipping should have a + full extension specification in the master + <a href="http://www.opengl.org/registry"> + extension registry</a> on www.opengl.org. Vendors failing to document + and specify their on extensions will not be allowed to incorporate + the resulting inadequate interfaces into the ABI. </p> + +<p> <a href="#issue5.3">Issues</a> </p> + +<p> 5.4. <tt>glext.h</tt> is normally + <tt>#include</tt>ed by <tt>gl.h</tt>. This inclusion can be + suppressed by the application defining the preprocessor symbol + <tt>GL_GLEXT_LEGACY</tt> prior to its <tt>#include + <GL/gl.h></tt>. </p> + +<p> <img src="new.gif">Similarly, <tt>glxext.h</tt> is normally + <tt>#include</tt>ed by <tt>glx.h</tt>. This inclusion can be + suppressed by the application defining the preprocessor symbol + <tt>GLX_GLXEXT_LEGACY</tt> prior to its <tt>#include + <GL/glx.h></tt>. </p> + +<p> <a href="#issue5.4">Issues</a> </p> + +<p> <a name="6"></a></p> +<h6>6. Feedback and Mailing Lists</h6> + +<p> Since the ABI has been finalized, we are no longer maintaining the + oglbase-discuss mailing list used during its development. List + archives may still be available from + <a href="http://www.mail-archive.com/oglbase-discuss@corp.sgi.com/"> + http://www.mail-archive.com/oglbase-discuss@corp.sgi.com/</a> </p> + +<hr/> + +<p> <a name="app"></a></p> +<h6>Appendix: Open Issues</h6> + +<p> <a name="issue2.1"></a> + <b>Section 2.1</b>: + Define GL datatypes for other supported Linux architectures - Alpha, + PowerPC, MIPS, etc. (in general these will be identical to the IA32 + types). Note: we may want to suggest <tt>GLlong</tt> and + <tt>GLulong</tt> as 64-bit datatypes for future OpenGL revisions. </p> + +<p> <a name="issue2.2"></a> + <b>Section 2.2</b>: + C++ libraries at runtime can be problematic - take the gcc/egcs + split, for example. Another potential problem area is static + constructor/destructor issues, e.g. when a C <tt>main()</tt> is + linked against GLU. Some tweaking may be required as apps running + against different ABI revisions start appearing. </p> + +<p> <a name="issue3.1"></a> + <b>Section 3.1</b>: + LSB uses a more complex naming convention for libraries; we're + avoiding this at least for now, because these conventions disagree + with common practice on virtually all other Unix OpenGL + implementations. </p> + +<p> <a name="issue3.2"></a> + <b>Section 3.2 (also Section 4.1)</b>: + Placing the headers and libraries in non-X11 specific locations + could impact non-GLX OpenGL implementations resident on the same + platform. It is also somewhat out of keeping with other X + extensions. However, this practice is so common on other platforms, + and non-X based OpenGL implementations are so rarely used, that we + chose to do so for build portability and "principle of least + surprise" purposes. </p> + +<p> Nothing prohibits the implementation from + placing the actual library files in other locations and implementing + the required library paths as links. </p> + +<p> <a name="issue3.3"></a> + <b>Section 3.3</b>: + The ABI should probably state requirements on GL libraries using C++ + or other auxiliary libraries, such that no conflict will arise with + apps also using those libraries. </p> + +<p> <a name="issue3.6"></a> + <b>Section 3.6</b>: + The context-independence requirement was the subject of enormous + controversy, mostly because the consequences of this requirement on + the underlying link library and driver implementations can be + significant. It is impossible to briefly recap the many pro and con + arguments briefly; refer to the <a href="#6">mailing list + archive</a> to learn more. </p> + +<p> GLU does sometimes need to be extended to + properly support new GL extensions; in particular, new pixel formats + and types, or new targets for texture downloads, such as cube + mapping, should ideally be exposed through the GLU mipmap generation + routines. This is an unresolved problem, since GLU is client code + not specific to any GL driver and thus not dynamically loadable. The + best current option is for driver suppliers to make sure that + whatever GLU functionality they need is contributed to the OpenGL + Sample Implementation's GLU library. </p> + +<p> Portable applications should treat the pointers + as context-dependent. </p> + +<p> We haven't determined if any non-ARB extensions should be standard + entry points not requiring this dynamic lookup. As a reference + point, here are lists of GL, GLX, and GLU extensions supported by a + variety of OpenGL and Mesa implementations today (please send + additions for other platforms to the oglbase-discuss mailing list so + they can be added): </p> + + <ul> + <li><a href="ext/3dlabs.txt">3Dlabs</a> </li> + <li><a href="ext/compaq.txt">Compaq</a> </li> + <li><a href="ext/intergraph.txt">Intergraph/Intense 3D</a> </li> + <li><a href="ext/mesa.txt">Mesa</a> </li> + <li><a href="ext/sgi.txt">SGI (multiple platforms)</a> </li> + <li><a href="ext/sun_ultra.txt">Sun Ultra</a> </li> + <li><a href="ext/xig.txt">Xi Graphics</a> </li> + </ul> + +<p> <a name="issue4.5"></a> + <b>Section 4.5</b>: + Implementations may still implement only OpenGL 1.1 functionality, + but the 1.2 header and link library material must still be provided. + Since applications must already check both compile and runtime + OpenGL version numbers, no problems due to lacking support for 1.2 + are expected. The next version of this standard is anticipated to + require OpenGL 1.2 support. </p> + +<p> <a name="issue4.6"></a> + <b>Section 4.6</b>: + It's important that <tt>glext.h</tt> and <tt>glxext.h</tt> can be + updated from the extension registry without breaking <tt>gl.h</tt> + and <tt>glx.h</tt>. Making sure that all extension definitions are + properly protected helps to this end, as well as being good + programming practice. </p> + +<p> <a name="issue4.8"></a> + <b>Section 4.8</b>: + <tt>GL_OGLBASE_VERSION</tt> is mostly provided so that apps can + determine whether to use traditional static linking of extensions, + or to dynamically query them. Unlike GL/GLX versioning, the ABI + version is not dynamically queryable at runtime. Historical + experience suggests that not providing the runtime query to begin + with is a bad decision. </p> + +<p> <a name="issue5.1"></a> + <b>Section 5.1</b>: + <tt>glext.h</tt> is an exception to the Linux-centric nature of this + document, since it is already being used on other platforms. </p> + +<p> <a name="issue5.2"></a> + <b>Section 5.2</b>: + Applications should <b>not</b> use the version number in + <tt>glext.h</tt> to test for presence or absence of specific + extension prototypes; this is extremely unportable and dangerous. + Always use the extension-specific symbols described in section 5.3. + </p> + +<p> The header version symbol was changed from + <tt>GL_GLEXT_VERSION_EXT</tt> to <tt>GL_GLEXT_VERSION</tt> for + consistency with the <tt>GLEXT</tt> namespace the ABI group has + started using. </p> + +<p> <a name="issue5.3"></a> + <b>Section 5.3</b>: + Other structures for the extension prototypes have been suggested, + such as having separate header files for each extension. Having both + structures may be preferable, but it requires more work. </p> + +<p> <a name="issue5.4"></a> + <b>Section 5.4</b>: + It's important to be able to suppress automatic inclusion of + <tt>glext.h</tt> and <tt>glxext.h</tt> in order to support + compilation of legacy code not written to be ABI-aware (e.g. + assuming that extensions can be statically linked). </p> + +<p> <a name="log"></a></p> +<h6>7. Change Log</h6> + +<ul> +<li> 10/9/2006 - updated registry links to the new location on + opengl.org and cleaned up other dangling wording due to the move + from oss.sgi.com. +<li> 6/20/2000 (version 1.0) - Linux ABI approved on the oglbase-discuss + mailing list. Corrected Windows function-pointer typedef convention + in section 5.3 by appending <tt>PROC</tt>, to match what glext.h + already does. </li> +<li> 5/29/2000 (version 0.9.8) - <tt>glxext.h</tt> added to section 4. + Resolution reached on the structure of <tt>glext.h</tt> and + <tt>glxext.h</tt>, and how they are included from <tt>gl.h</tt> and + <tt>glx.h</tt>. In particular, <tt>GL_OGLBASE_VERSION</tt> symbol + defined, default inclusion of extension headers from core headers + mandated, <tt>GL_GLEXT_PROTOTYPES</tt> may be specified in order to + get extension prototypes as well as function pointer typedefs. + Renamed <tt>GL_GLEXT_VERSION_EXT</tt> to <tt>GL_GLEXT_VERSION</tt>. + </li> +<li> 4/9/2000 (version 0.9.7) - <tt>glext.h</tt> is now available + together with the ABI specification. </li> +<li> 2/22/2000 (version 0.9.6) - Revised for public comment period. + Moved open issues to the new appendix. </li> +<li> 2/8/2000 (version 0.9.5) - Removed ellipses from prototype in + section 3.6, and simplified the lists of SGI supported extensions + into one file. Mandated threadsafety in section 3.7. Moved + glXGetProcAddressARB prototype from gl.h to glx.h in section 4.4, + since the function itself was moved from gl to glX during + standardization. Restructured the page to fit into the ogl-sample + site on oss.sgi.com, next to the extension registry. Pointed to the + updated extension registry on oss.sgi.com in several places. </li> +<li> 12/9/99 (version 0.9.4) - Added Intergraph extension list in + section 3.6. </li> +<li> 12/6/99 (version 0.9.3) - Added Compaq and 3Dlabs extension + lists in section 3.6. </li> +<li> 11/23/99 (version 0.9.2) - Refined discussion of + glXGetProcAddressARB to specify that any GL or GLX function can be + queried. </li> +<li> 11/23/99 (version 0.9.1) - Summing up lots of email discussion. + Expanded participant list in section 1.4. Pinned down library + naming scheme in section 3.1. Changed to require statically + exporting all GL 1.2 / GLX 1.3 / GLU 1.3 / ARB extension entry + points in section 3.4. Changed GetProcAddress from EXT to ARB and + from gl to glX(in anticipation of ARB approval) in section 3.5. + Does <b>not</b> require a context parameter. Require Windows naming + convention for <tt>glext.h</tt> function prototypes in section 5.3. + Added a link to the list archives in section 6. </li> +<li> 9/16/1999 - Added Mesa, Sun, and Xi Graphics extension lists in + section 3.6. Added section 3.8 on transitive library dependencies + of the GL libraries. </li> +<li> 9/10/1999 - Added initial list of GL/GLX/GLU extensions + for existing platforms in section 3.6.<br> + Specified text/link colors as well as background color. </li> +<li> 9/7/1999 - Initial version. </li> +</ul> + +<?php include_once("../../../assets/static_pages/khr_page_bottom.php"); ?> +</body> +</html> diff --git a/opengles/ABI/new.gif b/opengles/ABI/new.gif new file mode 100644 index 0000000000..7df4823516 Binary files /dev/null and b/opengles/ABI/new.gif differ diff --git a/opengles/BUILD.gn b/opengles/BUILD.gn new file mode 100644 index 0000000000..2fc7a7b55c --- /dev/null +++ b/opengles/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +config("libGLES_public_config") { + include_dirs = [ "api" ] +} + +group("libGLES") { + public_configs = [ ":libGLES_public_config" ] +} diff --git a/opengles/CODE_OF_CONDUCT.adoc b/opengles/CODE_OF_CONDUCT.adoc new file mode 100644 index 0000000000..d8c254650a --- /dev/null +++ b/opengles/CODE_OF_CONDUCT.adoc @@ -0,0 +1,10 @@ +// Copyright 2018-2021 The Khronos Group Inc. +// SPDX-License-Identifier: CC-BY-4.0 + += Code of Conduct + +A reminder that this issue tracker is managed by the Khronos Group. +Interactions here should follow the +https://www.khronos.org/developers/code-of-conduct[Khronos Code of Conduct], +which prohibits aggressive or derogatory language. Please keep the +discussion friendly and civil. diff --git a/opengles/CODE_OF_CONDUCT.md b/opengles/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..a11610bd30 --- /dev/null +++ b/opengles/CODE_OF_CONDUCT.md @@ -0,0 +1 @@ +A reminder that this issue tracker is managed by the Khronos Group. Interactions here should follow the Khronos Code of Conduct (https://www.khronos.org/developers/code-of-conduct), which prohibits aggressive or derogatory language. Please keep the discussion friendly and civil. diff --git a/opengles/OAT.xml b/opengles/OAT.xml new file mode 100644 index 0000000000..295e846d71 --- /dev/null +++ b/opengles/OAT.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (c) 2022 Huawei Device Co., Ltd. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- OAT(OSS Audit Tool) configuration guide: +basedir: Root dir, the basedir + project path is the real source file location. +licensefile: +1.If the project don't have "LICENSE" in root dir, please define all the license files in this project in , OAT will check license files according to this rule. + +tasklist(only for batch mode): +1. task: Define oat check thread, each task will start a new thread. +2. task name: Only an name, no practical effect. +3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist. +4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist. +5. task project: Projects to be checked, the path field define the source root dir of the project. + + +policyList: +1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process. +2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: +<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> +3. policyitem type: + "compatibility" is used to check license compatibility in the specified path; + "license" is used to check source license header in the specified path; + "copyright" is used to check source copyright header in the specified path; + "import" is used to check source dependency in the specified path, such as import ... ,include ... + "filetype" is used to check file type in the specified path, supported file types: archive, binary + "filename" is used to check whether the specified file exists in the specified path(support projectroot in default OAT.xml), supported file names: LICENSE, README, README.OpenSource + +4. policyitem name: This field is used for define the license, copyright, "*" means match all, the "!" prefix means could not match this value. For example, "!GPL" means can not use GPL license. +5. policyitem path: This field is used for define the source file scope to apply this policyitem, the "!" prefix means exclude the files. For example, "!.*/lib/.*" means files in lib dir will be exclude while process this policyitem. +6. policyitem rule and group: These two fields are used together to merge policy results. "may" policyitems in the same group means any one in this group passed, the result will be passed. +7. policyitem filefilter: Used to bind filefilter which define filter rules. +8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. + +Note:If the text contains special characters, please escape them according to the following rules: +" == > +& == > +' == > +< == > +> == > +--> +<configuration> + <oatconfig> + <licensefile>COPYING</licensefile> + <filefilterlist> + <filefilter name="defaultFilter" desc="Files not to check"> + <filteritem type="filepath" name=".*" desc="third party"/> + </filefilter> + <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies"> + <filteritem type="filename" name="README.OpenSource"/> + <filteritem type="filename" name="README"/> + <filteritem type="filename" name="specs/*" desc=""/> + <filteritem type="filename" name="api/*" desc=""/> + <filteritem type="filename" name="ABI/*" desc=""/> + </filefilter> + <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies" > + <filteritem type="filename" name="README.OpenSource"/> + <filteritem type="filename" name="README"/> + </filefilter> + </filefilterlist> + </oatconfig> +</configuration> diff --git a/opengles/README.OpenSource b/opengles/README.OpenSource new file mode 100644 index 0000000000..9c9e8fc882 --- /dev/null +++ b/opengles/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "openGLES", + "License": "Apache-2.0", + "License File": "NOTICE", + "Version Number": "a301c9b4600e4074008b93fba17744a859fb763b", + "Owner": "lizheng2@huawei.com", + "Upstream URL": "https://github.com/KhronosGroup/OpenGL-Registry.git", + "Description": "The OpenGL ES registry contains specifications of the core API and shading language; specifications of Khronos- and vendor-approved OpenGL ES extensions; header files corresponding to the specificatio" + } +] diff --git a/opengles/README.adoc b/opengles/README.adoc new file mode 100644 index 0000000000..d49a9c6864 --- /dev/null +++ b/opengles/README.adoc @@ -0,0 +1,142 @@ +// XX to be filled in by the merger of this PR (likely Jon) += *Advance Notice of Pending XML Registry Change (posted 2021-01-XX)* + +[WARNING] +.Warning +==== +Shortly after 2021-04-XX, we will be removing the old-style group blocks +(contained within the `groups` section at the top of the XML registry) +The groups are intended to contain all the possible legal values +for corresponding function parameters, but it is likely that many +of the groups are out of date relative to current OpenGL and OpenGL +ES specifications, and the many extensions to those specifications. +As of Wednesday 8th January 2020, these group blocks have been +deprecated in favour of group attributes declared inline with +the enumerant itself, which are currently the only actively updated +source for groupings. For more information, see public issue +link:https://github.com/KhronosGroup/OpenGL-Registry/issues/335[#335]. +==== + + += OpenGL-Registry + + +== OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry + +This site contains the API and Extension registries for the OpenGL family +APIs - OpenGL, OpenGL ES, and OpenGL SC. It includes API specifications; +specifications of Khronos- and vendor-approved extensions; header files +corresponding to the specifications; the XML API Registry defining each +API; and related tools and scripts. + +It does not contain the OpenGL and OpenGL ES Reference Pages, which are in +the KhronosGroup/OpenGL-Refpages repository. + +If you want to add an extension specification to the Registry, correct an +existing specification, request allocation of enumerants and other +controlled resources in the OpenGL / GLX / WGL namespaces, or otherwise +change the Registry, propose a pull request against the OpenGL-Registry +repository and adding the appropriate extension specifications, making changes +to the appropriate XML file, etc. Note that any changes you propose to +reserved values in the registry are not official until your pull request is +*accepted* into the master branch. + +Feel free to post issues on the repository if it's unclear how to do +something you need to with extensions, or if you find any problems. + + +== Please Don't File API And GLSL Bugs Here! + +The OpenGL-Registry repository isn't the right place to report problems with +the OpenGL and OpenGL ES API and Shading Language Specifications. + +For API (both core and extension) issues, please use the issue tracker in +the https://github.com/KhronosGroup/OpenGL-API repository. + +For Shading Language (both core and extension) issues, please use the issue +tracker in the https://github.com/KhronosGroup/OpenGL-GLSL repository. + +Please tag your issues with +[OpenGL]+ or +[OpenGL ES]+ in the title, if +they are specific to that API and/or Shading Language. + +Reporting problems with the registry *itself*, including missing or badly +formed extension documents, headers, or XML files, should be done using the +OpenGL-Registry issue tracker. + + +=== Defining New Extensions + +To create a new extension specification, take these steps: + +* Request one or more blocks of unused enumerants for GL, GLX, or WGL + depending on the needs of your extension, by adding the reservation(s) to + the end of gl.xml, glx.xml, and/or wgl.xml. +* Once the pull request modifying the XML files is accepted into master, you + have control of those enumerant blocks. +* Create an extension specification, following the model of existing vendor + specifications under extensions/*vendor*/ . +* Obtain whatever degree of review, implementation, and signoff you need + from affected parties before declaring the extension complete. +* Add the extension specification under extensions/*vendor*/*extension* . +* Modify extensions/registry.py to include the extension, using the next + free ARB, GL, and/or ES extension numbers (depending on which API the + extension is defined for). Execute the python script nextfree.py in the + extensions/ directory to find the next free numbers. +* Once registry.py is updated, 'make' in extensions/ to update the PHP + include files which are used to show an index of extensions on the + registry website. This requires GNU make and Python 3. +* Add the extension number(s) to the extension specification in the 'Number' + block. +* Add the extension interfaces and enumerant assignments to xml/gl.xml, + glx.xml, and/or wgl.xml following existing examples. Verify that the + relevant extension headers are generated with the correct interfaces by + running 'make' in xml/. This requires the lxml Python module. +* Once the pull request adding the extension specification and modifying + registry.py is accepted, your extension is registered. + +There are some documents under the docs/ directory describing some of the +processes for making extensions, but they are largely out of date. They may +be updated or removed over time: + +* link:docs/rules.html[How to create extensions] +* link:docs/enums.html[Enumerant allocation policies] +* link:docs/template.txt[Extension specification template] +* link:docs/promoting.html[Extension promotion guidelines] +* link:docs/reserved.txt[GLX opcode registry (rarely updated)] +* link:docs/syntaxrules.txt[OpenGL Syntax Rules (updated 2006/12/13)] +* link:docs/GLSLExtensionRules.txt[OpenGL Shading Language Extension Conventions (updated 2006/12/18)] +* link:docs/fog_coord.txt[Extension Specification Example] + + +=== Repository Contents + +* ABI - OpenGL ABI for Linux +* api - Header files for all APIs +** api/ES - Headers for OpenGL ES +** api/GL - Headers for OpenGL +** api/SC - Headers for OpenGL SC +** Note that the OpenGL ES and OpenGL SC headers all depend on the shared + https://www.khronos.org/registry/EGL/api/KHR/khrplatform.h[khrplatform.h] + This file is maintained in the http://www.khronos.org/registry/EGL/[EGL + Registry]. +* docs - Miscellaneous documentation on creating extensions, mostly out of date. +* extensions - Extension specifications for all APIs +** extensions/registry.py - combined extension registry for all APIs +** extensions/makeindex.py - create HTML extension indices from registry.py +* index_{es,gl,sc}.php - Index files for the website, linking to specifications, headers, and extensions relevant to each API +* specs - API and Shading Language Specifications for all APIs +** specs/es - OpenGL ES Specifications +** specs/gl - OpenGL Specifications +** specs/sc - OpenGL SC Specifications +* xml - XML API Registry and related tools + + +=== There Sure Is A Lot Of Stuff In Here! + +Yes, there sure is. The specs/ directory contains over 125 MB of PDFs, +including the latest specs for each version of OpenGL and OpenGL ES. While +this may be somewhat distressing to people who just want to add a single +extension, due to the repository download time, the *primary* purpose of +this repository is to be the backing store for the web registry on +khronos.org. Fortunately git is very efficient, so once you've done the +initial repository clone, updates will be small and quick. diff --git a/opengles/README.en.md b/opengles/README.en.md new file mode 100644 index 0000000000..4b5981437d --- /dev/null +++ b/opengles/README.en.md @@ -0,0 +1,36 @@ +# third_party_openGLES + +#### Description +{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/opengles/README.md b/opengles/README.md new file mode 100644 index 0000000000..df67f825a4 --- /dev/null +++ b/opengles/README.md @@ -0,0 +1,39 @@ +# third_party_openGLES + +#### ä»‹ç» +{**以下是 Gitee å¹³å°è¯´æ˜Žï¼Œæ‚¨å¯ä»¥æ›¿æ¢æ­¤ç®€ä»‹** +Gitee 是 OSCHINA 推出的基于 Git çš„ä»£ç æ‰˜ç®¡å¹³å°ï¼ˆåŒæ—¶æ”¯æŒ SVN)。专为开å‘者æä¾›ç¨³å®šã€é«˜æ•ˆã€å®‰å…¨çš„云端软件开å‘åä½œå¹³å° +无论是个人ã€å›¢é˜Ÿã€æˆ–是ä¼ä¸šï¼Œéƒ½èƒ½å¤Ÿç”¨ Gitee å®žçŽ°ä»£ç æ‰˜ç®¡ã€é¡¹ç›®ç®¡ç†ã€å作开å‘。ä¼ä¸šé¡¹ç›®è¯·çœ‹ [https://gitee.com/enterprises](https://gitee.com/enterprises)} + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + +#### å‚与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. æäº¤ä»£ç  +4. 新建 Pull Request + + +#### 特技 + +1. 使用 Readme\_XXX.md æ¥æ”¯æŒä¸åŒçš„语言,例如 Readme\_en.md, Readme\_zh.md +2. Gitee 官方åšå®¢ [blog.gitee.com](https://blog.gitee.com) +3. ä½ å¯ä»¥ [https://gitee.com/explore](https://gitee.com/explore) è¿™ä¸ªåœ°å€æ¥äº†è§£ Gitee 上的优秀开æºé¡¹ç›® +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开æºé¡¹ç›®ï¼Œæ˜¯ç»¼åˆè¯„定出的优秀开æºé¡¹ç›® +5. Gitee 官方æä¾›çš„使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee å°é¢äººç‰©æ˜¯ä¸€æ¡£ç”¨æ¥å±•示 Gitee 会员风采的æ ç›® [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/opengles/api/GL/glcorearb.h b/opengles/api/GL/glcorearb.h new file mode 100644 index 0000000000..ea6acc86de --- /dev/null +++ b/opengles/api/GL/glcorearb.h @@ -0,0 +1,5956 @@ +#ifndef __gl_glcorearb_h_ +#define __gl_glcorearb_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/* glcorearb.h is for use with OpenGL core profile implementations. +** It should should be placed in the same directory as gl.h and +** included as <GL/glcorearb.h>. +** +** glcorearb.h includes only APIs in the latest OpenGL core profile +** implementation together with APIs in newer ARB extensions which +** can be supported by the core profile. It does not, and never will +** include functionality removed from the core profile, such as +** fixed-function vertex and fragment processing. +** +** Do not #include both <GL/glcorearb.h> and either of <GL/gl.h> or +** <GL/glext.h> in the same source file. +*/ + +/* Generated C header for: + * API: gl + * Profile: core + * Versions considered: .* + * Versions emitted: .* + * Default extensions included: glcore + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_VERSION_1_0 +#define GL_VERSION_1_0 1 +typedef void GLvoid; +typedef unsigned int GLenum; +#include <KHR/khrplatform.h> +typedef khronos_float_t GLfloat; +typedef int GLint; +typedef int GLsizei; +typedef unsigned int GLbitfield; +typedef double GLdouble; +typedef unsigned int GLuint; +typedef unsigned char GLboolean; +typedef khronos_uint8_t GLubyte; +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_FALSE 0 +#define GL_TRUE 1 +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_QUADS 0x0007 +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_NONE 0 +#define GL_FRONT_LEFT 0x0400 +#define GL_FRONT_RIGHT 0x0401 +#define GL_BACK_LEFT 0x0402 +#define GL_BACK_RIGHT 0x0403 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_LEFT 0x0406 +#define GL_RIGHT 0x0407 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_RANGE 0x0B12 +#define GL_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_LINE_WIDTH 0x0B21 +#define GL_LINE_WIDTH_RANGE 0x0B22 +#define GL_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_POLYGON_MODE 0x0B40 +#define GL_POLYGON_SMOOTH 0x0B41 +#define GL_CULL_FACE 0x0B44 +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_TEST 0x0B71 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_TEST 0x0B90 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_VIEWPORT 0x0BA2 +#define GL_DITHER 0x0BD0 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_SRC 0x0BE1 +#define GL_BLEND 0x0BE2 +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_DRAW_BUFFER 0x0C01 +#define GL_READ_BUFFER 0x0C02 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_DOUBLEBUFFER 0x0C32 +#define GL_STEREO 0x0C33 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_UNPACK_SWAP_BYTES 0x0CF0 +#define GL_UNPACK_LSB_FIRST 0x0CF1 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_SWAP_BYTES 0x0D00 +#define GL_PACK_LSB_FIRST 0x0D01 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_TEXTURE_1D 0x0DE0 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_BORDER_COLOR 0x1004 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_CLEAR 0x1500 +#define GL_AND 0x1501 +#define GL_AND_REVERSE 0x1502 +#define GL_COPY 0x1503 +#define GL_AND_INVERTED 0x1504 +#define GL_NOOP 0x1505 +#define GL_XOR 0x1506 +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_EQUIV 0x1509 +#define GL_INVERT 0x150A +#define GL_OR_REVERSE 0x150B +#define GL_COPY_INVERTED 0x150C +#define GL_OR_INVERTED 0x150D +#define GL_NAND 0x150E +#define GL_SET 0x150F +#define GL_TEXTURE 0x1702 +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_STENCIL_INDEX 0x1901 +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_RED 0x1903 +#define GL_GREEN 0x1904 +#define GL_BLUE 0x1905 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_POINT 0x1B00 +#define GL_LINE 0x1B01 +#define GL_FILL 0x1B02 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_REPEAT 0x2901 +typedef void (APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); +typedef void (APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); +typedef void (APIENTRYP PFNGLPOINTSIZEPROC) (GLfloat size); +typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLDRAWBUFFERPROC) (GLenum buf); +typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); +typedef void (APIENTRYP PFNGLCLEARDEPTHPROC) (GLdouble depth); +typedef void (APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); +typedef void (APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef void (APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); +typedef void (APIENTRYP PFNGLDISABLEPROC) (GLenum cap); +typedef void (APIENTRYP PFNGLENABLEPROC) (GLenum cap); +typedef void (APIENTRYP PFNGLFINISHPROC) (void); +typedef void (APIENTRYP PFNGLFLUSHPROC) (void); +typedef void (APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); +typedef void (APIENTRYP PFNGLLOGICOPPROC) (GLenum opcode); +typedef void (APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); +typedef void (APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); +typedef void (APIENTRYP PFNGLPIXELSTOREFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); +typedef void (APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +typedef void (APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); +typedef void (APIENTRYP PFNGLGETDOUBLEVPROC) (GLenum pname, GLdouble *data); +typedef GLenum (APIENTRYP PFNGLGETERRORPROC) (void); +typedef void (APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); +typedef void (APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); +typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); +typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); +typedef void (APIENTRYP PFNGLDEPTHRANGEPROC) (GLdouble n, GLdouble f); +typedef void (APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCullFace (GLenum mode); +GLAPI void APIENTRY glFrontFace (GLenum mode); +GLAPI void APIENTRY glHint (GLenum target, GLenum mode); +GLAPI void APIENTRY glLineWidth (GLfloat width); +GLAPI void APIENTRY glPointSize (GLfloat size); +GLAPI void APIENTRY glPolygonMode (GLenum face, GLenum mode); +GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glDrawBuffer (GLenum buf); +GLAPI void APIENTRY glClear (GLbitfield mask); +GLAPI void APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void APIENTRY glClearStencil (GLint s); +GLAPI void APIENTRY glClearDepth (GLdouble depth); +GLAPI void APIENTRY glStencilMask (GLuint mask); +GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GLAPI void APIENTRY glDepthMask (GLboolean flag); +GLAPI void APIENTRY glDisable (GLenum cap); +GLAPI void APIENTRY glEnable (GLenum cap); +GLAPI void APIENTRY glFinish (void); +GLAPI void APIENTRY glFlush (void); +GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GLAPI void APIENTRY glLogicOp (GLenum opcode); +GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GLAPI void APIENTRY glDepthFunc (GLenum func); +GLAPI void APIENTRY glPixelStoref (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param); +GLAPI void APIENTRY glReadBuffer (GLenum src); +GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GLAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); +GLAPI void APIENTRY glGetDoublev (GLenum pname, GLdouble *data); +GLAPI GLenum APIENTRY glGetError (void); +GLAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *data); +GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *data); +GLAPI const GLubyte *APIENTRY glGetString (GLenum name); +GLAPI void APIENTRY glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +GLAPI void APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap); +GLAPI void APIENTRY glDepthRange (GLdouble n, GLdouble f); +GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +#endif +#endif /* GL_VERSION_1_0 */ + +#ifndef GL_VERSION_1_1 +#define GL_VERSION_1_1 1 +typedef khronos_float_t GLclampf; +typedef double GLclampd; +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_POINT 0x2A01 +#define GL_POLYGON_OFFSET_LINE 0x2A02 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_1D 0x8068 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_GREEN_SIZE 0x805D +#define GL_TEXTURE_BLUE_SIZE 0x805E +#define GL_TEXTURE_ALPHA_SIZE 0x805F +#define GL_DOUBLE 0x140A +#define GL_PROXY_TEXTURE_1D 0x8063 +#define GL_PROXY_TEXTURE_2D 0x8064 +#define GL_R3_G3_B2 0x2A10 +#define GL_RGB4 0x804F +#define GL_RGB5 0x8050 +#define GL_RGB8 0x8051 +#define GL_RGB10 0x8052 +#define GL_RGB12 0x8053 +#define GL_RGB16 0x8054 +#define GL_RGBA2 0x8055 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGBA8 0x8058 +#define GL_RGB10_A2 0x8059 +#define GL_RGBA12 0x805A +#define GL_RGBA16 0x805B +#define GL_VERTEX_ARRAY 0x8074 +typedef void (APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); +typedef void (APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params); +typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); +typedef void (APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); +GLAPI void APIENTRY glGetPointerv (GLenum pname, void **params); +GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GLAPI void APIENTRY glCopyTexImage1D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture); +GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GLAPI GLboolean APIENTRY glIsTexture (GLuint texture); +#endif +#endif /* GL_VERSION_1_1 */ + +#ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +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); +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); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +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); +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); +GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif +#endif /* GL_VERSION_1_2 */ + +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_CLAMP_TO_BORDER 0x812D +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTexture (GLenum texture); +GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +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); +GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img); +#endif +#endif /* GL_VERSION_1_3 */ + +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_BLEND_COLOR 0x8005 +#define GL_BLEND_EQUATION 0x8009 +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_FUNC_SUBTRACT 0x800A +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); +GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); +GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); +GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); +GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void APIENTRY glBlendEquation (GLenum mode); +#endif +#endif /* GL_VERSION_1_4 */ + +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#define GL_SRC1_ALPHA 0x8589 +typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data); +typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsQuery (GLuint id); +GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); +GLAPI void APIENTRY glEndQuery (GLenum target); +GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); +GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data); +GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access); +GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); +GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); +#endif +#endif /* GL_VERSION_1_5 */ + +#ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 +typedef char GLchar; +typedef khronos_int16_t GLshort; +typedef khronos_int8_t GLbyte; +typedef khronos_uint16_t GLushort; +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GLAPI void APIENTRY glCompileShader (GLuint shader); +GLAPI GLuint APIENTRY glCreateProgram (void); +GLAPI GLuint APIENTRY glCreateShader (GLenum type); +GLAPI void APIENTRY glDeleteProgram (GLuint program); +GLAPI void APIENTRY glDeleteShader (GLuint shader); +GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); +GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); +GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GLAPI GLboolean APIENTRY glIsProgram (GLuint program); +GLAPI GLboolean APIENTRY glIsShader (GLuint shader); +GLAPI void APIENTRY glLinkProgram (GLuint program); +GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GLAPI void APIENTRY glUseProgram (GLuint program); +GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); +GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); +GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glValidateProgram (GLuint program); +GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +#endif +#endif /* GL_VERSION_2_0 */ + +#ifndef GL_VERSION_2_1 +#define GL_VERSION_2_1 1 +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif +#endif /* GL_VERSION_2_1 */ + +#ifndef GL_VERSION_3_0 +#define GL_VERSION_3_0 1 +typedef khronos_uint16_t GLhalf; +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_CLIP_DISTANCE0 0x3000 +#define GL_CLIP_DISTANCE1 0x3001 +#define GL_CLIP_DISTANCE2 0x3002 +#define GL_CLIP_DISTANCE3 0x3003 +#define GL_CLIP_DISTANCE4 0x3004 +#define GL_CLIP_DISTANCE5 0x3005 +#define GL_CLIP_DISTANCE6 0x3006 +#define GL_CLIP_DISTANCE7 0x3007 +#define GL_MAX_CLIP_DISTANCES 0x0D32 +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_CONTEXT_FLAGS 0x821E +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RG 0x8226 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_FIXED_ONLY 0x891D +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_BGR_INTEGER 0x8D9A +#define GL_BGRA_INTEGER 0x8D9B +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_STENCIL_INDEX1 0x8D46 +#define GL_STENCIL_INDEX4 0x8D47 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_STENCIL_INDEX16 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_FRAMEBUFFER_SRGB 0x8DB9 +#define GL_HALF_FLOAT 0x140B +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#define GL_COMPRESSED_RED_RGTC1 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +#define GL_COMPRESSED_RG_RGTC2 0x8DBD +#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_R16 0x822A +#define GL_RG8 0x822B +#define GL_RG16 0x822C +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); +GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); +GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedback (void); +GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); +GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRender (void); +GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); +GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); +GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); +GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); +GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); +GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); +GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index); +GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); +GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); +GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateMipmap (GLenum target); +GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glBindVertexArray (GLuint array); +GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); +GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); +#endif +#endif /* GL_VERSION_3_0 */ + +#ifndef GL_VERSION_3_1 +#define GL_VERSION_3_1 1 +#define GL_SAMPLER_2D_RECT 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_INT_SAMPLER_2D_RECT 0x8DCD +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM 0x8F98 +#define GL_RG16_SNORM 0x8F99 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGBA16_SNORM 0x8F9B +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFFu +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); +typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); +GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#endif +#endif /* GL_VERSION_3_1 */ + +#ifndef GL_VERSION_3_2 +#define GL_VERSION_3_2 1 +typedef struct __GLsync *GLsync; +typedef khronos_uint64_t GLuint64; +typedef khronos_int64_t GLint64; +#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_PROGRAM_POINT_SIZE 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_CONTEXT_PROFILE_MASK 0x9126 +#define GL_DEPTH_CLAMP 0x864F +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION 0x8E4D +#define GL_LAST_VERTEX_CONVENTION 0x8E4E +#define GL_PROVOKING_VERTEX 0x8E4F +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_INTEGER_SAMPLES 0x9110 +typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); +typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); +typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); +GLAPI void APIENTRY glProvokingVertex (GLenum mode); +GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +GLAPI GLboolean APIENTRY glIsSync (GLsync sync); +GLAPI void APIENTRY glDeleteSync (GLsync sync); +GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); +GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); +#endif +#endif /* GL_VERSION_3_2 */ + +#ifndef GL_VERSION_3_3 +#define GL_VERSION_3_3 1 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +#define GL_SRC1_COLOR 0x88F9 +#define GL_ONE_MINUS_SRC1_COLOR 0x88FA +#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#define GL_SAMPLER_BINDING 0x8919 +#define GL_RGB10_A2UI 0x906F +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +#define GL_TIME_ELAPSED 0x88BF +#define GL_TIMESTAMP 0x8E28 +#define GL_INT_2_10_10_10_REV 0x8D9F +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); +GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); +GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); +GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); +GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); +GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); +GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); +GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +#endif +#endif /* GL_VERSION_3_3 */ + +#ifndef GL_VERSION_4_0 +#define GL_VERSION_4_0 1 +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +#define GL_MAX_VERTEX_STREAMS 0x8E71 +#define GL_DOUBLE_VEC2 0x8FFC +#define GL_DOUBLE_VEC3 0x8FFD +#define GL_DOUBLE_VEC4 0x8FFE +#define GL_DOUBLE_MAT2 0x8F46 +#define GL_DOUBLE_MAT3 0x8F47 +#define GL_DOUBLE_MAT4 0x8F48 +#define GL_DOUBLE_MAT2x3 0x8F49 +#define GL_DOUBLE_MAT2x4 0x8F4A +#define GL_DOUBLE_MAT3x2 0x8F4B +#define GL_DOUBLE_MAT3x4 0x8F4C +#define GL_DOUBLE_MAT4x2 0x8F4D +#define GL_DOUBLE_MAT4x3 0x8F4E +#define GL_ACTIVE_SUBROUTINES 0x8DE5 +#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +#define GL_MAX_SUBROUTINES 0x8DE7 +#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +#define GL_COMPATIBLE_SUBROUTINES 0x8E4B +#define GL_PATCHES 0x000E +#define GL_PATCH_VERTICES 0x8E72 +#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +#define GL_TESS_GEN_MODE 0x8E76 +#define GL_TESS_GEN_SPACING 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +#define GL_TESS_GEN_POINT_MODE 0x8E79 +#define GL_ISOLINES 0x8E7A +#define GL_FRACTIONAL_ODD 0x8E7B +#define GL_FRACTIONAL_EVEN 0x8E7C +#define GL_MAX_PATCH_VERTICES 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +#define GL_TESS_EVALUATION_SHADER 0x8E87 +#define GL_TESS_CONTROL_SHADER 0x8E88 +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); +typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); +typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); +typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); +typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); +typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShading (GLfloat value); +GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); +GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); +GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); +GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); +GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); +GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); +GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); +GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); +GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); +GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); +GLAPI void APIENTRY glPauseTransformFeedback (void); +GLAPI void APIENTRY glResumeTransformFeedback (void); +GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); +GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); +GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); +GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); +GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); +#endif +#endif /* GL_VERSION_4_0 */ + +#ifndef GL_VERSION_4_1 +#define GL_VERSION_4_1 1 +#define GL_FIXED 0x140C +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_RGB565 0x8D62 +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_GEOMETRY_SHADER_BIT 0x00000004 +#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#define GL_MAX_VIEWPORTS 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE 0x825D +#define GL_LAYER_PROVOKING_VERTEX 0x825E +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +#define GL_UNDEFINED_VERTEX 0x8260 +typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); +typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); +typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); +typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f); +typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReleaseShaderCompiler (void); +GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GLAPI void APIENTRY glClearDepthf (GLfloat d); +GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); +GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); +GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); +GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); +GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); +GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); +GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f); +GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); +#endif +#endif /* GL_VERSION_4_1 */ + +#ifndef GL_VERSION_4_2 +#define GL_VERSION_4_2 1 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 +#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 +#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 +#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A +#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B +#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C +#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D +#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC +#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB +#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA +#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +#define GL_COMMAND_BARRIER_BIT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +#define GL_ALL_BARRIER_BITS 0xFFFFFFFF +#define GL_MAX_IMAGE_UNITS 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 +#define GL_IMAGE_BINDING_NAME 0x8F3A +#define GL_IMAGE_BINDING_LEVEL 0x8F3B +#define GL_IMAGE_BINDING_LAYERED 0x8F3C +#define GL_IMAGE_BINDING_LAYER 0x8F3D +#define GL_IMAGE_BINDING_ACCESS 0x8F3E +#define GL_IMAGE_1D 0x904C +#define GL_IMAGE_2D 0x904D +#define GL_IMAGE_3D 0x904E +#define GL_IMAGE_2D_RECT 0x904F +#define GL_IMAGE_CUBE 0x9050 +#define GL_IMAGE_BUFFER 0x9051 +#define GL_IMAGE_1D_ARRAY 0x9052 +#define GL_IMAGE_2D_ARRAY 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 +#define GL_INT_IMAGE_1D 0x9057 +#define GL_INT_IMAGE_2D 0x9058 +#define GL_INT_IMAGE_3D 0x9059 +#define GL_INT_IMAGE_2D_RECT 0x905A +#define GL_INT_IMAGE_CUBE 0x905B +#define GL_INT_IMAGE_BUFFER 0x905C +#define GL_INT_IMAGE_1D_ARRAY 0x905D +#define GL_INT_IMAGE_2D_ARRAY 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C +#define GL_MAX_IMAGE_SAMPLES 0x906D +#define GL_IMAGE_BINDING_FORMAT 0x906E +#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); +typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params); +GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); +GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount); +GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +#endif +#endif /* GL_VERSION_4_2 */ + +#ifndef GL_VERSION_4_3 +#define GL_VERSION_4_3 1 +typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 +#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED +#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +#define GL_COMPUTE_SHADER_BIT 0x00000020 +#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +#define GL_DEBUG_SOURCE_API 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION 0x824A +#define GL_DEBUG_SOURCE_OTHER 0x824B +#define GL_DEBUG_TYPE_ERROR 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +#define GL_DEBUG_TYPE_PORTABILITY 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +#define GL_DEBUG_TYPE_OTHER 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES 0x9145 +#define GL_DEBUG_SEVERITY_HIGH 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +#define GL_DEBUG_SEVERITY_LOW 0x9148 +#define GL_DEBUG_TYPE_MARKER 0x8268 +#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +#define GL_DEBUG_TYPE_POP_GROUP 0x826A +#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +#define GL_BUFFER 0x82E0 +#define GL_SHADER 0x82E1 +#define GL_PROGRAM 0x82E2 +#define GL_QUERY 0x82E3 +#define GL_PROGRAM_PIPELINE 0x82E4 +#define GL_SAMPLER 0x82E6 +#define GL_MAX_LABEL_LENGTH 0x82E8 +#define GL_DEBUG_OUTPUT 0x92E0 +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +#define GL_MAX_UNIFORM_LOCATIONS 0x826E +#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +#define GL_INTERNALFORMAT_SUPPORTED 0x826F +#define GL_INTERNALFORMAT_PREFERRED 0x8270 +#define GL_INTERNALFORMAT_RED_SIZE 0x8271 +#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 +#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 +#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 +#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 +#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 +#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 +#define GL_INTERNALFORMAT_RED_TYPE 0x8278 +#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 +#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A +#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B +#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C +#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D +#define GL_MAX_WIDTH 0x827E +#define GL_MAX_HEIGHT 0x827F +#define GL_MAX_DEPTH 0x8280 +#define GL_MAX_LAYERS 0x8281 +#define GL_MAX_COMBINED_DIMENSIONS 0x8282 +#define GL_COLOR_COMPONENTS 0x8283 +#define GL_DEPTH_COMPONENTS 0x8284 +#define GL_STENCIL_COMPONENTS 0x8285 +#define GL_COLOR_RENDERABLE 0x8286 +#define GL_DEPTH_RENDERABLE 0x8287 +#define GL_STENCIL_RENDERABLE 0x8288 +#define GL_FRAMEBUFFER_RENDERABLE 0x8289 +#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A +#define GL_FRAMEBUFFER_BLEND 0x828B +#define GL_READ_PIXELS 0x828C +#define GL_READ_PIXELS_FORMAT 0x828D +#define GL_READ_PIXELS_TYPE 0x828E +#define GL_TEXTURE_IMAGE_FORMAT 0x828F +#define GL_TEXTURE_IMAGE_TYPE 0x8290 +#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 +#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 +#define GL_MIPMAP 0x8293 +#define GL_MANUAL_GENERATE_MIPMAP 0x8294 +#define GL_AUTO_GENERATE_MIPMAP 0x8295 +#define GL_COLOR_ENCODING 0x8296 +#define GL_SRGB_READ 0x8297 +#define GL_SRGB_WRITE 0x8298 +#define GL_FILTER 0x829A +#define GL_VERTEX_TEXTURE 0x829B +#define GL_TESS_CONTROL_TEXTURE 0x829C +#define GL_TESS_EVALUATION_TEXTURE 0x829D +#define GL_GEOMETRY_TEXTURE 0x829E +#define GL_FRAGMENT_TEXTURE 0x829F +#define GL_COMPUTE_TEXTURE 0x82A0 +#define GL_TEXTURE_SHADOW 0x82A1 +#define GL_TEXTURE_GATHER 0x82A2 +#define GL_TEXTURE_GATHER_SHADOW 0x82A3 +#define GL_SHADER_IMAGE_LOAD 0x82A4 +#define GL_SHADER_IMAGE_STORE 0x82A5 +#define GL_SHADER_IMAGE_ATOMIC 0x82A6 +#define GL_IMAGE_TEXEL_SIZE 0x82A7 +#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 +#define GL_IMAGE_PIXEL_FORMAT 0x82A9 +#define GL_IMAGE_PIXEL_TYPE 0x82AA +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF +#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 +#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 +#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 +#define GL_CLEAR_BUFFER 0x82B4 +#define GL_TEXTURE_VIEW 0x82B5 +#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 +#define GL_FULL_SUPPORT 0x82B7 +#define GL_CAVEAT_SUPPORT 0x82B8 +#define GL_IMAGE_CLASS_4_X_32 0x82B9 +#define GL_IMAGE_CLASS_2_X_32 0x82BA +#define GL_IMAGE_CLASS_1_X_32 0x82BB +#define GL_IMAGE_CLASS_4_X_16 0x82BC +#define GL_IMAGE_CLASS_2_X_16 0x82BD +#define GL_IMAGE_CLASS_1_X_16 0x82BE +#define GL_IMAGE_CLASS_4_X_8 0x82BF +#define GL_IMAGE_CLASS_2_X_8 0x82C0 +#define GL_IMAGE_CLASS_1_X_8 0x82C1 +#define GL_IMAGE_CLASS_11_11_10 0x82C2 +#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 +#define GL_VIEW_CLASS_128_BITS 0x82C4 +#define GL_VIEW_CLASS_96_BITS 0x82C5 +#define GL_VIEW_CLASS_64_BITS 0x82C6 +#define GL_VIEW_CLASS_48_BITS 0x82C7 +#define GL_VIEW_CLASS_32_BITS 0x82C8 +#define GL_VIEW_CLASS_24_BITS 0x82C9 +#define GL_VIEW_CLASS_16_BITS 0x82CA +#define GL_VIEW_CLASS_8_BITS 0x82CB +#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC +#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD +#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE +#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF +#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 +#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 +#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 +#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 +#define GL_UNIFORM 0x92E1 +#define GL_UNIFORM_BLOCK 0x92E2 +#define GL_PROGRAM_INPUT 0x92E3 +#define GL_PROGRAM_OUTPUT 0x92E4 +#define GL_BUFFER_VARIABLE 0x92E5 +#define GL_SHADER_STORAGE_BLOCK 0x92E6 +#define GL_VERTEX_SUBROUTINE 0x92E8 +#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 +#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA +#define GL_GEOMETRY_SUBROUTINE 0x92EB +#define GL_FRAGMENT_SUBROUTINE 0x92EC +#define GL_COMPUTE_SUBROUTINE 0x92ED +#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE +#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF +#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 +#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 +#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 +#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 +#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +#define GL_ACTIVE_RESOURCES 0x92F5 +#define GL_MAX_NAME_LENGTH 0x92F6 +#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 +#define GL_NAME_LENGTH 0x92F9 +#define GL_TYPE 0x92FA +#define GL_ARRAY_SIZE 0x92FB +#define GL_OFFSET 0x92FC +#define GL_BLOCK_INDEX 0x92FD +#define GL_ARRAY_STRIDE 0x92FE +#define GL_MATRIX_STRIDE 0x92FF +#define GL_IS_ROW_MAJOR 0x9300 +#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +#define GL_BUFFER_BINDING 0x9302 +#define GL_BUFFER_DATA_SIZE 0x9303 +#define GL_NUM_ACTIVE_VARIABLES 0x9304 +#define GL_ACTIVE_VARIABLES 0x9305 +#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +#define GL_LOCATION 0x930E +#define GL_LOCATION_INDEX 0x930F +#define GL_IS_PER_PATCH 0x92E7 +#define GL_SHADER_STORAGE_BUFFER 0x90D2 +#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 +#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 +#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +#define GL_TEXTURE_BUFFER_OFFSET 0x919D +#define GL_TEXTURE_BUFFER_SIZE 0x919E +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB +#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC +#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD +#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +#define GL_VERTEX_ATTRIB_BINDING 0x82D4 +#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +#define GL_VERTEX_BINDING_DIVISOR 0x82D6 +#define GL_VERTEX_BINDING_OFFSET 0x82D7 +#define GL_VERTEX_BINDING_STRIDE 0x82D8 +#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#define GL_VERTEX_BINDING_BUFFER 0x8F4F +typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); +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); +typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 *params); +typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLint *params); +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); +typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); +typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect); +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); +GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 *params); +GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level); +GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer); +GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); +GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLint *params); +GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); +GLAPI void APIENTRY glPopDebugGroup (void); +GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif +#endif /* GL_VERSION_4_3 */ + +#ifndef GL_VERSION_4_4 +#define GL_VERSION_4_4 1 +#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 +#define GL_TEXTURE_BUFFER_BINDING 0x8C2A +#define GL_MAP_PERSISTENT_BIT 0x0040 +#define GL_MAP_COHERENT_BIT 0x0080 +#define GL_DYNAMIC_STORAGE_BIT 0x0100 +#define GL_CLIENT_STORAGE_BIT 0x0200 +#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 +#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F +#define GL_BUFFER_STORAGE_FLAGS 0x8220 +#define GL_CLEAR_TEXTURE 0x9365 +#define GL_LOCATION_COMPONENT 0x934A +#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B +#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C +#define GL_QUERY_BUFFER 0x9192 +#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 +#define GL_QUERY_BUFFER_BINDING 0x9193 +#define GL_QUERY_RESULT_NO_WAIT 0x9194 +#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 +typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +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); +typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); +typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); +typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); +typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers); +typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); +typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +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); +GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); +GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); +GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures); +GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers); +GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures); +GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +#endif +#endif /* GL_VERSION_4_4 */ + +#ifndef GL_VERSION_4_5 +#define GL_VERSION_4_5 1 +#define GL_CONTEXT_LOST 0x0507 +#define GL_NEGATIVE_ONE_TO_ONE 0x935E +#define GL_ZERO_TO_ONE 0x935F +#define GL_CLIP_ORIGIN 0x935C +#define GL_CLIP_DEPTH_MODE 0x935D +#define GL_QUERY_WAIT_INVERTED 0x8E17 +#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 +#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 +#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A +#define GL_MAX_CULL_DISTANCES 0x82F9 +#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA +#define GL_TEXTURE_TARGET 0x1006 +#define GL_QUERY_TARGET 0x82EA +#define GL_GUILTY_CONTEXT_RESET 0x8253 +#define GL_INNOCENT_CONTEXT_RESET 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 +#define GL_LOSE_CONTEXT_ON_RESET 0x8252 +#define GL_NO_RESET_NOTIFICATION 0x8261 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 +#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB +#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC +typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth); +typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); +typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum buf); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum src); +typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); +typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture); +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); +typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers); +typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); +typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void); +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth); +GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param); +GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); +GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers); +GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access); +GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer); +GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params); +GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers); +GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param); +GLAPI void APIENTRY glNamedFramebufferTexture (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTextureLayer (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glNamedFramebufferDrawBuffer (GLuint framebuffer, GLenum buf); +GLAPI void APIENTRY glNamedFramebufferDrawBuffers (GLuint framebuffer, GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glNamedFramebufferReadBuffer (GLuint framebuffer, GLenum src); +GLAPI void APIENTRY glInvalidateNamedFramebufferData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); +GLAPI void APIENTRY glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI void APIENTRY glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI void APIENTRY glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GLAPI void APIENTRY glBlitNamedFramebuffer (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target); +GLAPI void APIENTRY glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameteriv (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glCreateRenderbuffers (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glNamedRenderbufferStorage (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures); +GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glTextureStorage2DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureStorage3DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glCompressedTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCopyTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glCopyTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureParameterf (GLuint texture, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTextureParameterfv (GLuint texture, GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glTextureParameteri (GLuint texture, GLenum pname, GLint param); +GLAPI void APIENTRY glTextureParameterIiv (GLuint texture, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureParameterIuiv (GLuint texture, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glTextureParameteriv (GLuint texture, GLenum pname, const GLint *param); +GLAPI void APIENTRY glGenerateTextureMipmap (GLuint texture); +GLAPI void APIENTRY glBindTextureUnit (GLuint unit, GLuint texture); +GLAPI void APIENTRY glGetTextureImage (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetCompressedTextureImage (GLuint texture, GLint level, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetTextureLevelParameterfv (GLuint texture, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureLevelParameteriv (GLuint texture, GLint level, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterfv (GLuint texture, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureParameterIiv (GLuint texture, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterIuiv (GLuint texture, GLenum pname, GLuint *params); +GLAPI void APIENTRY glGetTextureParameteriv (GLuint texture, GLenum pname, GLint *params); +GLAPI void APIENTRY glCreateVertexArrays (GLsizei n, GLuint *arrays); +GLAPI void APIENTRY glDisableVertexArrayAttrib (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glEnableVertexArrayAttrib (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glVertexArrayElementBuffer (GLuint vaobj, GLuint buffer); +GLAPI void APIENTRY glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexArrayVertexBuffers (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +GLAPI void APIENTRY glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glGetVertexArrayiv (GLuint vaobj, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayIndexediv (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); +GLAPI void APIENTRY glCreateSamplers (GLsizei n, GLuint *samplers); +GLAPI void APIENTRY glCreateProgramPipelines (GLsizei n, GLuint *pipelines); +GLAPI void APIENTRY glCreateQueries (GLenum target, GLsizei n, GLuint *ids); +GLAPI void APIENTRY glGetQueryBufferObjecti64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectui64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectuiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); +GLAPI void APIENTRY glGetTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); +GLAPI GLenum APIENTRY glGetGraphicsResetStatus (void); +GLAPI void APIENTRY glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetnTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +GLAPI void APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI void APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI void APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GLAPI void APIENTRY glTextureBarrier (void); +#endif +#endif /* GL_VERSION_4_5 */ + +#ifndef GL_VERSION_4_6 +#define GL_VERSION_4_6 1 +#define GL_SHADER_BINARY_FORMAT_SPIR_V 0x9551 +#define GL_SPIR_V_BINARY 0x9552 +#define GL_PARAMETER_BUFFER 0x80EE +#define GL_PARAMETER_BUFFER_BINDING 0x80EF +#define GL_CONTEXT_FLAG_NO_ERROR_BIT 0x00000008 +#define GL_VERTICES_SUBMITTED 0x82EE +#define GL_PRIMITIVES_SUBMITTED 0x82EF +#define GL_VERTEX_SHADER_INVOCATIONS 0x82F0 +#define GL_TESS_CONTROL_SHADER_PATCHES 0x82F1 +#define GL_TESS_EVALUATION_SHADER_INVOCATIONS 0x82F2 +#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED 0x82F3 +#define GL_FRAGMENT_SHADER_INVOCATIONS 0x82F4 +#define GL_COMPUTE_SHADER_INVOCATIONS 0x82F5 +#define GL_CLIPPING_INPUT_PRIMITIVES 0x82F6 +#define GL_CLIPPING_OUTPUT_PRIMITIVES 0x82F7 +#define GL_POLYGON_OFFSET_CLAMP 0x8E1B +#define GL_SPIR_V_EXTENSIONS 0x9553 +#define GL_NUM_SPIR_V_EXTENSIONS 0x9554 +#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF +#define GL_TRANSFORM_FEEDBACK_OVERFLOW 0x82EC +#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW 0x82ED +typedef void (APIENTRYP PFNGLSPECIALIZESHADERPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC) (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPPROC) (GLfloat factor, GLfloat units, GLfloat clamp); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpecializeShader (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +GLAPI void APIENTRY glMultiDrawArraysIndirectCount (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectCount (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glPolygonOffsetClamp (GLfloat factor, GLfloat units, GLfloat clamp); +#endif +#endif /* GL_VERSION_4_6 */ + +#ifndef GL_ARB_ES2_compatibility +#define GL_ARB_ES2_compatibility 1 +#endif /* GL_ARB_ES2_compatibility */ + +#ifndef GL_ARB_ES3_1_compatibility +#define GL_ARB_ES3_1_compatibility 1 +#endif /* GL_ARB_ES3_1_compatibility */ + +#ifndef GL_ARB_ES3_2_compatibility +#define GL_ARB_ES3_2_compatibility 1 +#define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE +#define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381 +#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382 +typedef void (APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXARBPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveBoundingBoxARB (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#endif +#endif /* GL_ARB_ES3_2_compatibility */ + +#ifndef GL_ARB_ES3_compatibility +#define GL_ARB_ES3_compatibility 1 +#endif /* GL_ARB_ES3_compatibility */ + +#ifndef GL_ARB_arrays_of_arrays +#define GL_ARB_arrays_of_arrays 1 +#endif /* GL_ARB_arrays_of_arrays */ + +#ifndef GL_ARB_base_instance +#define GL_ARB_base_instance 1 +#endif /* GL_ARB_base_instance */ + +#ifndef GL_ARB_bindless_texture +#define GL_ARB_bindless_texture 1 +typedef khronos_uint64_t GLuint64EXT; +#define GL_UNSIGNED_INT64_ARB 0x140F +typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture); +typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle); +typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); +typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler); +GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle); +GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle); +GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access); +GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle); +GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value); +GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value); +GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle); +GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle); +GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x); +GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params); +#endif +#endif /* GL_ARB_bindless_texture */ + +#ifndef GL_ARB_blend_func_extended +#define GL_ARB_blend_func_extended 1 +#endif /* GL_ARB_blend_func_extended */ + +#ifndef GL_ARB_buffer_storage +#define GL_ARB_buffer_storage 1 +#endif /* GL_ARB_buffer_storage */ + +#ifndef GL_ARB_cl_event +#define GL_ARB_cl_event 1 +struct _cl_context; +struct _cl_event; +#define GL_SYNC_CL_EVENT_ARB 0x8240 +#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 +typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +#endif +#endif /* GL_ARB_cl_event */ + +#ifndef GL_ARB_clear_buffer_object +#define GL_ARB_clear_buffer_object 1 +#endif /* GL_ARB_clear_buffer_object */ + +#ifndef GL_ARB_clear_texture +#define GL_ARB_clear_texture 1 +#endif /* GL_ARB_clear_texture */ + +#ifndef GL_ARB_clip_control +#define GL_ARB_clip_control 1 +#endif /* GL_ARB_clip_control */ + +#ifndef GL_ARB_compressed_texture_pixel_storage +#define GL_ARB_compressed_texture_pixel_storage 1 +#endif /* GL_ARB_compressed_texture_pixel_storage */ + +#ifndef GL_ARB_compute_shader +#define GL_ARB_compute_shader 1 +#endif /* GL_ARB_compute_shader */ + +#ifndef GL_ARB_compute_variable_group_size +#define GL_ARB_compute_variable_group_size 1 +#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344 +#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB +#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345 +#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF +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); +#ifdef GL_GLEXT_PROTOTYPES +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); +#endif +#endif /* GL_ARB_compute_variable_group_size */ + +#ifndef GL_ARB_conditional_render_inverted +#define GL_ARB_conditional_render_inverted 1 +#endif /* GL_ARB_conditional_render_inverted */ + +#ifndef GL_ARB_conservative_depth +#define GL_ARB_conservative_depth 1 +#endif /* GL_ARB_conservative_depth */ + +#ifndef GL_ARB_copy_buffer +#define GL_ARB_copy_buffer 1 +#endif /* GL_ARB_copy_buffer */ + +#ifndef GL_ARB_copy_image +#define GL_ARB_copy_image 1 +#endif /* GL_ARB_copy_image */ + +#ifndef GL_ARB_cull_distance +#define GL_ARB_cull_distance 1 +#endif /* GL_ARB_cull_distance */ + +#ifndef GL_ARB_debug_output +#define GL_ARB_debug_output 1 +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +#define GL_DEBUG_SOURCE_API_ARB 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +#define GL_DEBUG_TYPE_ERROR_ARB 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif +#endif /* GL_ARB_debug_output */ + +#ifndef GL_ARB_depth_buffer_float +#define GL_ARB_depth_buffer_float 1 +#endif /* GL_ARB_depth_buffer_float */ + +#ifndef GL_ARB_depth_clamp +#define GL_ARB_depth_clamp 1 +#endif /* GL_ARB_depth_clamp */ + +#ifndef GL_ARB_derivative_control +#define GL_ARB_derivative_control 1 +#endif /* GL_ARB_derivative_control */ + +#ifndef GL_ARB_direct_state_access +#define GL_ARB_direct_state_access 1 +#endif /* GL_ARB_direct_state_access */ + +#ifndef GL_ARB_draw_buffers_blend +#define GL_ARB_draw_buffers_blend 1 +typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif +#endif /* GL_ARB_draw_buffers_blend */ + +#ifndef GL_ARB_draw_elements_base_vertex +#define GL_ARB_draw_elements_base_vertex 1 +#endif /* GL_ARB_draw_elements_base_vertex */ + +#ifndef GL_ARB_draw_indirect +#define GL_ARB_draw_indirect 1 +#endif /* GL_ARB_draw_indirect */ + +#ifndef GL_ARB_draw_instanced +#define GL_ARB_draw_instanced 1 +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#endif +#endif /* GL_ARB_draw_instanced */ + +#ifndef GL_ARB_enhanced_layouts +#define GL_ARB_enhanced_layouts 1 +#endif /* GL_ARB_enhanced_layouts */ + +#ifndef GL_ARB_explicit_attrib_location +#define GL_ARB_explicit_attrib_location 1 +#endif /* GL_ARB_explicit_attrib_location */ + +#ifndef GL_ARB_explicit_uniform_location +#define GL_ARB_explicit_uniform_location 1 +#endif /* GL_ARB_explicit_uniform_location */ + +#ifndef GL_ARB_fragment_coord_conventions +#define GL_ARB_fragment_coord_conventions 1 +#endif /* GL_ARB_fragment_coord_conventions */ + +#ifndef GL_ARB_fragment_layer_viewport +#define GL_ARB_fragment_layer_viewport 1 +#endif /* GL_ARB_fragment_layer_viewport */ + +#ifndef GL_ARB_fragment_shader_interlock +#define GL_ARB_fragment_shader_interlock 1 +#endif /* GL_ARB_fragment_shader_interlock */ + +#ifndef GL_ARB_framebuffer_no_attachments +#define GL_ARB_framebuffer_no_attachments 1 +#endif /* GL_ARB_framebuffer_no_attachments */ + +#ifndef GL_ARB_framebuffer_object +#define GL_ARB_framebuffer_object 1 +#endif /* GL_ARB_framebuffer_object */ + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_ARB_framebuffer_sRGB 1 +#endif /* GL_ARB_framebuffer_sRGB */ + +#ifndef GL_ARB_geometry_shader4 +#define GL_ARB_geometry_shader4 1 +#define GL_LINES_ADJACENCY_ARB 0x000A +#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +#define GL_TRIANGLES_ADJACENCY_ARB 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +#define GL_GEOMETRY_SHADER_ARB 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); +GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif +#endif /* GL_ARB_geometry_shader4 */ + +#ifndef GL_ARB_get_program_binary +#define GL_ARB_get_program_binary 1 +#endif /* GL_ARB_get_program_binary */ + +#ifndef GL_ARB_get_texture_sub_image +#define GL_ARB_get_texture_sub_image 1 +#endif /* GL_ARB_get_texture_sub_image */ + +#ifndef GL_ARB_gl_spirv +#define GL_ARB_gl_spirv 1 +#define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551 +#define GL_SPIR_V_BINARY_ARB 0x9552 +typedef void (APIENTRYP PFNGLSPECIALIZESHADERARBPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpecializeShaderARB (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +#endif +#endif /* GL_ARB_gl_spirv */ + +#ifndef GL_ARB_gpu_shader5 +#define GL_ARB_gpu_shader5 1 +#endif /* GL_ARB_gpu_shader5 */ + +#ifndef GL_ARB_gpu_shader_fp64 +#define GL_ARB_gpu_shader_fp64 1 +#endif /* GL_ARB_gpu_shader_fp64 */ + +#ifndef GL_ARB_gpu_shader_int64 +#define GL_ARB_gpu_shader_int64 1 +#define GL_INT64_ARB 0x140E +#define GL_INT64_VEC2_ARB 0x8FE9 +#define GL_INT64_VEC3_ARB 0x8FEA +#define GL_INT64_VEC4_ARB 0x8FEB +#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 +typedef void (APIENTRYP PFNGLUNIFORM1I64ARBPROC) (GLint location, GLint64 x); +typedef void (APIENTRYP PFNGLUNIFORM2I64ARBPROC) (GLint location, GLint64 x, GLint64 y); +typedef void (APIENTRYP PFNGLUNIFORM3I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z); +typedef void (APIENTRYP PFNGLUNIFORM4I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +typedef void (APIENTRYP PFNGLUNIFORM1I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM2I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM3I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM4I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM1UI64ARBPROC) (GLint location, GLuint64 x); +typedef void (APIENTRYP PFNGLUNIFORM2UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y); +typedef void (APIENTRYP PFNGLUNIFORM3UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +typedef void (APIENTRYP PFNGLUNIFORM4UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +typedef void (APIENTRYP PFNGLUNIFORM1UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM2UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM3UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM4UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLGETUNIFORMI64VARBPROC) (GLuint program, GLint location, GLint64 *params); +typedef void (APIENTRYP PFNGLGETUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLuint64 *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint64 *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64ARBPROC) (GLuint program, GLint location, GLint64 x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64ARBPROC) (GLuint program, GLint location, GLuint64 x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64ARB (GLint location, GLint64 x); +GLAPI void APIENTRY glUniform2i64ARB (GLint location, GLint64 x, GLint64 y); +GLAPI void APIENTRY glUniform3i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z); +GLAPI void APIENTRY glUniform4i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +GLAPI void APIENTRY glUniform1i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform2i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform3i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform4i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform1ui64ARB (GLint location, GLuint64 x); +GLAPI void APIENTRY glUniform2ui64ARB (GLint location, GLuint64 x, GLuint64 y); +GLAPI void APIENTRY glUniform3ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +GLAPI void APIENTRY glUniform4ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +GLAPI void APIENTRY glUniform1ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glUniform2ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glUniform3ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glUniform4ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glGetUniformi64vARB (GLuint program, GLint location, GLint64 *params); +GLAPI void APIENTRY glGetUniformui64vARB (GLuint program, GLint location, GLuint64 *params); +GLAPI void APIENTRY glGetnUniformi64vARB (GLuint program, GLint location, GLsizei bufSize, GLint64 *params); +GLAPI void APIENTRY glGetnUniformui64vARB (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params); +GLAPI void APIENTRY glProgramUniform1i64ARB (GLuint program, GLint location, GLint64 x); +GLAPI void APIENTRY glProgramUniform2i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y); +GLAPI void APIENTRY glProgramUniform3i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z); +GLAPI void APIENTRY glProgramUniform4i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +GLAPI void APIENTRY glProgramUniform1i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform2i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform3i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform4i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform1ui64ARB (GLuint program, GLint location, GLuint64 x); +GLAPI void APIENTRY glProgramUniform2ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y); +GLAPI void APIENTRY glProgramUniform3ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +GLAPI void APIENTRY glProgramUniform4ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +GLAPI void APIENTRY glProgramUniform1ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniform2ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniform3ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniform4ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +#endif +#endif /* GL_ARB_gpu_shader_int64 */ + +#ifndef GL_ARB_half_float_vertex +#define GL_ARB_half_float_vertex 1 +#endif /* GL_ARB_half_float_vertex */ + +#ifndef GL_ARB_imaging +#define GL_ARB_imaging 1 +#endif /* GL_ARB_imaging */ + +#ifndef GL_ARB_indirect_parameters +#define GL_ARB_indirect_parameters 1 +#define GL_PARAMETER_BUFFER_ARB 0x80EE +#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#endif +#endif /* GL_ARB_indirect_parameters */ + +#ifndef GL_ARB_instanced_arrays +#define GL_ARB_instanced_arrays 1 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); +#endif +#endif /* GL_ARB_instanced_arrays */ + +#ifndef GL_ARB_internalformat_query +#define GL_ARB_internalformat_query 1 +#endif /* GL_ARB_internalformat_query */ + +#ifndef GL_ARB_internalformat_query2 +#define GL_ARB_internalformat_query2 1 +#define GL_SRGB_DECODE_ARB 0x8299 +#define GL_VIEW_CLASS_EAC_R11 0x9383 +#define GL_VIEW_CLASS_EAC_RG11 0x9384 +#define GL_VIEW_CLASS_ETC2_RGB 0x9385 +#define GL_VIEW_CLASS_ETC2_RGBA 0x9386 +#define GL_VIEW_CLASS_ETC2_EAC_RGBA 0x9387 +#define GL_VIEW_CLASS_ASTC_4x4_RGBA 0x9388 +#define GL_VIEW_CLASS_ASTC_5x4_RGBA 0x9389 +#define GL_VIEW_CLASS_ASTC_5x5_RGBA 0x938A +#define GL_VIEW_CLASS_ASTC_6x5_RGBA 0x938B +#define GL_VIEW_CLASS_ASTC_6x6_RGBA 0x938C +#define GL_VIEW_CLASS_ASTC_8x5_RGBA 0x938D +#define GL_VIEW_CLASS_ASTC_8x6_RGBA 0x938E +#define GL_VIEW_CLASS_ASTC_8x8_RGBA 0x938F +#define GL_VIEW_CLASS_ASTC_10x5_RGBA 0x9390 +#define GL_VIEW_CLASS_ASTC_10x6_RGBA 0x9391 +#define GL_VIEW_CLASS_ASTC_10x8_RGBA 0x9392 +#define GL_VIEW_CLASS_ASTC_10x10_RGBA 0x9393 +#define GL_VIEW_CLASS_ASTC_12x10_RGBA 0x9394 +#define GL_VIEW_CLASS_ASTC_12x12_RGBA 0x9395 +#endif /* GL_ARB_internalformat_query2 */ + +#ifndef GL_ARB_invalidate_subdata +#define GL_ARB_invalidate_subdata 1 +#endif /* GL_ARB_invalidate_subdata */ + +#ifndef GL_ARB_map_buffer_alignment +#define GL_ARB_map_buffer_alignment 1 +#endif /* GL_ARB_map_buffer_alignment */ + +#ifndef GL_ARB_map_buffer_range +#define GL_ARB_map_buffer_range 1 +#endif /* GL_ARB_map_buffer_range */ + +#ifndef GL_ARB_multi_bind +#define GL_ARB_multi_bind 1 +#endif /* GL_ARB_multi_bind */ + +#ifndef GL_ARB_multi_draw_indirect +#define GL_ARB_multi_draw_indirect 1 +#endif /* GL_ARB_multi_draw_indirect */ + +#ifndef GL_ARB_occlusion_query2 +#define GL_ARB_occlusion_query2 1 +#endif /* GL_ARB_occlusion_query2 */ + +#ifndef GL_ARB_parallel_shader_compile +#define GL_ARB_parallel_shader_compile 1 +#define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0 +#define GL_COMPLETION_STATUS_ARB 0x91B1 +typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSARBPROC) (GLuint count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMaxShaderCompilerThreadsARB (GLuint count); +#endif +#endif /* GL_ARB_parallel_shader_compile */ + +#ifndef GL_ARB_pipeline_statistics_query +#define GL_ARB_pipeline_statistics_query 1 +#define GL_VERTICES_SUBMITTED_ARB 0x82EE +#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF +#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0 +#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1 +#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2 +#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3 +#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4 +#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5 +#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6 +#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7 +#endif /* GL_ARB_pipeline_statistics_query */ + +#ifndef GL_ARB_pixel_buffer_object +#define GL_ARB_pixel_buffer_object 1 +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +#endif /* GL_ARB_pixel_buffer_object */ + +#ifndef GL_ARB_polygon_offset_clamp +#define GL_ARB_polygon_offset_clamp 1 +#endif /* GL_ARB_polygon_offset_clamp */ + +#ifndef GL_ARB_post_depth_coverage +#define GL_ARB_post_depth_coverage 1 +#endif /* GL_ARB_post_depth_coverage */ + +#ifndef GL_ARB_program_interface_query +#define GL_ARB_program_interface_query 1 +#endif /* GL_ARB_program_interface_query */ + +#ifndef GL_ARB_provoking_vertex +#define GL_ARB_provoking_vertex 1 +#endif /* GL_ARB_provoking_vertex */ + +#ifndef GL_ARB_query_buffer_object +#define GL_ARB_query_buffer_object 1 +#endif /* GL_ARB_query_buffer_object */ + +#ifndef GL_ARB_robust_buffer_access_behavior +#define GL_ARB_robust_buffer_access_behavior 1 +#endif /* GL_ARB_robust_buffer_access_behavior */ + +#ifndef GL_ARB_robustness +#define GL_ARB_robustness 1 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); +typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img); +typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); +GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); +GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img); +GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +#endif +#endif /* GL_ARB_robustness */ + +#ifndef GL_ARB_robustness_isolation +#define GL_ARB_robustness_isolation 1 +#endif /* GL_ARB_robustness_isolation */ + +#ifndef GL_ARB_sample_locations +#define GL_ARB_sample_locations 1 +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340 +#define GL_SAMPLE_LOCATION_ARB 0x8E50 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343 +typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLEVALUATEDEPTHVALUESARBPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSampleLocationsfvARB (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvARB (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glEvaluateDepthValuesARB (void); +#endif +#endif /* GL_ARB_sample_locations */ + +#ifndef GL_ARB_sample_shading +#define GL_ARB_sample_shading 1 +#define GL_SAMPLE_SHADING_ARB 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value); +#endif +#endif /* GL_ARB_sample_shading */ + +#ifndef GL_ARB_sampler_objects +#define GL_ARB_sampler_objects 1 +#endif /* GL_ARB_sampler_objects */ + +#ifndef GL_ARB_seamless_cube_map +#define GL_ARB_seamless_cube_map 1 +#endif /* GL_ARB_seamless_cube_map */ + +#ifndef GL_ARB_seamless_cubemap_per_texture +#define GL_ARB_seamless_cubemap_per_texture 1 +#endif /* GL_ARB_seamless_cubemap_per_texture */ + +#ifndef GL_ARB_separate_shader_objects +#define GL_ARB_separate_shader_objects 1 +#endif /* GL_ARB_separate_shader_objects */ + +#ifndef GL_ARB_shader_atomic_counter_ops +#define GL_ARB_shader_atomic_counter_ops 1 +#endif /* GL_ARB_shader_atomic_counter_ops */ + +#ifndef GL_ARB_shader_atomic_counters +#define GL_ARB_shader_atomic_counters 1 +#endif /* GL_ARB_shader_atomic_counters */ + +#ifndef GL_ARB_shader_ballot +#define GL_ARB_shader_ballot 1 +#endif /* GL_ARB_shader_ballot */ + +#ifndef GL_ARB_shader_bit_encoding +#define GL_ARB_shader_bit_encoding 1 +#endif /* GL_ARB_shader_bit_encoding */ + +#ifndef GL_ARB_shader_clock +#define GL_ARB_shader_clock 1 +#endif /* GL_ARB_shader_clock */ + +#ifndef GL_ARB_shader_draw_parameters +#define GL_ARB_shader_draw_parameters 1 +#endif /* GL_ARB_shader_draw_parameters */ + +#ifndef GL_ARB_shader_group_vote +#define GL_ARB_shader_group_vote 1 +#endif /* GL_ARB_shader_group_vote */ + +#ifndef GL_ARB_shader_image_load_store +#define GL_ARB_shader_image_load_store 1 +#endif /* GL_ARB_shader_image_load_store */ + +#ifndef GL_ARB_shader_image_size +#define GL_ARB_shader_image_size 1 +#endif /* GL_ARB_shader_image_size */ + +#ifndef GL_ARB_shader_precision +#define GL_ARB_shader_precision 1 +#endif /* GL_ARB_shader_precision */ + +#ifndef GL_ARB_shader_stencil_export +#define GL_ARB_shader_stencil_export 1 +#endif /* GL_ARB_shader_stencil_export */ + +#ifndef GL_ARB_shader_storage_buffer_object +#define GL_ARB_shader_storage_buffer_object 1 +#endif /* GL_ARB_shader_storage_buffer_object */ + +#ifndef GL_ARB_shader_subroutine +#define GL_ARB_shader_subroutine 1 +#endif /* GL_ARB_shader_subroutine */ + +#ifndef GL_ARB_shader_texture_image_samples +#define GL_ARB_shader_texture_image_samples 1 +#endif /* GL_ARB_shader_texture_image_samples */ + +#ifndef GL_ARB_shader_viewport_layer_array +#define GL_ARB_shader_viewport_layer_array 1 +#endif /* GL_ARB_shader_viewport_layer_array */ + +#ifndef GL_ARB_shading_language_420pack +#define GL_ARB_shading_language_420pack 1 +#endif /* GL_ARB_shading_language_420pack */ + +#ifndef GL_ARB_shading_language_include +#define GL_ARB_shading_language_include 1 +#define GL_SHADER_INCLUDE_ARB 0x8DAE +#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 +#define GL_NAMED_STRING_TYPE_ARB 0x8DEA +typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); +typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); +GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#endif +#endif /* GL_ARB_shading_language_include */ + +#ifndef GL_ARB_shading_language_packing +#define GL_ARB_shading_language_packing 1 +#endif /* GL_ARB_shading_language_packing */ + +#ifndef GL_ARB_sparse_buffer +#define GL_ARB_sparse_buffer 1 +#define GL_SPARSE_STORAGE_BIT_ARB 0x0400 +#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8 +typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +#endif +#endif /* GL_ARB_sparse_buffer */ + +#ifndef GL_ARB_sparse_texture +#define GL_ARB_sparse_texture 1 +#define GL_TEXTURE_SPARSE_ARB 0x91A6 +#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 +#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA +#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 +#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197 +#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A +#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 +typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#endif +#endif /* GL_ARB_sparse_texture */ + +#ifndef GL_ARB_sparse_texture2 +#define GL_ARB_sparse_texture2 1 +#endif /* GL_ARB_sparse_texture2 */ + +#ifndef GL_ARB_sparse_texture_clamp +#define GL_ARB_sparse_texture_clamp 1 +#endif /* GL_ARB_sparse_texture_clamp */ + +#ifndef GL_ARB_spirv_extensions +#define GL_ARB_spirv_extensions 1 +#endif /* GL_ARB_spirv_extensions */ + +#ifndef GL_ARB_stencil_texturing +#define GL_ARB_stencil_texturing 1 +#endif /* GL_ARB_stencil_texturing */ + +#ifndef GL_ARB_sync +#define GL_ARB_sync 1 +#endif /* GL_ARB_sync */ + +#ifndef GL_ARB_tessellation_shader +#define GL_ARB_tessellation_shader 1 +#endif /* GL_ARB_tessellation_shader */ + +#ifndef GL_ARB_texture_barrier +#define GL_ARB_texture_barrier 1 +#endif /* GL_ARB_texture_barrier */ + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp 1 +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif /* GL_ARB_texture_border_clamp */ + +#ifndef GL_ARB_texture_buffer_object +#define GL_ARB_texture_buffer_object 1 +#define GL_TEXTURE_BUFFER_ARB 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); +#endif +#endif /* GL_ARB_texture_buffer_object */ + +#ifndef GL_ARB_texture_buffer_object_rgb32 +#define GL_ARB_texture_buffer_object_rgb32 1 +#endif /* GL_ARB_texture_buffer_object_rgb32 */ + +#ifndef GL_ARB_texture_buffer_range +#define GL_ARB_texture_buffer_range 1 +#endif /* GL_ARB_texture_buffer_range */ + +#ifndef GL_ARB_texture_compression_bptc +#define GL_ARB_texture_compression_bptc 1 +#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F +#endif /* GL_ARB_texture_compression_bptc */ + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_ARB_texture_compression_rgtc 1 +#endif /* GL_ARB_texture_compression_rgtc */ + +#ifndef GL_ARB_texture_cube_map_array +#define GL_ARB_texture_cube_map_array 1 +#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F +#endif /* GL_ARB_texture_cube_map_array */ + +#ifndef GL_ARB_texture_filter_anisotropic +#define GL_ARB_texture_filter_anisotropic 1 +#endif /* GL_ARB_texture_filter_anisotropic */ + +#ifndef GL_ARB_texture_filter_minmax +#define GL_ARB_texture_filter_minmax 1 +#define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 +#define GL_WEIGHTED_AVERAGE_ARB 0x9367 +#endif /* GL_ARB_texture_filter_minmax */ + +#ifndef GL_ARB_texture_gather +#define GL_ARB_texture_gather 1 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F +#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F +#endif /* GL_ARB_texture_gather */ + +#ifndef GL_ARB_texture_mirror_clamp_to_edge +#define GL_ARB_texture_mirror_clamp_to_edge 1 +#endif /* GL_ARB_texture_mirror_clamp_to_edge */ + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif /* GL_ARB_texture_mirrored_repeat */ + +#ifndef GL_ARB_texture_multisample +#define GL_ARB_texture_multisample 1 +#endif /* GL_ARB_texture_multisample */ + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two 1 +#endif /* GL_ARB_texture_non_power_of_two */ + +#ifndef GL_ARB_texture_query_levels +#define GL_ARB_texture_query_levels 1 +#endif /* GL_ARB_texture_query_levels */ + +#ifndef GL_ARB_texture_query_lod +#define GL_ARB_texture_query_lod 1 +#endif /* GL_ARB_texture_query_lod */ + +#ifndef GL_ARB_texture_rg +#define GL_ARB_texture_rg 1 +#endif /* GL_ARB_texture_rg */ + +#ifndef GL_ARB_texture_rgb10_a2ui +#define GL_ARB_texture_rgb10_a2ui 1 +#endif /* GL_ARB_texture_rgb10_a2ui */ + +#ifndef GL_ARB_texture_stencil8 +#define GL_ARB_texture_stencil8 1 +#endif /* GL_ARB_texture_stencil8 */ + +#ifndef GL_ARB_texture_storage +#define GL_ARB_texture_storage 1 +#endif /* GL_ARB_texture_storage */ + +#ifndef GL_ARB_texture_storage_multisample +#define GL_ARB_texture_storage_multisample 1 +#endif /* GL_ARB_texture_storage_multisample */ + +#ifndef GL_ARB_texture_swizzle +#define GL_ARB_texture_swizzle 1 +#endif /* GL_ARB_texture_swizzle */ + +#ifndef GL_ARB_texture_view +#define GL_ARB_texture_view 1 +#endif /* GL_ARB_texture_view */ + +#ifndef GL_ARB_timer_query +#define GL_ARB_timer_query 1 +#endif /* GL_ARB_timer_query */ + +#ifndef GL_ARB_transform_feedback2 +#define GL_ARB_transform_feedback2 1 +#endif /* GL_ARB_transform_feedback2 */ + +#ifndef GL_ARB_transform_feedback3 +#define GL_ARB_transform_feedback3 1 +#endif /* GL_ARB_transform_feedback3 */ + +#ifndef GL_ARB_transform_feedback_instanced +#define GL_ARB_transform_feedback_instanced 1 +#endif /* GL_ARB_transform_feedback_instanced */ + +#ifndef GL_ARB_transform_feedback_overflow_query +#define GL_ARB_transform_feedback_overflow_query 1 +#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC +#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED +#endif /* GL_ARB_transform_feedback_overflow_query */ + +#ifndef GL_ARB_uniform_buffer_object +#define GL_ARB_uniform_buffer_object 1 +#endif /* GL_ARB_uniform_buffer_object */ + +#ifndef GL_ARB_vertex_array_bgra +#define GL_ARB_vertex_array_bgra 1 +#endif /* GL_ARB_vertex_array_bgra */ + +#ifndef GL_ARB_vertex_array_object +#define GL_ARB_vertex_array_object 1 +#endif /* GL_ARB_vertex_array_object */ + +#ifndef GL_ARB_vertex_attrib_64bit +#define GL_ARB_vertex_attrib_64bit 1 +#endif /* GL_ARB_vertex_attrib_64bit */ + +#ifndef GL_ARB_vertex_attrib_binding +#define GL_ARB_vertex_attrib_binding 1 +#endif /* GL_ARB_vertex_attrib_binding */ + +#ifndef GL_ARB_vertex_type_10f_11f_11f_rev +#define GL_ARB_vertex_type_10f_11f_11f_rev 1 +#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */ + +#ifndef GL_ARB_vertex_type_2_10_10_10_rev +#define GL_ARB_vertex_type_2_10_10_10_rev 1 +#endif /* GL_ARB_vertex_type_2_10_10_10_rev */ + +#ifndef GL_ARB_viewport_array +#define GL_ARB_viewport_array 1 +typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYDVNVPROC) (GLuint first, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDDNVPROC) (GLuint index, GLdouble n, GLdouble f); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthRangeArraydvNV (GLuint first, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glDepthRangeIndexeddNV (GLuint index, GLdouble n, GLdouble f); +#endif +#endif /* GL_ARB_viewport_array */ + +#ifndef GL_KHR_blend_equation_advanced +#define GL_KHR_blend_equation_advanced 1 +#define GL_MULTIPLY_KHR 0x9294 +#define GL_SCREEN_KHR 0x9295 +#define GL_OVERLAY_KHR 0x9296 +#define GL_DARKEN_KHR 0x9297 +#define GL_LIGHTEN_KHR 0x9298 +#define GL_COLORDODGE_KHR 0x9299 +#define GL_COLORBURN_KHR 0x929A +#define GL_HARDLIGHT_KHR 0x929B +#define GL_SOFTLIGHT_KHR 0x929C +#define GL_DIFFERENCE_KHR 0x929E +#define GL_EXCLUSION_KHR 0x92A0 +#define GL_HSL_HUE_KHR 0x92AD +#define GL_HSL_SATURATION_KHR 0x92AE +#define GL_HSL_COLOR_KHR 0x92AF +#define GL_HSL_LUMINOSITY_KHR 0x92B0 +typedef void (APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendBarrierKHR (void); +#endif +#endif /* GL_KHR_blend_equation_advanced */ + +#ifndef GL_KHR_blend_equation_advanced_coherent +#define GL_KHR_blend_equation_advanced_coherent 1 +#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 +#endif /* GL_KHR_blend_equation_advanced_coherent */ + +#ifndef GL_KHR_context_flush_control +#define GL_KHR_context_flush_control 1 +#endif /* GL_KHR_context_flush_control */ + +#ifndef GL_KHR_debug +#define GL_KHR_debug 1 +#endif /* GL_KHR_debug */ + +#ifndef GL_KHR_no_error +#define GL_KHR_no_error 1 +#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 +#endif /* GL_KHR_no_error */ + +#ifndef GL_KHR_parallel_shader_compile +#define GL_KHR_parallel_shader_compile 1 +#define GL_MAX_SHADER_COMPILER_THREADS_KHR 0x91B0 +#define GL_COMPLETION_STATUS_KHR 0x91B1 +typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSKHRPROC) (GLuint count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMaxShaderCompilerThreadsKHR (GLuint count); +#endif +#endif /* GL_KHR_parallel_shader_compile */ + +#ifndef GL_KHR_robust_buffer_access_behavior +#define GL_KHR_robust_buffer_access_behavior 1 +#endif /* GL_KHR_robust_buffer_access_behavior */ + +#ifndef GL_KHR_robustness +#define GL_KHR_robustness 1 +#define GL_CONTEXT_ROBUST_ACCESS 0x90F3 +#endif /* GL_KHR_robustness */ + +#ifndef GL_KHR_shader_subgroup +#define GL_KHR_shader_subgroup 1 +#define GL_SUBGROUP_SIZE_KHR 0x9532 +#define GL_SUBGROUP_SUPPORTED_STAGES_KHR 0x9533 +#define GL_SUBGROUP_SUPPORTED_FEATURES_KHR 0x9534 +#define GL_SUBGROUP_QUAD_ALL_STAGES_KHR 0x9535 +#define GL_SUBGROUP_FEATURE_BASIC_BIT_KHR 0x00000001 +#define GL_SUBGROUP_FEATURE_VOTE_BIT_KHR 0x00000002 +#define GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR 0x00000004 +#define GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR 0x00000008 +#define GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR 0x00000010 +#define GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR 0x00000020 +#define GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR 0x00000040 +#define GL_SUBGROUP_FEATURE_QUAD_BIT_KHR 0x00000080 +#endif /* GL_KHR_shader_subgroup */ + +#ifndef GL_KHR_texture_compression_astc_hdr +#define GL_KHR_texture_compression_astc_hdr 1 +#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +#endif /* GL_KHR_texture_compression_astc_hdr */ + +#ifndef GL_KHR_texture_compression_astc_ldr +#define GL_KHR_texture_compression_astc_ldr 1 +#endif /* GL_KHR_texture_compression_astc_ldr */ + +#ifndef GL_KHR_texture_compression_astc_sliced_3d +#define GL_KHR_texture_compression_astc_sliced_3d 1 +#endif /* GL_KHR_texture_compression_astc_sliced_3d */ + +#ifndef GL_AMD_framebuffer_multisample_advanced +#define GL_AMD_framebuffer_multisample_advanced 1 +#define GL_RENDERBUFFER_STORAGE_SAMPLES_AMD 0x91B2 +#define GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD 0x91B3 +#define GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD 0x91B4 +#define GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD 0x91B5 +#define GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B6 +#define GL_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B7 +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleAdvancedAMD (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleAdvancedAMD (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +#endif /* GL_AMD_framebuffer_multisample_advanced */ + +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor 1 +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data); +typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data); +GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif +#endif /* GL_AMD_performance_monitor */ + +#ifndef GL_APPLE_rgb_422 +#define GL_APPLE_rgb_422 1 +#define GL_RGB_422_APPLE 0x8A1F +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#define GL_RGB_RAW_422_APPLE 0x8A51 +#endif /* GL_APPLE_rgb_422 */ + +#ifndef GL_EXT_EGL_image_storage +#define GL_EXT_EGL_image_storage 1 +typedef void *GLeglImageOES; +typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC) (GLenum target, GLeglImageOES image, const GLint* attrib_list); +typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC) (GLuint texture, GLeglImageOES image, const GLint* attrib_list); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEGLImageTargetTexStorageEXT (GLenum target, GLeglImageOES image, const GLint* attrib_list); +GLAPI void APIENTRY glEGLImageTargetTextureStorageEXT (GLuint texture, GLeglImageOES image, const GLint* attrib_list); +#endif +#endif /* GL_EXT_EGL_image_storage */ + +#ifndef GL_EXT_EGL_sync +#define GL_EXT_EGL_sync 1 +#endif /* GL_EXT_EGL_sync */ + +#ifndef GL_EXT_debug_label +#define GL_EXT_debug_label 1 +#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F +#define GL_PROGRAM_OBJECT_EXT 0x8B40 +#define GL_SHADER_OBJECT_EXT 0x8B48 +#define GL_BUFFER_OBJECT_EXT 0x9151 +#define GL_QUERY_OBJECT_EXT 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 +typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif +#endif /* GL_EXT_debug_label */ + +#ifndef GL_EXT_debug_marker +#define GL_EXT_debug_marker 1 +typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); +GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); +GLAPI void APIENTRY glPopGroupMarkerEXT (void); +#endif +#endif /* GL_EXT_debug_marker */ + +#ifndef GL_EXT_direct_state_access +#define GL_EXT_direct_state_access 1 +#define GL_PROGRAM_MATRIX_EXT 0x8E2D +#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +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); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +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); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +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); +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); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +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); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +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); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +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); +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); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); +typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data); +typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +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); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +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); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); +typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); +GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); +GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); +GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +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); +GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +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); +GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +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); +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); +GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); +GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +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); +GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +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); +GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +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); +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); +GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); +GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data); +GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); +GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); +GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); +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); +GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +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); +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); +GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img); +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); +GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +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); +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); +GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img); +GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); +GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); +GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params); +GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); +GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params); +GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); +GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string); +GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); +GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); +GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); +GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array); +GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array); +GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param); +GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param); +GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); +GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); +GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor); +#endif +#endif /* GL_EXT_direct_state_access */ + +#ifndef GL_EXT_draw_instanced +#define GL_EXT_draw_instanced 1 +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#endif +#endif /* GL_EXT_draw_instanced */ + +#ifndef GL_EXT_multiview_tessellation_geometry_shader +#define GL_EXT_multiview_tessellation_geometry_shader 1 +#endif /* GL_EXT_multiview_tessellation_geometry_shader */ + +#ifndef GL_EXT_multiview_texture_multisample +#define GL_EXT_multiview_texture_multisample 1 +#endif /* GL_EXT_multiview_texture_multisample */ + +#ifndef GL_EXT_multiview_timer_query +#define GL_EXT_multiview_timer_query 1 +#endif /* GL_EXT_multiview_timer_query */ + +#ifndef GL_EXT_polygon_offset_clamp +#define GL_EXT_polygon_offset_clamp 1 +#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B +typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp); +#endif +#endif /* GL_EXT_polygon_offset_clamp */ + +#ifndef GL_EXT_post_depth_coverage +#define GL_EXT_post_depth_coverage 1 +#endif /* GL_EXT_post_depth_coverage */ + +#ifndef GL_EXT_raster_multisample +#define GL_EXT_raster_multisample 1 +#define GL_RASTER_MULTISAMPLE_EXT 0x9327 +#define GL_RASTER_SAMPLES_EXT 0x9328 +#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 +#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A +#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B +#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C +typedef void (APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations); +#endif +#endif /* GL_EXT_raster_multisample */ + +#ifndef GL_EXT_separate_shader_objects +#define GL_EXT_separate_shader_objects 1 +#define GL_ACTIVE_PROGRAM_EXT 0x8B8D +typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); +typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); +GLAPI void APIENTRY glActiveProgramEXT (GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); +#endif +#endif /* GL_EXT_separate_shader_objects */ + +#ifndef GL_EXT_shader_framebuffer_fetch +#define GL_EXT_shader_framebuffer_fetch 1 +#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 +#endif /* GL_EXT_shader_framebuffer_fetch */ + +#ifndef GL_EXT_shader_framebuffer_fetch_non_coherent +#define GL_EXT_shader_framebuffer_fetch_non_coherent 1 +typedef void (APIENTRYP PFNGLFRAMEBUFFERFETCHBARRIEREXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferFetchBarrierEXT (void); +#endif +#endif /* GL_EXT_shader_framebuffer_fetch_non_coherent */ + +#ifndef GL_EXT_shader_integer_mix +#define GL_EXT_shader_integer_mix 1 +#endif /* GL_EXT_shader_integer_mix */ + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_EXT_texture_compression_s3tc 1 +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif /* GL_EXT_texture_compression_s3tc */ + +#ifndef GL_EXT_texture_filter_minmax +#define GL_EXT_texture_filter_minmax 1 +#define GL_TEXTURE_REDUCTION_MODE_EXT 0x9366 +#define GL_WEIGHTED_AVERAGE_EXT 0x9367 +#endif /* GL_EXT_texture_filter_minmax */ + +#ifndef GL_EXT_texture_sRGB_R8 +#define GL_EXT_texture_sRGB_R8 1 +#define GL_SR8_EXT 0x8FBD +#endif /* GL_EXT_texture_sRGB_R8 */ + +#ifndef GL_EXT_texture_sRGB_RG8 +#define GL_EXT_texture_sRGB_RG8 1 +#define GL_SRG8_EXT 0x8FBE +#endif /* GL_EXT_texture_sRGB_RG8 */ + +#ifndef GL_EXT_texture_sRGB_decode +#define GL_EXT_texture_sRGB_decode 1 +#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 +#define GL_DECODE_EXT 0x8A49 +#define GL_SKIP_DECODE_EXT 0x8A4A +#endif /* GL_EXT_texture_sRGB_decode */ + +#ifndef GL_EXT_texture_shadow_lod +#define GL_EXT_texture_shadow_lod 1 +#endif /* GL_EXT_texture_shadow_lod */ + +#ifndef GL_EXT_window_rectangles +#define GL_EXT_window_rectangles 1 +#define GL_INCLUSIVE_EXT 0x8F10 +#define GL_EXCLUSIVE_EXT 0x8F11 +#define GL_WINDOW_RECTANGLE_EXT 0x8F12 +#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 +#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 +#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 +typedef void (APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box); +#endif +#endif /* GL_EXT_window_rectangles */ + +#ifndef GL_INTEL_blackhole_render +#define GL_INTEL_blackhole_render 1 +#define GL_BLACKHOLE_RENDER_INTEL 0x83FC +#endif /* GL_INTEL_blackhole_render */ + +#ifndef GL_INTEL_conservative_rasterization +#define GL_INTEL_conservative_rasterization 1 +#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE +#endif /* GL_INTEL_conservative_rasterization */ + +#ifndef GL_INTEL_framebuffer_CMAA +#define GL_INTEL_framebuffer_CMAA 1 +typedef void (APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void); +#endif +#endif /* GL_INTEL_framebuffer_CMAA */ + +#ifndef GL_INTEL_performance_query +#define GL_INTEL_performance_query 1 +#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 +#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 +#define GL_PERFQUERY_WAIT_INTEL 0x83FB +#define GL_PERFQUERY_FLUSH_INTEL 0x83FA +#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 +#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 +#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 +#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 +#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 +#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 +#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 +#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 +#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 +#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA +#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB +#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC +#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD +#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE +#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF +#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 +typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle); +typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); +typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); +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); +typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten); +typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); +typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle); +GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); +GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); +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); +GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten); +GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); +GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#endif +#endif /* GL_INTEL_performance_query */ + +#ifndef GL_MESA_framebuffer_flip_x +#define GL_MESA_framebuffer_flip_x 1 +#define GL_FRAMEBUFFER_FLIP_X_MESA 0x8BBC +#endif /* GL_MESA_framebuffer_flip_x */ + +#ifndef GL_MESA_framebuffer_flip_y +#define GL_MESA_framebuffer_flip_y 1 +#define GL_FRAMEBUFFER_FLIP_Y_MESA 0x8BBB +typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIMESAPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC) (GLenum target, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferParameteriMESA (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glGetFramebufferParameterivMESA (GLenum target, GLenum pname, GLint *params); +#endif +#endif /* GL_MESA_framebuffer_flip_y */ + +#ifndef GL_MESA_framebuffer_swap_xy +#define GL_MESA_framebuffer_swap_xy 1 +#define GL_FRAMEBUFFER_SWAP_XY_MESA 0x8BBD +#endif /* GL_MESA_framebuffer_swap_xy */ + +#ifndef GL_NV_bindless_multi_draw_indirect +#define GL_NV_bindless_multi_draw_indirect 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +#endif +#endif /* GL_NV_bindless_multi_draw_indirect */ + +#ifndef GL_NV_bindless_multi_draw_indirect_count +#define GL_NV_bindless_multi_draw_indirect_count 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessCountNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessCountNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +#endif +#endif /* GL_NV_bindless_multi_draw_indirect_count */ + +#ifndef GL_NV_bindless_texture +#define GL_NV_bindless_texture 1 +typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); +typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); +GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); +GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); +GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); +GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); +GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); +GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); +GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); +GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); +#endif +#endif /* GL_NV_bindless_texture */ + +#ifndef GL_NV_blend_equation_advanced +#define GL_NV_blend_equation_advanced 1 +#define GL_BLEND_OVERLAP_NV 0x9281 +#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 +#define GL_BLUE_NV 0x1905 +#define GL_COLORBURN_NV 0x929A +#define GL_COLORDODGE_NV 0x9299 +#define GL_CONJOINT_NV 0x9284 +#define GL_CONTRAST_NV 0x92A1 +#define GL_DARKEN_NV 0x9297 +#define GL_DIFFERENCE_NV 0x929E +#define GL_DISJOINT_NV 0x9283 +#define GL_DST_ATOP_NV 0x928F +#define GL_DST_IN_NV 0x928B +#define GL_DST_NV 0x9287 +#define GL_DST_OUT_NV 0x928D +#define GL_DST_OVER_NV 0x9289 +#define GL_EXCLUSION_NV 0x92A0 +#define GL_GREEN_NV 0x1904 +#define GL_HARDLIGHT_NV 0x929B +#define GL_HARDMIX_NV 0x92A9 +#define GL_HSL_COLOR_NV 0x92AF +#define GL_HSL_HUE_NV 0x92AD +#define GL_HSL_LUMINOSITY_NV 0x92B0 +#define GL_HSL_SATURATION_NV 0x92AE +#define GL_INVERT_OVG_NV 0x92B4 +#define GL_INVERT_RGB_NV 0x92A3 +#define GL_LIGHTEN_NV 0x9298 +#define GL_LINEARBURN_NV 0x92A5 +#define GL_LINEARDODGE_NV 0x92A4 +#define GL_LINEARLIGHT_NV 0x92A7 +#define GL_MINUS_CLAMPED_NV 0x92B3 +#define GL_MINUS_NV 0x929F +#define GL_MULTIPLY_NV 0x9294 +#define GL_OVERLAY_NV 0x9296 +#define GL_PINLIGHT_NV 0x92A8 +#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 +#define GL_PLUS_CLAMPED_NV 0x92B1 +#define GL_PLUS_DARKER_NV 0x9292 +#define GL_PLUS_NV 0x9291 +#define GL_RED_NV 0x1903 +#define GL_SCREEN_NV 0x9295 +#define GL_SOFTLIGHT_NV 0x929C +#define GL_SRC_ATOP_NV 0x928E +#define GL_SRC_IN_NV 0x928A +#define GL_SRC_NV 0x9286 +#define GL_SRC_OUT_NV 0x928C +#define GL_SRC_OVER_NV 0x9288 +#define GL_UNCORRELATED_NV 0x9282 +#define GL_VIVIDLIGHT_NV 0x92A6 +#define GL_XOR_NV 0x1506 +typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value); +GLAPI void APIENTRY glBlendBarrierNV (void); +#endif +#endif /* GL_NV_blend_equation_advanced */ + +#ifndef GL_NV_blend_equation_advanced_coherent +#define GL_NV_blend_equation_advanced_coherent 1 +#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 +#endif /* GL_NV_blend_equation_advanced_coherent */ + +#ifndef GL_NV_blend_minmax_factor +#define GL_NV_blend_minmax_factor 1 +#define GL_FACTOR_MIN_AMD 0x901C +#define GL_FACTOR_MAX_AMD 0x901D +#endif /* GL_NV_blend_minmax_factor */ + +#ifndef GL_NV_clip_space_w_scaling +#define GL_NV_clip_space_w_scaling 1 +#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C +#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D +#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E +typedef void (APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC) (GLuint index, GLfloat xcoeff, GLfloat ycoeff); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportPositionWScaleNV (GLuint index, GLfloat xcoeff, GLfloat ycoeff); +#endif +#endif /* GL_NV_clip_space_w_scaling */ + +#ifndef GL_NV_command_list +#define GL_NV_command_list 1 +#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000 +#define GL_NOP_COMMAND_NV 0x0001 +#define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002 +#define GL_DRAW_ARRAYS_COMMAND_NV 0x0003 +#define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004 +#define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005 +#define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006 +#define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007 +#define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008 +#define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009 +#define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A +#define GL_BLEND_COLOR_COMMAND_NV 0x000B +#define GL_STENCIL_REF_COMMAND_NV 0x000C +#define GL_LINE_WIDTH_COMMAND_NV 0x000D +#define GL_POLYGON_OFFSET_COMMAND_NV 0x000E +#define GL_ALPHA_REF_COMMAND_NV 0x000F +#define GL_VIEWPORT_COMMAND_NV 0x0010 +#define GL_SCISSOR_COMMAND_NV 0x0011 +#define GL_FRONT_FACE_COMMAND_NV 0x0012 +typedef void (APIENTRYP PFNGLCREATESTATESNVPROC) (GLsizei n, GLuint *states); +typedef void (APIENTRYP PFNGLDELETESTATESNVPROC) (GLsizei n, const GLuint *states); +typedef GLboolean (APIENTRYP PFNGLISSTATENVPROC) (GLuint state); +typedef void (APIENTRYP PFNGLSTATECAPTURENVPROC) (GLuint state, GLenum mode); +typedef GLuint (APIENTRYP PFNGLGETCOMMANDHEADERNVPROC) (GLenum tokenID, GLuint size); +typedef GLushort (APIENTRYP PFNGLGETSTAGEINDEXNVPROC) (GLenum shadertype); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSNVPROC) (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSADDRESSNVPROC) (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESNVPROC) (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC) (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLCREATECOMMANDLISTSNVPROC) (GLsizei n, GLuint *lists); +typedef void (APIENTRYP PFNGLDELETECOMMANDLISTSNVPROC) (GLsizei n, const GLuint *lists); +typedef GLboolean (APIENTRYP PFNGLISCOMMANDLISTNVPROC) (GLuint list); +typedef void (APIENTRYP PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC) (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLCOMMANDLISTSEGMENTSNVPROC) (GLuint list, GLuint segments); +typedef void (APIENTRYP PFNGLCOMPILECOMMANDLISTNVPROC) (GLuint list); +typedef void (APIENTRYP PFNGLCALLCOMMANDLISTNVPROC) (GLuint list); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCreateStatesNV (GLsizei n, GLuint *states); +GLAPI void APIENTRY glDeleteStatesNV (GLsizei n, const GLuint *states); +GLAPI GLboolean APIENTRY glIsStateNV (GLuint state); +GLAPI void APIENTRY glStateCaptureNV (GLuint state, GLenum mode); +GLAPI GLuint APIENTRY glGetCommandHeaderNV (GLenum tokenID, GLuint size); +GLAPI GLushort APIENTRY glGetStageIndexNV (GLenum shadertype); +GLAPI void APIENTRY glDrawCommandsNV (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); +GLAPI void APIENTRY glDrawCommandsAddressNV (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); +GLAPI void APIENTRY glDrawCommandsStatesNV (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glDrawCommandsStatesAddressNV (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glCreateCommandListsNV (GLsizei n, GLuint *lists); +GLAPI void APIENTRY glDeleteCommandListsNV (GLsizei n, const GLuint *lists); +GLAPI GLboolean APIENTRY glIsCommandListNV (GLuint list); +GLAPI void APIENTRY glListDrawCommandsStatesClientNV (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glCommandListSegmentsNV (GLuint list, GLuint segments); +GLAPI void APIENTRY glCompileCommandListNV (GLuint list); +GLAPI void APIENTRY glCallCommandListNV (GLuint list); +#endif +#endif /* GL_NV_command_list */ + +#ifndef GL_NV_compute_shader_derivatives +#define GL_NV_compute_shader_derivatives 1 +#endif /* GL_NV_compute_shader_derivatives */ + +#ifndef GL_NV_conditional_render +#define GL_NV_conditional_render 1 +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRenderNV (void); +#endif +#endif /* GL_NV_conditional_render */ + +#ifndef GL_NV_conservative_raster +#define GL_NV_conservative_raster 1 +#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 +#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 +#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 +#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 +typedef void (APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits); +#endif +#endif /* GL_NV_conservative_raster */ + +#ifndef GL_NV_conservative_raster_dilate +#define GL_NV_conservative_raster_dilate 1 +#define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379 +#define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A +#define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B +typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERFNVPROC) (GLenum pname, GLfloat value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat value); +#endif +#endif /* GL_NV_conservative_raster_dilate */ + +#ifndef GL_NV_conservative_raster_pre_snap +#define GL_NV_conservative_raster_pre_snap 1 +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV 0x9550 +#endif /* GL_NV_conservative_raster_pre_snap */ + +#ifndef GL_NV_conservative_raster_pre_snap_triangles +#define GL_NV_conservative_raster_pre_snap_triangles 1 +#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D +#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F +typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param); +#endif +#endif /* GL_NV_conservative_raster_pre_snap_triangles */ + +#ifndef GL_NV_conservative_raster_underestimation +#define GL_NV_conservative_raster_underestimation 1 +#endif /* GL_NV_conservative_raster_underestimation */ + +#ifndef GL_NV_depth_buffer_float +#define GL_NV_depth_buffer_float 1 +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#define GL_DEPTH32F_STENCIL8_NV 0x8DAC +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glClearDepthdNV (GLdouble depth); +GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); +#endif +#endif /* GL_NV_depth_buffer_float */ + +#ifndef GL_NV_draw_vulkan_image +#define GL_NV_draw_vulkan_image 1 +typedef void (APIENTRY *GLVULKANPROCNV)(void); +typedef void (APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +typedef GLVULKANPROCNV (APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name); +typedef void (APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +GLAPI GLVULKANPROCNV APIENTRY glGetVkProcAddrNV (const GLchar *name); +GLAPI void APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore); +GLAPI void APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore); +GLAPI void APIENTRY glSignalVkFenceNV (GLuint64 vkFence); +#endif +#endif /* GL_NV_draw_vulkan_image */ + +#ifndef GL_NV_fill_rectangle +#define GL_NV_fill_rectangle 1 +#define GL_FILL_RECTANGLE_NV 0x933C +#endif /* GL_NV_fill_rectangle */ + +#ifndef GL_NV_fragment_coverage_to_color +#define GL_NV_fragment_coverage_to_color 1 +#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD +#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE +typedef void (APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentCoverageColorNV (GLuint color); +#endif +#endif /* GL_NV_fragment_coverage_to_color */ + +#ifndef GL_NV_fragment_shader_barycentric +#define GL_NV_fragment_shader_barycentric 1 +#endif /* GL_NV_fragment_shader_barycentric */ + +#ifndef GL_NV_fragment_shader_interlock +#define GL_NV_fragment_shader_interlock 1 +#endif /* GL_NV_fragment_shader_interlock */ + +#ifndef GL_NV_framebuffer_mixed_samples +#define GL_NV_framebuffer_mixed_samples 1 +#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#define GL_DEPTH_SAMPLES_NV 0x932D +#define GL_STENCIL_SAMPLES_NV 0x932E +#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F +#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 +#define GL_COVERAGE_MODULATION_NV 0x9332 +#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 +typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v); +typedef void (APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufSize, GLfloat *v); +typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v); +GLAPI void APIENTRY glGetCoverageModulationTableNV (GLsizei bufSize, GLfloat *v); +GLAPI void APIENTRY glCoverageModulationNV (GLenum components); +#endif +#endif /* GL_NV_framebuffer_mixed_samples */ + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_NV_framebuffer_multisample_coverage 1 +#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 +#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +#endif /* GL_NV_framebuffer_multisample_coverage */ + +#ifndef GL_NV_geometry_shader_passthrough +#define GL_NV_geometry_shader_passthrough 1 +#endif /* GL_NV_geometry_shader_passthrough */ + +#ifndef GL_NV_gpu_shader5 +#define GL_NV_gpu_shader5 1 +typedef khronos_int64_t GLint64EXT; +#define GL_INT64_NV 0x140E +#define GL_UNSIGNED_INT64_NV 0x140F +#define GL_INT8_NV 0x8FE0 +#define GL_INT8_VEC2_NV 0x8FE1 +#define GL_INT8_VEC3_NV 0x8FE2 +#define GL_INT8_VEC4_NV 0x8FE3 +#define GL_INT16_NV 0x8FE4 +#define GL_INT16_VEC2_NV 0x8FE5 +#define GL_INT16_VEC3_NV 0x8FE6 +#define GL_INT16_VEC4_NV 0x8FE7 +#define GL_INT64_VEC2_NV 0x8FE9 +#define GL_INT64_VEC3_NV 0x8FEA +#define GL_INT64_VEC4_NV 0x8FEB +#define GL_UNSIGNED_INT8_NV 0x8FEC +#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +#define GL_UNSIGNED_INT16_NV 0x8FF0 +#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); +GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); +GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif +#endif /* GL_NV_gpu_shader5 */ + +#ifndef GL_NV_internalformat_sample_query +#define GL_NV_internalformat_sample_query 1 +#define GL_MULTISAMPLES_NV 0x9371 +#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 +#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 +#define GL_CONFORMANT_NV 0x9374 +typedef void (APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params); +#endif +#endif /* GL_NV_internalformat_sample_query */ + +#ifndef GL_NV_memory_attachment +#define GL_NV_memory_attachment 1 +#define GL_ATTACHED_MEMORY_OBJECT_NV 0x95A4 +#define GL_ATTACHED_MEMORY_OFFSET_NV 0x95A5 +#define GL_MEMORY_ATTACHABLE_ALIGNMENT_NV 0x95A6 +#define GL_MEMORY_ATTACHABLE_SIZE_NV 0x95A7 +#define GL_MEMORY_ATTACHABLE_NV 0x95A8 +#define GL_DETACHED_MEMORY_INCARNATION_NV 0x95A9 +#define GL_DETACHED_TEXTURES_NV 0x95AA +#define GL_DETACHED_BUFFERS_NV 0x95AB +#define GL_MAX_DETACHED_TEXTURES_NV 0x95AC +#define GL_MAX_DETACHED_BUFFERS_NV 0x95AD +typedef void (APIENTRYP PFNGLGETMEMORYOBJECTDETACHEDRESOURCESUIVNVPROC) (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params); +typedef void (APIENTRYP PFNGLRESETMEMORYOBJECTPARAMETERNVPROC) (GLuint memory, GLenum pname); +typedef void (APIENTRYP PFNGLTEXATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLBUFFERATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTUREATTACHMEMORYNVPROC) (GLuint texture, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLNAMEDBUFFERATTACHMEMORYNVPROC) (GLuint buffer, GLuint memory, GLuint64 offset); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetMemoryObjectDetachedResourcesuivNV (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params); +GLAPI void APIENTRY glResetMemoryObjectParameterNV (GLuint memory, GLenum pname); +GLAPI void APIENTRY glTexAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glBufferAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureAttachMemoryNV (GLuint texture, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glNamedBufferAttachMemoryNV (GLuint buffer, GLuint memory, GLuint64 offset); +#endif +#endif /* GL_NV_memory_attachment */ + +#ifndef GL_NV_memory_object_sparse +#define GL_NV_memory_object_sparse 1 +typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTMEMNVPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTMEMNVPROC) (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTMEMNVPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTMEMNVPROC) (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferPageCommitmentMemNV (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +GLAPI void APIENTRY glTexPageCommitmentMemNV (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentMemNV (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +GLAPI void APIENTRY glTexturePageCommitmentMemNV (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +#endif +#endif /* GL_NV_memory_object_sparse */ + +#ifndef GL_NV_mesh_shader +#define GL_NV_mesh_shader 1 +#define GL_MESH_SHADER_NV 0x9559 +#define GL_TASK_SHADER_NV 0x955A +#define GL_MAX_MESH_UNIFORM_BLOCKS_NV 0x8E60 +#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_NV 0x8E61 +#define GL_MAX_MESH_IMAGE_UNIFORMS_NV 0x8E62 +#define GL_MAX_MESH_UNIFORM_COMPONENTS_NV 0x8E63 +#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV 0x8E64 +#define GL_MAX_MESH_ATOMIC_COUNTERS_NV 0x8E65 +#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_NV 0x8E66 +#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV 0x8E67 +#define GL_MAX_TASK_UNIFORM_BLOCKS_NV 0x8E68 +#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_NV 0x8E69 +#define GL_MAX_TASK_IMAGE_UNIFORMS_NV 0x8E6A +#define GL_MAX_TASK_UNIFORM_COMPONENTS_NV 0x8E6B +#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV 0x8E6C +#define GL_MAX_TASK_ATOMIC_COUNTERS_NV 0x8E6D +#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_NV 0x8E6E +#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV 0x8E6F +#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_NV 0x95A2 +#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_NV 0x95A3 +#define GL_MAX_MESH_TOTAL_MEMORY_SIZE_NV 0x9536 +#define GL_MAX_TASK_TOTAL_MEMORY_SIZE_NV 0x9537 +#define GL_MAX_MESH_OUTPUT_VERTICES_NV 0x9538 +#define GL_MAX_MESH_OUTPUT_PRIMITIVES_NV 0x9539 +#define GL_MAX_TASK_OUTPUT_COUNT_NV 0x953A +#define GL_MAX_DRAW_MESH_TASKS_COUNT_NV 0x953D +#define GL_MAX_MESH_VIEWS_NV 0x9557 +#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV 0x92DF +#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV 0x9543 +#define GL_MAX_MESH_WORK_GROUP_SIZE_NV 0x953B +#define GL_MAX_TASK_WORK_GROUP_SIZE_NV 0x953C +#define GL_MESH_WORK_GROUP_SIZE_NV 0x953E +#define GL_TASK_WORK_GROUP_SIZE_NV 0x953F +#define GL_MESH_VERTICES_OUT_NV 0x9579 +#define GL_MESH_PRIMITIVES_OUT_NV 0x957A +#define GL_MESH_OUTPUT_TYPE_NV 0x957B +#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV 0x959C +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV 0x959D +#define GL_REFERENCED_BY_MESH_SHADER_NV 0x95A0 +#define GL_REFERENCED_BY_TASK_SHADER_NV 0x95A1 +#define GL_MESH_SHADER_BIT_NV 0x00000040 +#define GL_TASK_SHADER_BIT_NV 0x00000080 +#define GL_MESH_SUBROUTINE_NV 0x957C +#define GL_TASK_SUBROUTINE_NV 0x957D +#define GL_MESH_SUBROUTINE_UNIFORM_NV 0x957E +#define GL_TASK_SUBROUTINE_UNIFORM_NV 0x957F +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV 0x959E +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV 0x959F +typedef void (APIENTRYP PFNGLDRAWMESHTASKSNVPROC) (GLuint first, GLuint count); +typedef void (APIENTRYP PFNGLDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect); +typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTNVPROC) (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshTasksNV (GLuint first, GLuint count); +GLAPI void APIENTRY glDrawMeshTasksIndirectNV (GLintptr indirect); +GLAPI void APIENTRY glMultiDrawMeshTasksIndirectNV (GLintptr indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawMeshTasksIndirectCountNV (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#endif +#endif /* GL_NV_mesh_shader */ + +#ifndef GL_NV_path_rendering +#define GL_NV_path_rendering 1 +#define GL_PATH_FORMAT_SVG_NV 0x9070 +#define GL_PATH_FORMAT_PS_NV 0x9071 +#define GL_STANDARD_FONT_NAME_NV 0x9072 +#define GL_SYSTEM_FONT_NAME_NV 0x9073 +#define GL_FILE_NAME_NV 0x9074 +#define GL_PATH_STROKE_WIDTH_NV 0x9075 +#define GL_PATH_END_CAPS_NV 0x9076 +#define GL_PATH_INITIAL_END_CAP_NV 0x9077 +#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 +#define GL_PATH_JOIN_STYLE_NV 0x9079 +#define GL_PATH_MITER_LIMIT_NV 0x907A +#define GL_PATH_DASH_CAPS_NV 0x907B +#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C +#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D +#define GL_PATH_DASH_OFFSET_NV 0x907E +#define GL_PATH_CLIENT_LENGTH_NV 0x907F +#define GL_PATH_FILL_MODE_NV 0x9080 +#define GL_PATH_FILL_MASK_NV 0x9081 +#define GL_PATH_FILL_COVER_MODE_NV 0x9082 +#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 +#define GL_PATH_STROKE_MASK_NV 0x9084 +#define GL_COUNT_UP_NV 0x9088 +#define GL_COUNT_DOWN_NV 0x9089 +#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A +#define GL_CONVEX_HULL_NV 0x908B +#define GL_BOUNDING_BOX_NV 0x908D +#define GL_TRANSLATE_X_NV 0x908E +#define GL_TRANSLATE_Y_NV 0x908F +#define GL_TRANSLATE_2D_NV 0x9090 +#define GL_TRANSLATE_3D_NV 0x9091 +#define GL_AFFINE_2D_NV 0x9092 +#define GL_AFFINE_3D_NV 0x9094 +#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 +#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 +#define GL_UTF8_NV 0x909A +#define GL_UTF16_NV 0x909B +#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C +#define GL_PATH_COMMAND_COUNT_NV 0x909D +#define GL_PATH_COORD_COUNT_NV 0x909E +#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F +#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 +#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 +#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 +#define GL_SQUARE_NV 0x90A3 +#define GL_ROUND_NV 0x90A4 +#define GL_TRIANGULAR_NV 0x90A5 +#define GL_BEVEL_NV 0x90A6 +#define GL_MITER_REVERT_NV 0x90A7 +#define GL_MITER_TRUNCATE_NV 0x90A8 +#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 +#define GL_USE_MISSING_GLYPH_NV 0x90AA +#define GL_PATH_ERROR_POSITION_NV 0x90AB +#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD +#define GL_ADJACENT_PAIRS_NV 0x90AE +#define GL_FIRST_TO_REST_NV 0x90AF +#define GL_PATH_GEN_MODE_NV 0x90B0 +#define GL_PATH_GEN_COEFF_NV 0x90B1 +#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 +#define GL_PATH_STENCIL_FUNC_NV 0x90B7 +#define GL_PATH_STENCIL_REF_NV 0x90B8 +#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 +#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD +#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE +#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF +#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 +#define GL_MOVE_TO_RESETS_NV 0x90B5 +#define GL_MOVE_TO_CONTINUES_NV 0x90B6 +#define GL_CLOSE_PATH_NV 0x00 +#define GL_MOVE_TO_NV 0x02 +#define GL_RELATIVE_MOVE_TO_NV 0x03 +#define GL_LINE_TO_NV 0x04 +#define GL_RELATIVE_LINE_TO_NV 0x05 +#define GL_HORIZONTAL_LINE_TO_NV 0x06 +#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 +#define GL_VERTICAL_LINE_TO_NV 0x08 +#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 +#define GL_QUADRATIC_CURVE_TO_NV 0x0A +#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B +#define GL_CUBIC_CURVE_TO_NV 0x0C +#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D +#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E +#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F +#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 +#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 +#define GL_SMALL_CCW_ARC_TO_NV 0x12 +#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 +#define GL_SMALL_CW_ARC_TO_NV 0x14 +#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 +#define GL_LARGE_CCW_ARC_TO_NV 0x16 +#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 +#define GL_LARGE_CW_ARC_TO_NV 0x18 +#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 +#define GL_RESTART_PATH_NV 0xF0 +#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 +#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 +#define GL_RECT_NV 0xF6 +#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 +#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA +#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC +#define GL_ARC_TO_NV 0xFE +#define GL_RELATIVE_ARC_TO_NV 0xFF +#define GL_BOLD_BIT_NV 0x01 +#define GL_ITALIC_BIT_NV 0x02 +#define GL_GLYPH_WIDTH_BIT_NV 0x01 +#define GL_GLYPH_HEIGHT_BIT_NV 0x02 +#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 +#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 +#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 +#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 +#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 +#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 +#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 +#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 +#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 +#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 +#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 +#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 +#define GL_FONT_ASCENDER_BIT_NV 0x00200000 +#define GL_FONT_DESCENDER_BIT_NV 0x00400000 +#define GL_FONT_HEIGHT_BIT_NV 0x00800000 +#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 +#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 +#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 +#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 +#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 +#define GL_ROUNDED_RECT_NV 0xE8 +#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 +#define GL_ROUNDED_RECT2_NV 0xEA +#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB +#define GL_ROUNDED_RECT4_NV 0xEC +#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED +#define GL_ROUNDED_RECT8_NV 0xEE +#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF +#define GL_RELATIVE_RECT_NV 0xF7 +#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 +#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 +#define GL_FONT_UNAVAILABLE_NV 0x936A +#define GL_FONT_UNINTELLIGIBLE_NV 0x936B +#define GL_CONIC_CURVE_TO_NV 0x1A +#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B +#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 +#define GL_STANDARD_FONT_FORMAT_NV 0x936C +#define GL_PATH_PROJECTION_NV 0x1701 +#define GL_PATH_MODELVIEW_NV 0x1700 +#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 +#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 +#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 +#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 +#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 +#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 +#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 +#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 +#define GL_FRAGMENT_INPUT_NV 0x936D +typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path); +typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString); +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); +typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); +typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); +typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); +typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); +typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); +typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); +typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); +typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); +typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); +typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); +typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); +typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); +typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); +typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +typedef void (APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef GLenum (APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range); +GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range); +GLAPI GLboolean APIENTRY glIsPathNV (GLuint path); +GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString); +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); +GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); +GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); +GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); +GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); +GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); +GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); +GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); +GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); +GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func); +GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); +GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); +GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); +GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); +GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); +GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); +GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); +GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); +GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); +GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +GLAPI void APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +GLAPI void APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +GLAPI void APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI GLenum APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI void APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +GLAPI void APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params); +#endif +#endif /* GL_NV_path_rendering */ + +#ifndef GL_NV_path_rendering_shared_edge +#define GL_NV_path_rendering_shared_edge 1 +#define GL_SHARED_EDGE_NV 0xC0 +#endif /* GL_NV_path_rendering_shared_edge */ + +#ifndef GL_NV_primitive_shading_rate +#define GL_NV_primitive_shading_rate 1 +#define GL_SHADING_RATE_IMAGE_PER_PRIMITIVE_NV 0x95B1 +#define GL_SHADING_RATE_IMAGE_PALETTE_COUNT_NV 0x95B2 +#endif /* GL_NV_primitive_shading_rate */ + +#ifndef GL_NV_representative_fragment_test +#define GL_NV_representative_fragment_test 1 +#define GL_REPRESENTATIVE_FRAGMENT_TEST_NV 0x937F +#endif /* GL_NV_representative_fragment_test */ + +#ifndef GL_NV_sample_locations +#define GL_NV_sample_locations 1 +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 +#define GL_SAMPLE_LOCATION_NV 0x8E50 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 +typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glResolveDepthValuesNV (void); +#endif +#endif /* GL_NV_sample_locations */ + +#ifndef GL_NV_sample_mask_override_coverage +#define GL_NV_sample_mask_override_coverage 1 +#endif /* GL_NV_sample_mask_override_coverage */ + +#ifndef GL_NV_scissor_exclusive +#define GL_NV_scissor_exclusive 1 +#define GL_SCISSOR_TEST_EXCLUSIVE_NV 0x9555 +#define GL_SCISSOR_BOX_EXCLUSIVE_NV 0x9556 +typedef void (APIENTRYP PFNGLSCISSOREXCLUSIVENVPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLSCISSOREXCLUSIVEARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glScissorExclusiveNV (GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glScissorExclusiveArrayvNV (GLuint first, GLsizei count, const GLint *v); +#endif +#endif /* GL_NV_scissor_exclusive */ + +#ifndef GL_NV_shader_atomic_counters +#define GL_NV_shader_atomic_counters 1 +#endif /* GL_NV_shader_atomic_counters */ + +#ifndef GL_NV_shader_atomic_float +#define GL_NV_shader_atomic_float 1 +#endif /* GL_NV_shader_atomic_float */ + +#ifndef GL_NV_shader_atomic_float64 +#define GL_NV_shader_atomic_float64 1 +#endif /* GL_NV_shader_atomic_float64 */ + +#ifndef GL_NV_shader_atomic_fp16_vector +#define GL_NV_shader_atomic_fp16_vector 1 +#endif /* GL_NV_shader_atomic_fp16_vector */ + +#ifndef GL_NV_shader_atomic_int64 +#define GL_NV_shader_atomic_int64 1 +#endif /* GL_NV_shader_atomic_int64 */ + +#ifndef GL_NV_shader_buffer_load +#define GL_NV_shader_buffer_load 1 +#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D +#define GL_GPU_ADDRESS_NV 0x8F34 +#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 +typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); +typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); +typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); +typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); +typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); +GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); +GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); +GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); +GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); +GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); +GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); +GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); +GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); +GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); +GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif +#endif /* GL_NV_shader_buffer_load */ + +#ifndef GL_NV_shader_buffer_store +#define GL_NV_shader_buffer_store 1 +#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 +#endif /* GL_NV_shader_buffer_store */ + +#ifndef GL_NV_shader_subgroup_partitioned +#define GL_NV_shader_subgroup_partitioned 1 +#define GL_SUBGROUP_FEATURE_PARTITIONED_BIT_NV 0x00000100 +#endif /* GL_NV_shader_subgroup_partitioned */ + +#ifndef GL_NV_shader_texture_footprint +#define GL_NV_shader_texture_footprint 1 +#endif /* GL_NV_shader_texture_footprint */ + +#ifndef GL_NV_shader_thread_group +#define GL_NV_shader_thread_group 1 +#define GL_WARP_SIZE_NV 0x9339 +#define GL_WARPS_PER_SM_NV 0x933A +#define GL_SM_COUNT_NV 0x933B +#endif /* GL_NV_shader_thread_group */ + +#ifndef GL_NV_shader_thread_shuffle +#define GL_NV_shader_thread_shuffle 1 +#endif /* GL_NV_shader_thread_shuffle */ + +#ifndef GL_NV_shading_rate_image +#define GL_NV_shading_rate_image 1 +#define GL_SHADING_RATE_IMAGE_NV 0x9563 +#define GL_SHADING_RATE_NO_INVOCATIONS_NV 0x9564 +#define GL_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV 0x9565 +#define GL_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV 0x9566 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV 0x9567 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV 0x9568 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV 0x9569 +#define GL_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV 0x956A +#define GL_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV 0x956B +#define GL_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV 0x956C +#define GL_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV 0x956D +#define GL_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV 0x956E +#define GL_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV 0x956F +#define GL_SHADING_RATE_IMAGE_BINDING_NV 0x955B +#define GL_SHADING_RATE_IMAGE_TEXEL_WIDTH_NV 0x955C +#define GL_SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV 0x955D +#define GL_SHADING_RATE_IMAGE_PALETTE_SIZE_NV 0x955E +#define GL_MAX_COARSE_FRAGMENT_SAMPLES_NV 0x955F +#define GL_SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV 0x95AE +#define GL_SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV 0x95AF +#define GL_SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV 0x95B0 +typedef void (APIENTRYP PFNGLBINDSHADINGRATEIMAGENVPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLGETSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint entry, GLenum *rate); +typedef void (APIENTRYP PFNGLGETSHADINGRATESAMPLELOCATIONIVNVPROC) (GLenum rate, GLuint samples, GLuint index, GLint *location); +typedef void (APIENTRYP PFNGLSHADINGRATEIMAGEBARRIERNVPROC) (GLboolean synchronize); +typedef void (APIENTRYP PFNGLSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates); +typedef void (APIENTRYP PFNGLSHADINGRATESAMPLEORDERNVPROC) (GLenum order); +typedef void (APIENTRYP PFNGLSHADINGRATESAMPLEORDERCUSTOMNVPROC) (GLenum rate, GLuint samples, const GLint *locations); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindShadingRateImageNV (GLuint texture); +GLAPI void APIENTRY glGetShadingRateImagePaletteNV (GLuint viewport, GLuint entry, GLenum *rate); +GLAPI void APIENTRY glGetShadingRateSampleLocationivNV (GLenum rate, GLuint samples, GLuint index, GLint *location); +GLAPI void APIENTRY glShadingRateImageBarrierNV (GLboolean synchronize); +GLAPI void APIENTRY glShadingRateImagePaletteNV (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates); +GLAPI void APIENTRY glShadingRateSampleOrderNV (GLenum order); +GLAPI void APIENTRY glShadingRateSampleOrderCustomNV (GLenum rate, GLuint samples, const GLint *locations); +#endif +#endif /* GL_NV_shading_rate_image */ + +#ifndef GL_NV_stereo_view_rendering +#define GL_NV_stereo_view_rendering 1 +#endif /* GL_NV_stereo_view_rendering */ + +#ifndef GL_NV_texture_barrier +#define GL_NV_texture_barrier 1 +typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureBarrierNV (void); +#endif +#endif /* GL_NV_texture_barrier */ + +#ifndef GL_NV_texture_rectangle_compressed +#define GL_NV_texture_rectangle_compressed 1 +#endif /* GL_NV_texture_rectangle_compressed */ + +#ifndef GL_NV_uniform_buffer_unified_memory +#define GL_NV_uniform_buffer_unified_memory 1 +#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E +#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F +#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370 +#endif /* GL_NV_uniform_buffer_unified_memory */ + +#ifndef GL_NV_vertex_attrib_integer_64bit +#define GL_NV_vertex_attrib_integer_64bit 1 +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); +GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); +GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +#endif +#endif /* GL_NV_vertex_attrib_integer_64bit */ + +#ifndef GL_NV_vertex_buffer_unified_memory +#define GL_NV_vertex_buffer_unified_memory 1 +#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E +#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F +#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 +#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 +#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 +#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 +#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 +#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 +#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 +#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 +#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 +#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 +#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A +#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B +#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C +#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D +#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E +#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F +#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 +#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 +#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 +#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 +#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 +#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 +typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); +GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); +#endif +#endif /* GL_NV_vertex_buffer_unified_memory */ + +#ifndef GL_NV_viewport_array2 +#define GL_NV_viewport_array2 1 +#endif /* GL_NV_viewport_array2 */ + +#ifndef GL_NV_viewport_swizzle +#define GL_NV_viewport_swizzle 1 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 +#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 +#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 +#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A +#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B +typedef void (APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#endif +#endif /* GL_NV_viewport_swizzle */ + +#ifndef GL_OVR_multiview +#define GL_OVR_multiview 1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 +#define GL_MAX_VIEWS_OVR 0x9631 +#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#endif +#endif /* GL_OVR_multiview */ + +#ifndef GL_OVR_multiview2 +#define GL_OVR_multiview2 1 +#endif /* GL_OVR_multiview2 */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GL/glext.h b/opengles/api/GL/glext.h new file mode 100644 index 0000000000..4a4a5cea64 --- /dev/null +++ b/opengles/api/GL/glext.h @@ -0,0 +1,12866 @@ +#ifndef __gl_glext_h_ +#define __gl_glext_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +#define GL_GLEXT_VERSION 20210107 + +#include <KHR/khrplatform.h> + +/* Generated C header for: + * API: gl + * Profile: compatibility + * Versions considered: .* + * Versions emitted: 1\.[2-9]|[234]\.[0-9] + * Default extensions included: gl + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_RESCALE_NORMAL 0x803A +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +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); +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); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +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); +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); +GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif +#endif /* GL_VERSION_1_2 */ + +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +#define GL_MULTISAMPLE_BIT 0x20000000 +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_SUBTRACT 0x84E7 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTexture (GLenum texture); +GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +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); +GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img); +GLAPI void APIENTRY glClientActiveTexture (GLenum texture); +GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s); +GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s); +GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s); +GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s); +GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); +GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t); +GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); +GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); +GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); +GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); +GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); +GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); +GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m); +GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m); +GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m); +GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m); +#endif +#endif /* GL_VERSION_1_3 */ + +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_FOG_COORDINATE_SOURCE 0x8450 +#define GL_FOG_COORDINATE 0x8451 +#define GL_FRAGMENT_DEPTH 0x8452 +#define GL_CURRENT_FOG_COORDINATE 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +#define GL_FOG_COORDINATE_ARRAY 0x8457 +#define GL_COLOR_SUM 0x8458 +#define GL_CURRENT_SECONDARY_COLOR 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +#define GL_SECONDARY_COLOR_ARRAY 0x845E +#define GL_TEXTURE_FILTER_CONTROL 0x8500 +#define GL_DEPTH_TEXTURE_MODE 0x884B +#define GL_COMPARE_R_TO_TEXTURE 0x884E +#define GL_BLEND_COLOR 0x8005 +#define GL_BLEND_EQUATION 0x8009 +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_FUNC_SUBTRACT 0x800A +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); +GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); +GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); +GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); +GLAPI void APIENTRY glFogCoordf (GLfloat coord); +GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord); +GLAPI void APIENTRY glFogCoordd (GLdouble coord); +GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord); +GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); +GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v); +GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); +GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v); +GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); +GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v); +GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue); +GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v); +GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); +GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v); +GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); +GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v); +GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); +GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v); +GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); +GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v); +GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2iv (const GLint *v); +GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2sv (const GLshort *v); +GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3iv (const GLint *v); +GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3sv (const GLshort *v); +GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void APIENTRY glBlendEquation (GLenum mode); +#endif +#endif /* GL_VERSION_1_4 */ + +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#define GL_SRC1_ALPHA 0x8589 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +#define GL_FOG_COORD_SRC 0x8450 +#define GL_FOG_COORD 0x8451 +#define GL_CURRENT_FOG_COORD 0x8453 +#define GL_FOG_COORD_ARRAY_TYPE 0x8454 +#define GL_FOG_COORD_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORD_ARRAY_POINTER 0x8456 +#define GL_FOG_COORD_ARRAY 0x8457 +#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D +#define GL_SRC0_RGB 0x8580 +#define GL_SRC1_RGB 0x8581 +#define GL_SRC2_RGB 0x8582 +#define GL_SRC0_ALPHA 0x8588 +#define GL_SRC2_ALPHA 0x858A +typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data); +typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsQuery (GLuint id); +GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); +GLAPI void APIENTRY glEndQuery (GLenum target); +GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); +GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data); +GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access); +GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); +GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); +#endif +#endif /* GL_VERSION_1_5 */ + +#ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 +typedef char GLchar; +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 +#define GL_POINT_SPRITE 0x8861 +#define GL_COORD_REPLACE 0x8862 +#define GL_MAX_TEXTURE_COORDS 0x8871 +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GLAPI void APIENTRY glCompileShader (GLuint shader); +GLAPI GLuint APIENTRY glCreateProgram (void); +GLAPI GLuint APIENTRY glCreateShader (GLenum type); +GLAPI void APIENTRY glDeleteProgram (GLuint program); +GLAPI void APIENTRY glDeleteShader (GLuint shader); +GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); +GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); +GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GLAPI GLboolean APIENTRY glIsProgram (GLuint program); +GLAPI GLboolean APIENTRY glIsShader (GLuint shader); +GLAPI void APIENTRY glLinkProgram (GLuint program); +GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GLAPI void APIENTRY glUseProgram (GLuint program); +GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); +GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); +GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glValidateProgram (GLuint program); +GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +#endif +#endif /* GL_VERSION_2_0 */ + +#ifndef GL_VERSION_2_1 +#define GL_VERSION_2_1 1 +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F +#define GL_SLUMINANCE_ALPHA 0x8C44 +#define GL_SLUMINANCE8_ALPHA8 0x8C45 +#define GL_SLUMINANCE 0x8C46 +#define GL_SLUMINANCE8 0x8C47 +#define GL_COMPRESSED_SLUMINANCE 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif +#endif /* GL_VERSION_2_1 */ + +#ifndef GL_VERSION_3_0 +#define GL_VERSION_3_0 1 +typedef khronos_uint16_t GLhalf; +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_CLIP_DISTANCE0 0x3000 +#define GL_CLIP_DISTANCE1 0x3001 +#define GL_CLIP_DISTANCE2 0x3002 +#define GL_CLIP_DISTANCE3 0x3003 +#define GL_CLIP_DISTANCE4 0x3004 +#define GL_CLIP_DISTANCE5 0x3005 +#define GL_CLIP_DISTANCE6 0x3006 +#define GL_CLIP_DISTANCE7 0x3007 +#define GL_MAX_CLIP_DISTANCES 0x0D32 +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_CONTEXT_FLAGS 0x821E +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RG 0x8226 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_FIXED_ONLY 0x891D +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_BGR_INTEGER 0x8D9A +#define GL_BGRA_INTEGER 0x8D9B +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_STENCIL_INDEX1 0x8D46 +#define GL_STENCIL_INDEX4 0x8D47 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_STENCIL_INDEX16 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_INDEX 0x8222 +#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE 0x8C15 +#define GL_FRAMEBUFFER_SRGB 0x8DB9 +#define GL_HALF_FLOAT 0x140B +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#define GL_COMPRESSED_RED_RGTC1 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +#define GL_COMPRESSED_RG_RGTC2 0x8DBD +#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_R16 0x822A +#define GL_RG8 0x822B +#define GL_RG16 0x822C +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#define GL_CLAMP_VERTEX_COLOR 0x891A +#define GL_CLAMP_FRAGMENT_COLOR 0x891B +#define GL_ALPHA_INTEGER 0x8D97 +typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); +GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); +GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedback (void); +GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); +GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRender (void); +GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); +GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); +GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); +GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); +GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); +GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); +GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index); +GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); +GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); +GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateMipmap (GLenum target); +GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glBindVertexArray (GLuint array); +GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); +GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); +#endif +#endif /* GL_VERSION_3_0 */ + +#ifndef GL_VERSION_3_1 +#define GL_VERSION_3_1 1 +#define GL_SAMPLER_2D_RECT 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_INT_SAMPLER_2D_RECT 0x8DCD +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM 0x8F98 +#define GL_RG16_SNORM 0x8F99 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGBA16_SNORM 0x8F9B +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFFu +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); +typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); +GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#endif +#endif /* GL_VERSION_3_1 */ + +#ifndef GL_VERSION_3_2 +#define GL_VERSION_3_2 1 +typedef struct __GLsync *GLsync; +typedef khronos_uint64_t GLuint64; +typedef khronos_int64_t GLint64; +#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_PROGRAM_POINT_SIZE 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_CONTEXT_PROFILE_MASK 0x9126 +#define GL_DEPTH_CLAMP 0x864F +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION 0x8E4D +#define GL_LAST_VERTEX_CONVENTION 0x8E4E +#define GL_PROVOKING_VERTEX 0x8E4F +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_INTEGER_SAMPLES 0x9110 +typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); +typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); +typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); +GLAPI void APIENTRY glProvokingVertex (GLenum mode); +GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +GLAPI GLboolean APIENTRY glIsSync (GLsync sync); +GLAPI void APIENTRY glDeleteSync (GLsync sync); +GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); +GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); +#endif +#endif /* GL_VERSION_3_2 */ + +#ifndef GL_VERSION_3_3 +#define GL_VERSION_3_3 1 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +#define GL_SRC1_COLOR 0x88F9 +#define GL_ONE_MINUS_SRC1_COLOR 0x88FA +#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#define GL_SAMPLER_BINDING 0x8919 +#define GL_RGB10_A2UI 0x906F +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +#define GL_TIME_ELAPSED 0x88BF +#define GL_TIMESTAMP 0x8E28 +#define GL_INT_2_10_10_10_REV 0x8D9F +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); +GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); +GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); +GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); +GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); +GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); +GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); +GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color); +GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color); +GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color); +GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color); +#endif +#endif /* GL_VERSION_3_3 */ + +#ifndef GL_VERSION_4_0 +#define GL_VERSION_4_0 1 +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +#define GL_MAX_VERTEX_STREAMS 0x8E71 +#define GL_DOUBLE_VEC2 0x8FFC +#define GL_DOUBLE_VEC3 0x8FFD +#define GL_DOUBLE_VEC4 0x8FFE +#define GL_DOUBLE_MAT2 0x8F46 +#define GL_DOUBLE_MAT3 0x8F47 +#define GL_DOUBLE_MAT4 0x8F48 +#define GL_DOUBLE_MAT2x3 0x8F49 +#define GL_DOUBLE_MAT2x4 0x8F4A +#define GL_DOUBLE_MAT3x2 0x8F4B +#define GL_DOUBLE_MAT3x4 0x8F4C +#define GL_DOUBLE_MAT4x2 0x8F4D +#define GL_DOUBLE_MAT4x3 0x8F4E +#define GL_ACTIVE_SUBROUTINES 0x8DE5 +#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +#define GL_MAX_SUBROUTINES 0x8DE7 +#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +#define GL_COMPATIBLE_SUBROUTINES 0x8E4B +#define GL_PATCHES 0x000E +#define GL_PATCH_VERTICES 0x8E72 +#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +#define GL_TESS_GEN_MODE 0x8E76 +#define GL_TESS_GEN_SPACING 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +#define GL_TESS_GEN_POINT_MODE 0x8E79 +#define GL_ISOLINES 0x8E7A +#define GL_FRACTIONAL_ODD 0x8E7B +#define GL_FRACTIONAL_EVEN 0x8E7C +#define GL_MAX_PATCH_VERTICES 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +#define GL_TESS_EVALUATION_SHADER 0x8E87 +#define GL_TESS_CONTROL_SHADER 0x8E88 +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); +typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); +typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); +typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); +typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); +typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShading (GLfloat value); +GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); +GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); +GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); +GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); +GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); +GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); +GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); +GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); +GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); +GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); +GLAPI void APIENTRY glPauseTransformFeedback (void); +GLAPI void APIENTRY glResumeTransformFeedback (void); +GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); +GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); +GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); +GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); +GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); +#endif +#endif /* GL_VERSION_4_0 */ + +#ifndef GL_VERSION_4_1 +#define GL_VERSION_4_1 1 +#define GL_FIXED 0x140C +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_RGB565 0x8D62 +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_GEOMETRY_SHADER_BIT 0x00000004 +#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#define GL_MAX_VIEWPORTS 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE 0x825D +#define GL_LAYER_PROVOKING_VERTEX 0x825E +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +#define GL_UNDEFINED_VERTEX 0x8260 +typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); +typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); +typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); +typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f); +typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReleaseShaderCompiler (void); +GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GLAPI void APIENTRY glClearDepthf (GLfloat d); +GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); +GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); +GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); +GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); +GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); +GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); +GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f); +GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); +#endif +#endif /* GL_VERSION_4_1 */ + +#ifndef GL_VERSION_4_2 +#define GL_VERSION_4_2 1 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 +#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 +#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 +#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A +#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B +#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C +#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D +#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC +#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB +#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA +#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +#define GL_COMMAND_BARRIER_BIT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +#define GL_ALL_BARRIER_BITS 0xFFFFFFFF +#define GL_MAX_IMAGE_UNITS 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 +#define GL_IMAGE_BINDING_NAME 0x8F3A +#define GL_IMAGE_BINDING_LEVEL 0x8F3B +#define GL_IMAGE_BINDING_LAYERED 0x8F3C +#define GL_IMAGE_BINDING_LAYER 0x8F3D +#define GL_IMAGE_BINDING_ACCESS 0x8F3E +#define GL_IMAGE_1D 0x904C +#define GL_IMAGE_2D 0x904D +#define GL_IMAGE_3D 0x904E +#define GL_IMAGE_2D_RECT 0x904F +#define GL_IMAGE_CUBE 0x9050 +#define GL_IMAGE_BUFFER 0x9051 +#define GL_IMAGE_1D_ARRAY 0x9052 +#define GL_IMAGE_2D_ARRAY 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 +#define GL_INT_IMAGE_1D 0x9057 +#define GL_INT_IMAGE_2D 0x9058 +#define GL_INT_IMAGE_3D 0x9059 +#define GL_INT_IMAGE_2D_RECT 0x905A +#define GL_INT_IMAGE_CUBE 0x905B +#define GL_INT_IMAGE_BUFFER 0x905C +#define GL_INT_IMAGE_1D_ARRAY 0x905D +#define GL_INT_IMAGE_2D_ARRAY 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C +#define GL_MAX_IMAGE_SAMPLES 0x906D +#define GL_IMAGE_BINDING_FORMAT 0x906E +#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); +typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params); +GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); +GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount); +GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +#endif +#endif /* GL_VERSION_4_2 */ + +#ifndef GL_VERSION_4_3 +#define GL_VERSION_4_3 1 +typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 +#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED +#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +#define GL_COMPUTE_SHADER_BIT 0x00000020 +#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +#define GL_DEBUG_SOURCE_API 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION 0x824A +#define GL_DEBUG_SOURCE_OTHER 0x824B +#define GL_DEBUG_TYPE_ERROR 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +#define GL_DEBUG_TYPE_PORTABILITY 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +#define GL_DEBUG_TYPE_OTHER 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES 0x9145 +#define GL_DEBUG_SEVERITY_HIGH 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +#define GL_DEBUG_SEVERITY_LOW 0x9148 +#define GL_DEBUG_TYPE_MARKER 0x8268 +#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +#define GL_DEBUG_TYPE_POP_GROUP 0x826A +#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +#define GL_BUFFER 0x82E0 +#define GL_SHADER 0x82E1 +#define GL_PROGRAM 0x82E2 +#define GL_QUERY 0x82E3 +#define GL_PROGRAM_PIPELINE 0x82E4 +#define GL_SAMPLER 0x82E6 +#define GL_MAX_LABEL_LENGTH 0x82E8 +#define GL_DEBUG_OUTPUT 0x92E0 +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +#define GL_MAX_UNIFORM_LOCATIONS 0x826E +#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +#define GL_INTERNALFORMAT_SUPPORTED 0x826F +#define GL_INTERNALFORMAT_PREFERRED 0x8270 +#define GL_INTERNALFORMAT_RED_SIZE 0x8271 +#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 +#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 +#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 +#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 +#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 +#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 +#define GL_INTERNALFORMAT_RED_TYPE 0x8278 +#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 +#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A +#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B +#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C +#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D +#define GL_MAX_WIDTH 0x827E +#define GL_MAX_HEIGHT 0x827F +#define GL_MAX_DEPTH 0x8280 +#define GL_MAX_LAYERS 0x8281 +#define GL_MAX_COMBINED_DIMENSIONS 0x8282 +#define GL_COLOR_COMPONENTS 0x8283 +#define GL_DEPTH_COMPONENTS 0x8284 +#define GL_STENCIL_COMPONENTS 0x8285 +#define GL_COLOR_RENDERABLE 0x8286 +#define GL_DEPTH_RENDERABLE 0x8287 +#define GL_STENCIL_RENDERABLE 0x8288 +#define GL_FRAMEBUFFER_RENDERABLE 0x8289 +#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A +#define GL_FRAMEBUFFER_BLEND 0x828B +#define GL_READ_PIXELS 0x828C +#define GL_READ_PIXELS_FORMAT 0x828D +#define GL_READ_PIXELS_TYPE 0x828E +#define GL_TEXTURE_IMAGE_FORMAT 0x828F +#define GL_TEXTURE_IMAGE_TYPE 0x8290 +#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 +#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 +#define GL_MIPMAP 0x8293 +#define GL_MANUAL_GENERATE_MIPMAP 0x8294 +#define GL_AUTO_GENERATE_MIPMAP 0x8295 +#define GL_COLOR_ENCODING 0x8296 +#define GL_SRGB_READ 0x8297 +#define GL_SRGB_WRITE 0x8298 +#define GL_FILTER 0x829A +#define GL_VERTEX_TEXTURE 0x829B +#define GL_TESS_CONTROL_TEXTURE 0x829C +#define GL_TESS_EVALUATION_TEXTURE 0x829D +#define GL_GEOMETRY_TEXTURE 0x829E +#define GL_FRAGMENT_TEXTURE 0x829F +#define GL_COMPUTE_TEXTURE 0x82A0 +#define GL_TEXTURE_SHADOW 0x82A1 +#define GL_TEXTURE_GATHER 0x82A2 +#define GL_TEXTURE_GATHER_SHADOW 0x82A3 +#define GL_SHADER_IMAGE_LOAD 0x82A4 +#define GL_SHADER_IMAGE_STORE 0x82A5 +#define GL_SHADER_IMAGE_ATOMIC 0x82A6 +#define GL_IMAGE_TEXEL_SIZE 0x82A7 +#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 +#define GL_IMAGE_PIXEL_FORMAT 0x82A9 +#define GL_IMAGE_PIXEL_TYPE 0x82AA +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF +#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 +#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 +#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 +#define GL_CLEAR_BUFFER 0x82B4 +#define GL_TEXTURE_VIEW 0x82B5 +#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 +#define GL_FULL_SUPPORT 0x82B7 +#define GL_CAVEAT_SUPPORT 0x82B8 +#define GL_IMAGE_CLASS_4_X_32 0x82B9 +#define GL_IMAGE_CLASS_2_X_32 0x82BA +#define GL_IMAGE_CLASS_1_X_32 0x82BB +#define GL_IMAGE_CLASS_4_X_16 0x82BC +#define GL_IMAGE_CLASS_2_X_16 0x82BD +#define GL_IMAGE_CLASS_1_X_16 0x82BE +#define GL_IMAGE_CLASS_4_X_8 0x82BF +#define GL_IMAGE_CLASS_2_X_8 0x82C0 +#define GL_IMAGE_CLASS_1_X_8 0x82C1 +#define GL_IMAGE_CLASS_11_11_10 0x82C2 +#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 +#define GL_VIEW_CLASS_128_BITS 0x82C4 +#define GL_VIEW_CLASS_96_BITS 0x82C5 +#define GL_VIEW_CLASS_64_BITS 0x82C6 +#define GL_VIEW_CLASS_48_BITS 0x82C7 +#define GL_VIEW_CLASS_32_BITS 0x82C8 +#define GL_VIEW_CLASS_24_BITS 0x82C9 +#define GL_VIEW_CLASS_16_BITS 0x82CA +#define GL_VIEW_CLASS_8_BITS 0x82CB +#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC +#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD +#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE +#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF +#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 +#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 +#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 +#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 +#define GL_UNIFORM 0x92E1 +#define GL_UNIFORM_BLOCK 0x92E2 +#define GL_PROGRAM_INPUT 0x92E3 +#define GL_PROGRAM_OUTPUT 0x92E4 +#define GL_BUFFER_VARIABLE 0x92E5 +#define GL_SHADER_STORAGE_BLOCK 0x92E6 +#define GL_VERTEX_SUBROUTINE 0x92E8 +#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 +#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA +#define GL_GEOMETRY_SUBROUTINE 0x92EB +#define GL_FRAGMENT_SUBROUTINE 0x92EC +#define GL_COMPUTE_SUBROUTINE 0x92ED +#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE +#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF +#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 +#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 +#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 +#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 +#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +#define GL_ACTIVE_RESOURCES 0x92F5 +#define GL_MAX_NAME_LENGTH 0x92F6 +#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 +#define GL_NAME_LENGTH 0x92F9 +#define GL_TYPE 0x92FA +#define GL_ARRAY_SIZE 0x92FB +#define GL_OFFSET 0x92FC +#define GL_BLOCK_INDEX 0x92FD +#define GL_ARRAY_STRIDE 0x92FE +#define GL_MATRIX_STRIDE 0x92FF +#define GL_IS_ROW_MAJOR 0x9300 +#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +#define GL_BUFFER_BINDING 0x9302 +#define GL_BUFFER_DATA_SIZE 0x9303 +#define GL_NUM_ACTIVE_VARIABLES 0x9304 +#define GL_ACTIVE_VARIABLES 0x9305 +#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +#define GL_LOCATION 0x930E +#define GL_LOCATION_INDEX 0x930F +#define GL_IS_PER_PATCH 0x92E7 +#define GL_SHADER_STORAGE_BUFFER 0x90D2 +#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 +#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 +#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +#define GL_TEXTURE_BUFFER_OFFSET 0x919D +#define GL_TEXTURE_BUFFER_SIZE 0x919E +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB +#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC +#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD +#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +#define GL_VERTEX_ATTRIB_BINDING 0x82D4 +#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +#define GL_VERTEX_BINDING_DIVISOR 0x82D6 +#define GL_VERTEX_BINDING_OFFSET 0x82D7 +#define GL_VERTEX_BINDING_STRIDE 0x82D8 +#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#define GL_VERTEX_BINDING_BUFFER 0x8F4F +#define GL_DISPLAY_LIST 0x82E7 +typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); +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); +typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 *params); +typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLint *params); +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); +typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); +typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect); +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); +GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 *params); +GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level); +GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer); +GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); +GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLint *params); +GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name); +GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); +GLAPI void APIENTRY glPopDebugGroup (void); +GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif +#endif /* GL_VERSION_4_3 */ + +#ifndef GL_VERSION_4_4 +#define GL_VERSION_4_4 1 +#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 +#define GL_TEXTURE_BUFFER_BINDING 0x8C2A +#define GL_MAP_PERSISTENT_BIT 0x0040 +#define GL_MAP_COHERENT_BIT 0x0080 +#define GL_DYNAMIC_STORAGE_BIT 0x0100 +#define GL_CLIENT_STORAGE_BIT 0x0200 +#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 +#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F +#define GL_BUFFER_STORAGE_FLAGS 0x8220 +#define GL_CLEAR_TEXTURE 0x9365 +#define GL_LOCATION_COMPONENT 0x934A +#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B +#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C +#define GL_QUERY_BUFFER 0x9192 +#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 +#define GL_QUERY_BUFFER_BINDING 0x9193 +#define GL_QUERY_RESULT_NO_WAIT 0x9194 +#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 +typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +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); +typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); +typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); +typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); +typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers); +typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); +typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +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); +GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); +GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); +GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures); +GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers); +GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures); +GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +#endif +#endif /* GL_VERSION_4_4 */ + +#ifndef GL_VERSION_4_5 +#define GL_VERSION_4_5 1 +#define GL_CONTEXT_LOST 0x0507 +#define GL_NEGATIVE_ONE_TO_ONE 0x935E +#define GL_ZERO_TO_ONE 0x935F +#define GL_CLIP_ORIGIN 0x935C +#define GL_CLIP_DEPTH_MODE 0x935D +#define GL_QUERY_WAIT_INVERTED 0x8E17 +#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 +#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 +#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A +#define GL_MAX_CULL_DISTANCES 0x82F9 +#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA +#define GL_TEXTURE_TARGET 0x1006 +#define GL_QUERY_TARGET 0x82EA +#define GL_GUILTY_CONTEXT_RESET 0x8253 +#define GL_INNOCENT_CONTEXT_RESET 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 +#define GL_LOSE_CONTEXT_ON_RESET 0x8252 +#define GL_NO_RESET_NOTIFICATION 0x8261 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_MINMAX 0x802E +#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB +#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC +typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth); +typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); +typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum buf); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum src); +typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); +typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture); +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); +typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers); +typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); +typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void); +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (APIENTRYP PFNGLGETNMAPDVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void (APIENTRYP PFNGLGETNMAPFVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void (APIENTRYP PFNGLGETNMAPIVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void (APIENTRYP PFNGLGETNPIXELMAPFVPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void (APIENTRYP PFNGLGETNCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); +typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); +typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); +typedef void (APIENTRYP PFNGLGETNHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +typedef void (APIENTRYP PFNGLGETNMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth); +GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param); +GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); +GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers); +GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access); +GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer); +GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params); +GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers); +GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param); +GLAPI void APIENTRY glNamedFramebufferTexture (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTextureLayer (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glNamedFramebufferDrawBuffer (GLuint framebuffer, GLenum buf); +GLAPI void APIENTRY glNamedFramebufferDrawBuffers (GLuint framebuffer, GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glNamedFramebufferReadBuffer (GLuint framebuffer, GLenum src); +GLAPI void APIENTRY glInvalidateNamedFramebufferData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); +GLAPI void APIENTRY glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI void APIENTRY glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI void APIENTRY glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GLAPI void APIENTRY glBlitNamedFramebuffer (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target); +GLAPI void APIENTRY glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameteriv (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glCreateRenderbuffers (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glNamedRenderbufferStorage (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures); +GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glTextureStorage2DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureStorage3DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glCompressedTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCopyTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glCopyTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureParameterf (GLuint texture, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTextureParameterfv (GLuint texture, GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glTextureParameteri (GLuint texture, GLenum pname, GLint param); +GLAPI void APIENTRY glTextureParameterIiv (GLuint texture, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureParameterIuiv (GLuint texture, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glTextureParameteriv (GLuint texture, GLenum pname, const GLint *param); +GLAPI void APIENTRY glGenerateTextureMipmap (GLuint texture); +GLAPI void APIENTRY glBindTextureUnit (GLuint unit, GLuint texture); +GLAPI void APIENTRY glGetTextureImage (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetCompressedTextureImage (GLuint texture, GLint level, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetTextureLevelParameterfv (GLuint texture, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureLevelParameteriv (GLuint texture, GLint level, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterfv (GLuint texture, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureParameterIiv (GLuint texture, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterIuiv (GLuint texture, GLenum pname, GLuint *params); +GLAPI void APIENTRY glGetTextureParameteriv (GLuint texture, GLenum pname, GLint *params); +GLAPI void APIENTRY glCreateVertexArrays (GLsizei n, GLuint *arrays); +GLAPI void APIENTRY glDisableVertexArrayAttrib (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glEnableVertexArrayAttrib (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glVertexArrayElementBuffer (GLuint vaobj, GLuint buffer); +GLAPI void APIENTRY glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexArrayVertexBuffers (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +GLAPI void APIENTRY glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glGetVertexArrayiv (GLuint vaobj, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayIndexediv (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); +GLAPI void APIENTRY glCreateSamplers (GLsizei n, GLuint *samplers); +GLAPI void APIENTRY glCreateProgramPipelines (GLsizei n, GLuint *pipelines); +GLAPI void APIENTRY glCreateQueries (GLenum target, GLsizei n, GLuint *ids); +GLAPI void APIENTRY glGetQueryBufferObjecti64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectui64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectuiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); +GLAPI void APIENTRY glGetTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); +GLAPI GLenum APIENTRY glGetGraphicsResetStatus (void); +GLAPI void APIENTRY glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetnTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI void APIENTRY glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +GLAPI void APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI void APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI void APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GLAPI void APIENTRY glGetnMapdv (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +GLAPI void APIENTRY glGetnMapfv (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +GLAPI void APIENTRY glGetnMapiv (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +GLAPI void APIENTRY glGetnPixelMapfv (GLenum map, GLsizei bufSize, GLfloat *values); +GLAPI void APIENTRY glGetnPixelMapuiv (GLenum map, GLsizei bufSize, GLuint *values); +GLAPI void APIENTRY glGetnPixelMapusv (GLenum map, GLsizei bufSize, GLushort *values); +GLAPI void APIENTRY glGetnPolygonStipple (GLsizei bufSize, GLubyte *pattern); +GLAPI void APIENTRY glGetnColorTable (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); +GLAPI void APIENTRY glGetnConvolutionFilter (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); +GLAPI void APIENTRY glGetnSeparableFilter (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); +GLAPI void APIENTRY glGetnHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +GLAPI void APIENTRY glGetnMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +GLAPI void APIENTRY glTextureBarrier (void); +#endif +#endif /* GL_VERSION_4_5 */ + +#ifndef GL_VERSION_4_6 +#define GL_VERSION_4_6 1 +#define GL_SHADER_BINARY_FORMAT_SPIR_V 0x9551 +#define GL_SPIR_V_BINARY 0x9552 +#define GL_PARAMETER_BUFFER 0x80EE +#define GL_PARAMETER_BUFFER_BINDING 0x80EF +#define GL_CONTEXT_FLAG_NO_ERROR_BIT 0x00000008 +#define GL_VERTICES_SUBMITTED 0x82EE +#define GL_PRIMITIVES_SUBMITTED 0x82EF +#define GL_VERTEX_SHADER_INVOCATIONS 0x82F0 +#define GL_TESS_CONTROL_SHADER_PATCHES 0x82F1 +#define GL_TESS_EVALUATION_SHADER_INVOCATIONS 0x82F2 +#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED 0x82F3 +#define GL_FRAGMENT_SHADER_INVOCATIONS 0x82F4 +#define GL_COMPUTE_SHADER_INVOCATIONS 0x82F5 +#define GL_CLIPPING_INPUT_PRIMITIVES 0x82F6 +#define GL_CLIPPING_OUTPUT_PRIMITIVES 0x82F7 +#define GL_POLYGON_OFFSET_CLAMP 0x8E1B +#define GL_SPIR_V_EXTENSIONS 0x9553 +#define GL_NUM_SPIR_V_EXTENSIONS 0x9554 +#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF +#define GL_TRANSFORM_FEEDBACK_OVERFLOW 0x82EC +#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW 0x82ED +typedef void (APIENTRYP PFNGLSPECIALIZESHADERPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC) (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPPROC) (GLfloat factor, GLfloat units, GLfloat clamp); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpecializeShader (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +GLAPI void APIENTRY glMultiDrawArraysIndirectCount (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectCount (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glPolygonOffsetClamp (GLfloat factor, GLfloat units, GLfloat clamp); +#endif +#endif /* GL_VERSION_4_6 */ + +#ifndef GL_ARB_ES2_compatibility +#define GL_ARB_ES2_compatibility 1 +#endif /* GL_ARB_ES2_compatibility */ + +#ifndef GL_ARB_ES3_1_compatibility +#define GL_ARB_ES3_1_compatibility 1 +#endif /* GL_ARB_ES3_1_compatibility */ + +#ifndef GL_ARB_ES3_2_compatibility +#define GL_ARB_ES3_2_compatibility 1 +#define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE +#define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381 +#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382 +typedef void (APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXARBPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveBoundingBoxARB (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#endif +#endif /* GL_ARB_ES3_2_compatibility */ + +#ifndef GL_ARB_ES3_compatibility +#define GL_ARB_ES3_compatibility 1 +#endif /* GL_ARB_ES3_compatibility */ + +#ifndef GL_ARB_arrays_of_arrays +#define GL_ARB_arrays_of_arrays 1 +#endif /* GL_ARB_arrays_of_arrays */ + +#ifndef GL_ARB_base_instance +#define GL_ARB_base_instance 1 +#endif /* GL_ARB_base_instance */ + +#ifndef GL_ARB_bindless_texture +#define GL_ARB_bindless_texture 1 +typedef khronos_uint64_t GLuint64EXT; +#define GL_UNSIGNED_INT64_ARB 0x140F +typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture); +typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle); +typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); +typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler); +GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle); +GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle); +GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access); +GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle); +GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value); +GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value); +GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle); +GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle); +GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x); +GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params); +#endif +#endif /* GL_ARB_bindless_texture */ + +#ifndef GL_ARB_blend_func_extended +#define GL_ARB_blend_func_extended 1 +#endif /* GL_ARB_blend_func_extended */ + +#ifndef GL_ARB_buffer_storage +#define GL_ARB_buffer_storage 1 +#endif /* GL_ARB_buffer_storage */ + +#ifndef GL_ARB_cl_event +#define GL_ARB_cl_event 1 +struct _cl_context; +struct _cl_event; +#define GL_SYNC_CL_EVENT_ARB 0x8240 +#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 +typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); +#endif +#endif /* GL_ARB_cl_event */ + +#ifndef GL_ARB_clear_buffer_object +#define GL_ARB_clear_buffer_object 1 +#endif /* GL_ARB_clear_buffer_object */ + +#ifndef GL_ARB_clear_texture +#define GL_ARB_clear_texture 1 +#endif /* GL_ARB_clear_texture */ + +#ifndef GL_ARB_clip_control +#define GL_ARB_clip_control 1 +#endif /* GL_ARB_clip_control */ + +#ifndef GL_ARB_color_buffer_float +#define GL_ARB_color_buffer_float 1 +#define GL_RGBA_FLOAT_MODE_ARB 0x8820 +#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +#define GL_CLAMP_READ_COLOR_ARB 0x891C +#define GL_FIXED_ONLY_ARB 0x891D +typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp); +#endif +#endif /* GL_ARB_color_buffer_float */ + +#ifndef GL_ARB_compatibility +#define GL_ARB_compatibility 1 +#endif /* GL_ARB_compatibility */ + +#ifndef GL_ARB_compressed_texture_pixel_storage +#define GL_ARB_compressed_texture_pixel_storage 1 +#endif /* GL_ARB_compressed_texture_pixel_storage */ + +#ifndef GL_ARB_compute_shader +#define GL_ARB_compute_shader 1 +#endif /* GL_ARB_compute_shader */ + +#ifndef GL_ARB_compute_variable_group_size +#define GL_ARB_compute_variable_group_size 1 +#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344 +#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB +#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345 +#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF +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); +#ifdef GL_GLEXT_PROTOTYPES +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); +#endif +#endif /* GL_ARB_compute_variable_group_size */ + +#ifndef GL_ARB_conditional_render_inverted +#define GL_ARB_conditional_render_inverted 1 +#endif /* GL_ARB_conditional_render_inverted */ + +#ifndef GL_ARB_conservative_depth +#define GL_ARB_conservative_depth 1 +#endif /* GL_ARB_conservative_depth */ + +#ifndef GL_ARB_copy_buffer +#define GL_ARB_copy_buffer 1 +#endif /* GL_ARB_copy_buffer */ + +#ifndef GL_ARB_copy_image +#define GL_ARB_copy_image 1 +#endif /* GL_ARB_copy_image */ + +#ifndef GL_ARB_cull_distance +#define GL_ARB_cull_distance 1 +#endif /* GL_ARB_cull_distance */ + +#ifndef GL_ARB_debug_output +#define GL_ARB_debug_output 1 +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +#define GL_DEBUG_SOURCE_API_ARB 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +#define GL_DEBUG_TYPE_ERROR_ARB 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif +#endif /* GL_ARB_debug_output */ + +#ifndef GL_ARB_depth_buffer_float +#define GL_ARB_depth_buffer_float 1 +#endif /* GL_ARB_depth_buffer_float */ + +#ifndef GL_ARB_depth_clamp +#define GL_ARB_depth_clamp 1 +#endif /* GL_ARB_depth_clamp */ + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture 1 +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#endif /* GL_ARB_depth_texture */ + +#ifndef GL_ARB_derivative_control +#define GL_ARB_derivative_control 1 +#endif /* GL_ARB_derivative_control */ + +#ifndef GL_ARB_direct_state_access +#define GL_ARB_direct_state_access 1 +#endif /* GL_ARB_direct_state_access */ + +#ifndef GL_ARB_draw_buffers +#define GL_ARB_draw_buffers 1 +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER15_ARB 0x8834 +typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs); +#endif +#endif /* GL_ARB_draw_buffers */ + +#ifndef GL_ARB_draw_buffers_blend +#define GL_ARB_draw_buffers_blend 1 +typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif +#endif /* GL_ARB_draw_buffers_blend */ + +#ifndef GL_ARB_draw_elements_base_vertex +#define GL_ARB_draw_elements_base_vertex 1 +#endif /* GL_ARB_draw_elements_base_vertex */ + +#ifndef GL_ARB_draw_indirect +#define GL_ARB_draw_indirect 1 +#endif /* GL_ARB_draw_indirect */ + +#ifndef GL_ARB_draw_instanced +#define GL_ARB_draw_instanced 1 +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#endif +#endif /* GL_ARB_draw_instanced */ + +#ifndef GL_ARB_enhanced_layouts +#define GL_ARB_enhanced_layouts 1 +#endif /* GL_ARB_enhanced_layouts */ + +#ifndef GL_ARB_explicit_attrib_location +#define GL_ARB_explicit_attrib_location 1 +#endif /* GL_ARB_explicit_attrib_location */ + +#ifndef GL_ARB_explicit_uniform_location +#define GL_ARB_explicit_uniform_location 1 +#endif /* GL_ARB_explicit_uniform_location */ + +#ifndef GL_ARB_fragment_coord_conventions +#define GL_ARB_fragment_coord_conventions 1 +#endif /* GL_ARB_fragment_coord_conventions */ + +#ifndef GL_ARB_fragment_layer_viewport +#define GL_ARB_fragment_layer_viewport 1 +#endif /* GL_ARB_fragment_layer_viewport */ + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program 1 +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF +typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string); +typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string); +GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program); +GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs); +GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string); +GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program); +#endif +#endif /* GL_ARB_fragment_program */ + +#ifndef GL_ARB_fragment_program_shadow +#define GL_ARB_fragment_program_shadow 1 +#endif /* GL_ARB_fragment_program_shadow */ + +#ifndef GL_ARB_fragment_shader +#define GL_ARB_fragment_shader 1 +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +#endif /* GL_ARB_fragment_shader */ + +#ifndef GL_ARB_fragment_shader_interlock +#define GL_ARB_fragment_shader_interlock 1 +#endif /* GL_ARB_fragment_shader_interlock */ + +#ifndef GL_ARB_framebuffer_no_attachments +#define GL_ARB_framebuffer_no_attachments 1 +#endif /* GL_ARB_framebuffer_no_attachments */ + +#ifndef GL_ARB_framebuffer_object +#define GL_ARB_framebuffer_object 1 +#endif /* GL_ARB_framebuffer_object */ + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_ARB_framebuffer_sRGB 1 +#endif /* GL_ARB_framebuffer_sRGB */ + +#ifndef GL_ARB_geometry_shader4 +#define GL_ARB_geometry_shader4 1 +#define GL_LINES_ADJACENCY_ARB 0x000A +#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +#define GL_TRIANGLES_ADJACENCY_ARB 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +#define GL_GEOMETRY_SHADER_ARB 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); +GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif +#endif /* GL_ARB_geometry_shader4 */ + +#ifndef GL_ARB_get_program_binary +#define GL_ARB_get_program_binary 1 +#endif /* GL_ARB_get_program_binary */ + +#ifndef GL_ARB_get_texture_sub_image +#define GL_ARB_get_texture_sub_image 1 +#endif /* GL_ARB_get_texture_sub_image */ + +#ifndef GL_ARB_gl_spirv +#define GL_ARB_gl_spirv 1 +#define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551 +#define GL_SPIR_V_BINARY_ARB 0x9552 +typedef void (APIENTRYP PFNGLSPECIALIZESHADERARBPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpecializeShaderARB (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +#endif +#endif /* GL_ARB_gl_spirv */ + +#ifndef GL_ARB_gpu_shader5 +#define GL_ARB_gpu_shader5 1 +#endif /* GL_ARB_gpu_shader5 */ + +#ifndef GL_ARB_gpu_shader_fp64 +#define GL_ARB_gpu_shader_fp64 1 +#endif /* GL_ARB_gpu_shader_fp64 */ + +#ifndef GL_ARB_gpu_shader_int64 +#define GL_ARB_gpu_shader_int64 1 +#define GL_INT64_ARB 0x140E +#define GL_INT64_VEC2_ARB 0x8FE9 +#define GL_INT64_VEC3_ARB 0x8FEA +#define GL_INT64_VEC4_ARB 0x8FEB +#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 +typedef void (APIENTRYP PFNGLUNIFORM1I64ARBPROC) (GLint location, GLint64 x); +typedef void (APIENTRYP PFNGLUNIFORM2I64ARBPROC) (GLint location, GLint64 x, GLint64 y); +typedef void (APIENTRYP PFNGLUNIFORM3I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z); +typedef void (APIENTRYP PFNGLUNIFORM4I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +typedef void (APIENTRYP PFNGLUNIFORM1I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM2I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM3I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM4I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM1UI64ARBPROC) (GLint location, GLuint64 x); +typedef void (APIENTRYP PFNGLUNIFORM2UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y); +typedef void (APIENTRYP PFNGLUNIFORM3UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +typedef void (APIENTRYP PFNGLUNIFORM4UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +typedef void (APIENTRYP PFNGLUNIFORM1UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM2UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM3UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM4UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLGETUNIFORMI64VARBPROC) (GLuint program, GLint location, GLint64 *params); +typedef void (APIENTRYP PFNGLGETUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLuint64 *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint64 *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64ARBPROC) (GLuint program, GLint location, GLint64 x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64ARBPROC) (GLuint program, GLint location, GLuint64 x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64ARB (GLint location, GLint64 x); +GLAPI void APIENTRY glUniform2i64ARB (GLint location, GLint64 x, GLint64 y); +GLAPI void APIENTRY glUniform3i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z); +GLAPI void APIENTRY glUniform4i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +GLAPI void APIENTRY glUniform1i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform2i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform3i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform4i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform1ui64ARB (GLint location, GLuint64 x); +GLAPI void APIENTRY glUniform2ui64ARB (GLint location, GLuint64 x, GLuint64 y); +GLAPI void APIENTRY glUniform3ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +GLAPI void APIENTRY glUniform4ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +GLAPI void APIENTRY glUniform1ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glUniform2ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glUniform3ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glUniform4ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glGetUniformi64vARB (GLuint program, GLint location, GLint64 *params); +GLAPI void APIENTRY glGetUniformui64vARB (GLuint program, GLint location, GLuint64 *params); +GLAPI void APIENTRY glGetnUniformi64vARB (GLuint program, GLint location, GLsizei bufSize, GLint64 *params); +GLAPI void APIENTRY glGetnUniformui64vARB (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params); +GLAPI void APIENTRY glProgramUniform1i64ARB (GLuint program, GLint location, GLint64 x); +GLAPI void APIENTRY glProgramUniform2i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y); +GLAPI void APIENTRY glProgramUniform3i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z); +GLAPI void APIENTRY glProgramUniform4i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +GLAPI void APIENTRY glProgramUniform1i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform2i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform3i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform4i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform1ui64ARB (GLuint program, GLint location, GLuint64 x); +GLAPI void APIENTRY glProgramUniform2ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y); +GLAPI void APIENTRY glProgramUniform3ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +GLAPI void APIENTRY glProgramUniform4ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +GLAPI void APIENTRY glProgramUniform1ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniform2ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniform3ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniform4ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +#endif +#endif /* GL_ARB_gpu_shader_int64 */ + +#ifndef GL_ARB_half_float_pixel +#define GL_ARB_half_float_pixel 1 +typedef khronos_uint16_t GLhalfARB; +#define GL_HALF_FLOAT_ARB 0x140B +#endif /* GL_ARB_half_float_pixel */ + +#ifndef GL_ARB_half_float_vertex +#define GL_ARB_half_float_vertex 1 +#endif /* GL_ARB_half_float_vertex */ + +#ifndef GL_ARB_imaging +#define GL_ARB_imaging 1 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); +GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table); +GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); +GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); +GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); +GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params); +GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image); +GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); +GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); +GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glResetHistogram (GLenum target); +GLAPI void APIENTRY glResetMinmax (GLenum target); +#endif +#endif /* GL_ARB_imaging */ + +#ifndef GL_ARB_indirect_parameters +#define GL_ARB_indirect_parameters 1 +#define GL_PARAMETER_BUFFER_ARB 0x80EE +#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#endif +#endif /* GL_ARB_indirect_parameters */ + +#ifndef GL_ARB_instanced_arrays +#define GL_ARB_instanced_arrays 1 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); +#endif +#endif /* GL_ARB_instanced_arrays */ + +#ifndef GL_ARB_internalformat_query +#define GL_ARB_internalformat_query 1 +#endif /* GL_ARB_internalformat_query */ + +#ifndef GL_ARB_internalformat_query2 +#define GL_ARB_internalformat_query2 1 +#define GL_SRGB_DECODE_ARB 0x8299 +#define GL_VIEW_CLASS_EAC_R11 0x9383 +#define GL_VIEW_CLASS_EAC_RG11 0x9384 +#define GL_VIEW_CLASS_ETC2_RGB 0x9385 +#define GL_VIEW_CLASS_ETC2_RGBA 0x9386 +#define GL_VIEW_CLASS_ETC2_EAC_RGBA 0x9387 +#define GL_VIEW_CLASS_ASTC_4x4_RGBA 0x9388 +#define GL_VIEW_CLASS_ASTC_5x4_RGBA 0x9389 +#define GL_VIEW_CLASS_ASTC_5x5_RGBA 0x938A +#define GL_VIEW_CLASS_ASTC_6x5_RGBA 0x938B +#define GL_VIEW_CLASS_ASTC_6x6_RGBA 0x938C +#define GL_VIEW_CLASS_ASTC_8x5_RGBA 0x938D +#define GL_VIEW_CLASS_ASTC_8x6_RGBA 0x938E +#define GL_VIEW_CLASS_ASTC_8x8_RGBA 0x938F +#define GL_VIEW_CLASS_ASTC_10x5_RGBA 0x9390 +#define GL_VIEW_CLASS_ASTC_10x6_RGBA 0x9391 +#define GL_VIEW_CLASS_ASTC_10x8_RGBA 0x9392 +#define GL_VIEW_CLASS_ASTC_10x10_RGBA 0x9393 +#define GL_VIEW_CLASS_ASTC_12x10_RGBA 0x9394 +#define GL_VIEW_CLASS_ASTC_12x12_RGBA 0x9395 +#endif /* GL_ARB_internalformat_query2 */ + +#ifndef GL_ARB_invalidate_subdata +#define GL_ARB_invalidate_subdata 1 +#endif /* GL_ARB_invalidate_subdata */ + +#ifndef GL_ARB_map_buffer_alignment +#define GL_ARB_map_buffer_alignment 1 +#endif /* GL_ARB_map_buffer_alignment */ + +#ifndef GL_ARB_map_buffer_range +#define GL_ARB_map_buffer_range 1 +#endif /* GL_ARB_map_buffer_range */ + +#ifndef GL_ARB_matrix_palette +#define GL_ARB_matrix_palette 1 +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index); +GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices); +GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices); +GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices); +GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_ARB_matrix_palette */ + +#ifndef GL_ARB_multi_bind +#define GL_ARB_multi_bind 1 +#endif /* GL_ARB_multi_bind */ + +#ifndef GL_ARB_multi_draw_indirect +#define GL_ARB_multi_draw_indirect 1 +#endif /* GL_ARB_multi_draw_indirect */ + +#ifndef GL_ARB_multisample +#define GL_ARB_multisample 1 +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert); +#endif +#endif /* GL_ARB_multisample */ + +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture 1 +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTextureARB (GLenum texture); +GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture); +GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s); +GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s); +GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s); +GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s); +GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t); +GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t); +GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t); +GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r); +GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r); +GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r); +GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r); +GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q); +GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v); +#endif +#endif /* GL_ARB_multitexture */ + +#ifndef GL_ARB_occlusion_query +#define GL_ARB_occlusion_query 1 +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_SAMPLES_PASSED_ARB 0x8914 +typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id); +GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id); +GLAPI void APIENTRY glEndQueryARB (GLenum target); +GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); +#endif +#endif /* GL_ARB_occlusion_query */ + +#ifndef GL_ARB_occlusion_query2 +#define GL_ARB_occlusion_query2 1 +#endif /* GL_ARB_occlusion_query2 */ + +#ifndef GL_ARB_parallel_shader_compile +#define GL_ARB_parallel_shader_compile 1 +#define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0 +#define GL_COMPLETION_STATUS_ARB 0x91B1 +typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSARBPROC) (GLuint count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMaxShaderCompilerThreadsARB (GLuint count); +#endif +#endif /* GL_ARB_parallel_shader_compile */ + +#ifndef GL_ARB_pipeline_statistics_query +#define GL_ARB_pipeline_statistics_query 1 +#define GL_VERTICES_SUBMITTED_ARB 0x82EE +#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF +#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0 +#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1 +#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2 +#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3 +#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4 +#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5 +#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6 +#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7 +#endif /* GL_ARB_pipeline_statistics_query */ + +#ifndef GL_ARB_pixel_buffer_object +#define GL_ARB_pixel_buffer_object 1 +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +#endif /* GL_ARB_pixel_buffer_object */ + +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters 1 +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); +#endif +#endif /* GL_ARB_point_parameters */ + +#ifndef GL_ARB_point_sprite +#define GL_ARB_point_sprite 1 +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_ARB 0x8862 +#endif /* GL_ARB_point_sprite */ + +#ifndef GL_ARB_polygon_offset_clamp +#define GL_ARB_polygon_offset_clamp 1 +#endif /* GL_ARB_polygon_offset_clamp */ + +#ifndef GL_ARB_post_depth_coverage +#define GL_ARB_post_depth_coverage 1 +#endif /* GL_ARB_post_depth_coverage */ + +#ifndef GL_ARB_program_interface_query +#define GL_ARB_program_interface_query 1 +#endif /* GL_ARB_program_interface_query */ + +#ifndef GL_ARB_provoking_vertex +#define GL_ARB_provoking_vertex 1 +#endif /* GL_ARB_provoking_vertex */ + +#ifndef GL_ARB_query_buffer_object +#define GL_ARB_query_buffer_object 1 +#endif /* GL_ARB_query_buffer_object */ + +#ifndef GL_ARB_robust_buffer_access_behavior +#define GL_ARB_robust_buffer_access_behavior 1 +#endif /* GL_ARB_robust_buffer_access_behavior */ + +#ifndef GL_ARB_robustness +#define GL_ARB_robustness 1 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); +typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img); +typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); +typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); +typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); +typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); +GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); +GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img); +GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); +GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); +GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); +GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); +GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); +GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); +GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); +GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +#endif +#endif /* GL_ARB_robustness */ + +#ifndef GL_ARB_robustness_isolation +#define GL_ARB_robustness_isolation 1 +#endif /* GL_ARB_robustness_isolation */ + +#ifndef GL_ARB_sample_locations +#define GL_ARB_sample_locations 1 +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340 +#define GL_SAMPLE_LOCATION_ARB 0x8E50 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343 +typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLEVALUATEDEPTHVALUESARBPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSampleLocationsfvARB (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvARB (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glEvaluateDepthValuesARB (void); +#endif +#endif /* GL_ARB_sample_locations */ + +#ifndef GL_ARB_sample_shading +#define GL_ARB_sample_shading 1 +#define GL_SAMPLE_SHADING_ARB 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value); +#endif +#endif /* GL_ARB_sample_shading */ + +#ifndef GL_ARB_sampler_objects +#define GL_ARB_sampler_objects 1 +#endif /* GL_ARB_sampler_objects */ + +#ifndef GL_ARB_seamless_cube_map +#define GL_ARB_seamless_cube_map 1 +#endif /* GL_ARB_seamless_cube_map */ + +#ifndef GL_ARB_seamless_cubemap_per_texture +#define GL_ARB_seamless_cubemap_per_texture 1 +#endif /* GL_ARB_seamless_cubemap_per_texture */ + +#ifndef GL_ARB_separate_shader_objects +#define GL_ARB_separate_shader_objects 1 +#endif /* GL_ARB_separate_shader_objects */ + +#ifndef GL_ARB_shader_atomic_counter_ops +#define GL_ARB_shader_atomic_counter_ops 1 +#endif /* GL_ARB_shader_atomic_counter_ops */ + +#ifndef GL_ARB_shader_atomic_counters +#define GL_ARB_shader_atomic_counters 1 +#endif /* GL_ARB_shader_atomic_counters */ + +#ifndef GL_ARB_shader_ballot +#define GL_ARB_shader_ballot 1 +#endif /* GL_ARB_shader_ballot */ + +#ifndef GL_ARB_shader_bit_encoding +#define GL_ARB_shader_bit_encoding 1 +#endif /* GL_ARB_shader_bit_encoding */ + +#ifndef GL_ARB_shader_clock +#define GL_ARB_shader_clock 1 +#endif /* GL_ARB_shader_clock */ + +#ifndef GL_ARB_shader_draw_parameters +#define GL_ARB_shader_draw_parameters 1 +#endif /* GL_ARB_shader_draw_parameters */ + +#ifndef GL_ARB_shader_group_vote +#define GL_ARB_shader_group_vote 1 +#endif /* GL_ARB_shader_group_vote */ + +#ifndef GL_ARB_shader_image_load_store +#define GL_ARB_shader_image_load_store 1 +#endif /* GL_ARB_shader_image_load_store */ + +#ifndef GL_ARB_shader_image_size +#define GL_ARB_shader_image_size 1 +#endif /* GL_ARB_shader_image_size */ + +#ifndef GL_ARB_shader_objects +#define GL_ARB_shader_objects 1 +#ifdef __APPLE__ +typedef void *GLhandleARB; +#else +typedef unsigned int GLhandleARB; +#endif +typedef char GLcharARB; +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length); +typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj); +GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname); +GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); +GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType); +GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length); +GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj); +GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); +GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); +GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj); +GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj); +GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj); +GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0); +GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0); +GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); +GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); +GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); +GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#endif +#endif /* GL_ARB_shader_objects */ + +#ifndef GL_ARB_shader_precision +#define GL_ARB_shader_precision 1 +#endif /* GL_ARB_shader_precision */ + +#ifndef GL_ARB_shader_stencil_export +#define GL_ARB_shader_stencil_export 1 +#endif /* GL_ARB_shader_stencil_export */ + +#ifndef GL_ARB_shader_storage_buffer_object +#define GL_ARB_shader_storage_buffer_object 1 +#endif /* GL_ARB_shader_storage_buffer_object */ + +#ifndef GL_ARB_shader_subroutine +#define GL_ARB_shader_subroutine 1 +#endif /* GL_ARB_shader_subroutine */ + +#ifndef GL_ARB_shader_texture_image_samples +#define GL_ARB_shader_texture_image_samples 1 +#endif /* GL_ARB_shader_texture_image_samples */ + +#ifndef GL_ARB_shader_texture_lod +#define GL_ARB_shader_texture_lod 1 +#endif /* GL_ARB_shader_texture_lod */ + +#ifndef GL_ARB_shader_viewport_layer_array +#define GL_ARB_shader_viewport_layer_array 1 +#endif /* GL_ARB_shader_viewport_layer_array */ + +#ifndef GL_ARB_shading_language_100 +#define GL_ARB_shading_language_100 1 +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#endif /* GL_ARB_shading_language_100 */ + +#ifndef GL_ARB_shading_language_420pack +#define GL_ARB_shading_language_420pack 1 +#endif /* GL_ARB_shading_language_420pack */ + +#ifndef GL_ARB_shading_language_include +#define GL_ARB_shading_language_include 1 +#define GL_SHADER_INCLUDE_ARB 0x8DAE +#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 +#define GL_NAMED_STRING_TYPE_ARB 0x8DEA +typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); +typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); +GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#endif +#endif /* GL_ARB_shading_language_include */ + +#ifndef GL_ARB_shading_language_packing +#define GL_ARB_shading_language_packing 1 +#endif /* GL_ARB_shading_language_packing */ + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow 1 +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#endif /* GL_ARB_shadow */ + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient 1 +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#endif /* GL_ARB_shadow_ambient */ + +#ifndef GL_ARB_sparse_buffer +#define GL_ARB_sparse_buffer 1 +#define GL_SPARSE_STORAGE_BIT_ARB 0x0400 +#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8 +typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +#endif +#endif /* GL_ARB_sparse_buffer */ + +#ifndef GL_ARB_sparse_texture +#define GL_ARB_sparse_texture 1 +#define GL_TEXTURE_SPARSE_ARB 0x91A6 +#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 +#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA +#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 +#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197 +#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A +#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 +typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#endif +#endif /* GL_ARB_sparse_texture */ + +#ifndef GL_ARB_sparse_texture2 +#define GL_ARB_sparse_texture2 1 +#endif /* GL_ARB_sparse_texture2 */ + +#ifndef GL_ARB_sparse_texture_clamp +#define GL_ARB_sparse_texture_clamp 1 +#endif /* GL_ARB_sparse_texture_clamp */ + +#ifndef GL_ARB_spirv_extensions +#define GL_ARB_spirv_extensions 1 +#endif /* GL_ARB_spirv_extensions */ + +#ifndef GL_ARB_stencil_texturing +#define GL_ARB_stencil_texturing 1 +#endif /* GL_ARB_stencil_texturing */ + +#ifndef GL_ARB_sync +#define GL_ARB_sync 1 +#endif /* GL_ARB_sync */ + +#ifndef GL_ARB_tessellation_shader +#define GL_ARB_tessellation_shader 1 +#endif /* GL_ARB_tessellation_shader */ + +#ifndef GL_ARB_texture_barrier +#define GL_ARB_texture_barrier 1 +#endif /* GL_ARB_texture_barrier */ + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp 1 +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif /* GL_ARB_texture_border_clamp */ + +#ifndef GL_ARB_texture_buffer_object +#define GL_ARB_texture_buffer_object 1 +#define GL_TEXTURE_BUFFER_ARB 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); +#endif +#endif /* GL_ARB_texture_buffer_object */ + +#ifndef GL_ARB_texture_buffer_object_rgb32 +#define GL_ARB_texture_buffer_object_rgb32 1 +#endif /* GL_ARB_texture_buffer_object_rgb32 */ + +#ifndef GL_ARB_texture_buffer_range +#define GL_ARB_texture_buffer_range 1 +#endif /* GL_ARB_texture_buffer_range */ + +#ifndef GL_ARB_texture_compression +#define GL_ARB_texture_compression 1 +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +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); +GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img); +#endif +#endif /* GL_ARB_texture_compression */ + +#ifndef GL_ARB_texture_compression_bptc +#define GL_ARB_texture_compression_bptc 1 +#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F +#endif /* GL_ARB_texture_compression_bptc */ + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_ARB_texture_compression_rgtc 1 +#endif /* GL_ARB_texture_compression_rgtc */ + +#ifndef GL_ARB_texture_cube_map +#define GL_ARB_texture_cube_map 1 +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +#endif /* GL_ARB_texture_cube_map */ + +#ifndef GL_ARB_texture_cube_map_array +#define GL_ARB_texture_cube_map_array 1 +#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F +#endif /* GL_ARB_texture_cube_map_array */ + +#ifndef GL_ARB_texture_env_add +#define GL_ARB_texture_env_add 1 +#endif /* GL_ARB_texture_env_add */ + +#ifndef GL_ARB_texture_env_combine +#define GL_ARB_texture_env_combine 1 +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#endif /* GL_ARB_texture_env_combine */ + +#ifndef GL_ARB_texture_env_crossbar +#define GL_ARB_texture_env_crossbar 1 +#endif /* GL_ARB_texture_env_crossbar */ + +#ifndef GL_ARB_texture_env_dot3 +#define GL_ARB_texture_env_dot3 1 +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF +#endif /* GL_ARB_texture_env_dot3 */ + +#ifndef GL_ARB_texture_filter_anisotropic +#define GL_ARB_texture_filter_anisotropic 1 +#endif /* GL_ARB_texture_filter_anisotropic */ + +#ifndef GL_ARB_texture_filter_minmax +#define GL_ARB_texture_filter_minmax 1 +#define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 +#define GL_WEIGHTED_AVERAGE_ARB 0x9367 +#endif /* GL_ARB_texture_filter_minmax */ + +#ifndef GL_ARB_texture_float +#define GL_ARB_texture_float 1 +#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 +#define GL_RGBA32F_ARB 0x8814 +#define GL_RGB32F_ARB 0x8815 +#define GL_ALPHA32F_ARB 0x8816 +#define GL_INTENSITY32F_ARB 0x8817 +#define GL_LUMINANCE32F_ARB 0x8818 +#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +#define GL_RGBA16F_ARB 0x881A +#define GL_RGB16F_ARB 0x881B +#define GL_ALPHA16F_ARB 0x881C +#define GL_INTENSITY16F_ARB 0x881D +#define GL_LUMINANCE16F_ARB 0x881E +#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +#endif /* GL_ARB_texture_float */ + +#ifndef GL_ARB_texture_gather +#define GL_ARB_texture_gather 1 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F +#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F +#endif /* GL_ARB_texture_gather */ + +#ifndef GL_ARB_texture_mirror_clamp_to_edge +#define GL_ARB_texture_mirror_clamp_to_edge 1 +#endif /* GL_ARB_texture_mirror_clamp_to_edge */ + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif /* GL_ARB_texture_mirrored_repeat */ + +#ifndef GL_ARB_texture_multisample +#define GL_ARB_texture_multisample 1 +#endif /* GL_ARB_texture_multisample */ + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two 1 +#endif /* GL_ARB_texture_non_power_of_two */ + +#ifndef GL_ARB_texture_query_levels +#define GL_ARB_texture_query_levels 1 +#endif /* GL_ARB_texture_query_levels */ + +#ifndef GL_ARB_texture_query_lod +#define GL_ARB_texture_query_lod 1 +#endif /* GL_ARB_texture_query_lod */ + +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle 1 +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#endif /* GL_ARB_texture_rectangle */ + +#ifndef GL_ARB_texture_rg +#define GL_ARB_texture_rg 1 +#endif /* GL_ARB_texture_rg */ + +#ifndef GL_ARB_texture_rgb10_a2ui +#define GL_ARB_texture_rgb10_a2ui 1 +#endif /* GL_ARB_texture_rgb10_a2ui */ + +#ifndef GL_ARB_texture_stencil8 +#define GL_ARB_texture_stencil8 1 +#endif /* GL_ARB_texture_stencil8 */ + +#ifndef GL_ARB_texture_storage +#define GL_ARB_texture_storage 1 +#endif /* GL_ARB_texture_storage */ + +#ifndef GL_ARB_texture_storage_multisample +#define GL_ARB_texture_storage_multisample 1 +#endif /* GL_ARB_texture_storage_multisample */ + +#ifndef GL_ARB_texture_swizzle +#define GL_ARB_texture_swizzle 1 +#endif /* GL_ARB_texture_swizzle */ + +#ifndef GL_ARB_texture_view +#define GL_ARB_texture_view 1 +#endif /* GL_ARB_texture_view */ + +#ifndef GL_ARB_timer_query +#define GL_ARB_timer_query 1 +#endif /* GL_ARB_timer_query */ + +#ifndef GL_ARB_transform_feedback2 +#define GL_ARB_transform_feedback2 1 +#endif /* GL_ARB_transform_feedback2 */ + +#ifndef GL_ARB_transform_feedback3 +#define GL_ARB_transform_feedback3 1 +#endif /* GL_ARB_transform_feedback3 */ + +#ifndef GL_ARB_transform_feedback_instanced +#define GL_ARB_transform_feedback_instanced 1 +#endif /* GL_ARB_transform_feedback_instanced */ + +#ifndef GL_ARB_transform_feedback_overflow_query +#define GL_ARB_transform_feedback_overflow_query 1 +#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC +#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED +#endif /* GL_ARB_transform_feedback_overflow_query */ + +#ifndef GL_ARB_transpose_matrix +#define GL_ARB_transpose_matrix 1 +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m); +GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m); +GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m); +GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m); +#endif +#endif /* GL_ARB_transpose_matrix */ + +#ifndef GL_ARB_uniform_buffer_object +#define GL_ARB_uniform_buffer_object 1 +#endif /* GL_ARB_uniform_buffer_object */ + +#ifndef GL_ARB_vertex_array_bgra +#define GL_ARB_vertex_array_bgra 1 +#endif /* GL_ARB_vertex_array_bgra */ + +#ifndef GL_ARB_vertex_array_object +#define GL_ARB_vertex_array_object 1 +#endif /* GL_ARB_vertex_array_object */ + +#ifndef GL_ARB_vertex_attrib_64bit +#define GL_ARB_vertex_attrib_64bit 1 +#endif /* GL_ARB_vertex_attrib_64bit */ + +#ifndef GL_ARB_vertex_attrib_binding +#define GL_ARB_vertex_attrib_binding 1 +#endif /* GL_ARB_vertex_attrib_binding */ + +#ifndef GL_ARB_vertex_blend +#define GL_ARB_vertex_blend 1 +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F +typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); +typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); +typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); +typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); +typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); +typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights); +GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights); +GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights); +GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights); +GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights); +GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights); +GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights); +GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights); +GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glVertexBlendARB (GLint count); +#endif +#endif /* GL_ARB_vertex_blend */ + +#ifndef GL_ARB_vertex_buffer_object +#define GL_ARB_vertex_buffer_object 1 +typedef khronos_ssize_t GLsizeiptrARB; +typedef khronos_intptr_t GLintptrARB; +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA +typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data); +typedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer); +GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers); +GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers); +GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer); +GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage); +GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data); +GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data); +GLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access); +GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target); +GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params); +#endif +#endif /* GL_ARB_vertex_buffer_object */ + +#ifndef GL_ARB_vertex_program +#define GL_ARB_vertex_program 1 +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index); +GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index); +GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer); +#endif +#endif /* GL_ARB_vertex_program */ + +#ifndef GL_ARB_vertex_shader +#define GL_ARB_vertex_shader 1 +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); +GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); +#endif +#endif /* GL_ARB_vertex_shader */ + +#ifndef GL_ARB_vertex_type_10f_11f_11f_rev +#define GL_ARB_vertex_type_10f_11f_11f_rev 1 +#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */ + +#ifndef GL_ARB_vertex_type_2_10_10_10_rev +#define GL_ARB_vertex_type_2_10_10_10_rev 1 +#endif /* GL_ARB_vertex_type_2_10_10_10_rev */ + +#ifndef GL_ARB_viewport_array +#define GL_ARB_viewport_array 1 +typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYDVNVPROC) (GLuint first, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDDNVPROC) (GLuint index, GLdouble n, GLdouble f); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthRangeArraydvNV (GLuint first, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glDepthRangeIndexeddNV (GLuint index, GLdouble n, GLdouble f); +#endif +#endif /* GL_ARB_viewport_array */ + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos 1 +typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v); +GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v); +GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v); +GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v); +#endif +#endif /* GL_ARB_window_pos */ + +#ifndef GL_KHR_blend_equation_advanced +#define GL_KHR_blend_equation_advanced 1 +#define GL_MULTIPLY_KHR 0x9294 +#define GL_SCREEN_KHR 0x9295 +#define GL_OVERLAY_KHR 0x9296 +#define GL_DARKEN_KHR 0x9297 +#define GL_LIGHTEN_KHR 0x9298 +#define GL_COLORDODGE_KHR 0x9299 +#define GL_COLORBURN_KHR 0x929A +#define GL_HARDLIGHT_KHR 0x929B +#define GL_SOFTLIGHT_KHR 0x929C +#define GL_DIFFERENCE_KHR 0x929E +#define GL_EXCLUSION_KHR 0x92A0 +#define GL_HSL_HUE_KHR 0x92AD +#define GL_HSL_SATURATION_KHR 0x92AE +#define GL_HSL_COLOR_KHR 0x92AF +#define GL_HSL_LUMINOSITY_KHR 0x92B0 +typedef void (APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendBarrierKHR (void); +#endif +#endif /* GL_KHR_blend_equation_advanced */ + +#ifndef GL_KHR_blend_equation_advanced_coherent +#define GL_KHR_blend_equation_advanced_coherent 1 +#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 +#endif /* GL_KHR_blend_equation_advanced_coherent */ + +#ifndef GL_KHR_context_flush_control +#define GL_KHR_context_flush_control 1 +#endif /* GL_KHR_context_flush_control */ + +#ifndef GL_KHR_debug +#define GL_KHR_debug 1 +#endif /* GL_KHR_debug */ + +#ifndef GL_KHR_no_error +#define GL_KHR_no_error 1 +#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 +#endif /* GL_KHR_no_error */ + +#ifndef GL_KHR_parallel_shader_compile +#define GL_KHR_parallel_shader_compile 1 +#define GL_MAX_SHADER_COMPILER_THREADS_KHR 0x91B0 +#define GL_COMPLETION_STATUS_KHR 0x91B1 +typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSKHRPROC) (GLuint count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMaxShaderCompilerThreadsKHR (GLuint count); +#endif +#endif /* GL_KHR_parallel_shader_compile */ + +#ifndef GL_KHR_robust_buffer_access_behavior +#define GL_KHR_robust_buffer_access_behavior 1 +#endif /* GL_KHR_robust_buffer_access_behavior */ + +#ifndef GL_KHR_robustness +#define GL_KHR_robustness 1 +#define GL_CONTEXT_ROBUST_ACCESS 0x90F3 +#endif /* GL_KHR_robustness */ + +#ifndef GL_KHR_shader_subgroup +#define GL_KHR_shader_subgroup 1 +#define GL_SUBGROUP_SIZE_KHR 0x9532 +#define GL_SUBGROUP_SUPPORTED_STAGES_KHR 0x9533 +#define GL_SUBGROUP_SUPPORTED_FEATURES_KHR 0x9534 +#define GL_SUBGROUP_QUAD_ALL_STAGES_KHR 0x9535 +#define GL_SUBGROUP_FEATURE_BASIC_BIT_KHR 0x00000001 +#define GL_SUBGROUP_FEATURE_VOTE_BIT_KHR 0x00000002 +#define GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR 0x00000004 +#define GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR 0x00000008 +#define GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR 0x00000010 +#define GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR 0x00000020 +#define GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR 0x00000040 +#define GL_SUBGROUP_FEATURE_QUAD_BIT_KHR 0x00000080 +#endif /* GL_KHR_shader_subgroup */ + +#ifndef GL_KHR_texture_compression_astc_hdr +#define GL_KHR_texture_compression_astc_hdr 1 +#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +#endif /* GL_KHR_texture_compression_astc_hdr */ + +#ifndef GL_KHR_texture_compression_astc_ldr +#define GL_KHR_texture_compression_astc_ldr 1 +#endif /* GL_KHR_texture_compression_astc_ldr */ + +#ifndef GL_KHR_texture_compression_astc_sliced_3d +#define GL_KHR_texture_compression_astc_sliced_3d 1 +#endif /* GL_KHR_texture_compression_astc_sliced_3d */ + +#ifndef GL_OES_byte_coordinates +#define GL_OES_byte_coordinates 1 +typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords); +typedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s); +typedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t); +typedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r); +typedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q); +typedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x, GLbyte y); +typedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y, GLbyte z); +typedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords); +typedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z, GLbyte w); +typedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s); +GLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords); +GLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t); +GLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords); +GLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r); +GLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords); +GLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q); +GLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords); +GLAPI void APIENTRY glTexCoord1bOES (GLbyte s); +GLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords); +GLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t); +GLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords); +GLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r); +GLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords); +GLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q); +GLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords); +GLAPI void APIENTRY glVertex2bOES (GLbyte x, GLbyte y); +GLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords); +GLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y, GLbyte z); +GLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords); +GLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z, GLbyte w); +GLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords); +#endif +#endif /* GL_OES_byte_coordinates */ + +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif /* GL_OES_compressed_paletted_texture */ + +#ifndef GL_OES_fixed_point +#define GL_OES_fixed_point 1 +typedef khronos_int32_t GLfixed; +#define GL_FIXED_OES 0x140C +typedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref); +typedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth); +typedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); +typedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f); +typedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param); +typedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +typedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation); +typedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param); +typedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width); +typedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); +typedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param); +typedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +typedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); +typedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); +typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); +typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value); +typedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap); +typedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue); +typedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components); +typedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u); +typedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v); +typedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v); +typedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values); +typedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params); +typedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component); +typedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m); +typedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points); +typedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points); +typedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2); +typedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords); +typedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token); +typedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values); +typedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor); +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities); +typedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y); +typedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w); +typedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2); +typedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2); +typedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s); +typedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t); +typedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r); +typedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q); +typedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); +typedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); +typedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x); +typedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y); +typedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords); +typedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref); +GLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GLAPI void APIENTRY glClearDepthxOES (GLfixed depth); +GLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation); +GLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f); +GLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param); +GLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param); +GLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +GLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation); +GLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param); +GLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param); +GLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param); +GLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glLineWidthxOES (GLfixed width); +GLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m); +GLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); +GLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param); +GLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m); +GLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); +GLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glPointSizexOES (GLfixed size); +GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); +GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); +GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); +GLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value); +GLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap); +GLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue); +GLAPI void APIENTRY glColor3xvOES (const GLfixed *components); +GLAPI void APIENTRY glColor4xvOES (const GLfixed *components); +GLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param); +GLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glEvalCoord1xOES (GLfixed u); +GLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords); +GLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v); +GLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords); +GLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer); +GLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v); +GLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param); +GLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values); +GLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params); +GLAPI void APIENTRY glIndexxOES (GLfixed component); +GLAPI void APIENTRY glIndexxvOES (const GLfixed *component); +GLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m); +GLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points); +GLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points); +GLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2); +GLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2); +GLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m); +GLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s); +GLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords); +GLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t); +GLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords); +GLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r); +GLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords); +GLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords); +GLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords); +GLAPI void APIENTRY glPassThroughxOES (GLfixed token); +GLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values); +GLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param); +GLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param); +GLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor); +GLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities); +GLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y); +GLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords); +GLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords); +GLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w); +GLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords); +GLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2); +GLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2); +GLAPI void APIENTRY glTexCoord1xOES (GLfixed s); +GLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords); +GLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t); +GLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords); +GLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r); +GLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords); +GLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords); +GLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); +GLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glVertex2xOES (GLfixed x); +GLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords); +GLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y); +GLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords); +GLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords); +#endif +#endif /* GL_OES_fixed_point */ + +#ifndef GL_OES_query_matrix +#define GL_OES_query_matrix 1 +typedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent); +#endif +#endif /* GL_OES_query_matrix */ + +#ifndef GL_OES_read_format +#define GL_OES_read_format 1 +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif /* GL_OES_read_format */ + +#ifndef GL_OES_single_precision +#define GL_OES_single_precision 1 +typedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); +typedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); +typedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f); +typedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +typedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation); +typedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClearDepthfOES (GLclampf depth); +GLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); +GLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f); +GLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +GLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation); +GLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +#endif +#endif /* GL_OES_single_precision */ + +#ifndef GL_3DFX_multisample +#define GL_3DFX_multisample 1 +#define GL_MULTISAMPLE_3DFX 0x86B2 +#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 +#define GL_SAMPLES_3DFX 0x86B4 +#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 +#endif /* GL_3DFX_multisample */ + +#ifndef GL_3DFX_tbuffer +#define GL_3DFX_tbuffer 1 +typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask); +#endif +#endif /* GL_3DFX_tbuffer */ + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_3DFX_texture_compression_FXT1 1 +#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +#endif /* GL_3DFX_texture_compression_FXT1 */ + +#ifndef GL_AMD_blend_minmax_factor +#define GL_AMD_blend_minmax_factor 1 +#define GL_FACTOR_MIN_AMD 0x901C +#define GL_FACTOR_MAX_AMD 0x901D +#endif /* GL_AMD_blend_minmax_factor */ + +#ifndef GL_AMD_conservative_depth +#define GL_AMD_conservative_depth 1 +#endif /* GL_AMD_conservative_depth */ + +#ifndef GL_AMD_debug_output +#define GL_AMD_debug_output 1 +typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); +#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 +#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 +#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 +#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A +#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B +#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C +#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D +#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E +#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F +#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 +typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufSize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufSize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +#endif +#endif /* GL_AMD_debug_output */ + +#ifndef GL_AMD_depth_clamp_separate +#define GL_AMD_depth_clamp_separate 1 +#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E +#define GL_DEPTH_CLAMP_FAR_AMD 0x901F +#endif /* GL_AMD_depth_clamp_separate */ + +#ifndef GL_AMD_draw_buffers_blend +#define GL_AMD_draw_buffers_blend 1 +typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +#endif +#endif /* GL_AMD_draw_buffers_blend */ + +#ifndef GL_AMD_framebuffer_multisample_advanced +#define GL_AMD_framebuffer_multisample_advanced 1 +#define GL_RENDERBUFFER_STORAGE_SAMPLES_AMD 0x91B2 +#define GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD 0x91B3 +#define GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD 0x91B4 +#define GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD 0x91B5 +#define GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B6 +#define GL_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B7 +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleAdvancedAMD (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleAdvancedAMD (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +#endif /* GL_AMD_framebuffer_multisample_advanced */ + +#ifndef GL_AMD_framebuffer_sample_positions +#define GL_AMD_framebuffer_sample_positions 1 +#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F +#define GL_PIXELS_PER_SAMPLE_PATTERN_X_AMD 0x91AE +#define GL_PIXELS_PER_SAMPLE_PATTERN_Y_AMD 0x91AF +#define GL_ALL_PIXELS_AMD 0xFFFFFFFF +typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC) (GLenum target, GLuint numsamples, GLuint pixelindex, const GLfloat *values); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC) (GLuint framebuffer, GLuint numsamples, GLuint pixelindex, const GLfloat *values); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERFVAMDPROC) (GLenum target, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERFVAMDPROC) (GLuint framebuffer, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSamplePositionsfvAMD (GLenum target, GLuint numsamples, GLuint pixelindex, const GLfloat *values); +GLAPI void APIENTRY glNamedFramebufferSamplePositionsfvAMD (GLuint framebuffer, GLuint numsamples, GLuint pixelindex, const GLfloat *values); +GLAPI void APIENTRY glGetFramebufferParameterfvAMD (GLenum target, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values); +GLAPI void APIENTRY glGetNamedFramebufferParameterfvAMD (GLuint framebuffer, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values); +#endif +#endif /* GL_AMD_framebuffer_sample_positions */ + +#ifndef GL_AMD_gcn_shader +#define GL_AMD_gcn_shader 1 +#endif /* GL_AMD_gcn_shader */ + +#ifndef GL_AMD_gpu_shader_half_float +#define GL_AMD_gpu_shader_half_float 1 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +#define GL_FLOAT16_MAT2_AMD 0x91C5 +#define GL_FLOAT16_MAT3_AMD 0x91C6 +#define GL_FLOAT16_MAT4_AMD 0x91C7 +#define GL_FLOAT16_MAT2x3_AMD 0x91C8 +#define GL_FLOAT16_MAT2x4_AMD 0x91C9 +#define GL_FLOAT16_MAT3x2_AMD 0x91CA +#define GL_FLOAT16_MAT3x4_AMD 0x91CB +#define GL_FLOAT16_MAT4x2_AMD 0x91CC +#define GL_FLOAT16_MAT4x3_AMD 0x91CD +#endif /* GL_AMD_gpu_shader_half_float */ + +#ifndef GL_AMD_gpu_shader_int16 +#define GL_AMD_gpu_shader_int16 1 +#endif /* GL_AMD_gpu_shader_int16 */ + +#ifndef GL_AMD_gpu_shader_int64 +#define GL_AMD_gpu_shader_int64 1 +typedef khronos_int64_t GLint64EXT; +#define GL_INT64_NV 0x140E +#define GL_UNSIGNED_INT64_NV 0x140F +#define GL_INT8_NV 0x8FE0 +#define GL_INT8_VEC2_NV 0x8FE1 +#define GL_INT8_VEC3_NV 0x8FE2 +#define GL_INT8_VEC4_NV 0x8FE3 +#define GL_INT16_NV 0x8FE4 +#define GL_INT16_VEC2_NV 0x8FE5 +#define GL_INT16_VEC3_NV 0x8FE6 +#define GL_INT16_VEC4_NV 0x8FE7 +#define GL_INT64_VEC2_NV 0x8FE9 +#define GL_INT64_VEC3_NV 0x8FEA +#define GL_INT64_VEC4_NV 0x8FEB +#define GL_UNSIGNED_INT8_NV 0x8FEC +#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +#define GL_UNSIGNED_INT16_NV 0x8FF0 +#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); +GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); +GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); +GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif +#endif /* GL_AMD_gpu_shader_int64 */ + +#ifndef GL_AMD_interleaved_elements +#define GL_AMD_interleaved_elements 1 +#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4 +#define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5 +typedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param); +#endif +#endif /* GL_AMD_interleaved_elements */ + +#ifndef GL_AMD_multi_draw_indirect +#define GL_AMD_multi_draw_indirect 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride); +#endif +#endif /* GL_AMD_multi_draw_indirect */ + +#ifndef GL_AMD_name_gen_delete +#define GL_AMD_name_gen_delete 1 +#define GL_DATA_BUFFER_AMD 0x9151 +#define GL_PERFORMANCE_MONITOR_AMD 0x9152 +#define GL_QUERY_OBJECT_AMD 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 +#define GL_SAMPLER_OBJECT_AMD 0x9155 +typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); +typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); +typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); +GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); +GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); +#endif +#endif /* GL_AMD_name_gen_delete */ + +#ifndef GL_AMD_occlusion_query_event +#define GL_AMD_occlusion_query_event 1 +#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F +#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 +#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 +#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 +#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 +#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF +typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param); +#endif +#endif /* GL_AMD_occlusion_query_event */ + +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor 1 +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data); +typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data); +GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif +#endif /* GL_AMD_performance_monitor */ + +#ifndef GL_AMD_pinned_memory +#define GL_AMD_pinned_memory 1 +#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 +#endif /* GL_AMD_pinned_memory */ + +#ifndef GL_AMD_query_buffer_object +#define GL_AMD_query_buffer_object 1 +#define GL_QUERY_BUFFER_AMD 0x9192 +#define GL_QUERY_BUFFER_BINDING_AMD 0x9193 +#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194 +#endif /* GL_AMD_query_buffer_object */ + +#ifndef GL_AMD_sample_positions +#define GL_AMD_sample_positions 1 +typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); +#endif +#endif /* GL_AMD_sample_positions */ + +#ifndef GL_AMD_seamless_cubemap_per_texture +#define GL_AMD_seamless_cubemap_per_texture 1 +#endif /* GL_AMD_seamless_cubemap_per_texture */ + +#ifndef GL_AMD_shader_atomic_counter_ops +#define GL_AMD_shader_atomic_counter_ops 1 +#endif /* GL_AMD_shader_atomic_counter_ops */ + +#ifndef GL_AMD_shader_ballot +#define GL_AMD_shader_ballot 1 +#endif /* GL_AMD_shader_ballot */ + +#ifndef GL_AMD_shader_explicit_vertex_parameter +#define GL_AMD_shader_explicit_vertex_parameter 1 +#endif /* GL_AMD_shader_explicit_vertex_parameter */ + +#ifndef GL_AMD_shader_gpu_shader_half_float_fetch +#define GL_AMD_shader_gpu_shader_half_float_fetch 1 +#endif /* GL_AMD_shader_gpu_shader_half_float_fetch */ + +#ifndef GL_AMD_shader_image_load_store_lod +#define GL_AMD_shader_image_load_store_lod 1 +#endif /* GL_AMD_shader_image_load_store_lod */ + +#ifndef GL_AMD_shader_stencil_export +#define GL_AMD_shader_stencil_export 1 +#endif /* GL_AMD_shader_stencil_export */ + +#ifndef GL_AMD_shader_trinary_minmax +#define GL_AMD_shader_trinary_minmax 1 +#endif /* GL_AMD_shader_trinary_minmax */ + +#ifndef GL_AMD_sparse_texture +#define GL_AMD_sparse_texture 1 +#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 +#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A +#define GL_MIN_SPARSE_LEVEL_AMD 0x919B +#define GL_MIN_LOD_WARNING_AMD 0x919C +#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 +typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +#endif +#endif /* GL_AMD_sparse_texture */ + +#ifndef GL_AMD_stencil_operation_extended +#define GL_AMD_stencil_operation_extended 1 +#define GL_SET_AMD 0x874A +#define GL_REPLACE_VALUE_AMD 0x874B +#define GL_STENCIL_OP_VALUE_AMD 0x874C +#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D +typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value); +#endif +#endif /* GL_AMD_stencil_operation_extended */ + +#ifndef GL_AMD_texture_gather_bias_lod +#define GL_AMD_texture_gather_bias_lod 1 +#endif /* GL_AMD_texture_gather_bias_lod */ + +#ifndef GL_AMD_texture_texture4 +#define GL_AMD_texture_texture4 1 +#endif /* GL_AMD_texture_texture4 */ + +#ifndef GL_AMD_transform_feedback3_lines_triangles +#define GL_AMD_transform_feedback3_lines_triangles 1 +#endif /* GL_AMD_transform_feedback3_lines_triangles */ + +#ifndef GL_AMD_transform_feedback4 +#define GL_AMD_transform_feedback4 1 +#define GL_STREAM_RASTERIZATION_AMD 0x91A0 +#endif /* GL_AMD_transform_feedback4 */ + +#ifndef GL_AMD_vertex_shader_layer +#define GL_AMD_vertex_shader_layer 1 +#endif /* GL_AMD_vertex_shader_layer */ + +#ifndef GL_AMD_vertex_shader_tessellator +#define GL_AMD_vertex_shader_tessellator 1 +#define GL_SAMPLER_BUFFER_AMD 0x9001 +#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 +#define GL_TESSELLATION_MODE_AMD 0x9004 +#define GL_TESSELLATION_FACTOR_AMD 0x9005 +#define GL_DISCRETE_AMD 0x9006 +#define GL_CONTINUOUS_AMD 0x9007 +typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor); +GLAPI void APIENTRY glTessellationModeAMD (GLenum mode); +#endif +#endif /* GL_AMD_vertex_shader_tessellator */ + +#ifndef GL_AMD_vertex_shader_viewport_index +#define GL_AMD_vertex_shader_viewport_index 1 +#endif /* GL_AMD_vertex_shader_viewport_index */ + +#ifndef GL_APPLE_aux_depth_stencil +#define GL_APPLE_aux_depth_stencil 1 +#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 +#endif /* GL_APPLE_aux_depth_stencil */ + +#ifndef GL_APPLE_client_storage +#define GL_APPLE_client_storage 1 +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +#endif /* GL_APPLE_client_storage */ + +#ifndef GL_APPLE_element_array +#define GL_APPLE_element_array 1 +#define GL_ELEMENT_ARRAY_APPLE 0x8A0C +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E +typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer); +GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#endif +#endif /* GL_APPLE_element_array */ + +#ifndef GL_APPLE_fence +#define GL_APPLE_fence 1 +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_FENCE_APPLE 0x8A0B +typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); +typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences); +GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); +GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence); +GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name); +GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name); +#endif +#endif /* GL_APPLE_fence */ + +#ifndef GL_APPLE_float_pixels +#define GL_APPLE_float_pixels 1 +#define GL_HALF_APPLE 0x140B +#define GL_RGBA_FLOAT32_APPLE 0x8814 +#define GL_RGB_FLOAT32_APPLE 0x8815 +#define GL_ALPHA_FLOAT32_APPLE 0x8816 +#define GL_INTENSITY_FLOAT32_APPLE 0x8817 +#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 +#define GL_RGBA_FLOAT16_APPLE 0x881A +#define GL_RGB_FLOAT16_APPLE 0x881B +#define GL_ALPHA_FLOAT16_APPLE 0x881C +#define GL_INTENSITY_FLOAT16_APPLE 0x881D +#define GL_LUMINANCE_FLOAT16_APPLE 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F +#define GL_COLOR_FLOAT_APPLE 0x8A0F +#endif /* GL_APPLE_float_pixels */ + +#ifndef GL_APPLE_flush_buffer_range +#define GL_APPLE_flush_buffer_range 1 +#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 +#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 +typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); +#endif +#endif /* GL_APPLE_flush_buffer_range */ + +#ifndef GL_APPLE_object_purgeable +#define GL_APPLE_object_purgeable 1 +#define GL_BUFFER_OBJECT_APPLE 0x85B3 +#define GL_RELEASED_APPLE 0x8A19 +#define GL_VOLATILE_APPLE 0x8A1A +#define GL_RETAINED_APPLE 0x8A1B +#define GL_UNDEFINED_APPLE 0x8A1C +#define GL_PURGEABLE_APPLE 0x8A1D +typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); +#endif +#endif /* GL_APPLE_object_purgeable */ + +#ifndef GL_APPLE_rgb_422 +#define GL_APPLE_rgb_422 1 +#define GL_RGB_422_APPLE 0x8A1F +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#define GL_RGB_RAW_422_APPLE 0x8A51 +#endif /* GL_APPLE_rgb_422 */ + +#ifndef GL_APPLE_row_bytes +#define GL_APPLE_row_bytes 1 +#define GL_PACK_ROW_BYTES_APPLE 0x8A15 +#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 +#endif /* GL_APPLE_row_bytes */ + +#ifndef GL_APPLE_specular_vector +#define GL_APPLE_specular_vector 1 +#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 +#endif /* GL_APPLE_specular_vector */ + +#ifndef GL_APPLE_texture_range +#define GL_APPLE_texture_range 1 +#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 +#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 +#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC +#define GL_STORAGE_PRIVATE_APPLE 0x85BD +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF +typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer); +GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params); +#endif +#endif /* GL_APPLE_texture_range */ + +#ifndef GL_APPLE_transform_hint +#define GL_APPLE_transform_hint 1 +#define GL_TRANSFORM_HINT_APPLE 0x85B1 +#endif /* GL_APPLE_transform_hint */ + +#ifndef GL_APPLE_vertex_array_object +#define GL_APPLE_vertex_array_object 1 +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array); +GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); +GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); +GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array); +#endif +#endif /* GL_APPLE_vertex_array_object */ + +#ifndef GL_APPLE_vertex_array_range +#define GL_APPLE_vertex_array_range 1 +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CLIENT_APPLE 0x85B4 +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer); +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer); +typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer); +GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer); +GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param); +#endif +#endif /* GL_APPLE_vertex_array_range */ + +#ifndef GL_APPLE_vertex_program_evaluators +#define GL_APPLE_vertex_program_evaluators 1 +#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 +#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 +#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 +#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 +#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 +#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 +#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 +#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 +#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 +#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +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); +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); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname); +GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname); +GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); +GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +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); +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); +#endif +#endif /* GL_APPLE_vertex_program_evaluators */ + +#ifndef GL_APPLE_ycbcr_422 +#define GL_APPLE_ycbcr_422 1 +#define GL_YCBCR_422_APPLE 0x85B9 +#endif /* GL_APPLE_ycbcr_422 */ + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers 1 +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 +typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs); +#endif +#endif /* GL_ATI_draw_buffers */ + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array 1 +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer); +GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count); +GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); +#endif +#endif /* GL_ATI_element_array */ + +#ifndef GL_ATI_envmap_bumpmap +#define GL_ATI_envmap_bumpmap 1 +#define GL_BUMP_ROT_MATRIX_ATI 0x8775 +#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +#define GL_BUMP_TEX_UNITS_ATI 0x8778 +#define GL_DUDV_ATI 0x8779 +#define GL_DU8DV8_ATI 0x877A +#define GL_BUMP_ENVMAP_ATI 0x877B +#define GL_BUMP_TARGET_ATI 0x877C +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param); +GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param); +GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); +#endif +#endif /* GL_ATI_envmap_bumpmap */ + +#ifndef GL_ATI_fragment_shader +#define GL_ATI_fragment_shader 1 +#define GL_FRAGMENT_SHADER_ATI 0x8920 +#define GL_REG_0_ATI 0x8921 +#define GL_REG_1_ATI 0x8922 +#define GL_REG_2_ATI 0x8923 +#define GL_REG_3_ATI 0x8924 +#define GL_REG_4_ATI 0x8925 +#define GL_REG_5_ATI 0x8926 +#define GL_REG_6_ATI 0x8927 +#define GL_REG_7_ATI 0x8928 +#define GL_REG_8_ATI 0x8929 +#define GL_REG_9_ATI 0x892A +#define GL_REG_10_ATI 0x892B +#define GL_REG_11_ATI 0x892C +#define GL_REG_12_ATI 0x892D +#define GL_REG_13_ATI 0x892E +#define GL_REG_14_ATI 0x892F +#define GL_REG_15_ATI 0x8930 +#define GL_REG_16_ATI 0x8931 +#define GL_REG_17_ATI 0x8932 +#define GL_REG_18_ATI 0x8933 +#define GL_REG_19_ATI 0x8934 +#define GL_REG_20_ATI 0x8935 +#define GL_REG_21_ATI 0x8936 +#define GL_REG_22_ATI 0x8937 +#define GL_REG_23_ATI 0x8938 +#define GL_REG_24_ATI 0x8939 +#define GL_REG_25_ATI 0x893A +#define GL_REG_26_ATI 0x893B +#define GL_REG_27_ATI 0x893C +#define GL_REG_28_ATI 0x893D +#define GL_REG_29_ATI 0x893E +#define GL_REG_30_ATI 0x893F +#define GL_REG_31_ATI 0x8940 +#define GL_CON_0_ATI 0x8941 +#define GL_CON_1_ATI 0x8942 +#define GL_CON_2_ATI 0x8943 +#define GL_CON_3_ATI 0x8944 +#define GL_CON_4_ATI 0x8945 +#define GL_CON_5_ATI 0x8946 +#define GL_CON_6_ATI 0x8947 +#define GL_CON_7_ATI 0x8948 +#define GL_CON_8_ATI 0x8949 +#define GL_CON_9_ATI 0x894A +#define GL_CON_10_ATI 0x894B +#define GL_CON_11_ATI 0x894C +#define GL_CON_12_ATI 0x894D +#define GL_CON_13_ATI 0x894E +#define GL_CON_14_ATI 0x894F +#define GL_CON_15_ATI 0x8950 +#define GL_CON_16_ATI 0x8951 +#define GL_CON_17_ATI 0x8952 +#define GL_CON_18_ATI 0x8953 +#define GL_CON_19_ATI 0x8954 +#define GL_CON_20_ATI 0x8955 +#define GL_CON_21_ATI 0x8956 +#define GL_CON_22_ATI 0x8957 +#define GL_CON_23_ATI 0x8958 +#define GL_CON_24_ATI 0x8959 +#define GL_CON_25_ATI 0x895A +#define GL_CON_26_ATI 0x895B +#define GL_CON_27_ATI 0x895C +#define GL_CON_28_ATI 0x895D +#define GL_CON_29_ATI 0x895E +#define GL_CON_30_ATI 0x895F +#define GL_CON_31_ATI 0x8960 +#define GL_MOV_ATI 0x8961 +#define GL_ADD_ATI 0x8963 +#define GL_MUL_ATI 0x8964 +#define GL_SUB_ATI 0x8965 +#define GL_DOT3_ATI 0x8966 +#define GL_DOT4_ATI 0x8967 +#define GL_MAD_ATI 0x8968 +#define GL_LERP_ATI 0x8969 +#define GL_CND_ATI 0x896A +#define GL_CND0_ATI 0x896B +#define GL_DOT2_ADD_ATI 0x896C +#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +#define GL_NUM_PASSES_ATI 0x8970 +#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +#define GL_SWIZZLE_STR_ATI 0x8976 +#define GL_SWIZZLE_STQ_ATI 0x8977 +#define GL_SWIZZLE_STR_DR_ATI 0x8978 +#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +#define GL_SWIZZLE_STRQ_ATI 0x897A +#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B +#define GL_RED_BIT_ATI 0x00000001 +#define GL_GREEN_BIT_ATI 0x00000002 +#define GL_BLUE_BIT_ATI 0x00000004 +#define GL_2X_BIT_ATI 0x00000001 +#define GL_4X_BIT_ATI 0x00000002 +#define GL_8X_BIT_ATI 0x00000004 +#define GL_HALF_BIT_ATI 0x00000008 +#define GL_QUARTER_BIT_ATI 0x00000010 +#define GL_EIGHTH_BIT_ATI 0x00000020 +#define GL_SATURATE_BIT_ATI 0x00000040 +#define GL_COMP_BIT_ATI 0x00000002 +#define GL_NEGATE_BIT_ATI 0x00000004 +#define GL_BIAS_BIT_ATI 0x00000008 +typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +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); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +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); +typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range); +GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id); +GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id); +GLAPI void APIENTRY glBeginFragmentShaderATI (void); +GLAPI void APIENTRY glEndFragmentShaderATI (void); +GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); +GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); +GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +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); +GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +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); +GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); +#endif +#endif /* GL_ATI_fragment_shader */ + +#ifndef GL_ATI_map_object_buffer +#define GL_ATI_map_object_buffer 1 +typedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer); +#endif +#endif /* GL_ATI_map_object_buffer */ + +#ifndef GL_ATI_meminfo +#define GL_ATI_meminfo 1 +#define GL_VBO_FREE_MEMORY_ATI 0x87FB +#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC +#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD +#endif /* GL_ATI_meminfo */ + +#ifndef GL_ATI_pixel_format_float +#define GL_ATI_pixel_format_float 1 +#define GL_RGBA_FLOAT_MODE_ATI 0x8820 +#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +#endif /* GL_ATI_pixel_format_float */ + +#ifndef GL_ATI_pn_triangles +#define GL_ATI_pn_triangles 1 +#define GL_PN_TRIANGLES_ATI 0x87F0 +#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 +typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param); +GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param); +#endif +#endif /* GL_ATI_pn_triangles */ + +#ifndef GL_ATI_separate_stencil +#define GL_ATI_separate_stencil 1 +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#endif +#endif /* GL_ATI_separate_stencil */ + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader 1 +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +#endif /* GL_ATI_text_fragment_shader */ + +#ifndef GL_ATI_texture_env_combine3 +#define GL_ATI_texture_env_combine3 1 +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 +#endif /* GL_ATI_texture_env_combine3 */ + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float 1 +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +#endif /* GL_ATI_texture_float */ + +#ifndef GL_ATI_texture_mirror_once +#define GL_ATI_texture_mirror_once 1 +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +#endif /* GL_ATI_texture_mirror_once */ + +#ifndef GL_ATI_vertex_array_object +#define GL_ATI_vertex_array_object 1 +#define GL_STATIC_ATI 0x8760 +#define GL_DYNAMIC_ATI 0x8761 +#define GL_PRESERVE_ATI 0x8762 +#define GL_DISCARD_ATI 0x8763 +#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 +typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage); +typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage); +GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve); +GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); +GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); +#endif +#endif /* GL_ATI_vertex_array_object */ + +#ifndef GL_ATI_vertex_attrib_array_object +#define GL_ATI_vertex_attrib_array_object 1 +typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); +#endif +#endif /* GL_ATI_vertex_attrib_array_object */ + +#ifndef GL_ATI_vertex_streams +#define GL_ATI_vertex_streams 1 +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_VERTEX_STREAM0_ATI 0x876C +#define GL_VERTEX_STREAM1_ATI 0x876D +#define GL_VERTEX_STREAM2_ATI 0x876E +#define GL_VERTEX_STREAM3_ATI 0x876F +#define GL_VERTEX_STREAM4_ATI 0x8770 +#define GL_VERTEX_STREAM5_ATI 0x8771 +#define GL_VERTEX_STREAM6_ATI 0x8772 +#define GL_VERTEX_STREAM7_ATI 0x8773 +#define GL_VERTEX_SOURCE_ATI 0x8774 +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x); +GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x); +GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x); +GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x); +GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y); +GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords); +GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); +GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream); +GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param); +GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param); +#endif +#endif /* GL_ATI_vertex_streams */ + +#ifndef GL_EXT_422_pixels +#define GL_EXT_422_pixels 1 +#define GL_422_EXT 0x80CC +#define GL_422_REV_EXT 0x80CD +#define GL_422_AVERAGE_EXT 0x80CE +#define GL_422_REV_AVERAGE_EXT 0x80CF +#endif /* GL_EXT_422_pixels */ + +#ifndef GL_EXT_EGL_image_storage +#define GL_EXT_EGL_image_storage 1 +typedef void *GLeglImageOES; +typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC) (GLenum target, GLeglImageOES image, const GLint* attrib_list); +typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC) (GLuint texture, GLeglImageOES image, const GLint* attrib_list); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEGLImageTargetTexStorageEXT (GLenum target, GLeglImageOES image, const GLint* attrib_list); +GLAPI void APIENTRY glEGLImageTargetTextureStorageEXT (GLuint texture, GLeglImageOES image, const GLint* attrib_list); +#endif +#endif /* GL_EXT_EGL_image_storage */ + +#ifndef GL_EXT_EGL_sync +#define GL_EXT_EGL_sync 1 +#endif /* GL_EXT_EGL_sync */ + +#ifndef GL_EXT_abgr +#define GL_EXT_abgr 1 +#define GL_ABGR_EXT 0x8000 +#endif /* GL_EXT_abgr */ + +#ifndef GL_EXT_bgra +#define GL_EXT_bgra 1 +#define GL_BGR_EXT 0x80E0 +#define GL_BGRA_EXT 0x80E1 +#endif /* GL_EXT_bgra */ + +#ifndef GL_EXT_bindable_uniform +#define GL_EXT_bindable_uniform 1 +#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 +#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 +#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 +#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED +#define GL_UNIFORM_BUFFER_EXT 0x8DEE +#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF +typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); +typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); +GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location); +GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location); +#endif +#endif /* GL_EXT_bindable_uniform */ + +#ifndef GL_EXT_blend_color +#define GL_EXT_blend_color 1 +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_BLEND_COLOR_EXT 0x8005 +typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +#endif +#endif /* GL_EXT_blend_color */ + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate 1 +#define GL_BLEND_EQUATION_RGB_EXT 0x8009 +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); +#endif +#endif /* GL_EXT_blend_equation_separate */ + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate 1 +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif +#endif /* GL_EXT_blend_func_separate */ + +#ifndef GL_EXT_blend_logic_op +#define GL_EXT_blend_logic_op 1 +#endif /* GL_EXT_blend_logic_op */ + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_BLEND_EQUATION_EXT 0x8009 +typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationEXT (GLenum mode); +#endif +#endif /* GL_EXT_blend_minmax */ + +#ifndef GL_EXT_blend_subtract +#define GL_EXT_blend_subtract 1 +#define GL_FUNC_SUBTRACT_EXT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B +#endif /* GL_EXT_blend_subtract */ + +#ifndef GL_EXT_clip_volume_hint +#define GL_EXT_clip_volume_hint 1 +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 +#endif /* GL_EXT_clip_volume_hint */ + +#ifndef GL_EXT_cmyka +#define GL_EXT_cmyka 1 +#define GL_CMYK_EXT 0x800C +#define GL_CMYKA_EXT 0x800D +#define GL_PACK_CMYK_HINT_EXT 0x800E +#define GL_UNPACK_CMYK_HINT_EXT 0x800F +#endif /* GL_EXT_cmyka */ + +#ifndef GL_EXT_color_subtable +#define GL_EXT_color_subtable 1 +typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +#endif +#endif /* GL_EXT_color_subtable */ + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array 1 +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 +typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count); +GLAPI void APIENTRY glUnlockArraysEXT (void); +#endif +#endif /* GL_EXT_compiled_vertex_array */ + +#ifndef GL_EXT_convolution +#define GL_EXT_convolution 1 +#define GL_CONVOLUTION_1D_EXT 0x8010 +#define GL_CONVOLUTION_2D_EXT 0x8011 +#define GL_SEPARABLE_2D_EXT 0x8012 +#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +#define GL_REDUCE_EXT 0x8016 +#define GL_CONVOLUTION_FORMAT_EXT 0x8017 +#define GL_CONVOLUTION_WIDTH_EXT 0x8018 +#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); +GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); +GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); +GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); +GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image); +GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); +GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); +#endif +#endif /* GL_EXT_convolution */ + +#ifndef GL_EXT_coordinate_frame +#define GL_EXT_coordinate_frame 1 +#define GL_TANGENT_ARRAY_EXT 0x8439 +#define GL_BINORMAL_ARRAY_EXT 0x843A +#define GL_CURRENT_TANGENT_EXT 0x843B +#define GL_CURRENT_BINORMAL_EXT 0x843C +#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +#define GL_MAP1_TANGENT_EXT 0x8444 +#define GL_MAP2_TANGENT_EXT 0x8445 +#define GL_MAP1_BINORMAL_EXT 0x8446 +#define GL_MAP2_BINORMAL_EXT 0x8447 +typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); +GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); +GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); +GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz); +GLAPI void APIENTRY glTangent3ivEXT (const GLint *v); +GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); +GLAPI void APIENTRY glTangent3svEXT (const GLshort *v); +GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); +GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); +GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); +GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz); +GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v); +GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); +GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v); +GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_EXT_coordinate_frame */ + +#ifndef GL_EXT_copy_texture +#define GL_EXT_copy_texture 1 +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif +#endif /* GL_EXT_copy_texture */ + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex 1 +#define GL_CULL_VERTEX_EXT 0x81AA +#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC +typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params); +GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params); +#endif +#endif /* GL_EXT_cull_vertex */ + +#ifndef GL_EXT_debug_label +#define GL_EXT_debug_label 1 +#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F +#define GL_PROGRAM_OBJECT_EXT 0x8B40 +#define GL_SHADER_OBJECT_EXT 0x8B48 +#define GL_BUFFER_OBJECT_EXT 0x9151 +#define GL_QUERY_OBJECT_EXT 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 +typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); +typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); +GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif +#endif /* GL_EXT_debug_label */ + +#ifndef GL_EXT_debug_marker +#define GL_EXT_debug_marker 1 +typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); +GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); +GLAPI void APIENTRY glPopGroupMarkerEXT (void); +#endif +#endif /* GL_EXT_debug_marker */ + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test 1 +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BOUNDS_EXT 0x8891 +typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); +#endif +#endif /* GL_EXT_depth_bounds_test */ + +#ifndef GL_EXT_direct_state_access +#define GL_EXT_direct_state_access 1 +#define GL_PROGRAM_MATRIX_EXT 0x8E2D +#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +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); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +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); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +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); +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); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +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); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +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); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +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); +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); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); +typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data); +typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +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); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +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); +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); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); +typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); +GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); +GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); +GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +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); +GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +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); +GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +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); +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); +GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); +GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +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); +GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +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); +GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +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); +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); +GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); +GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data); +GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); +GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); +GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); +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); +GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +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); +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); +GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img); +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); +GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); +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); +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); +GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); +GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img); +GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); +GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); +GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params); +GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); +GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params); +GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); +GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string); +GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); +GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); +GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); +GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array); +GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array); +GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index); +GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param); +GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param); +GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param); +GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); +GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); +GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex); +GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor); +GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor); +#endif +#endif /* GL_EXT_direct_state_access */ + +#ifndef GL_EXT_draw_buffers2 +#define GL_EXT_draw_buffers2 1 +typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +#endif +#endif /* GL_EXT_draw_buffers2 */ + +#ifndef GL_EXT_draw_instanced +#define GL_EXT_draw_instanced 1 +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#endif +#endif /* GL_EXT_draw_instanced */ + +#ifndef GL_EXT_draw_range_elements +#define GL_EXT_draw_range_elements 1 +#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +#endif +#endif /* GL_EXT_draw_range_elements */ + +#ifndef GL_EXT_external_buffer +#define GL_EXT_external_buffer 1 +typedef void *GLeglClientBufferEXT; +typedef void (APIENTRYP PFNGLBUFFERSTORAGEEXTERNALEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTERNALEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferStorageExternalEXT (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +GLAPI void APIENTRY glNamedBufferStorageExternalEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +#endif +#endif /* GL_EXT_external_buffer */ + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord 1 +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 +typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord); +GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord); +GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord); +GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord); +GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_EXT_fog_coord */ + +#ifndef GL_EXT_framebuffer_blit +#define GL_EXT_framebuffer_blit 1 +#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif +#endif /* GL_EXT_framebuffer_blit */ + +#ifndef GL_EXT_framebuffer_multisample +#define GL_EXT_framebuffer_multisample 1 +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +#endif /* GL_EXT_framebuffer_multisample */ + +#ifndef GL_EXT_framebuffer_multisample_blit_scaled +#define GL_EXT_framebuffer_multisample_blit_scaled 1 +#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA +#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB +#endif /* GL_EXT_framebuffer_multisample_blit_scaled */ + +#ifndef GL_EXT_framebuffer_object +#define GL_EXT_framebuffer_object 1 +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +#define GL_FRAMEBUFFER_EXT 0x8D40 +#define GL_RENDERBUFFER_EXT 0x8D41 +#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +#define GL_STENCIL_INDEX1_EXT 0x8D46 +#define GL_STENCIL_INDEX4_EXT 0x8D47 +#define GL_STENCIL_INDEX8_EXT 0x8D48 +#define GL_STENCIL_INDEX16_EXT 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer); +GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); +GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer); +GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer); +GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); +GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); +GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target); +GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target); +#endif +#endif /* GL_EXT_framebuffer_object */ + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_EXT_framebuffer_sRGB 1 +#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA +#endif /* GL_EXT_framebuffer_sRGB */ + +#ifndef GL_EXT_geometry_shader4 +#define GL_EXT_geometry_shader4 1 +#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE +#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +#define GL_LINES_ADJACENCY_EXT 0x000A +#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B +#define GL_TRIANGLES_ADJACENCY_EXT 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); +#endif +#endif /* GL_EXT_geometry_shader4 */ + +#ifndef GL_EXT_gpu_program_parameters +#define GL_EXT_gpu_program_parameters 1 +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +#endif +#endif /* GL_EXT_gpu_program_parameters */ + +#ifndef GL_EXT_gpu_shader4 +#define GL_EXT_gpu_shader4 1 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD +#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +#define GL_SAMPLER_BUFFER_EXT 0x8DC2 +#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 +#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +#define GL_INT_SAMPLER_1D_EXT 0x8DC9 +#define GL_INT_SAMPLER_2D_EXT 0x8DCA +#define GL_INT_SAMPLER_3D_EXT 0x8DCB +#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC +#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD +#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF +#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905 +typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); +GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name); +GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0); +GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); +#endif +#endif /* GL_EXT_gpu_shader4 */ + +#ifndef GL_EXT_histogram +#define GL_EXT_histogram 1 +#define GL_HISTOGRAM_EXT 0x8024 +#define GL_PROXY_HISTOGRAM_EXT 0x8025 +#define GL_HISTOGRAM_WIDTH_EXT 0x8026 +#define GL_HISTOGRAM_FORMAT_EXT 0x8027 +#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +#define GL_HISTOGRAM_SINK_EXT 0x802D +#define GL_MINMAX_EXT 0x802E +#define GL_MINMAX_FORMAT_EXT 0x802F +#define GL_MINMAX_SINK_EXT 0x8030 +#define GL_TABLE_TOO_LARGE_EXT 0x8031 +typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); +GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glResetHistogramEXT (GLenum target); +GLAPI void APIENTRY glResetMinmaxEXT (GLenum target); +#endif +#endif /* GL_EXT_histogram */ + +#ifndef GL_EXT_index_array_formats +#define GL_EXT_index_array_formats 1 +#define GL_IUI_V2F_EXT 0x81AD +#define GL_IUI_V3F_EXT 0x81AE +#define GL_IUI_N3F_V2F_EXT 0x81AF +#define GL_IUI_N3F_V3F_EXT 0x81B0 +#define GL_T2F_IUI_V2F_EXT 0x81B1 +#define GL_T2F_IUI_V3F_EXT 0x81B2 +#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 +#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 +#endif /* GL_EXT_index_array_formats */ + +#ifndef GL_EXT_index_func +#define GL_EXT_index_func 1 +#define GL_INDEX_TEST_EXT 0x81B5 +#define GL_INDEX_TEST_FUNC_EXT 0x81B6 +#define GL_INDEX_TEST_REF_EXT 0x81B7 +typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref); +#endif +#endif /* GL_EXT_index_func */ + +#ifndef GL_EXT_index_material +#define GL_EXT_index_material 1 +#define GL_INDEX_MATERIAL_EXT 0x81B8 +#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 +#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA +typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode); +#endif +#endif /* GL_EXT_index_material */ + +#ifndef GL_EXT_index_texture +#define GL_EXT_index_texture 1 +#endif /* GL_EXT_index_texture */ + +#ifndef GL_EXT_light_texture +#define GL_EXT_light_texture 1 +#define GL_FRAGMENT_MATERIAL_EXT 0x8349 +#define GL_FRAGMENT_NORMAL_EXT 0x834A +#define GL_FRAGMENT_COLOR_EXT 0x834C +#define GL_ATTENUATION_EXT 0x834D +#define GL_SHADOW_ATTENUATION_EXT 0x834E +#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +#define GL_TEXTURE_LIGHT_EXT 0x8350 +#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyTextureEXT (GLenum mode); +GLAPI void APIENTRY glTextureLightEXT (GLenum pname); +GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode); +#endif +#endif /* GL_EXT_light_texture */ + +#ifndef GL_EXT_memory_object +#define GL_EXT_memory_object 1 +#define GL_TEXTURE_TILING_EXT 0x9580 +#define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581 +#define GL_PROTECTED_MEMORY_OBJECT_EXT 0x959B +#define GL_NUM_TILING_TYPES_EXT 0x9582 +#define GL_TILING_TYPES_EXT 0x9583 +#define GL_OPTIMAL_TILING_EXT 0x9584 +#define GL_LINEAR_TILING_EXT 0x9585 +#define GL_NUM_DEVICE_UUIDS_EXT 0x9596 +#define GL_DEVICE_UUID_EXT 0x9597 +#define GL_DRIVER_UUID_EXT 0x9598 +#define GL_UUID_SIZE_EXT 16 +typedef void (APIENTRYP PFNGLGETUNSIGNEDBYTEVEXTPROC) (GLenum pname, GLubyte *data); +typedef void (APIENTRYP PFNGLGETUNSIGNEDBYTEI_VEXTPROC) (GLenum target, GLuint index, GLubyte *data); +typedef void (APIENTRYP PFNGLDELETEMEMORYOBJECTSEXTPROC) (GLsizei n, const GLuint *memoryObjects); +typedef GLboolean (APIENTRYP PFNGLISMEMORYOBJECTEXTPROC) (GLuint memoryObject); +typedef void (APIENTRYP PFNGLCREATEMEMORYOBJECTSEXTPROC) (GLsizei n, GLuint *memoryObjects); +typedef void (APIENTRYP PFNGLMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM2DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM3DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLBUFFERSTORAGEMEMEXTPROC) (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM2DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM2DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM3DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM3DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEMEMEXTPROC) (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM1DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUnsignedBytevEXT (GLenum pname, GLubyte *data); +GLAPI void APIENTRY glGetUnsignedBytei_vEXT (GLenum target, GLuint index, GLubyte *data); +GLAPI void APIENTRY glDeleteMemoryObjectsEXT (GLsizei n, const GLuint *memoryObjects); +GLAPI GLboolean APIENTRY glIsMemoryObjectEXT (GLuint memoryObject); +GLAPI void APIENTRY glCreateMemoryObjectsEXT (GLsizei n, GLuint *memoryObjects); +GLAPI void APIENTRY glMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, GLint *params); +GLAPI void APIENTRY glTexStorageMem2DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTexStorageMem2DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTexStorageMem3DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTexStorageMem3DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glBufferStorageMemEXT (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem2DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem2DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem3DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem3DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glNamedBufferStorageMemEXT (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTexStorageMem1DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem1DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset); +#endif +#endif /* GL_EXT_memory_object */ + +#ifndef GL_EXT_memory_object_fd +#define GL_EXT_memory_object_fd 1 +#define GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586 +typedef void (APIENTRYP PFNGLIMPORTMEMORYFDEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, GLint fd); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImportMemoryFdEXT (GLuint memory, GLuint64 size, GLenum handleType, GLint fd); +#endif +#endif /* GL_EXT_memory_object_fd */ + +#ifndef GL_EXT_memory_object_win32 +#define GL_EXT_memory_object_win32 1 +#define GL_HANDLE_TYPE_OPAQUE_WIN32_EXT 0x9587 +#define GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT 0x9588 +#define GL_DEVICE_LUID_EXT 0x9599 +#define GL_DEVICE_NODE_MASK_EXT 0x959A +#define GL_LUID_SIZE_EXT 8 +#define GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT 0x9589 +#define GL_HANDLE_TYPE_D3D12_RESOURCE_EXT 0x958A +#define GL_HANDLE_TYPE_D3D11_IMAGE_EXT 0x958B +#define GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT 0x958C +typedef void (APIENTRYP PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, void *handle); +typedef void (APIENTRYP PFNGLIMPORTMEMORYWIN32NAMEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, const void *name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImportMemoryWin32HandleEXT (GLuint memory, GLuint64 size, GLenum handleType, void *handle); +GLAPI void APIENTRY glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GLenum handleType, const void *name); +#endif +#endif /* GL_EXT_memory_object_win32 */ + +#ifndef GL_EXT_misc_attribute +#define GL_EXT_misc_attribute 1 +#endif /* GL_EXT_misc_attribute */ + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +#endif +#endif /* GL_EXT_multi_draw_arrays */ + +#ifndef GL_EXT_multisample +#define GL_EXT_multisample 1 +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#define GL_SAMPLE_MASK_EXT 0x80A0 +#define GL_1PASS_EXT 0x80A1 +#define GL_2PASS_0_EXT 0x80A2 +#define GL_2PASS_1_EXT 0x80A3 +#define GL_4PASS_0_EXT 0x80A4 +#define GL_4PASS_1_EXT 0x80A5 +#define GL_4PASS_2_EXT 0x80A6 +#define GL_4PASS_3_EXT 0x80A7 +#define GL_SAMPLE_BUFFERS_EXT 0x80A8 +#define GL_SAMPLES_EXT 0x80A9 +#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +#define GL_SAMPLE_PATTERN_EXT 0x80AC +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 +typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern); +#endif +#endif /* GL_EXT_multisample */ + +#ifndef GL_EXT_multiview_tessellation_geometry_shader +#define GL_EXT_multiview_tessellation_geometry_shader 1 +#endif /* GL_EXT_multiview_tessellation_geometry_shader */ + +#ifndef GL_EXT_multiview_texture_multisample +#define GL_EXT_multiview_texture_multisample 1 +#endif /* GL_EXT_multiview_texture_multisample */ + +#ifndef GL_EXT_multiview_timer_query +#define GL_EXT_multiview_timer_query 1 +#endif /* GL_EXT_multiview_timer_query */ + +#ifndef GL_EXT_packed_depth_stencil +#define GL_EXT_packed_depth_stencil 1 +#define GL_DEPTH_STENCIL_EXT 0x84F9 +#define GL_UNSIGNED_INT_24_8_EXT 0x84FA +#define GL_DEPTH24_STENCIL8_EXT 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +#endif /* GL_EXT_packed_depth_stencil */ + +#ifndef GL_EXT_packed_float +#define GL_EXT_packed_float 1 +#define GL_R11F_G11F_B10F_EXT 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B +#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C +#endif /* GL_EXT_packed_float */ + +#ifndef GL_EXT_packed_pixels +#define GL_EXT_packed_pixels 1 +#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 +#endif /* GL_EXT_packed_pixels */ + +#ifndef GL_EXT_paletted_texture +#define GL_EXT_paletted_texture 1 +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table); +GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data); +GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +#endif +#endif /* GL_EXT_paletted_texture */ + +#ifndef GL_EXT_pixel_buffer_object +#define GL_EXT_pixel_buffer_object 1 +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +#endif /* GL_EXT_pixel_buffer_object */ + +#ifndef GL_EXT_pixel_transform +#define GL_EXT_pixel_transform 1 +#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +#define GL_PIXEL_MAG_FILTER_EXT 0x8331 +#define GL_PIXEL_MIN_FILTER_EXT 0x8332 +#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +#define GL_CUBIC_EXT 0x8334 +#define GL_AVERAGE_EXT 0x8335 +#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +#endif +#endif /* GL_EXT_pixel_transform */ + +#ifndef GL_EXT_pixel_transform_color_table +#define GL_EXT_pixel_transform_color_table 1 +#endif /* GL_EXT_pixel_transform_color_table */ + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 1 +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 +typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params); +#endif +#endif /* GL_EXT_point_parameters */ + +#ifndef GL_EXT_polygon_offset +#define GL_EXT_polygon_offset 1 +#define GL_POLYGON_OFFSET_EXT 0x8037 +#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 +typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias); +#endif +#endif /* GL_EXT_polygon_offset */ + +#ifndef GL_EXT_polygon_offset_clamp +#define GL_EXT_polygon_offset_clamp 1 +#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B +typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp); +#endif +#endif /* GL_EXT_polygon_offset_clamp */ + +#ifndef GL_EXT_post_depth_coverage +#define GL_EXT_post_depth_coverage 1 +#endif /* GL_EXT_post_depth_coverage */ + +#ifndef GL_EXT_provoking_vertex +#define GL_EXT_provoking_vertex 1 +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D +#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E +#define GL_PROVOKING_VERTEX_EXT 0x8E4F +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode); +#endif +#endif /* GL_EXT_provoking_vertex */ + +#ifndef GL_EXT_raster_multisample +#define GL_EXT_raster_multisample 1 +#define GL_RASTER_MULTISAMPLE_EXT 0x9327 +#define GL_RASTER_SAMPLES_EXT 0x9328 +#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 +#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A +#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B +#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C +typedef void (APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations); +#endif +#endif /* GL_EXT_raster_multisample */ + +#ifndef GL_EXT_rescale_normal +#define GL_EXT_rescale_normal 1 +#define GL_RESCALE_NORMAL_EXT 0x803A +#endif /* GL_EXT_rescale_normal */ + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color 1 +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); +GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); +GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); +GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); +GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v); +GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); +GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v); +GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); +GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v); +GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); +GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v); +GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); +GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v); +GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_EXT_secondary_color */ + +#ifndef GL_EXT_semaphore +#define GL_EXT_semaphore 1 +#define GL_LAYOUT_GENERAL_EXT 0x958D +#define GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E +#define GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F +#define GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590 +#define GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591 +#define GL_LAYOUT_TRANSFER_SRC_EXT 0x9592 +#define GL_LAYOUT_TRANSFER_DST_EXT 0x9593 +#define GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT 0x9530 +#define GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT 0x9531 +typedef void (APIENTRYP PFNGLGENSEMAPHORESEXTPROC) (GLsizei n, GLuint *semaphores); +typedef void (APIENTRYP PFNGLDELETESEMAPHORESEXTPROC) (GLsizei n, const GLuint *semaphores); +typedef GLboolean (APIENTRYP PFNGLISSEMAPHOREEXTPROC) (GLuint semaphore); +typedef void (APIENTRYP PFNGLSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, const GLuint64 *params); +typedef void (APIENTRYP PFNGLGETSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, GLuint64 *params); +typedef void (APIENTRYP PFNGLWAITSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts); +typedef void (APIENTRYP PFNGLSIGNALSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenSemaphoresEXT (GLsizei n, GLuint *semaphores); +GLAPI void APIENTRY glDeleteSemaphoresEXT (GLsizei n, const GLuint *semaphores); +GLAPI GLboolean APIENTRY glIsSemaphoreEXT (GLuint semaphore); +GLAPI void APIENTRY glSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, const GLuint64 *params); +GLAPI void APIENTRY glGetSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, GLuint64 *params); +GLAPI void APIENTRY glWaitSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts); +GLAPI void APIENTRY glSignalSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts); +#endif +#endif /* GL_EXT_semaphore */ + +#ifndef GL_EXT_semaphore_fd +#define GL_EXT_semaphore_fd 1 +typedef void (APIENTRYP PFNGLIMPORTSEMAPHOREFDEXTPROC) (GLuint semaphore, GLenum handleType, GLint fd); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImportSemaphoreFdEXT (GLuint semaphore, GLenum handleType, GLint fd); +#endif +#endif /* GL_EXT_semaphore_fd */ + +#ifndef GL_EXT_semaphore_win32 +#define GL_EXT_semaphore_win32 1 +#define GL_HANDLE_TYPE_D3D12_FENCE_EXT 0x9594 +#define GL_D3D12_FENCE_VALUE_EXT 0x9595 +typedef void (APIENTRYP PFNGLIMPORTSEMAPHOREWIN32HANDLEEXTPROC) (GLuint semaphore, GLenum handleType, void *handle); +typedef void (APIENTRYP PFNGLIMPORTSEMAPHOREWIN32NAMEEXTPROC) (GLuint semaphore, GLenum handleType, const void *name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImportSemaphoreWin32HandleEXT (GLuint semaphore, GLenum handleType, void *handle); +GLAPI void APIENTRY glImportSemaphoreWin32NameEXT (GLuint semaphore, GLenum handleType, const void *name); +#endif +#endif /* GL_EXT_semaphore_win32 */ + +#ifndef GL_EXT_separate_shader_objects +#define GL_EXT_separate_shader_objects 1 +#define GL_ACTIVE_PROGRAM_EXT 0x8B8D +typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); +typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); +GLAPI void APIENTRY glActiveProgramEXT (GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); +#endif +#endif /* GL_EXT_separate_shader_objects */ + +#ifndef GL_EXT_separate_specular_color +#define GL_EXT_separate_specular_color 1 +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA +#endif /* GL_EXT_separate_specular_color */ + +#ifndef GL_EXT_shader_framebuffer_fetch +#define GL_EXT_shader_framebuffer_fetch 1 +#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 +#endif /* GL_EXT_shader_framebuffer_fetch */ + +#ifndef GL_EXT_shader_framebuffer_fetch_non_coherent +#define GL_EXT_shader_framebuffer_fetch_non_coherent 1 +typedef void (APIENTRYP PFNGLFRAMEBUFFERFETCHBARRIEREXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferFetchBarrierEXT (void); +#endif +#endif /* GL_EXT_shader_framebuffer_fetch_non_coherent */ + +#ifndef GL_EXT_shader_image_load_formatted +#define GL_EXT_shader_image_load_formatted 1 +#endif /* GL_EXT_shader_image_load_formatted */ + +#ifndef GL_EXT_shader_image_load_store +#define GL_EXT_shader_image_load_store 1 +#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 +#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A +#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B +#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C +#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D +#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E +#define GL_IMAGE_1D_EXT 0x904C +#define GL_IMAGE_2D_EXT 0x904D +#define GL_IMAGE_3D_EXT 0x904E +#define GL_IMAGE_2D_RECT_EXT 0x904F +#define GL_IMAGE_CUBE_EXT 0x9050 +#define GL_IMAGE_BUFFER_EXT 0x9051 +#define GL_IMAGE_1D_ARRAY_EXT 0x9052 +#define GL_IMAGE_2D_ARRAY_EXT 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 +#define GL_INT_IMAGE_1D_EXT 0x9057 +#define GL_INT_IMAGE_2D_EXT 0x9058 +#define GL_INT_IMAGE_3D_EXT 0x9059 +#define GL_INT_IMAGE_2D_RECT_EXT 0x905A +#define GL_INT_IMAGE_CUBE_EXT 0x905B +#define GL_INT_IMAGE_BUFFER_EXT 0x905C +#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D +#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C +#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D +#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 +#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 +#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); +#endif +#endif /* GL_EXT_shader_image_load_store */ + +#ifndef GL_EXT_shader_integer_mix +#define GL_EXT_shader_integer_mix 1 +#endif /* GL_EXT_shader_integer_mix */ + +#ifndef GL_EXT_shadow_funcs +#define GL_EXT_shadow_funcs 1 +#endif /* GL_EXT_shadow_funcs */ + +#ifndef GL_EXT_shared_texture_palette +#define GL_EXT_shared_texture_palette 1 +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +#endif /* GL_EXT_shared_texture_palette */ + +#ifndef GL_EXT_sparse_texture2 +#define GL_EXT_sparse_texture2 1 +#endif /* GL_EXT_sparse_texture2 */ + +#ifndef GL_EXT_stencil_clear_tag +#define GL_EXT_stencil_clear_tag 1 +#define GL_STENCIL_TAG_BITS_EXT 0x88F2 +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); +#endif +#endif /* GL_EXT_stencil_clear_tag */ + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side 1 +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 +typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face); +#endif +#endif /* GL_EXT_stencil_two_side */ + +#ifndef GL_EXT_stencil_wrap +#define GL_EXT_stencil_wrap 1 +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_DECR_WRAP_EXT 0x8508 +#endif /* GL_EXT_stencil_wrap */ + +#ifndef GL_EXT_subtexture +#define GL_EXT_subtexture 1 +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +#endif +#endif /* GL_EXT_subtexture */ + +#ifndef GL_EXT_texture +#define GL_EXT_texture 1 +#define GL_ALPHA4_EXT 0x803B +#define GL_ALPHA8_EXT 0x803C +#define GL_ALPHA12_EXT 0x803D +#define GL_ALPHA16_EXT 0x803E +#define GL_LUMINANCE4_EXT 0x803F +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE12_EXT 0x8041 +#define GL_LUMINANCE16_EXT 0x8042 +#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +#define GL_INTENSITY_EXT 0x8049 +#define GL_INTENSITY4_EXT 0x804A +#define GL_INTENSITY8_EXT 0x804B +#define GL_INTENSITY12_EXT 0x804C +#define GL_INTENSITY16_EXT 0x804D +#define GL_RGB2_EXT 0x804E +#define GL_RGB4_EXT 0x804F +#define GL_RGB5_EXT 0x8050 +#define GL_RGB8_EXT 0x8051 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB12_EXT 0x8053 +#define GL_RGB16_EXT 0x8054 +#define GL_RGBA2_EXT 0x8055 +#define GL_RGBA4_EXT 0x8056 +#define GL_RGB5_A1_EXT 0x8057 +#define GL_RGBA8_EXT 0x8058 +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGBA12_EXT 0x805A +#define GL_RGBA16_EXT 0x805B +#define GL_TEXTURE_RED_SIZE_EXT 0x805C +#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +#define GL_REPLACE_EXT 0x8062 +#define GL_PROXY_TEXTURE_1D_EXT 0x8063 +#define GL_PROXY_TEXTURE_2D_EXT 0x8064 +#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 +#endif /* GL_EXT_texture */ + +#ifndef GL_EXT_texture3D +#define GL_EXT_texture3D 1 +#define GL_PACK_SKIP_IMAGES_EXT 0x806B +#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_TEXTURE_DEPTH_EXT 0x8071 +#define GL_TEXTURE_WRAP_R_EXT 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 +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); +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); +#ifdef GL_GLEXT_PROTOTYPES +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); +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); +#endif +#endif /* GL_EXT_texture3D */ + +#ifndef GL_EXT_texture_array +#define GL_EXT_texture_array 1 +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif +#endif /* GL_EXT_texture_array */ + +#ifndef GL_EXT_texture_buffer_object +#define GL_EXT_texture_buffer_object 1 +#define GL_TEXTURE_BUFFER_EXT 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E +typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); +#endif +#endif /* GL_EXT_texture_buffer_object */ + +#ifndef GL_EXT_texture_compression_latc +#define GL_EXT_texture_compression_latc 1 +#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 +#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 +#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 +#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 +#endif /* GL_EXT_texture_compression_latc */ + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_EXT_texture_compression_rgtc 1 +#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +#endif /* GL_EXT_texture_compression_rgtc */ + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_EXT_texture_compression_s3tc 1 +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif /* GL_EXT_texture_compression_s3tc */ + +#ifndef GL_EXT_texture_cube_map +#define GL_EXT_texture_cube_map 1 +#define GL_NORMAL_MAP_EXT 0x8511 +#define GL_REFLECTION_MAP_EXT 0x8512 +#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C +#endif /* GL_EXT_texture_cube_map */ + +#ifndef GL_EXT_texture_env_add +#define GL_EXT_texture_env_add 1 +#endif /* GL_EXT_texture_env_add */ + +#ifndef GL_EXT_texture_env_combine +#define GL_EXT_texture_env_combine 1 +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_CONSTANT_EXT 0x8576 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND2_ALPHA_EXT 0x859A +#endif /* GL_EXT_texture_env_combine */ + +#ifndef GL_EXT_texture_env_dot3 +#define GL_EXT_texture_env_dot3 1 +#define GL_DOT3_RGB_EXT 0x8740 +#define GL_DOT3_RGBA_EXT 0x8741 +#endif /* GL_EXT_texture_env_dot3 */ + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif /* GL_EXT_texture_filter_anisotropic */ + +#ifndef GL_EXT_texture_filter_minmax +#define GL_EXT_texture_filter_minmax 1 +#define GL_TEXTURE_REDUCTION_MODE_EXT 0x9366 +#define GL_WEIGHTED_AVERAGE_EXT 0x9367 +#endif /* GL_EXT_texture_filter_minmax */ + +#ifndef GL_EXT_texture_integer +#define GL_EXT_texture_integer 1 +#define GL_RGBA32UI_EXT 0x8D70 +#define GL_RGB32UI_EXT 0x8D71 +#define GL_ALPHA32UI_EXT 0x8D72 +#define GL_INTENSITY32UI_EXT 0x8D73 +#define GL_LUMINANCE32UI_EXT 0x8D74 +#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 +#define GL_RGBA16UI_EXT 0x8D76 +#define GL_RGB16UI_EXT 0x8D77 +#define GL_ALPHA16UI_EXT 0x8D78 +#define GL_INTENSITY16UI_EXT 0x8D79 +#define GL_LUMINANCE16UI_EXT 0x8D7A +#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B +#define GL_RGBA8UI_EXT 0x8D7C +#define GL_RGB8UI_EXT 0x8D7D +#define GL_ALPHA8UI_EXT 0x8D7E +#define GL_INTENSITY8UI_EXT 0x8D7F +#define GL_LUMINANCE8UI_EXT 0x8D80 +#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 +#define GL_RGBA32I_EXT 0x8D82 +#define GL_RGB32I_EXT 0x8D83 +#define GL_ALPHA32I_EXT 0x8D84 +#define GL_INTENSITY32I_EXT 0x8D85 +#define GL_LUMINANCE32I_EXT 0x8D86 +#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 +#define GL_RGBA16I_EXT 0x8D88 +#define GL_RGB16I_EXT 0x8D89 +#define GL_ALPHA16I_EXT 0x8D8A +#define GL_INTENSITY16I_EXT 0x8D8B +#define GL_LUMINANCE16I_EXT 0x8D8C +#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D +#define GL_RGBA8I_EXT 0x8D8E +#define GL_RGB8I_EXT 0x8D8F +#define GL_ALPHA8I_EXT 0x8D90 +#define GL_INTENSITY8I_EXT 0x8D91 +#define GL_LUMINANCE8I_EXT 0x8D92 +#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 +#define GL_RED_INTEGER_EXT 0x8D94 +#define GL_GREEN_INTEGER_EXT 0x8D95 +#define GL_BLUE_INTEGER_EXT 0x8D96 +#define GL_ALPHA_INTEGER_EXT 0x8D97 +#define GL_RGB_INTEGER_EXT 0x8D98 +#define GL_RGBA_INTEGER_EXT 0x8D99 +#define GL_BGR_INTEGER_EXT 0x8D9A +#define GL_BGRA_INTEGER_EXT 0x8D9B +#define GL_LUMINANCE_INTEGER_EXT 0x8D9C +#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D +#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); +typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); +GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); +#endif +#endif /* GL_EXT_texture_integer */ + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#endif /* GL_EXT_texture_lod_bias */ + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_EXT_texture_mirror_clamp 1 +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +#endif /* GL_EXT_texture_mirror_clamp */ + +#ifndef GL_EXT_texture_object +#define GL_EXT_texture_object 1 +#define GL_TEXTURE_PRIORITY_EXT 0x8066 +#define GL_TEXTURE_RESIDENT_EXT 0x8067 +#define GL_TEXTURE_1D_BINDING_EXT 0x8068 +#define GL_TEXTURE_2D_BINDING_EXT 0x8069 +#define GL_TEXTURE_3D_BINDING_EXT 0x806A +typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); +typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); +GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture); +GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures); +GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures); +GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture); +GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); +#endif +#endif /* GL_EXT_texture_object */ + +#ifndef GL_EXT_texture_perturb_normal +#define GL_EXT_texture_perturb_normal 1 +#define GL_PERTURB_EXT 0x85AE +#define GL_TEXTURE_NORMAL_EXT 0x85AF +typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureNormalEXT (GLenum mode); +#endif +#endif /* GL_EXT_texture_perturb_normal */ + +#ifndef GL_EXT_texture_sRGB +#define GL_EXT_texture_sRGB 1 +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB8_EXT 0x8C41 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +#define GL_SLUMINANCE_EXT 0x8C46 +#define GL_SLUMINANCE8_EXT 0x8C47 +#define GL_COMPRESSED_SRGB_EXT 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#endif /* GL_EXT_texture_sRGB */ + +#ifndef GL_EXT_texture_sRGB_R8 +#define GL_EXT_texture_sRGB_R8 1 +#define GL_SR8_EXT 0x8FBD +#endif /* GL_EXT_texture_sRGB_R8 */ + +#ifndef GL_EXT_texture_sRGB_RG8 +#define GL_EXT_texture_sRGB_RG8 1 +#define GL_SRG8_EXT 0x8FBE +#endif /* GL_EXT_texture_sRGB_RG8 */ + +#ifndef GL_EXT_texture_sRGB_decode +#define GL_EXT_texture_sRGB_decode 1 +#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 +#define GL_DECODE_EXT 0x8A49 +#define GL_SKIP_DECODE_EXT 0x8A4A +#endif /* GL_EXT_texture_sRGB_decode */ + +#ifndef GL_EXT_texture_shadow_lod +#define GL_EXT_texture_shadow_lod 1 +#endif /* GL_EXT_texture_shadow_lod */ + +#ifndef GL_EXT_texture_shared_exponent +#define GL_EXT_texture_shared_exponent 1 +#define GL_RGB9_E5_EXT 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E +#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F +#endif /* GL_EXT_texture_shared_exponent */ + +#ifndef GL_EXT_texture_snorm +#define GL_EXT_texture_snorm 1 +#define GL_ALPHA_SNORM 0x9010 +#define GL_LUMINANCE_SNORM 0x9011 +#define GL_LUMINANCE_ALPHA_SNORM 0x9012 +#define GL_INTENSITY_SNORM 0x9013 +#define GL_ALPHA8_SNORM 0x9014 +#define GL_LUMINANCE8_SNORM 0x9015 +#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 +#define GL_INTENSITY8_SNORM 0x9017 +#define GL_ALPHA16_SNORM 0x9018 +#define GL_LUMINANCE16_SNORM 0x9019 +#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A +#define GL_INTENSITY16_SNORM 0x901B +#define GL_RED_SNORM 0x8F90 +#define GL_RG_SNORM 0x8F91 +#define GL_RGB_SNORM 0x8F92 +#define GL_RGBA_SNORM 0x8F93 +#endif /* GL_EXT_texture_snorm */ + +#ifndef GL_EXT_texture_swizzle +#define GL_EXT_texture_swizzle 1 +#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 +#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 +#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 +#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 +#endif /* GL_EXT_texture_swizzle */ + +#ifndef GL_EXT_timer_query +#define GL_EXT_timer_query 1 +#define GL_TIME_ELAPSED_EXT 0x88BF +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params); +#endif +#endif /* GL_EXT_timer_query */ + +#ifndef GL_EXT_transform_feedback +#define GL_EXT_transform_feedback 1 +#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F +#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C +#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D +#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 +#define GL_RASTERIZER_DISCARD_EXT 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedbackEXT (void); +GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +#endif +#endif /* GL_EXT_transform_feedback */ + +#ifndef GL_EXT_vertex_array +#define GL_EXT_vertex_array 1 +#define GL_VERTEX_ARRAY_EXT 0x8074 +#define GL_NORMAL_ARRAY_EXT 0x8075 +#define GL_COLOR_ARRAY_EXT 0x8076 +#define GL_INDEX_ARRAY_EXT 0x8077 +#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 +typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); +typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params); +typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glArrayElementEXT (GLint i); +GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); +GLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params); +GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer); +GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer); +GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); +#endif +#endif /* GL_EXT_vertex_array */ + +#ifndef GL_EXT_vertex_array_bgra +#define GL_EXT_vertex_array_bgra 1 +#endif /* GL_EXT_vertex_array_bgra */ + +#ifndef GL_EXT_vertex_attrib_64bit +#define GL_EXT_vertex_attrib_64bit 1 +#define GL_DOUBLE_VEC2_EXT 0x8FFC +#define GL_DOUBLE_VEC3_EXT 0x8FFD +#define GL_DOUBLE_VEC4_EXT 0x8FFE +#define GL_DOUBLE_MAT2_EXT 0x8F46 +#define GL_DOUBLE_MAT3_EXT 0x8F47 +#define GL_DOUBLE_MAT4_EXT 0x8F48 +#define GL_DOUBLE_MAT2x3_EXT 0x8F49 +#define GL_DOUBLE_MAT2x4_EXT 0x8F4A +#define GL_DOUBLE_MAT3x2_EXT 0x8F4B +#define GL_DOUBLE_MAT3x4_EXT 0x8F4C +#define GL_DOUBLE_MAT4x2_EXT 0x8F4D +#define GL_DOUBLE_MAT4x3_EXT 0x8F4E +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); +#endif +#endif /* GL_EXT_vertex_attrib_64bit */ + +#ifndef GL_EXT_vertex_shader +#define GL_EXT_vertex_shader 1 +#define GL_VERTEX_SHADER_EXT 0x8780 +#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +#define GL_OP_INDEX_EXT 0x8782 +#define GL_OP_NEGATE_EXT 0x8783 +#define GL_OP_DOT3_EXT 0x8784 +#define GL_OP_DOT4_EXT 0x8785 +#define GL_OP_MUL_EXT 0x8786 +#define GL_OP_ADD_EXT 0x8787 +#define GL_OP_MADD_EXT 0x8788 +#define GL_OP_FRAC_EXT 0x8789 +#define GL_OP_MAX_EXT 0x878A +#define GL_OP_MIN_EXT 0x878B +#define GL_OP_SET_GE_EXT 0x878C +#define GL_OP_SET_LT_EXT 0x878D +#define GL_OP_CLAMP_EXT 0x878E +#define GL_OP_FLOOR_EXT 0x878F +#define GL_OP_ROUND_EXT 0x8790 +#define GL_OP_EXP_BASE_2_EXT 0x8791 +#define GL_OP_LOG_BASE_2_EXT 0x8792 +#define GL_OP_POWER_EXT 0x8793 +#define GL_OP_RECIP_EXT 0x8794 +#define GL_OP_RECIP_SQRT_EXT 0x8795 +#define GL_OP_SUB_EXT 0x8796 +#define GL_OP_CROSS_PRODUCT_EXT 0x8797 +#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +#define GL_OP_MOV_EXT 0x8799 +#define GL_OUTPUT_VERTEX_EXT 0x879A +#define GL_OUTPUT_COLOR0_EXT 0x879B +#define GL_OUTPUT_COLOR1_EXT 0x879C +#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +#define GL_OUTPUT_FOG_EXT 0x87BD +#define GL_SCALAR_EXT 0x87BE +#define GL_VECTOR_EXT 0x87BF +#define GL_MATRIX_EXT 0x87C0 +#define GL_VARIANT_EXT 0x87C1 +#define GL_INVARIANT_EXT 0x87C2 +#define GL_LOCAL_CONSTANT_EXT 0x87C3 +#define GL_LOCAL_EXT 0x87C4 +#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +#define GL_X_EXT 0x87D5 +#define GL_Y_EXT 0x87D6 +#define GL_Z_EXT 0x87D7 +#define GL_W_EXT 0x87D8 +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_ZERO_EXT 0x87DD +#define GL_ONE_EXT 0x87DE +#define GL_NEGATIVE_ONE_EXT 0x87DF +#define GL_NORMALIZED_RANGE_EXT 0x87E0 +#define GL_FULL_RANGE_EXT 0x87E1 +#define GL_CURRENT_VERTEX_EXT 0x87E2 +#define GL_MVP_MATRIX_EXT 0x87E3 +#define GL_VARIANT_VALUE_EXT 0x87E4 +#define GL_VARIANT_DATATYPE_EXT 0x87E5 +#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +#define GL_VARIANT_ARRAY_EXT 0x87E8 +#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +#define GL_INVARIANT_VALUE_EXT 0x87EA +#define GL_INVARIANT_DATATYPE_EXT 0x87EB +#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED +typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr); +typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr); +typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); +typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); +typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); +typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); +typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); +typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); +typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); +typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); +typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr); +typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data); +typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVertexShaderEXT (void); +GLAPI void APIENTRY glEndVertexShaderEXT (void); +GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id); +GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range); +GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id); +GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); +GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num); +GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num); +GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr); +GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr); +GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr); +GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr); +GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr); +GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr); +GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr); +GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr); +GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr); +GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr); +GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr); +GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id); +GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id); +GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value); +GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value); +GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); +GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value); +GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value); +GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap); +GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data); +GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +#endif +#endif /* GL_EXT_vertex_shader */ + +#ifndef GL_EXT_vertex_weighting +#define GL_EXT_vertex_weighting 1 +#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3 +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6 +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_MODELVIEW0_EXT 0x1700 +#define GL_MODELVIEW1_EXT 0x850A +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight); +GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight); +GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_EXT_vertex_weighting */ + +#ifndef GL_EXT_win32_keyed_mutex +#define GL_EXT_win32_keyed_mutex 1 +typedef GLboolean (APIENTRYP PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key, GLuint timeout); +typedef GLboolean (APIENTRYP PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAcquireKeyedMutexWin32EXT (GLuint memory, GLuint64 key, GLuint timeout); +GLAPI GLboolean APIENTRY glReleaseKeyedMutexWin32EXT (GLuint memory, GLuint64 key); +#endif +#endif /* GL_EXT_win32_keyed_mutex */ + +#ifndef GL_EXT_window_rectangles +#define GL_EXT_window_rectangles 1 +#define GL_INCLUSIVE_EXT 0x8F10 +#define GL_EXCLUSIVE_EXT 0x8F11 +#define GL_WINDOW_RECTANGLE_EXT 0x8F12 +#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 +#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 +#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 +typedef void (APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box); +#endif +#endif /* GL_EXT_window_rectangles */ + +#ifndef GL_EXT_x11_sync_object +#define GL_EXT_x11_sync_object 1 +#define GL_SYNC_X11_FENCE_EXT 0x90E1 +typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +#endif +#endif /* GL_EXT_x11_sync_object */ + +#ifndef GL_GREMEDY_frame_terminator +#define GL_GREMEDY_frame_terminator 1 +typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); +#endif +#endif /* GL_GREMEDY_frame_terminator */ + +#ifndef GL_GREMEDY_string_marker +#define GL_GREMEDY_string_marker 1 +typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string); +#endif +#endif /* GL_GREMEDY_string_marker */ + +#ifndef GL_HP_convolution_border_modes +#define GL_HP_convolution_border_modes 1 +#define GL_IGNORE_BORDER_HP 0x8150 +#define GL_CONSTANT_BORDER_HP 0x8151 +#define GL_REPLICATE_BORDER_HP 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 +#endif /* GL_HP_convolution_border_modes */ + +#ifndef GL_HP_image_transform +#define GL_HP_image_transform 1 +#define GL_IMAGE_SCALE_X_HP 0x8155 +#define GL_IMAGE_SCALE_Y_HP 0x8156 +#define GL_IMAGE_TRANSLATE_X_HP 0x8157 +#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 +#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 +#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A +#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B +#define GL_IMAGE_MAG_FILTER_HP 0x815C +#define GL_IMAGE_MIN_FILTER_HP 0x815D +#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E +#define GL_CUBIC_HP 0x815F +#define GL_AVERAGE_HP 0x8160 +#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 +#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 +#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); +#endif +#endif /* GL_HP_image_transform */ + +#ifndef GL_HP_occlusion_test +#define GL_HP_occlusion_test 1 +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +#endif /* GL_HP_occlusion_test */ + +#ifndef GL_HP_texture_lighting +#define GL_HP_texture_lighting 1 +#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 +#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 +#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 +#endif /* GL_HP_texture_lighting */ + +#ifndef GL_IBM_cull_vertex +#define GL_IBM_cull_vertex 1 +#define GL_CULL_VERTEX_IBM 103050 +#endif /* GL_IBM_cull_vertex */ + +#ifndef GL_IBM_multimode_draw_arrays +#define GL_IBM_multimode_draw_arrays 1 +typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride); +#endif +#endif /* GL_IBM_multimode_draw_arrays */ + +#ifndef GL_IBM_rasterpos_clip +#define GL_IBM_rasterpos_clip 1 +#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 +#endif /* GL_IBM_rasterpos_clip */ + +#ifndef GL_IBM_static_data +#define GL_IBM_static_data 1 +#define GL_ALL_STATIC_DATA_IBM 103060 +#define GL_STATIC_VERTEX_ARRAY_IBM 103061 +typedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushStaticDataIBM (GLenum target); +#endif +#endif /* GL_IBM_static_data */ + +#ifndef GL_IBM_texture_mirrored_repeat +#define GL_IBM_texture_mirrored_repeat 1 +#define GL_MIRRORED_REPEAT_IBM 0x8370 +#endif /* GL_IBM_texture_mirrored_repeat */ + +#ifndef GL_IBM_vertex_array_lists +#define GL_IBM_vertex_array_lists 1 +#define GL_VERTEX_ARRAY_LIST_IBM 103070 +#define GL_NORMAL_ARRAY_LIST_IBM 103071 +#define GL_COLOR_ARRAY_LIST_IBM 103072 +#define GL_INDEX_ARRAY_LIST_IBM 103073 +#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 +typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride); +GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); +#endif +#endif /* GL_IBM_vertex_array_lists */ + +#ifndef GL_INGR_blend_func_separate +#define GL_INGR_blend_func_separate 1 +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif +#endif /* GL_INGR_blend_func_separate */ + +#ifndef GL_INGR_color_clamp +#define GL_INGR_color_clamp 1 +#define GL_RED_MIN_CLAMP_INGR 0x8560 +#define GL_GREEN_MIN_CLAMP_INGR 0x8561 +#define GL_BLUE_MIN_CLAMP_INGR 0x8562 +#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +#define GL_RED_MAX_CLAMP_INGR 0x8564 +#define GL_GREEN_MAX_CLAMP_INGR 0x8565 +#define GL_BLUE_MAX_CLAMP_INGR 0x8566 +#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 +#endif /* GL_INGR_color_clamp */ + +#ifndef GL_INGR_interlace_read +#define GL_INGR_interlace_read 1 +#define GL_INTERLACE_READ_INGR 0x8568 +#endif /* GL_INGR_interlace_read */ + +#ifndef GL_INTEL_blackhole_render +#define GL_INTEL_blackhole_render 1 +#define GL_BLACKHOLE_RENDER_INTEL 0x83FC +#endif /* GL_INTEL_blackhole_render */ + +#ifndef GL_INTEL_conservative_rasterization +#define GL_INTEL_conservative_rasterization 1 +#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE +#endif /* GL_INTEL_conservative_rasterization */ + +#ifndef GL_INTEL_fragment_shader_ordering +#define GL_INTEL_fragment_shader_ordering 1 +#endif /* GL_INTEL_fragment_shader_ordering */ + +#ifndef GL_INTEL_framebuffer_CMAA +#define GL_INTEL_framebuffer_CMAA 1 +typedef void (APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void); +#endif +#endif /* GL_INTEL_framebuffer_CMAA */ + +#ifndef GL_INTEL_map_texture +#define GL_INTEL_map_texture 1 +#define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF +#define GL_LAYOUT_DEFAULT_INTEL 0 +#define GL_LAYOUT_LINEAR_INTEL 1 +#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2 +typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level); +typedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture); +GLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level); +GLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout); +#endif +#endif /* GL_INTEL_map_texture */ + +#ifndef GL_INTEL_parallel_arrays +#define GL_INTEL_parallel_arrays 1 +#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 +typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer); +typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer); +GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer); +GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer); +GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer); +#endif +#endif /* GL_INTEL_parallel_arrays */ + +#ifndef GL_INTEL_performance_query +#define GL_INTEL_performance_query 1 +#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 +#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 +#define GL_PERFQUERY_WAIT_INTEL 0x83FB +#define GL_PERFQUERY_FLUSH_INTEL 0x83FA +#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 +#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 +#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 +#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 +#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 +#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 +#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 +#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 +#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 +#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA +#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB +#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC +#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD +#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE +#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF +#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 +typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle); +typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); +typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); +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); +typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten); +typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); +typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle); +GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); +GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); +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); +GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten); +GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); +GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#endif +#endif /* GL_INTEL_performance_query */ + +#ifndef GL_MESAX_texture_stack +#define GL_MESAX_texture_stack 1 +#define GL_TEXTURE_1D_STACK_MESAX 0x8759 +#define GL_TEXTURE_2D_STACK_MESAX 0x875A +#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E +#endif /* GL_MESAX_texture_stack */ + +#ifndef GL_MESA_framebuffer_flip_x +#define GL_MESA_framebuffer_flip_x 1 +#define GL_FRAMEBUFFER_FLIP_X_MESA 0x8BBC +#endif /* GL_MESA_framebuffer_flip_x */ + +#ifndef GL_MESA_framebuffer_flip_y +#define GL_MESA_framebuffer_flip_y 1 +#define GL_FRAMEBUFFER_FLIP_Y_MESA 0x8BBB +typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIMESAPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC) (GLenum target, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferParameteriMESA (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glGetFramebufferParameterivMESA (GLenum target, GLenum pname, GLint *params); +#endif +#endif /* GL_MESA_framebuffer_flip_y */ + +#ifndef GL_MESA_framebuffer_swap_xy +#define GL_MESA_framebuffer_swap_xy 1 +#define GL_FRAMEBUFFER_SWAP_XY_MESA 0x8BBD +#endif /* GL_MESA_framebuffer_swap_xy */ + +#ifndef GL_MESA_pack_invert +#define GL_MESA_pack_invert 1 +#define GL_PACK_INVERT_MESA 0x8758 +#endif /* GL_MESA_pack_invert */ + +#ifndef GL_MESA_program_binary_formats +#define GL_MESA_program_binary_formats 1 +#define GL_PROGRAM_BINARY_FORMAT_MESA 0x875F +#endif /* GL_MESA_program_binary_formats */ + +#ifndef GL_MESA_resize_buffers +#define GL_MESA_resize_buffers 1 +typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glResizeBuffersMESA (void); +#endif +#endif /* GL_MESA_resize_buffers */ + +#ifndef GL_MESA_shader_integer_functions +#define GL_MESA_shader_integer_functions 1 +#endif /* GL_MESA_shader_integer_functions */ + +#ifndef GL_MESA_tile_raster_order +#define GL_MESA_tile_raster_order 1 +#define GL_TILE_RASTER_ORDER_FIXED_MESA 0x8BB8 +#define GL_TILE_RASTER_ORDER_INCREASING_X_MESA 0x8BB9 +#define GL_TILE_RASTER_ORDER_INCREASING_Y_MESA 0x8BBA +#endif /* GL_MESA_tile_raster_order */ + +#ifndef GL_MESA_window_pos +#define GL_MESA_window_pos 1 +typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v); +GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v); +GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); +#endif +#endif /* GL_MESA_window_pos */ + +#ifndef GL_MESA_ycbcr_texture +#define GL_MESA_ycbcr_texture 1 +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#define GL_YCBCR_MESA 0x8757 +#endif /* GL_MESA_ycbcr_texture */ + +#ifndef GL_NVX_blend_equation_advanced_multi_draw_buffers +#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1 +#endif /* GL_NVX_blend_equation_advanced_multi_draw_buffers */ + +#ifndef GL_NVX_conditional_render +#define GL_NVX_conditional_render 1 +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id); +GLAPI void APIENTRY glEndConditionalRenderNVX (void); +#endif +#endif /* GL_NVX_conditional_render */ + +#ifndef GL_NVX_gpu_memory_info +#define GL_NVX_gpu_memory_info 1 +#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 +#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 +#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 +#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A +#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B +#endif /* GL_NVX_gpu_memory_info */ + +#ifndef GL_NVX_gpu_multicast2 +#define GL_NVX_gpu_multicast2 1 +#define GL_UPLOAD_GPU_MASK_NVX 0x954A +typedef void (APIENTRYP PFNGLUPLOADGPUMASKNVXPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLMULTICASTVIEWPORTARRAYVNVXPROC) (GLuint gpu, GLuint first, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTICASTVIEWPORTPOSITIONWSCALENVXPROC) (GLuint gpu, GLuint index, GLfloat xcoeff, GLfloat ycoeff); +typedef void (APIENTRYP PFNGLMULTICASTSCISSORARRAYVNVXPROC) (GLuint gpu, GLuint first, GLsizei count, const GLint *v); +typedef GLuint (APIENTRYP PFNGLASYNCCOPYBUFFERSUBDATANVXPROC) (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *fenceValueArray, GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray); +typedef GLuint (APIENTRYP PFNGLASYNCCOPYIMAGESUBDATANVXPROC) (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *waitValueArray, GLuint srcGpu, GLbitfield dstGpuMask, 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, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUploadGpuMaskNVX (GLbitfield mask); +GLAPI void APIENTRY glMulticastViewportArrayvNVX (GLuint gpu, GLuint first, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glMulticastViewportPositionWScaleNVX (GLuint gpu, GLuint index, GLfloat xcoeff, GLfloat ycoeff); +GLAPI void APIENTRY glMulticastScissorArrayvNVX (GLuint gpu, GLuint first, GLsizei count, const GLint *v); +GLAPI GLuint APIENTRY glAsyncCopyBufferSubDataNVX (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *fenceValueArray, GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray); +GLAPI GLuint APIENTRY glAsyncCopyImageSubDataNVX (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *waitValueArray, GLuint srcGpu, GLbitfield dstGpuMask, 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, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray); +#endif +#endif /* GL_NVX_gpu_multicast2 */ + +#ifndef GL_NVX_linked_gpu_multicast +#define GL_NVX_linked_gpu_multicast 1 +#define GL_LGPU_SEPARATE_STORAGE_BIT_NVX 0x0800 +#define GL_MAX_LGPU_GPUS_NVX 0x92BA +typedef void (APIENTRYP PFNGLLGPUNAMEDBUFFERSUBDATANVXPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLLGPUCOPYIMAGESUBDATANVXPROC) (GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLLGPUINTERLOCKNVXPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLGPUNamedBufferSubDataNVX (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glLGPUCopyImageSubDataNVX (GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glLGPUInterlockNVX (void); +#endif +#endif /* GL_NVX_linked_gpu_multicast */ + +#ifndef GL_NVX_progress_fence +#define GL_NVX_progress_fence 1 +typedef GLuint (APIENTRYP PFNGLCREATEPROGRESSFENCENVXPROC) (void); +typedef void (APIENTRYP PFNGLSIGNALSEMAPHOREUI64NVXPROC) (GLuint signalGpu, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray); +typedef void (APIENTRYP PFNGLWAITSEMAPHOREUI64NVXPROC) (GLuint waitGpu, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray); +typedef void (APIENTRYP PFNGLCLIENTWAITSEMAPHOREUI64NVXPROC) (GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glCreateProgressFenceNVX (void); +GLAPI void APIENTRY glSignalSemaphoreui64NVX (GLuint signalGpu, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray); +GLAPI void APIENTRY glWaitSemaphoreui64NVX (GLuint waitGpu, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray); +GLAPI void APIENTRY glClientWaitSemaphoreui64NVX (GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray); +#endif +#endif /* GL_NVX_progress_fence */ + +#ifndef GL_NV_alpha_to_coverage_dither_control +#define GL_NV_alpha_to_coverage_dither_control 1 +#define GL_ALPHA_TO_COVERAGE_DITHER_DEFAULT_NV 0x934D +#define GL_ALPHA_TO_COVERAGE_DITHER_ENABLE_NV 0x934E +#define GL_ALPHA_TO_COVERAGE_DITHER_DISABLE_NV 0x934F +#define GL_ALPHA_TO_COVERAGE_DITHER_MODE_NV 0x92BF +typedef void (APIENTRYP PFNGLALPHATOCOVERAGEDITHERCONTROLNVPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAlphaToCoverageDitherControlNV (GLenum mode); +#endif +#endif /* GL_NV_alpha_to_coverage_dither_control */ + +#ifndef GL_NV_bindless_multi_draw_indirect +#define GL_NV_bindless_multi_draw_indirect 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +#endif +#endif /* GL_NV_bindless_multi_draw_indirect */ + +#ifndef GL_NV_bindless_multi_draw_indirect_count +#define GL_NV_bindless_multi_draw_indirect_count 1 +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessCountNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessCountNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +#endif +#endif /* GL_NV_bindless_multi_draw_indirect_count */ + +#ifndef GL_NV_bindless_texture +#define GL_NV_bindless_texture 1 +typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); +typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); +typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); +GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); +GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); +GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); +GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); +GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); +GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); +GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); +GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); +#endif +#endif /* GL_NV_bindless_texture */ + +#ifndef GL_NV_blend_equation_advanced +#define GL_NV_blend_equation_advanced 1 +#define GL_BLEND_OVERLAP_NV 0x9281 +#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 +#define GL_BLUE_NV 0x1905 +#define GL_COLORBURN_NV 0x929A +#define GL_COLORDODGE_NV 0x9299 +#define GL_CONJOINT_NV 0x9284 +#define GL_CONTRAST_NV 0x92A1 +#define GL_DARKEN_NV 0x9297 +#define GL_DIFFERENCE_NV 0x929E +#define GL_DISJOINT_NV 0x9283 +#define GL_DST_ATOP_NV 0x928F +#define GL_DST_IN_NV 0x928B +#define GL_DST_NV 0x9287 +#define GL_DST_OUT_NV 0x928D +#define GL_DST_OVER_NV 0x9289 +#define GL_EXCLUSION_NV 0x92A0 +#define GL_GREEN_NV 0x1904 +#define GL_HARDLIGHT_NV 0x929B +#define GL_HARDMIX_NV 0x92A9 +#define GL_HSL_COLOR_NV 0x92AF +#define GL_HSL_HUE_NV 0x92AD +#define GL_HSL_LUMINOSITY_NV 0x92B0 +#define GL_HSL_SATURATION_NV 0x92AE +#define GL_INVERT_OVG_NV 0x92B4 +#define GL_INVERT_RGB_NV 0x92A3 +#define GL_LIGHTEN_NV 0x9298 +#define GL_LINEARBURN_NV 0x92A5 +#define GL_LINEARDODGE_NV 0x92A4 +#define GL_LINEARLIGHT_NV 0x92A7 +#define GL_MINUS_CLAMPED_NV 0x92B3 +#define GL_MINUS_NV 0x929F +#define GL_MULTIPLY_NV 0x9294 +#define GL_OVERLAY_NV 0x9296 +#define GL_PINLIGHT_NV 0x92A8 +#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 +#define GL_PLUS_CLAMPED_NV 0x92B1 +#define GL_PLUS_DARKER_NV 0x9292 +#define GL_PLUS_NV 0x9291 +#define GL_RED_NV 0x1903 +#define GL_SCREEN_NV 0x9295 +#define GL_SOFTLIGHT_NV 0x929C +#define GL_SRC_ATOP_NV 0x928E +#define GL_SRC_IN_NV 0x928A +#define GL_SRC_NV 0x9286 +#define GL_SRC_OUT_NV 0x928C +#define GL_SRC_OVER_NV 0x9288 +#define GL_UNCORRELATED_NV 0x9282 +#define GL_VIVIDLIGHT_NV 0x92A6 +#define GL_XOR_NV 0x1506 +typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value); +GLAPI void APIENTRY glBlendBarrierNV (void); +#endif +#endif /* GL_NV_blend_equation_advanced */ + +#ifndef GL_NV_blend_equation_advanced_coherent +#define GL_NV_blend_equation_advanced_coherent 1 +#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 +#endif /* GL_NV_blend_equation_advanced_coherent */ + +#ifndef GL_NV_blend_minmax_factor +#define GL_NV_blend_minmax_factor 1 +#endif /* GL_NV_blend_minmax_factor */ + +#ifndef GL_NV_blend_square +#define GL_NV_blend_square 1 +#endif /* GL_NV_blend_square */ + +#ifndef GL_NV_clip_space_w_scaling +#define GL_NV_clip_space_w_scaling 1 +#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C +#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D +#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E +typedef void (APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC) (GLuint index, GLfloat xcoeff, GLfloat ycoeff); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportPositionWScaleNV (GLuint index, GLfloat xcoeff, GLfloat ycoeff); +#endif +#endif /* GL_NV_clip_space_w_scaling */ + +#ifndef GL_NV_command_list +#define GL_NV_command_list 1 +#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000 +#define GL_NOP_COMMAND_NV 0x0001 +#define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002 +#define GL_DRAW_ARRAYS_COMMAND_NV 0x0003 +#define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004 +#define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005 +#define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006 +#define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007 +#define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008 +#define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009 +#define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A +#define GL_BLEND_COLOR_COMMAND_NV 0x000B +#define GL_STENCIL_REF_COMMAND_NV 0x000C +#define GL_LINE_WIDTH_COMMAND_NV 0x000D +#define GL_POLYGON_OFFSET_COMMAND_NV 0x000E +#define GL_ALPHA_REF_COMMAND_NV 0x000F +#define GL_VIEWPORT_COMMAND_NV 0x0010 +#define GL_SCISSOR_COMMAND_NV 0x0011 +#define GL_FRONT_FACE_COMMAND_NV 0x0012 +typedef void (APIENTRYP PFNGLCREATESTATESNVPROC) (GLsizei n, GLuint *states); +typedef void (APIENTRYP PFNGLDELETESTATESNVPROC) (GLsizei n, const GLuint *states); +typedef GLboolean (APIENTRYP PFNGLISSTATENVPROC) (GLuint state); +typedef void (APIENTRYP PFNGLSTATECAPTURENVPROC) (GLuint state, GLenum mode); +typedef GLuint (APIENTRYP PFNGLGETCOMMANDHEADERNVPROC) (GLenum tokenID, GLuint size); +typedef GLushort (APIENTRYP PFNGLGETSTAGEINDEXNVPROC) (GLenum shadertype); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSNVPROC) (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSADDRESSNVPROC) (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESNVPROC) (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC) (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLCREATECOMMANDLISTSNVPROC) (GLsizei n, GLuint *lists); +typedef void (APIENTRYP PFNGLDELETECOMMANDLISTSNVPROC) (GLsizei n, const GLuint *lists); +typedef GLboolean (APIENTRYP PFNGLISCOMMANDLISTNVPROC) (GLuint list); +typedef void (APIENTRYP PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC) (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLCOMMANDLISTSEGMENTSNVPROC) (GLuint list, GLuint segments); +typedef void (APIENTRYP PFNGLCOMPILECOMMANDLISTNVPROC) (GLuint list); +typedef void (APIENTRYP PFNGLCALLCOMMANDLISTNVPROC) (GLuint list); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCreateStatesNV (GLsizei n, GLuint *states); +GLAPI void APIENTRY glDeleteStatesNV (GLsizei n, const GLuint *states); +GLAPI GLboolean APIENTRY glIsStateNV (GLuint state); +GLAPI void APIENTRY glStateCaptureNV (GLuint state, GLenum mode); +GLAPI GLuint APIENTRY glGetCommandHeaderNV (GLenum tokenID, GLuint size); +GLAPI GLushort APIENTRY glGetStageIndexNV (GLenum shadertype); +GLAPI void APIENTRY glDrawCommandsNV (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); +GLAPI void APIENTRY glDrawCommandsAddressNV (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); +GLAPI void APIENTRY glDrawCommandsStatesNV (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glDrawCommandsStatesAddressNV (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glCreateCommandListsNV (GLsizei n, GLuint *lists); +GLAPI void APIENTRY glDeleteCommandListsNV (GLsizei n, const GLuint *lists); +GLAPI GLboolean APIENTRY glIsCommandListNV (GLuint list); +GLAPI void APIENTRY glListDrawCommandsStatesClientNV (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glCommandListSegmentsNV (GLuint list, GLuint segments); +GLAPI void APIENTRY glCompileCommandListNV (GLuint list); +GLAPI void APIENTRY glCallCommandListNV (GLuint list); +#endif +#endif /* GL_NV_command_list */ + +#ifndef GL_NV_compute_program5 +#define GL_NV_compute_program5 1 +#define GL_COMPUTE_PROGRAM_NV 0x90FB +#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC +#endif /* GL_NV_compute_program5 */ + +#ifndef GL_NV_compute_shader_derivatives +#define GL_NV_compute_shader_derivatives 1 +#endif /* GL_NV_compute_shader_derivatives */ + +#ifndef GL_NV_conditional_render +#define GL_NV_conditional_render 1 +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRenderNV (void); +#endif +#endif /* GL_NV_conditional_render */ + +#ifndef GL_NV_conservative_raster +#define GL_NV_conservative_raster 1 +#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 +#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 +#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 +#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 +typedef void (APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits); +#endif +#endif /* GL_NV_conservative_raster */ + +#ifndef GL_NV_conservative_raster_dilate +#define GL_NV_conservative_raster_dilate 1 +#define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379 +#define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A +#define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B +typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERFNVPROC) (GLenum pname, GLfloat value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat value); +#endif +#endif /* GL_NV_conservative_raster_dilate */ + +#ifndef GL_NV_conservative_raster_pre_snap +#define GL_NV_conservative_raster_pre_snap 1 +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV 0x9550 +#endif /* GL_NV_conservative_raster_pre_snap */ + +#ifndef GL_NV_conservative_raster_pre_snap_triangles +#define GL_NV_conservative_raster_pre_snap_triangles 1 +#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D +#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F +typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param); +#endif +#endif /* GL_NV_conservative_raster_pre_snap_triangles */ + +#ifndef GL_NV_conservative_raster_underestimation +#define GL_NV_conservative_raster_underestimation 1 +#endif /* GL_NV_conservative_raster_underestimation */ + +#ifndef GL_NV_copy_depth_to_color +#define GL_NV_copy_depth_to_color 1 +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +#endif /* GL_NV_copy_depth_to_color */ + +#ifndef GL_NV_copy_image +#define GL_NV_copy_image 1 +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); +#ifdef GL_GLEXT_PROTOTYPES +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); +#endif +#endif /* GL_NV_copy_image */ + +#ifndef GL_NV_deep_texture3D +#define GL_NV_deep_texture3D 1 +#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0 +#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1 +#endif /* GL_NV_deep_texture3D */ + +#ifndef GL_NV_depth_buffer_float +#define GL_NV_depth_buffer_float 1 +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#define GL_DEPTH32F_STENCIL8_NV 0x8DAC +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glClearDepthdNV (GLdouble depth); +GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); +#endif +#endif /* GL_NV_depth_buffer_float */ + +#ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp 1 +#define GL_DEPTH_CLAMP_NV 0x864F +#endif /* GL_NV_depth_clamp */ + +#ifndef GL_NV_draw_texture +#define GL_NV_draw_texture 1 +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); +#ifdef GL_GLEXT_PROTOTYPES +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); +#endif +#endif /* GL_NV_draw_texture */ + +#ifndef GL_NV_draw_vulkan_image +#define GL_NV_draw_vulkan_image 1 +typedef void (APIENTRY *GLVULKANPROCNV)(void); +typedef void (APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +typedef GLVULKANPROCNV (APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name); +typedef void (APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +GLAPI GLVULKANPROCNV APIENTRY glGetVkProcAddrNV (const GLchar *name); +GLAPI void APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore); +GLAPI void APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore); +GLAPI void APIENTRY glSignalVkFenceNV (GLuint64 vkFence); +#endif +#endif /* GL_NV_draw_vulkan_image */ + +#ifndef GL_NV_evaluators +#define GL_NV_evaluators 1 +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points); +typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points); +GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points); +GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode); +#endif +#endif /* GL_NV_evaluators */ + +#ifndef GL_NV_explicit_multisample +#define GL_NV_explicit_multisample 1 +#define GL_SAMPLE_POSITION_NV 0x8E50 +#define GL_SAMPLE_MASK_NV 0x8E51 +#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 +#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 +#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 +#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 +#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 +#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 +#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 +#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); +typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); +GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask); +GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer); +#endif +#endif /* GL_NV_explicit_multisample */ + +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); +GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); +GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence); +GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence); +GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +GLAPI void APIENTRY glFinishFenceNV (GLuint fence); +GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); +#endif +#endif /* GL_NV_fence */ + +#ifndef GL_NV_fill_rectangle +#define GL_NV_fill_rectangle 1 +#define GL_FILL_RECTANGLE_NV 0x933C +#endif /* GL_NV_fill_rectangle */ + +#ifndef GL_NV_float_buffer +#define GL_NV_float_buffer 1 +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E +#endif /* GL_NV_float_buffer */ + +#ifndef GL_NV_fog_distance +#define GL_NV_fog_distance 1 +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_EYE_RADIAL_NV 0x855B +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C +#endif /* GL_NV_fog_distance */ + +#ifndef GL_NV_fragment_coverage_to_color +#define GL_NV_fragment_coverage_to_color 1 +#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD +#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE +typedef void (APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentCoverageColorNV (GLuint color); +#endif +#endif /* GL_NV_fragment_coverage_to_color */ + +#ifndef GL_NV_fragment_program +#define GL_NV_fragment_program 1 +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +#endif +#endif /* GL_NV_fragment_program */ + +#ifndef GL_NV_fragment_program2 +#define GL_NV_fragment_program2 1 +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 +#endif /* GL_NV_fragment_program2 */ + +#ifndef GL_NV_fragment_program4 +#define GL_NV_fragment_program4 1 +#endif /* GL_NV_fragment_program4 */ + +#ifndef GL_NV_fragment_program_option +#define GL_NV_fragment_program_option 1 +#endif /* GL_NV_fragment_program_option */ + +#ifndef GL_NV_fragment_shader_barycentric +#define GL_NV_fragment_shader_barycentric 1 +#endif /* GL_NV_fragment_shader_barycentric */ + +#ifndef GL_NV_fragment_shader_interlock +#define GL_NV_fragment_shader_interlock 1 +#endif /* GL_NV_fragment_shader_interlock */ + +#ifndef GL_NV_framebuffer_mixed_samples +#define GL_NV_framebuffer_mixed_samples 1 +#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#define GL_DEPTH_SAMPLES_NV 0x932D +#define GL_STENCIL_SAMPLES_NV 0x932E +#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F +#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 +#define GL_COVERAGE_MODULATION_NV 0x9332 +#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 +typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v); +typedef void (APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufSize, GLfloat *v); +typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v); +GLAPI void APIENTRY glGetCoverageModulationTableNV (GLsizei bufSize, GLfloat *v); +GLAPI void APIENTRY glCoverageModulationNV (GLenum components); +#endif +#endif /* GL_NV_framebuffer_mixed_samples */ + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_NV_framebuffer_multisample_coverage 1 +#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 +#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +#endif /* GL_NV_framebuffer_multisample_coverage */ + +#ifndef GL_NV_geometry_program4 +#define GL_NV_geometry_program4 1 +#define GL_GEOMETRY_PROGRAM_NV 0x8C26 +#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 +#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 +typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit); +GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif +#endif /* GL_NV_geometry_program4 */ + +#ifndef GL_NV_geometry_shader4 +#define GL_NV_geometry_shader4 1 +#endif /* GL_NV_geometry_shader4 */ + +#ifndef GL_NV_geometry_shader_passthrough +#define GL_NV_geometry_shader_passthrough 1 +#endif /* GL_NV_geometry_shader_passthrough */ + +#ifndef GL_NV_gpu_multicast +#define GL_NV_gpu_multicast 1 +#define GL_PER_GPU_STORAGE_BIT_NV 0x0800 +#define GL_MULTICAST_GPUS_NV 0x92BA +#define GL_RENDER_GPU_MASK_NV 0x9558 +#define GL_PER_GPU_STORAGE_NV 0x9548 +#define GL_MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9549 +typedef void (APIENTRYP PFNGLRENDERGPUMASKNVPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLMULTICASTBUFFERSUBDATANVPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLMULTICASTCOPYBUFFERSUBDATANVPROC) (GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLMULTICASTCOPYIMAGESUBDATANVPROC) (GLuint srcGpu, GLbitfield dstGpuMask, 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); +typedef void (APIENTRYP PFNGLMULTICASTBLITFRAMEBUFFERNVPROC) (GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRYP PFNGLMULTICASTFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTICASTBARRIERNVPROC) (void); +typedef void (APIENTRYP PFNGLMULTICASTWAITSYNCNVPROC) (GLuint signalGpu, GLbitfield waitGpuMask); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint64 *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderGpuMaskNV (GLbitfield mask); +GLAPI void APIENTRY glMulticastBufferSubDataNV (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glMulticastCopyBufferSubDataNV (GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glMulticastCopyImageSubDataNV (GLuint srcGpu, GLbitfield dstGpuMask, 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); +GLAPI void APIENTRY glMulticastBlitFramebufferNV (GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI void APIENTRY glMulticastFramebufferSampleLocationsfvNV (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glMulticastBarrierNV (void); +GLAPI void APIENTRY glMulticastWaitSyncNV (GLuint signalGpu, GLbitfield waitGpuMask); +GLAPI void APIENTRY glMulticastGetQueryObjectivNV (GLuint gpu, GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glMulticastGetQueryObjectuivNV (GLuint gpu, GLuint id, GLenum pname, GLuint *params); +GLAPI void APIENTRY glMulticastGetQueryObjecti64vNV (GLuint gpu, GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glMulticastGetQueryObjectui64vNV (GLuint gpu, GLuint id, GLenum pname, GLuint64 *params); +#endif +#endif /* GL_NV_gpu_multicast */ + +#ifndef GL_NV_gpu_program4 +#define GL_NV_gpu_program4 1 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 +#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 +#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 +#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 +#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 +#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 +#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); +GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); +#endif +#endif /* GL_NV_gpu_program4 */ + +#ifndef GL_NV_gpu_program5 +#define GL_NV_gpu_program5 1 +#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C +#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F +#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 +#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 +typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); +#endif +#endif /* GL_NV_gpu_program5 */ + +#ifndef GL_NV_gpu_program5_mem_extended +#define GL_NV_gpu_program5_mem_extended 1 +#endif /* GL_NV_gpu_program5_mem_extended */ + +#ifndef GL_NV_gpu_shader5 +#define GL_NV_gpu_shader5 1 +#endif /* GL_NV_gpu_shader5 */ + +#ifndef GL_NV_half_float +#define GL_NV_half_float 1 +typedef unsigned short GLhalfNV; +#define GL_HALF_FLOAT_NV 0x140B +typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y); +GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); +GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s); +GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t); +GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); +GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s); +GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); +GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog); +GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog); +GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight); +GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight); +GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x); +GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); +GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +#endif +#endif /* GL_NV_half_float */ + +#ifndef GL_NV_internalformat_sample_query +#define GL_NV_internalformat_sample_query 1 +#define GL_MULTISAMPLES_NV 0x9371 +#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 +#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 +#define GL_CONFORMANT_NV 0x9374 +typedef void (APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params); +#endif +#endif /* GL_NV_internalformat_sample_query */ + +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent 1 +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +#endif /* GL_NV_light_max_exponent */ + +#ifndef GL_NV_memory_attachment +#define GL_NV_memory_attachment 1 +#define GL_ATTACHED_MEMORY_OBJECT_NV 0x95A4 +#define GL_ATTACHED_MEMORY_OFFSET_NV 0x95A5 +#define GL_MEMORY_ATTACHABLE_ALIGNMENT_NV 0x95A6 +#define GL_MEMORY_ATTACHABLE_SIZE_NV 0x95A7 +#define GL_MEMORY_ATTACHABLE_NV 0x95A8 +#define GL_DETACHED_MEMORY_INCARNATION_NV 0x95A9 +#define GL_DETACHED_TEXTURES_NV 0x95AA +#define GL_DETACHED_BUFFERS_NV 0x95AB +#define GL_MAX_DETACHED_TEXTURES_NV 0x95AC +#define GL_MAX_DETACHED_BUFFERS_NV 0x95AD +typedef void (APIENTRYP PFNGLGETMEMORYOBJECTDETACHEDRESOURCESUIVNVPROC) (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params); +typedef void (APIENTRYP PFNGLRESETMEMORYOBJECTPARAMETERNVPROC) (GLuint memory, GLenum pname); +typedef void (APIENTRYP PFNGLTEXATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLBUFFERATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTUREATTACHMEMORYNVPROC) (GLuint texture, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLNAMEDBUFFERATTACHMEMORYNVPROC) (GLuint buffer, GLuint memory, GLuint64 offset); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetMemoryObjectDetachedResourcesuivNV (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params); +GLAPI void APIENTRY glResetMemoryObjectParameterNV (GLuint memory, GLenum pname); +GLAPI void APIENTRY glTexAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glBufferAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureAttachMemoryNV (GLuint texture, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glNamedBufferAttachMemoryNV (GLuint buffer, GLuint memory, GLuint64 offset); +#endif +#endif /* GL_NV_memory_attachment */ + +#ifndef GL_NV_memory_object_sparse +#define GL_NV_memory_object_sparse 1 +typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTMEMNVPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTMEMNVPROC) (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTMEMNVPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTMEMNVPROC) (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferPageCommitmentMemNV (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +GLAPI void APIENTRY glTexPageCommitmentMemNV (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentMemNV (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +GLAPI void APIENTRY glTexturePageCommitmentMemNV (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +#endif +#endif /* GL_NV_memory_object_sparse */ + +#ifndef GL_NV_mesh_shader +#define GL_NV_mesh_shader 1 +#define GL_MESH_SHADER_NV 0x9559 +#define GL_TASK_SHADER_NV 0x955A +#define GL_MAX_MESH_UNIFORM_BLOCKS_NV 0x8E60 +#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_NV 0x8E61 +#define GL_MAX_MESH_IMAGE_UNIFORMS_NV 0x8E62 +#define GL_MAX_MESH_UNIFORM_COMPONENTS_NV 0x8E63 +#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV 0x8E64 +#define GL_MAX_MESH_ATOMIC_COUNTERS_NV 0x8E65 +#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_NV 0x8E66 +#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV 0x8E67 +#define GL_MAX_TASK_UNIFORM_BLOCKS_NV 0x8E68 +#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_NV 0x8E69 +#define GL_MAX_TASK_IMAGE_UNIFORMS_NV 0x8E6A +#define GL_MAX_TASK_UNIFORM_COMPONENTS_NV 0x8E6B +#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV 0x8E6C +#define GL_MAX_TASK_ATOMIC_COUNTERS_NV 0x8E6D +#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_NV 0x8E6E +#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV 0x8E6F +#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_NV 0x95A2 +#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_NV 0x95A3 +#define GL_MAX_MESH_TOTAL_MEMORY_SIZE_NV 0x9536 +#define GL_MAX_TASK_TOTAL_MEMORY_SIZE_NV 0x9537 +#define GL_MAX_MESH_OUTPUT_VERTICES_NV 0x9538 +#define GL_MAX_MESH_OUTPUT_PRIMITIVES_NV 0x9539 +#define GL_MAX_TASK_OUTPUT_COUNT_NV 0x953A +#define GL_MAX_DRAW_MESH_TASKS_COUNT_NV 0x953D +#define GL_MAX_MESH_VIEWS_NV 0x9557 +#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV 0x92DF +#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV 0x9543 +#define GL_MAX_MESH_WORK_GROUP_SIZE_NV 0x953B +#define GL_MAX_TASK_WORK_GROUP_SIZE_NV 0x953C +#define GL_MESH_WORK_GROUP_SIZE_NV 0x953E +#define GL_TASK_WORK_GROUP_SIZE_NV 0x953F +#define GL_MESH_VERTICES_OUT_NV 0x9579 +#define GL_MESH_PRIMITIVES_OUT_NV 0x957A +#define GL_MESH_OUTPUT_TYPE_NV 0x957B +#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV 0x959C +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV 0x959D +#define GL_REFERENCED_BY_MESH_SHADER_NV 0x95A0 +#define GL_REFERENCED_BY_TASK_SHADER_NV 0x95A1 +#define GL_MESH_SHADER_BIT_NV 0x00000040 +#define GL_TASK_SHADER_BIT_NV 0x00000080 +#define GL_MESH_SUBROUTINE_NV 0x957C +#define GL_TASK_SUBROUTINE_NV 0x957D +#define GL_MESH_SUBROUTINE_UNIFORM_NV 0x957E +#define GL_TASK_SUBROUTINE_UNIFORM_NV 0x957F +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV 0x959E +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV 0x959F +typedef void (APIENTRYP PFNGLDRAWMESHTASKSNVPROC) (GLuint first, GLuint count); +typedef void (APIENTRYP PFNGLDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect); +typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect, GLsizei drawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTNVPROC) (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshTasksNV (GLuint first, GLuint count); +GLAPI void APIENTRY glDrawMeshTasksIndirectNV (GLintptr indirect); +GLAPI void APIENTRY glMultiDrawMeshTasksIndirectNV (GLintptr indirect, GLsizei drawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawMeshTasksIndirectCountNV (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#endif +#endif /* GL_NV_mesh_shader */ + +#ifndef GL_NV_multisample_coverage +#define GL_NV_multisample_coverage 1 +#endif /* GL_NV_multisample_coverage */ + +#ifndef GL_NV_multisample_filter_hint +#define GL_NV_multisample_filter_hint 1 +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#endif /* GL_NV_multisample_filter_hint */ + +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query 1 +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id); +GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id); +GLAPI void APIENTRY glEndOcclusionQueryNV (void); +GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); +#endif +#endif /* GL_NV_occlusion_query */ + +#ifndef GL_NV_packed_depth_stencil +#define GL_NV_packed_depth_stencil 1 +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_UNSIGNED_INT_24_8_NV 0x84FA +#endif /* GL_NV_packed_depth_stencil */ + +#ifndef GL_NV_parameter_buffer_object +#define GL_NV_parameter_buffer_object 1 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 +#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 +#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 +#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params); +#endif +#endif /* GL_NV_parameter_buffer_object */ + +#ifndef GL_NV_parameter_buffer_object2 +#define GL_NV_parameter_buffer_object2 1 +#endif /* GL_NV_parameter_buffer_object2 */ + +#ifndef GL_NV_path_rendering +#define GL_NV_path_rendering 1 +#define GL_PATH_FORMAT_SVG_NV 0x9070 +#define GL_PATH_FORMAT_PS_NV 0x9071 +#define GL_STANDARD_FONT_NAME_NV 0x9072 +#define GL_SYSTEM_FONT_NAME_NV 0x9073 +#define GL_FILE_NAME_NV 0x9074 +#define GL_PATH_STROKE_WIDTH_NV 0x9075 +#define GL_PATH_END_CAPS_NV 0x9076 +#define GL_PATH_INITIAL_END_CAP_NV 0x9077 +#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 +#define GL_PATH_JOIN_STYLE_NV 0x9079 +#define GL_PATH_MITER_LIMIT_NV 0x907A +#define GL_PATH_DASH_CAPS_NV 0x907B +#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C +#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D +#define GL_PATH_DASH_OFFSET_NV 0x907E +#define GL_PATH_CLIENT_LENGTH_NV 0x907F +#define GL_PATH_FILL_MODE_NV 0x9080 +#define GL_PATH_FILL_MASK_NV 0x9081 +#define GL_PATH_FILL_COVER_MODE_NV 0x9082 +#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 +#define GL_PATH_STROKE_MASK_NV 0x9084 +#define GL_COUNT_UP_NV 0x9088 +#define GL_COUNT_DOWN_NV 0x9089 +#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A +#define GL_CONVEX_HULL_NV 0x908B +#define GL_BOUNDING_BOX_NV 0x908D +#define GL_TRANSLATE_X_NV 0x908E +#define GL_TRANSLATE_Y_NV 0x908F +#define GL_TRANSLATE_2D_NV 0x9090 +#define GL_TRANSLATE_3D_NV 0x9091 +#define GL_AFFINE_2D_NV 0x9092 +#define GL_AFFINE_3D_NV 0x9094 +#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 +#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 +#define GL_UTF8_NV 0x909A +#define GL_UTF16_NV 0x909B +#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C +#define GL_PATH_COMMAND_COUNT_NV 0x909D +#define GL_PATH_COORD_COUNT_NV 0x909E +#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F +#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 +#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 +#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 +#define GL_SQUARE_NV 0x90A3 +#define GL_ROUND_NV 0x90A4 +#define GL_TRIANGULAR_NV 0x90A5 +#define GL_BEVEL_NV 0x90A6 +#define GL_MITER_REVERT_NV 0x90A7 +#define GL_MITER_TRUNCATE_NV 0x90A8 +#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 +#define GL_USE_MISSING_GLYPH_NV 0x90AA +#define GL_PATH_ERROR_POSITION_NV 0x90AB +#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD +#define GL_ADJACENT_PAIRS_NV 0x90AE +#define GL_FIRST_TO_REST_NV 0x90AF +#define GL_PATH_GEN_MODE_NV 0x90B0 +#define GL_PATH_GEN_COEFF_NV 0x90B1 +#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 +#define GL_PATH_STENCIL_FUNC_NV 0x90B7 +#define GL_PATH_STENCIL_REF_NV 0x90B8 +#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 +#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD +#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE +#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF +#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 +#define GL_MOVE_TO_RESETS_NV 0x90B5 +#define GL_MOVE_TO_CONTINUES_NV 0x90B6 +#define GL_CLOSE_PATH_NV 0x00 +#define GL_MOVE_TO_NV 0x02 +#define GL_RELATIVE_MOVE_TO_NV 0x03 +#define GL_LINE_TO_NV 0x04 +#define GL_RELATIVE_LINE_TO_NV 0x05 +#define GL_HORIZONTAL_LINE_TO_NV 0x06 +#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 +#define GL_VERTICAL_LINE_TO_NV 0x08 +#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 +#define GL_QUADRATIC_CURVE_TO_NV 0x0A +#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B +#define GL_CUBIC_CURVE_TO_NV 0x0C +#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D +#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E +#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F +#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 +#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 +#define GL_SMALL_CCW_ARC_TO_NV 0x12 +#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 +#define GL_SMALL_CW_ARC_TO_NV 0x14 +#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 +#define GL_LARGE_CCW_ARC_TO_NV 0x16 +#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 +#define GL_LARGE_CW_ARC_TO_NV 0x18 +#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 +#define GL_RESTART_PATH_NV 0xF0 +#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 +#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 +#define GL_RECT_NV 0xF6 +#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 +#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA +#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC +#define GL_ARC_TO_NV 0xFE +#define GL_RELATIVE_ARC_TO_NV 0xFF +#define GL_BOLD_BIT_NV 0x01 +#define GL_ITALIC_BIT_NV 0x02 +#define GL_GLYPH_WIDTH_BIT_NV 0x01 +#define GL_GLYPH_HEIGHT_BIT_NV 0x02 +#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 +#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 +#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 +#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 +#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 +#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 +#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 +#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 +#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 +#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 +#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 +#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 +#define GL_FONT_ASCENDER_BIT_NV 0x00200000 +#define GL_FONT_DESCENDER_BIT_NV 0x00400000 +#define GL_FONT_HEIGHT_BIT_NV 0x00800000 +#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 +#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 +#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 +#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 +#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 +#define GL_ROUNDED_RECT_NV 0xE8 +#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 +#define GL_ROUNDED_RECT2_NV 0xEA +#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB +#define GL_ROUNDED_RECT4_NV 0xEC +#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED +#define GL_ROUNDED_RECT8_NV 0xEE +#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF +#define GL_RELATIVE_RECT_NV 0xF7 +#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 +#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 +#define GL_FONT_UNAVAILABLE_NV 0x936A +#define GL_FONT_UNINTELLIGIBLE_NV 0x936B +#define GL_CONIC_CURVE_TO_NV 0x1A +#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B +#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 +#define GL_STANDARD_FONT_FORMAT_NV 0x936C +#define GL_2_BYTES_NV 0x1407 +#define GL_3_BYTES_NV 0x1408 +#define GL_4_BYTES_NV 0x1409 +#define GL_EYE_LINEAR_NV 0x2400 +#define GL_OBJECT_LINEAR_NV 0x2401 +#define GL_CONSTANT_NV 0x8576 +#define GL_PATH_FOG_GEN_MODE_NV 0x90AC +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 +#define GL_PATH_PROJECTION_NV 0x1701 +#define GL_PATH_MODELVIEW_NV 0x1700 +#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 +#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 +#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 +#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 +#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 +#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 +#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 +#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 +#define GL_FRAGMENT_INPUT_NV 0x936D +typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path); +typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString); +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); +typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); +typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); +typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); +typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); +typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); +typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); +typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); +typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); +typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); +typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); +typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); +typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); +typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); +typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +typedef void (APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef GLenum (APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params); +typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode); +typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value); +typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range); +GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range); +GLAPI GLboolean APIENTRY glIsPathNV (GLuint path); +GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString); +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); +GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); +GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); +GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); +GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); +GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); +GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); +GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); +GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); +GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func); +GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); +GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); +GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); +GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); +GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); +GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); +GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); +GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); +GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); +GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +GLAPI void APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GLAPI void APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +GLAPI void APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +GLAPI void APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI void APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GLAPI GLenum APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GLAPI void APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +GLAPI void APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params); +GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); +GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); +GLAPI void APIENTRY glPathFogGenNV (GLenum genMode); +GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value); +GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value); +#endif +#endif /* GL_NV_path_rendering */ + +#ifndef GL_NV_path_rendering_shared_edge +#define GL_NV_path_rendering_shared_edge 1 +#define GL_SHARED_EDGE_NV 0xC0 +#endif /* GL_NV_path_rendering_shared_edge */ + +#ifndef GL_NV_pixel_data_range +#define GL_NV_pixel_data_range 1 +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer); +typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer); +GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target); +#endif +#endif /* GL_NV_pixel_data_range */ + +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite 1 +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param); +GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params); +#endif +#endif /* GL_NV_point_sprite */ + +#ifndef GL_NV_present_video +#define GL_NV_present_video 1 +#define GL_FRAME_NV 0x8E26 +#define GL_FIELDS_NV 0x8E27 +#define GL_CURRENT_TIME_NV 0x8E28 +#define GL_NUM_FILL_STREAMS_NV 0x8E29 +#define GL_PRESENT_TIME_NV 0x8E2A +#define GL_PRESENT_DURATION_NV 0x8E2B +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); +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); +typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); +#ifdef GL_GLEXT_PROTOTYPES +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); +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); +GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); +GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); +#endif +#endif /* GL_NV_present_video */ + +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart 1 +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveRestartNV (void); +GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index); +#endif +#endif /* GL_NV_primitive_restart */ + +#ifndef GL_NV_primitive_shading_rate +#define GL_NV_primitive_shading_rate 1 +#define GL_SHADING_RATE_IMAGE_PER_PRIMITIVE_NV 0x95B1 +#define GL_SHADING_RATE_IMAGE_PALETTE_COUNT_NV 0x95B2 +#endif /* GL_NV_primitive_shading_rate */ + +#ifndef GL_NV_query_resource +#define GL_NV_query_resource 1 +#define GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV 0x9540 +#define GL_QUERY_RESOURCE_MEMTYPE_VIDMEM_NV 0x9542 +#define GL_QUERY_RESOURCE_SYS_RESERVED_NV 0x9544 +#define GL_QUERY_RESOURCE_TEXTURE_NV 0x9545 +#define GL_QUERY_RESOURCE_RENDERBUFFER_NV 0x9546 +#define GL_QUERY_RESOURCE_BUFFEROBJECT_NV 0x9547 +typedef GLint (APIENTRYP PFNGLQUERYRESOURCENVPROC) (GLenum queryType, GLint tagId, GLuint count, GLint *buffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glQueryResourceNV (GLenum queryType, GLint tagId, GLuint count, GLint *buffer); +#endif +#endif /* GL_NV_query_resource */ + +#ifndef GL_NV_query_resource_tag +#define GL_NV_query_resource_tag 1 +typedef void (APIENTRYP PFNGLGENQUERYRESOURCETAGNVPROC) (GLsizei n, GLint *tagIds); +typedef void (APIENTRYP PFNGLDELETEQUERYRESOURCETAGNVPROC) (GLsizei n, const GLint *tagIds); +typedef void (APIENTRYP PFNGLQUERYRESOURCETAGNVPROC) (GLint tagId, const GLchar *tagString); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueryResourceTagNV (GLsizei n, GLint *tagIds); +GLAPI void APIENTRY glDeleteQueryResourceTagNV (GLsizei n, const GLint *tagIds); +GLAPI void APIENTRY glQueryResourceTagNV (GLint tagId, const GLchar *tagString); +#endif +#endif /* GL_NV_query_resource_tag */ + +#ifndef GL_NV_register_combiners +#define GL_NV_register_combiners 1 +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_SPARE0_NV 0x852E +#define GL_SPARE1_NV 0x852F +#define GL_DISCARD_NV 0x8530 +#define GL_E_TIMES_F_NV 0x8531 +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param); +GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params); +GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param); +GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); +#endif +#endif /* GL_NV_register_combiners */ + +#ifndef GL_NV_register_combiners2 +#define GL_NV_register_combiners2 1 +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); +#endif +#endif /* GL_NV_register_combiners2 */ + +#ifndef GL_NV_representative_fragment_test +#define GL_NV_representative_fragment_test 1 +#define GL_REPRESENTATIVE_FRAGMENT_TEST_NV 0x937F +#endif /* GL_NV_representative_fragment_test */ + +#ifndef GL_NV_robustness_video_memory_purge +#define GL_NV_robustness_video_memory_purge 1 +#define GL_PURGED_CONTEXT_RESET_NV 0x92BB +#endif /* GL_NV_robustness_video_memory_purge */ + +#ifndef GL_NV_sample_locations +#define GL_NV_sample_locations 1 +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 +#define GL_SAMPLE_LOCATION_NV 0x8E50 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 +typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glResolveDepthValuesNV (void); +#endif +#endif /* GL_NV_sample_locations */ + +#ifndef GL_NV_sample_mask_override_coverage +#define GL_NV_sample_mask_override_coverage 1 +#endif /* GL_NV_sample_mask_override_coverage */ + +#ifndef GL_NV_scissor_exclusive +#define GL_NV_scissor_exclusive 1 +#define GL_SCISSOR_TEST_EXCLUSIVE_NV 0x9555 +#define GL_SCISSOR_BOX_EXCLUSIVE_NV 0x9556 +typedef void (APIENTRYP PFNGLSCISSOREXCLUSIVENVPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLSCISSOREXCLUSIVEARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glScissorExclusiveNV (GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glScissorExclusiveArrayvNV (GLuint first, GLsizei count, const GLint *v); +#endif +#endif /* GL_NV_scissor_exclusive */ + +#ifndef GL_NV_shader_atomic_counters +#define GL_NV_shader_atomic_counters 1 +#endif /* GL_NV_shader_atomic_counters */ + +#ifndef GL_NV_shader_atomic_float +#define GL_NV_shader_atomic_float 1 +#endif /* GL_NV_shader_atomic_float */ + +#ifndef GL_NV_shader_atomic_float64 +#define GL_NV_shader_atomic_float64 1 +#endif /* GL_NV_shader_atomic_float64 */ + +#ifndef GL_NV_shader_atomic_fp16_vector +#define GL_NV_shader_atomic_fp16_vector 1 +#endif /* GL_NV_shader_atomic_fp16_vector */ + +#ifndef GL_NV_shader_atomic_int64 +#define GL_NV_shader_atomic_int64 1 +#endif /* GL_NV_shader_atomic_int64 */ + +#ifndef GL_NV_shader_buffer_load +#define GL_NV_shader_buffer_load 1 +#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D +#define GL_GPU_ADDRESS_NV 0x8F34 +#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 +typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); +typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); +typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); +typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); +typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); +GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); +GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); +GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); +GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); +GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); +GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); +GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); +GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); +GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif +#endif /* GL_NV_shader_buffer_load */ + +#ifndef GL_NV_shader_buffer_store +#define GL_NV_shader_buffer_store 1 +#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 +#endif /* GL_NV_shader_buffer_store */ + +#ifndef GL_NV_shader_storage_buffer_object +#define GL_NV_shader_storage_buffer_object 1 +#endif /* GL_NV_shader_storage_buffer_object */ + +#ifndef GL_NV_shader_subgroup_partitioned +#define GL_NV_shader_subgroup_partitioned 1 +#define GL_SUBGROUP_FEATURE_PARTITIONED_BIT_NV 0x00000100 +#endif /* GL_NV_shader_subgroup_partitioned */ + +#ifndef GL_NV_shader_texture_footprint +#define GL_NV_shader_texture_footprint 1 +#endif /* GL_NV_shader_texture_footprint */ + +#ifndef GL_NV_shader_thread_group +#define GL_NV_shader_thread_group 1 +#define GL_WARP_SIZE_NV 0x9339 +#define GL_WARPS_PER_SM_NV 0x933A +#define GL_SM_COUNT_NV 0x933B +#endif /* GL_NV_shader_thread_group */ + +#ifndef GL_NV_shader_thread_shuffle +#define GL_NV_shader_thread_shuffle 1 +#endif /* GL_NV_shader_thread_shuffle */ + +#ifndef GL_NV_shading_rate_image +#define GL_NV_shading_rate_image 1 +#define GL_SHADING_RATE_IMAGE_NV 0x9563 +#define GL_SHADING_RATE_NO_INVOCATIONS_NV 0x9564 +#define GL_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV 0x9565 +#define GL_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV 0x9566 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV 0x9567 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV 0x9568 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV 0x9569 +#define GL_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV 0x956A +#define GL_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV 0x956B +#define GL_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV 0x956C +#define GL_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV 0x956D +#define GL_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV 0x956E +#define GL_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV 0x956F +#define GL_SHADING_RATE_IMAGE_BINDING_NV 0x955B +#define GL_SHADING_RATE_IMAGE_TEXEL_WIDTH_NV 0x955C +#define GL_SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV 0x955D +#define GL_SHADING_RATE_IMAGE_PALETTE_SIZE_NV 0x955E +#define GL_MAX_COARSE_FRAGMENT_SAMPLES_NV 0x955F +#define GL_SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV 0x95AE +#define GL_SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV 0x95AF +#define GL_SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV 0x95B0 +typedef void (APIENTRYP PFNGLBINDSHADINGRATEIMAGENVPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLGETSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint entry, GLenum *rate); +typedef void (APIENTRYP PFNGLGETSHADINGRATESAMPLELOCATIONIVNVPROC) (GLenum rate, GLuint samples, GLuint index, GLint *location); +typedef void (APIENTRYP PFNGLSHADINGRATEIMAGEBARRIERNVPROC) (GLboolean synchronize); +typedef void (APIENTRYP PFNGLSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates); +typedef void (APIENTRYP PFNGLSHADINGRATESAMPLEORDERNVPROC) (GLenum order); +typedef void (APIENTRYP PFNGLSHADINGRATESAMPLEORDERCUSTOMNVPROC) (GLenum rate, GLuint samples, const GLint *locations); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindShadingRateImageNV (GLuint texture); +GLAPI void APIENTRY glGetShadingRateImagePaletteNV (GLuint viewport, GLuint entry, GLenum *rate); +GLAPI void APIENTRY glGetShadingRateSampleLocationivNV (GLenum rate, GLuint samples, GLuint index, GLint *location); +GLAPI void APIENTRY glShadingRateImageBarrierNV (GLboolean synchronize); +GLAPI void APIENTRY glShadingRateImagePaletteNV (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates); +GLAPI void APIENTRY glShadingRateSampleOrderNV (GLenum order); +GLAPI void APIENTRY glShadingRateSampleOrderCustomNV (GLenum rate, GLuint samples, const GLint *locations); +#endif +#endif /* GL_NV_shading_rate_image */ + +#ifndef GL_NV_stereo_view_rendering +#define GL_NV_stereo_view_rendering 1 +#endif /* GL_NV_stereo_view_rendering */ + +#ifndef GL_NV_tessellation_program5 +#define GL_NV_tessellation_program5 1 +#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 +#define GL_TESS_CONTROL_PROGRAM_NV 0x891E +#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F +#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 +#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 +#endif /* GL_NV_tessellation_program5 */ + +#ifndef GL_NV_texgen_emboss +#define GL_NV_texgen_emboss 1 +#define GL_EMBOSS_LIGHT_NV 0x855D +#define GL_EMBOSS_CONSTANT_NV 0x855E +#define GL_EMBOSS_MAP_NV 0x855F +#endif /* GL_NV_texgen_emboss */ + +#ifndef GL_NV_texgen_reflection +#define GL_NV_texgen_reflection 1 +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_REFLECTION_MAP_NV 0x8512 +#endif /* GL_NV_texgen_reflection */ + +#ifndef GL_NV_texture_barrier +#define GL_NV_texture_barrier 1 +typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureBarrierNV (void); +#endif +#endif /* GL_NV_texture_barrier */ + +#ifndef GL_NV_texture_compression_vtc +#define GL_NV_texture_compression_vtc 1 +#endif /* GL_NV_texture_compression_vtc */ + +#ifndef GL_NV_texture_env_combine4 +#define GL_NV_texture_env_combine4 1 +#define GL_COMBINE4_NV 0x8503 +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPERAND3_ALPHA_NV 0x859B +#endif /* GL_NV_texture_env_combine4 */ + +#ifndef GL_NV_texture_expand_normal +#define GL_NV_texture_expand_normal 1 +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +#endif /* GL_NV_texture_expand_normal */ + +#ifndef GL_NV_texture_multisample +#define GL_NV_texture_multisample 1 +#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 +#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +#endif +#endif /* GL_NV_texture_multisample */ + +#ifndef GL_NV_texture_rectangle +#define GL_NV_texture_rectangle 1 +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 +#endif /* GL_NV_texture_rectangle */ + +#ifndef GL_NV_texture_rectangle_compressed +#define GL_NV_texture_rectangle_compressed 1 +#endif /* GL_NV_texture_rectangle_compressed */ + +#ifndef GL_NV_texture_shader +#define GL_NV_texture_shader 1 +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_CULL_MODES_NV 0x86E0 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3 +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HI_SCALE_NV 0x870E +#define GL_LO_SCALE_NV 0x870F +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_SCALE_NV 0x8711 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_HI_BIAS_NV 0x8714 +#define GL_LO_BIAS_NV 0x8715 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DT_BIAS_NV 0x8717 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_MAG_SIZE_NV 0x871F +#endif /* GL_NV_texture_shader */ + +#ifndef GL_NV_texture_shader2 +#define GL_NV_texture_shader2 1 +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#endif /* GL_NV_texture_shader2 */ + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 1 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#endif /* GL_NV_texture_shader3 */ + +#ifndef GL_NV_timeline_semaphore +#define GL_NV_timeline_semaphore 1 +#define GL_TIMELINE_SEMAPHORE_VALUE_NV 0x9595 +#define GL_SEMAPHORE_TYPE_NV 0x95B3 +#define GL_SEMAPHORE_TYPE_BINARY_NV 0x95B4 +#define GL_SEMAPHORE_TYPE_TIMELINE_NV 0x95B5 +#define GL_MAX_TIMELINE_SEMAPHORE_VALUE_DIFFERENCE_NV 0x95B6 +typedef void (APIENTRYP PFNGLCREATESEMAPHORESNVPROC) (GLsizei n, GLuint *semaphores); +typedef void (APIENTRYP PFNGLSEMAPHOREPARAMETERIVNVPROC) (GLuint semaphore, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETSEMAPHOREPARAMETERIVNVPROC) (GLuint semaphore, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCreateSemaphoresNV (GLsizei n, GLuint *semaphores); +GLAPI void APIENTRY glSemaphoreParameterivNV (GLuint semaphore, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetSemaphoreParameterivNV (GLuint semaphore, GLenum pname, GLint *params); +#endif +#endif /* GL_NV_timeline_semaphore */ + +#ifndef GL_NV_transform_feedback +#define GL_NV_transform_feedback 1 +#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 +#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 +#define GL_TEXTURE_COORD_NV 0x8C79 +#define GL_CLIP_DISTANCE_NV 0x8C7A +#define GL_VERTEX_ID_NV 0x8C7B +#define GL_PRIMITIVE_ID_NV 0x8C7C +#define GL_GENERIC_ATTRIB_NV 0x8C7D +#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 +#define GL_ACTIVE_VARYINGS_NV 0x8C81 +#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 +#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 +#define GL_PRIMITIVES_GENERATED_NV 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 +#define GL_RASTERIZER_DISCARD_NV 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B +#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C +#define GL_SEPARATE_ATTRIBS_NV 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +#define GL_LAYER_NV 0x8DAA +#define GL_NEXT_BUFFER_NV -2 +#define GL_SKIP_COMPONENTS4_NV -3 +#define GL_SKIP_COMPONENTS3_NV -4 +#define GL_SKIP_COMPONENTS2_NV -5 +#define GL_SKIP_COMPONENTS1_NV -6 +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLenum bufferMode); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedbackNV (void); +GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLsizei count, const GLint *attribs, GLenum bufferMode); +GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name); +GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); +GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +#endif +#endif /* GL_NV_transform_feedback */ + +#ifndef GL_NV_transform_feedback2 +#define GL_NV_transform_feedback2 1 +#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); +GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); +GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id); +GLAPI void APIENTRY glPauseTransformFeedbackNV (void); +GLAPI void APIENTRY glResumeTransformFeedbackNV (void); +GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id); +#endif +#endif /* GL_NV_transform_feedback2 */ + +#ifndef GL_NV_uniform_buffer_unified_memory +#define GL_NV_uniform_buffer_unified_memory 1 +#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E +#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F +#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370 +#endif /* GL_NV_uniform_buffer_unified_memory */ + +#ifndef GL_NV_vdpau_interop +#define GL_NV_vdpau_interop 1 +typedef GLintptr GLvdpauSurfaceNV; +#define GL_SURFACE_STATE_NV 0x86EB +#define GL_SURFACE_REGISTERED_NV 0x86FD +#define GL_SURFACE_MAPPED_NV 0x8700 +#define GL_WRITE_DISCARD_NV 0x88BE +typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress); +typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); +typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress); +GLAPI void APIENTRY glVDPAUFiniNV (void); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); +GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#endif +#endif /* GL_NV_vdpau_interop */ + +#ifndef GL_NV_vdpau_interop2 +#define GL_NV_vdpau_interop2 1 +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACEWITHPICTURESTRUCTURENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames, GLboolean isFrameStructure); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceWithPictureStructureNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames, GLboolean isFrameStructure); +#endif +#endif /* GL_NV_vdpau_interop2 */ + +#ifndef GL_NV_vertex_array_range +#define GL_NV_vertex_array_range 1 +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); +GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer); +#endif +#endif /* GL_NV_vertex_array_range */ + +#ifndef GL_NV_vertex_array_range2 +#define GL_NV_vertex_array_range2 1 +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 +#endif /* GL_NV_vertex_array_range2 */ + +#ifndef GL_NV_vertex_attrib_integer_64bit +#define GL_NV_vertex_attrib_integer_64bit 1 +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); +GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); +GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +#endif +#endif /* GL_NV_vertex_attrib_integer_64bit */ + +#ifndef GL_NV_vertex_buffer_unified_memory +#define GL_NV_vertex_buffer_unified_memory 1 +#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E +#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F +#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 +#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 +#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 +#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 +#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 +#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 +#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 +#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 +#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 +#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 +#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A +#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B +#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C +#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D +#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E +#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F +#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 +#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 +#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 +#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 +#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 +#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 +typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); +GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); +#endif +#endif /* GL_NV_vertex_buffer_unified_memory */ + +#ifndef GL_NV_vertex_program +#define GL_NV_vertex_program 1 +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_NV 0x8637 +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F +typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); +GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); +GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs); +GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); +GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer); +GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id); +GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); +GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); +GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); +GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); +#endif +#endif /* GL_NV_vertex_program */ + +#ifndef GL_NV_vertex_program1_1 +#define GL_NV_vertex_program1_1 1 +#endif /* GL_NV_vertex_program1_1 */ + +#ifndef GL_NV_vertex_program2 +#define GL_NV_vertex_program2 1 +#endif /* GL_NV_vertex_program2 */ + +#ifndef GL_NV_vertex_program2_option +#define GL_NV_vertex_program2_option 1 +#endif /* GL_NV_vertex_program2_option */ + +#ifndef GL_NV_vertex_program3 +#define GL_NV_vertex_program3 1 +#endif /* GL_NV_vertex_program3 */ + +#ifndef GL_NV_vertex_program4 +#define GL_NV_vertex_program4 1 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x); +GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); +GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x); +GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); +GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); +#endif +#endif /* GL_NV_vertex_program4 */ + +#ifndef GL_NV_video_capture +#define GL_NV_video_capture 1 +#define GL_VIDEO_BUFFER_NV 0x9020 +#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 +#define GL_FIELD_UPPER_NV 0x9022 +#define GL_FIELD_LOWER_NV 0x9023 +#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 +#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 +#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 +#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 +#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 +#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 +#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A +#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B +#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C +#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D +#define GL_PARTIAL_SUCCESS_NV 0x902E +#define GL_SUCCESS_NV 0x902F +#define GL_FAILURE_NV 0x9030 +#define GL_YCBYCR8_422_NV 0x9031 +#define GL_YCBAYCR8A_4224_NV 0x9032 +#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 +#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 +#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 +#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 +#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 +#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 +#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 +#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A +#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B +#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C +typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot); +GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot); +GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +#endif +#endif /* GL_NV_video_capture */ + +#ifndef GL_NV_viewport_array2 +#define GL_NV_viewport_array2 1 +#endif /* GL_NV_viewport_array2 */ + +#ifndef GL_NV_viewport_swizzle +#define GL_NV_viewport_swizzle 1 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 +#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 +#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 +#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A +#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B +typedef void (APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#endif +#endif /* GL_NV_viewport_swizzle */ + +#ifndef GL_OML_interlace +#define GL_OML_interlace 1 +#define GL_INTERLACE_OML 0x8980 +#define GL_INTERLACE_READ_OML 0x8981 +#endif /* GL_OML_interlace */ + +#ifndef GL_OML_resample +#define GL_OML_resample 1 +#define GL_PACK_RESAMPLE_OML 0x8984 +#define GL_UNPACK_RESAMPLE_OML 0x8985 +#define GL_RESAMPLE_REPLICATE_OML 0x8986 +#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +#define GL_RESAMPLE_AVERAGE_OML 0x8988 +#define GL_RESAMPLE_DECIMATE_OML 0x8989 +#endif /* GL_OML_resample */ + +#ifndef GL_OML_subsample +#define GL_OML_subsample 1 +#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 +#endif /* GL_OML_subsample */ + +#ifndef GL_OVR_multiview +#define GL_OVR_multiview 1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 +#define GL_MAX_VIEWS_OVR 0x9631 +#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#endif +#endif /* GL_OVR_multiview */ + +#ifndef GL_OVR_multiview2 +#define GL_OVR_multiview2 1 +#endif /* GL_OVR_multiview2 */ + +#ifndef GL_PGI_misc_hints +#define GL_PGI_misc_hints 1 +#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 +#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD +#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE +#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 +#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 +#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 +#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C +#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D +#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E +#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F +#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 +#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 +#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 +#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 +#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 +#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 +#define GL_CLIP_NEAR_HINT_PGI 0x1A220 +#define GL_CLIP_FAR_HINT_PGI 0x1A221 +#define GL_WIDE_LINE_HINT_PGI 0x1A222 +#define GL_BACK_NORMALS_HINT_PGI 0x1A223 +typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode); +#endif +#endif /* GL_PGI_misc_hints */ + +#ifndef GL_PGI_vertex_hints +#define GL_PGI_vertex_hints 1 +#define GL_VERTEX_DATA_HINT_PGI 0x1A22A +#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B +#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C +#define GL_MAX_VERTEX_HINT_PGI 0x1A22D +#define GL_COLOR3_BIT_PGI 0x00010000 +#define GL_COLOR4_BIT_PGI 0x00020000 +#define GL_EDGEFLAG_BIT_PGI 0x00040000 +#define GL_INDEX_BIT_PGI 0x00080000 +#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +#define GL_MAT_EMISSION_BIT_PGI 0x00800000 +#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +#define GL_MAT_SHININESS_BIT_PGI 0x02000000 +#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +#define GL_NORMAL_BIT_PGI 0x08000000 +#define GL_TEXCOORD1_BIT_PGI 0x10000000 +#define GL_TEXCOORD2_BIT_PGI 0x20000000 +#define GL_TEXCOORD3_BIT_PGI 0x40000000 +#define GL_TEXCOORD4_BIT_PGI 0x80000000 +#define GL_VERTEX23_BIT_PGI 0x00000004 +#define GL_VERTEX4_BIT_PGI 0x00000008 +#endif /* GL_PGI_vertex_hints */ + +#ifndef GL_REND_screen_coordinates +#define GL_REND_screen_coordinates 1 +#define GL_SCREEN_COORDINATES_REND 0x8490 +#define GL_INVERTED_SCREEN_W_REND 0x8491 +#endif /* GL_REND_screen_coordinates */ + +#ifndef GL_S3_s3tc +#define GL_S3_s3tc 1 +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA4_S3TC 0x83A3 +#define GL_RGBA_DXT5_S3TC 0x83A4 +#define GL_RGBA4_DXT5_S3TC 0x83A5 +#endif /* GL_S3_s3tc */ + +#ifndef GL_SGIS_detail_texture +#define GL_SGIS_detail_texture 1 +#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 +#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 +#define GL_LINEAR_DETAIL_SGIS 0x8097 +#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 +#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 +#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A +#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B +#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C +typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); +#endif +#endif /* GL_SGIS_detail_texture */ + +#ifndef GL_SGIS_fog_function +#define GL_SGIS_fog_function 1 +#define GL_FOG_FUNC_SGIS 0x812A +#define GL_FOG_FUNC_POINTS_SGIS 0x812B +#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C +typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points); +#endif +#endif /* GL_SGIS_fog_function */ + +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap 1 +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 +#endif /* GL_SGIS_generate_mipmap */ + +#ifndef GL_SGIS_multisample +#define GL_SGIS_multisample 1 +#define GL_MULTISAMPLE_SGIS 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +#define GL_SAMPLE_MASK_SGIS 0x80A0 +#define GL_1PASS_SGIS 0x80A1 +#define GL_2PASS_0_SGIS 0x80A2 +#define GL_2PASS_1_SGIS 0x80A3 +#define GL_4PASS_0_SGIS 0x80A4 +#define GL_4PASS_1_SGIS 0x80A5 +#define GL_4PASS_2_SGIS 0x80A6 +#define GL_4PASS_3_SGIS 0x80A7 +#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +#define GL_SAMPLES_SGIS 0x80A9 +#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +#define GL_SAMPLE_PATTERN_SGIS 0x80AC +typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern); +#endif +#endif /* GL_SGIS_multisample */ + +#ifndef GL_SGIS_pixel_texture +#define GL_SGIS_pixel_texture 1 +#define GL_PIXEL_TEXTURE_SGIS 0x8353 +#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 +#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 +#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param); +GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); +GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); +GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); +#endif +#endif /* GL_SGIS_pixel_texture */ + +#ifndef GL_SGIS_point_line_texgen +#define GL_SGIS_point_line_texgen 1 +#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 +#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 +#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 +#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 +#define GL_EYE_POINT_SGIS 0x81F4 +#define GL_OBJECT_POINT_SGIS 0x81F5 +#define GL_EYE_LINE_SGIS 0x81F6 +#define GL_OBJECT_LINE_SGIS 0x81F7 +#endif /* GL_SGIS_point_line_texgen */ + +#ifndef GL_SGIS_point_parameters +#define GL_SGIS_point_parameters 1 +#define GL_POINT_SIZE_MIN_SGIS 0x8126 +#define GL_POINT_SIZE_MAX_SGIS 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 +#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 +typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params); +#endif +#endif /* GL_SGIS_point_parameters */ + +#ifndef GL_SGIS_sharpen_texture +#define GL_SGIS_sharpen_texture 1 +#define GL_LINEAR_SHARPEN_SGIS 0x80AD +#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE +#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF +#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 +typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); +#endif +#endif /* GL_SGIS_sharpen_texture */ + +#ifndef GL_SGIS_texture4D +#define GL_SGIS_texture4D 1 +#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 +#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 +#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 +#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 +#define GL_TEXTURE_4D_SGIS 0x8134 +#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 +#define GL_TEXTURE_4DSIZE_SGIS 0x8136 +#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 +#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 +#define GL_TEXTURE_4D_BINDING_SGIS 0x814F +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); +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); +#ifdef GL_GLEXT_PROTOTYPES +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); +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); +#endif +#endif /* GL_SGIS_texture4D */ + +#ifndef GL_SGIS_texture_border_clamp +#define GL_SGIS_texture_border_clamp 1 +#define GL_CLAMP_TO_BORDER_SGIS 0x812D +#endif /* GL_SGIS_texture_border_clamp */ + +#ifndef GL_SGIS_texture_color_mask +#define GL_SGIS_texture_color_mask 1 +#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +#endif +#endif /* GL_SGIS_texture_color_mask */ + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_SGIS_texture_edge_clamp 1 +#define GL_CLAMP_TO_EDGE_SGIS 0x812F +#endif /* GL_SGIS_texture_edge_clamp */ + +#ifndef GL_SGIS_texture_filter4 +#define GL_SGIS_texture_filter4 1 +#define GL_FILTER4_SGIS 0x8146 +#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 +typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); +typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); +GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +#endif +#endif /* GL_SGIS_texture_filter4 */ + +#ifndef GL_SGIS_texture_lod +#define GL_SGIS_texture_lod 1 +#define GL_TEXTURE_MIN_LOD_SGIS 0x813A +#define GL_TEXTURE_MAX_LOD_SGIS 0x813B +#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D +#endif /* GL_SGIS_texture_lod */ + +#ifndef GL_SGIS_texture_select +#define GL_SGIS_texture_select 1 +#define GL_DUAL_ALPHA4_SGIS 0x8110 +#define GL_DUAL_ALPHA8_SGIS 0x8111 +#define GL_DUAL_ALPHA12_SGIS 0x8112 +#define GL_DUAL_ALPHA16_SGIS 0x8113 +#define GL_DUAL_LUMINANCE4_SGIS 0x8114 +#define GL_DUAL_LUMINANCE8_SGIS 0x8115 +#define GL_DUAL_LUMINANCE12_SGIS 0x8116 +#define GL_DUAL_LUMINANCE16_SGIS 0x8117 +#define GL_DUAL_INTENSITY4_SGIS 0x8118 +#define GL_DUAL_INTENSITY8_SGIS 0x8119 +#define GL_DUAL_INTENSITY12_SGIS 0x811A +#define GL_DUAL_INTENSITY16_SGIS 0x811B +#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C +#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D +#define GL_QUAD_ALPHA4_SGIS 0x811E +#define GL_QUAD_ALPHA8_SGIS 0x811F +#define GL_QUAD_LUMINANCE4_SGIS 0x8120 +#define GL_QUAD_LUMINANCE8_SGIS 0x8121 +#define GL_QUAD_INTENSITY4_SGIS 0x8122 +#define GL_QUAD_INTENSITY8_SGIS 0x8123 +#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 +#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 +#endif /* GL_SGIS_texture_select */ + +#ifndef GL_SGIX_async +#define GL_SGIX_async 1 +#define GL_ASYNC_MARKER_SGIX 0x8329 +typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); +typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); +typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker); +GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp); +GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp); +GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range); +GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); +GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker); +#endif +#endif /* GL_SGIX_async */ + +#ifndef GL_SGIX_async_histogram +#define GL_SGIX_async_histogram 1 +#define GL_ASYNC_HISTOGRAM_SGIX 0x832C +#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D +#endif /* GL_SGIX_async_histogram */ + +#ifndef GL_SGIX_async_pixel +#define GL_SGIX_async_pixel 1 +#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +#define GL_ASYNC_READ_PIXELS_SGIX 0x835E +#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 +#endif /* GL_SGIX_async_pixel */ + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_SGIX_blend_alpha_minmax 1 +#define GL_ALPHA_MIN_SGIX 0x8320 +#define GL_ALPHA_MAX_SGIX 0x8321 +#endif /* GL_SGIX_blend_alpha_minmax */ + +#ifndef GL_SGIX_calligraphic_fragment +#define GL_SGIX_calligraphic_fragment 1 +#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 +#endif /* GL_SGIX_calligraphic_fragment */ + +#ifndef GL_SGIX_clipmap +#define GL_SGIX_clipmap 1 +#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 +#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 +#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 +#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 +#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 +#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 +#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 +#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 +#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 +#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D +#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E +#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F +#endif /* GL_SGIX_clipmap */ + +#ifndef GL_SGIX_convolution_accuracy +#define GL_SGIX_convolution_accuracy 1 +#define GL_CONVOLUTION_HINT_SGIX 0x8316 +#endif /* GL_SGIX_convolution_accuracy */ + +#ifndef GL_SGIX_depth_pass_instrument +#define GL_SGIX_depth_pass_instrument 1 +#endif /* GL_SGIX_depth_pass_instrument */ + +#ifndef GL_SGIX_depth_texture +#define GL_SGIX_depth_texture 1 +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 +#endif /* GL_SGIX_depth_texture */ + +#ifndef GL_SGIX_flush_raster +#define GL_SGIX_flush_raster 1 +typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushRasterSGIX (void); +#endif +#endif /* GL_SGIX_flush_raster */ + +#ifndef GL_SGIX_fog_offset +#define GL_SGIX_fog_offset 1 +#define GL_FOG_OFFSET_SGIX 0x8198 +#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 +#endif /* GL_SGIX_fog_offset */ + +#ifndef GL_SGIX_fragment_lighting +#define GL_SGIX_fragment_lighting 1 +#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 +#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 +#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 +#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 +#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 +#define GL_LIGHT_ENV_MODE_SGIX 0x8407 +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B +#define GL_FRAGMENT_LIGHT0_SGIX 0x840C +#define GL_FRAGMENT_LIGHT1_SGIX 0x840D +#define GL_FRAGMENT_LIGHT2_SGIX 0x840E +#define GL_FRAGMENT_LIGHT3_SGIX 0x840F +#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 +#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 +#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 +#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 +typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode); +GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); +GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param); +GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params); +GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param); +GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param); +GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params); +GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param); +GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param); +GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); +GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param); +#endif +#endif /* GL_SGIX_fragment_lighting */ + +#ifndef GL_SGIX_framezoom +#define GL_SGIX_framezoom 1 +#define GL_FRAMEZOOM_SGIX 0x818B +#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C +#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D +typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameZoomSGIX (GLint factor); +#endif +#endif /* GL_SGIX_framezoom */ + +#ifndef GL_SGIX_igloo_interface +#define GL_SGIX_igloo_interface 1 +typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params); +#endif +#endif /* GL_SGIX_igloo_interface */ + +#ifndef GL_SGIX_instruments +#define GL_SGIX_instruments 1 +#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 +#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 +typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); +typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); +typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); +GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); +GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p); +GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker); +GLAPI void APIENTRY glStartInstrumentsSGIX (void); +GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker); +#endif +#endif /* GL_SGIX_instruments */ + +#ifndef GL_SGIX_interlace +#define GL_SGIX_interlace 1 +#define GL_INTERLACE_SGIX 0x8094 +#endif /* GL_SGIX_interlace */ + +#ifndef GL_SGIX_ir_instrument1 +#define GL_SGIX_ir_instrument1 1 +#define GL_IR_INSTRUMENT1_SGIX 0x817F +#endif /* GL_SGIX_ir_instrument1 */ + +#ifndef GL_SGIX_list_priority +#define GL_SGIX_list_priority 1 +#define GL_LIST_PRIORITY_SGIX 0x8182 +typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); +GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); +GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param); +GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); +#endif +#endif /* GL_SGIX_list_priority */ + +#ifndef GL_SGIX_pixel_texture +#define GL_SGIX_pixel_texture 1 +#define GL_PIXEL_TEX_GEN_SGIX 0x8139 +#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B +typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode); +#endif +#endif /* GL_SGIX_pixel_texture */ + +#ifndef GL_SGIX_pixel_tiles +#define GL_SGIX_pixel_tiles 1 +#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E +#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F +#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 +#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 +#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 +#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 +#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 +#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 +#endif /* GL_SGIX_pixel_tiles */ + +#ifndef GL_SGIX_polynomial_ffd +#define GL_SGIX_polynomial_ffd 1 +#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 +#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 +#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 +#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 +#define GL_DEFORMATIONS_MASK_SGIX 0x8196 +#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 +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); +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); +typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); +#ifdef GL_GLEXT_PROTOTYPES +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); +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); +GLAPI void APIENTRY glDeformSGIX (GLbitfield mask); +GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask); +#endif +#endif /* GL_SGIX_polynomial_ffd */ + +#ifndef GL_SGIX_reference_plane +#define GL_SGIX_reference_plane 1 +#define GL_REFERENCE_PLANE_SGIX 0x817D +#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E +typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation); +#endif +#endif /* GL_SGIX_reference_plane */ + +#ifndef GL_SGIX_resample +#define GL_SGIX_resample 1 +#define GL_PACK_RESAMPLE_SGIX 0x842E +#define GL_UNPACK_RESAMPLE_SGIX 0x842F +#define GL_RESAMPLE_REPLICATE_SGIX 0x8433 +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434 +#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#endif /* GL_SGIX_resample */ + +#ifndef GL_SGIX_scalebias_hint +#define GL_SGIX_scalebias_hint 1 +#define GL_SCALEBIAS_HINT_SGIX 0x8322 +#endif /* GL_SGIX_scalebias_hint */ + +#ifndef GL_SGIX_shadow +#define GL_SGIX_shadow 1 +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D +#endif /* GL_SGIX_shadow */ + +#ifndef GL_SGIX_shadow_ambient +#define GL_SGIX_shadow_ambient 1 +#define GL_SHADOW_AMBIENT_SGIX 0x80BF +#endif /* GL_SGIX_shadow_ambient */ + +#ifndef GL_SGIX_sprite +#define GL_SGIX_sprite 1 +#define GL_SPRITE_SGIX 0x8148 +#define GL_SPRITE_MODE_SGIX 0x8149 +#define GL_SPRITE_AXIS_SGIX 0x814A +#define GL_SPRITE_TRANSLATION_SGIX 0x814B +#define GL_SPRITE_AXIAL_SGIX 0x814C +#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D +#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param); +GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param); +GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params); +#endif +#endif /* GL_SGIX_sprite */ + +#ifndef GL_SGIX_subsample +#define GL_SGIX_subsample 1 +#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 +#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 +#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 +#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 +#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 +#endif /* GL_SGIX_subsample */ + +#ifndef GL_SGIX_tag_sample_buffer +#define GL_SGIX_tag_sample_buffer 1 +typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTagSampleBufferSGIX (void); +#endif +#endif /* GL_SGIX_tag_sample_buffer */ + +#ifndef GL_SGIX_texture_add_env +#define GL_SGIX_texture_add_env 1 +#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE +#endif /* GL_SGIX_texture_add_env */ + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_SGIX_texture_coordinate_clamp 1 +#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B +#endif /* GL_SGIX_texture_coordinate_clamp */ + +#ifndef GL_SGIX_texture_lod_bias +#define GL_SGIX_texture_lod_bias 1 +#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E +#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F +#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 +#endif /* GL_SGIX_texture_lod_bias */ + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_SGIX_texture_multi_buffer 1 +#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E +#endif /* GL_SGIX_texture_multi_buffer */ + +#ifndef GL_SGIX_texture_scale_bias +#define GL_SGIX_texture_scale_bias 1 +#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C +#endif /* GL_SGIX_texture_scale_bias */ + +#ifndef GL_SGIX_vertex_preclip +#define GL_SGIX_vertex_preclip 1 +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF +#endif /* GL_SGIX_vertex_preclip */ + +#ifndef GL_SGIX_ycrcb +#define GL_SGIX_ycrcb 1 +#define GL_YCRCB_422_SGIX 0x81BB +#define GL_YCRCB_444_SGIX 0x81BC +#endif /* GL_SGIX_ycrcb */ + +#ifndef GL_SGIX_ycrcb_subsample +#define GL_SGIX_ycrcb_subsample 1 +#endif /* GL_SGIX_ycrcb_subsample */ + +#ifndef GL_SGIX_ycrcba +#define GL_SGIX_ycrcba 1 +#define GL_YCRCB_SGIX 0x8318 +#define GL_YCRCBA_SGIX 0x8319 +#endif /* GL_SGIX_ycrcba */ + +#ifndef GL_SGI_color_matrix +#define GL_SGI_color_matrix 1 +#define GL_COLOR_MATRIX_SGI 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB +#endif /* GL_SGI_color_matrix */ + +#ifndef GL_SGI_color_table +#define GL_SGI_color_table 1 +#define GL_COLOR_TABLE_SGI 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF +typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); +GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table); +GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); +#endif +#endif /* GL_SGI_color_table */ + +#ifndef GL_SGI_texture_color_table +#define GL_SGI_texture_color_table 1 +#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD +#endif /* GL_SGI_texture_color_table */ + +#ifndef GL_SUNX_constant_data +#define GL_SUNX_constant_data 1 +#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 +typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFinishTextureSUNX (void); +#endif +#endif /* GL_SUNX_constant_data */ + +#ifndef GL_SUN_convolution_border_modes +#define GL_SUN_convolution_border_modes 1 +#define GL_WRAP_BORDER_SUN 0x81D4 +#endif /* GL_SUN_convolution_border_modes */ + +#ifndef GL_SUN_global_alpha +#define GL_SUN_global_alpha 1 +#define GL_GLOBAL_ALPHA_SUN 0x81D9 +#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor); +GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor); +GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor); +GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor); +GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor); +GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor); +GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor); +GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor); +#endif +#endif /* GL_SUN_global_alpha */ + +#ifndef GL_SUN_mesh_array +#define GL_SUN_mesh_array 1 +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_TRIANGLE_MESH_SUN 0x8615 +typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); +#endif +#endif /* GL_SUN_mesh_array */ + +#ifndef GL_SUN_slice_accum +#define GL_SUN_slice_accum 1 +#define GL_SLICE_ACCUM_SUN 0x85CC +#endif /* GL_SUN_slice_accum */ + +#ifndef GL_SUN_triangle_list +#define GL_SUN_triangle_list 1 +#define GL_RESTART_SUN 0x0001 +#define GL_REPLACE_MIDDLE_SUN 0x0002 +#define GL_REPLACE_OLDEST_SUN 0x0003 +#define GL_TRIANGLE_LIST_SUN 0x81D7 +#define GL_REPLACEMENT_CODE_SUN 0x81D8 +#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +#define GL_R1UI_V3F_SUN 0x85C4 +#define GL_R1UI_C4UB_V3F_SUN 0x85C5 +#define GL_R1UI_C3F_V3F_SUN 0x85C6 +#define GL_R1UI_N3F_V3F_SUN 0x85C7 +#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +#define GL_R1UI_T2F_V3F_SUN 0x85C9 +#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code); +GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code); +GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code); +GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code); +GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code); +GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code); +GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer); +#endif +#endif /* GL_SUN_triangle_list */ + +#ifndef GL_SUN_vertex +#define GL_SUN_vertex 1 +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +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); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +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); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); +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); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +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); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v); +GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v); +GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +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); +GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +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); +GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v); +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); +GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +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); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +#endif +#endif /* GL_SUN_vertex */ + +#ifndef GL_WIN_phong_shading +#define GL_WIN_phong_shading 1 +#define GL_PHONG_WIN 0x80EA +#define GL_PHONG_HINT_WIN 0x80EB +#endif /* GL_WIN_phong_shading */ + +#ifndef GL_WIN_specular_fog +#define GL_WIN_specular_fog 1 +#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC +#endif /* GL_WIN_specular_fog */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GL/glxext.h b/opengles/api/GL/glxext.h new file mode 100644 index 0000000000..e397eed8cb --- /dev/null +++ b/opengles/api/GL/glxext.h @@ -0,0 +1,954 @@ +#ifndef __glx_glxext_h_ +#define __glx_glxext_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#define GLX_GLXEXT_VERSION 20200929 + +/* Generated C header for: + * API: glx + * Versions considered: .* + * Versions emitted: 1\.[3-9] + * Default extensions included: glx + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GLX_VERSION_1_3 +#define GLX_VERSION_1_3 1 +typedef XID GLXContextID; +typedef struct __GLXFBConfigRec *GLXFBConfig; +typedef XID GLXWindow; +typedef XID GLXPbuffer; +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_CONFIG_CAVEAT 0x20 +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_DONT_CARE 0xFFFFFFFF +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_VISUAL_ID 0x800B +#define GLX_SCREEN 0x800C +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 +#define GLX_PBUFFER_HEIGHT 0x8040 +#define GLX_PBUFFER_WIDTH 0x8041 +typedef GLXFBConfig *( *PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); +typedef GLXFBConfig *( *PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); +typedef int ( *PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); +typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); +typedef GLXWindow ( *PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +typedef void ( *PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); +typedef GLXPixmap ( *PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +typedef void ( *PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); +typedef GLXPbuffer ( *PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); +typedef void ( *PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); +typedef void ( *PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +typedef GLXContext ( *PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef Bool ( *PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLEPROC) (void); +typedef int ( *PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); +typedef void ( *PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); +typedef void ( *PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); +#ifdef GLX_GLXEXT_PROTOTYPES +GLXFBConfig *glXGetFBConfigs (Display *dpy, int screen, int *nelements); +GLXFBConfig *glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements); +int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value); +XVisualInfo *glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config); +GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +void glXDestroyWindow (Display *dpy, GLXWindow win); +GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap); +GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list); +void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf); +void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +GLXDrawable glXGetCurrentReadDrawable (void); +int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value); +void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask); +void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask); +#endif +#endif /* GLX_VERSION_1_3 */ + +#ifndef GLX_VERSION_1_4 +#define GLX_VERSION_1_4 1 +typedef void ( *__GLXextFuncPtr)(void); +#define GLX_SAMPLE_BUFFERS 100000 +#define GLX_SAMPLES 100001 +typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); +#ifdef GLX_GLXEXT_PROTOTYPES +__GLXextFuncPtr glXGetProcAddress (const GLubyte *procName); +#endif +#endif /* GLX_VERSION_1_4 */ + +#ifndef GLX_ARB_context_flush_control +#define GLX_ARB_context_flush_control 1 +#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 +#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 +#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 +#endif /* GLX_ARB_context_flush_control */ + +#ifndef GLX_ARB_create_context +#define GLX_ARB_create_context 1 +#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define GLX_CONTEXT_FLAGS_ARB 0x2094 +typedef GLXContext ( *PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); +#ifdef GLX_GLXEXT_PROTOTYPES +GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); +#endif +#endif /* GLX_ARB_create_context */ + +#ifndef GLX_ARB_create_context_no_error +#define GLX_ARB_create_context_no_error 1 +#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 +#endif /* GLX_ARB_create_context_no_error */ + +#ifndef GLX_ARB_create_context_profile +#define GLX_ARB_create_context_profile 1 +#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 +#endif /* GLX_ARB_create_context_profile */ + +#ifndef GLX_ARB_create_context_robustness +#define GLX_ARB_create_context_robustness 1 +#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif /* GLX_ARB_create_context_robustness */ + +#ifndef GLX_ARB_fbconfig_float +#define GLX_ARB_fbconfig_float 1 +#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 +#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +#endif /* GLX_ARB_fbconfig_float */ + +#ifndef GLX_ARB_framebuffer_sRGB +#define GLX_ARB_framebuffer_sRGB 1 +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 +#endif /* GLX_ARB_framebuffer_sRGB */ + +#ifndef GLX_ARB_get_proc_address +#define GLX_ARB_get_proc_address 1 +typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); +#ifdef GLX_GLXEXT_PROTOTYPES +__GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName); +#endif +#endif /* GLX_ARB_get_proc_address */ + +#ifndef GLX_ARB_multisample +#define GLX_ARB_multisample 1 +#define GLX_SAMPLE_BUFFERS_ARB 100000 +#define GLX_SAMPLES_ARB 100001 +#endif /* GLX_ARB_multisample */ + +#ifndef GLX_ARB_robustness_application_isolation +#define GLX_ARB_robustness_application_isolation 1 +#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 +#endif /* GLX_ARB_robustness_application_isolation */ + +#ifndef GLX_ARB_robustness_share_group_isolation +#define GLX_ARB_robustness_share_group_isolation 1 +#endif /* GLX_ARB_robustness_share_group_isolation */ + +#ifndef GLX_ARB_vertex_buffer_object +#define GLX_ARB_vertex_buffer_object 1 +#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095 +#endif /* GLX_ARB_vertex_buffer_object */ + +#ifndef GLX_3DFX_multisample +#define GLX_3DFX_multisample 1 +#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 +#define GLX_SAMPLES_3DFX 0x8051 +#endif /* GLX_3DFX_multisample */ + +#ifndef GLX_AMD_gpu_association +#define GLX_AMD_gpu_association 1 +#define GLX_GPU_VENDOR_AMD 0x1F00 +#define GLX_GPU_RENDERER_STRING_AMD 0x1F01 +#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define GLX_GPU_RAM_AMD 0x21A3 +#define GLX_GPU_CLOCK_AMD 0x21A4 +#define GLX_GPU_NUM_PIPES_AMD 0x21A5 +#define GLX_GPU_NUM_SIMD_AMD 0x21A6 +#define GLX_GPU_NUM_RB_AMD 0x21A7 +#define GLX_GPU_NUM_SPI_AMD 0x21A8 +typedef unsigned int ( *PFNGLXGETGPUIDSAMDPROC) (unsigned int maxCount, unsigned int *ids); +typedef int ( *PFNGLXGETGPUINFOAMDPROC) (unsigned int id, int property, GLenum dataType, unsigned int size, void *data); +typedef unsigned int ( *PFNGLXGETCONTEXTGPUIDAMDPROC) (GLXContext ctx); +typedef GLXContext ( *PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC) (unsigned int id, GLXContext share_list); +typedef GLXContext ( *PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (unsigned int id, GLXContext share_context, const int *attribList); +typedef Bool ( *PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC) (GLXContext ctx); +typedef Bool ( *PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (GLXContext ctx); +typedef GLXContext ( *PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); +typedef void ( *PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC) (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#ifdef GLX_GLXEXT_PROTOTYPES +unsigned int glXGetGPUIDsAMD (unsigned int maxCount, unsigned int *ids); +int glXGetGPUInfoAMD (unsigned int id, int property, GLenum dataType, unsigned int size, void *data); +unsigned int glXGetContextGPUIDAMD (GLXContext ctx); +GLXContext glXCreateAssociatedContextAMD (unsigned int id, GLXContext share_list); +GLXContext glXCreateAssociatedContextAttribsAMD (unsigned int id, GLXContext share_context, const int *attribList); +Bool glXDeleteAssociatedContextAMD (GLXContext ctx); +Bool glXMakeAssociatedContextCurrentAMD (GLXContext ctx); +GLXContext glXGetCurrentAssociatedContextAMD (void); +void glXBlitContextFramebufferAMD (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif +#endif /* GLX_AMD_gpu_association */ + +#ifndef GLX_EXT_buffer_age +#define GLX_EXT_buffer_age 1 +#define GLX_BACK_BUFFER_AGE_EXT 0x20F4 +#endif /* GLX_EXT_buffer_age */ + +#ifndef GLX_EXT_context_priority +#define GLX_EXT_context_priority 1 +#define GLX_CONTEXT_PRIORITY_LEVEL_EXT 0x3100 +#define GLX_CONTEXT_PRIORITY_HIGH_EXT 0x3101 +#define GLX_CONTEXT_PRIORITY_MEDIUM_EXT 0x3102 +#define GLX_CONTEXT_PRIORITY_LOW_EXT 0x3103 +#endif /* GLX_EXT_context_priority */ + +#ifndef GLX_EXT_create_context_es2_profile +#define GLX_EXT_create_context_es2_profile 1 +#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#endif /* GLX_EXT_create_context_es2_profile */ + +#ifndef GLX_EXT_create_context_es_profile +#define GLX_EXT_create_context_es_profile 1 +#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 +#endif /* GLX_EXT_create_context_es_profile */ + +#ifndef GLX_EXT_fbconfig_packed_float +#define GLX_EXT_fbconfig_packed_float 1 +#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 +#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 +#endif /* GLX_EXT_fbconfig_packed_float */ + +#ifndef GLX_EXT_framebuffer_sRGB +#define GLX_EXT_framebuffer_sRGB 1 +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 +#endif /* GLX_EXT_framebuffer_sRGB */ + +#ifndef GLX_EXT_get_drawable_type +#define GLX_EXT_get_drawable_type 1 +#endif /* GLX_EXT_get_drawable_type */ + +#ifndef GLX_EXT_import_context +#define GLX_EXT_import_context 1 +#define GLX_SHARE_CONTEXT_EXT 0x800A +#define GLX_VISUAL_ID_EXT 0x800B +#define GLX_SCREEN_EXT 0x800C +typedef Display *( *PFNGLXGETCURRENTDISPLAYEXTPROC) (void); +typedef int ( *PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); +typedef GLXContextID ( *PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); +typedef GLXContext ( *PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); +typedef void ( *PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); +#ifdef GLX_GLXEXT_PROTOTYPES +Display *glXGetCurrentDisplayEXT (void); +int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value); +GLXContextID glXGetContextIDEXT (const GLXContext context); +GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID); +void glXFreeContextEXT (Display *dpy, GLXContext context); +#endif +#endif /* GLX_EXT_import_context */ + +#ifndef GLX_EXT_libglvnd +#define GLX_EXT_libglvnd 1 +#define GLX_VENDOR_NAMES_EXT 0x20F6 +#endif /* GLX_EXT_libglvnd */ + +#ifndef GLX_EXT_no_config_context +#define GLX_EXT_no_config_context 1 +#endif /* GLX_EXT_no_config_context */ + +#ifndef GLX_EXT_stereo_tree +#define GLX_EXT_stereo_tree 1 +typedef struct { + int type; + unsigned long serial; + Bool send_event; + Display *display; + int extension; + int evtype; + GLXDrawable window; + Bool stereo_tree; +} GLXStereoNotifyEventEXT; +#define GLX_STEREO_TREE_EXT 0x20F5 +#define GLX_STEREO_NOTIFY_MASK_EXT 0x00000001 +#define GLX_STEREO_NOTIFY_EXT 0x00000000 +#endif /* GLX_EXT_stereo_tree */ + +#ifndef GLX_EXT_swap_control +#define GLX_EXT_swap_control 1 +#define GLX_SWAP_INTERVAL_EXT 0x20F1 +#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 +typedef void ( *PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval); +#ifdef GLX_GLXEXT_PROTOTYPES +void glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval); +#endif +#endif /* GLX_EXT_swap_control */ + +#ifndef GLX_EXT_swap_control_tear +#define GLX_EXT_swap_control_tear 1 +#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3 +#endif /* GLX_EXT_swap_control_tear */ + +#ifndef GLX_EXT_texture_from_pixmap +#define GLX_EXT_texture_from_pixmap 1 +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 +#define GLX_TEXTURE_FORMAT_EXT 0x20D5 +#define GLX_TEXTURE_TARGET_EXT 0x20D6 +#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 +#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA +#define GLX_TEXTURE_1D_EXT 0x20DB +#define GLX_TEXTURE_2D_EXT 0x20DC +#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD +#define GLX_FRONT_LEFT_EXT 0x20DE +#define GLX_FRONT_RIGHT_EXT 0x20DF +#define GLX_BACK_LEFT_EXT 0x20E0 +#define GLX_BACK_RIGHT_EXT 0x20E1 +#define GLX_FRONT_EXT 0x20DE +#define GLX_BACK_EXT 0x20E0 +#define GLX_AUX0_EXT 0x20E2 +#define GLX_AUX1_EXT 0x20E3 +#define GLX_AUX2_EXT 0x20E4 +#define GLX_AUX3_EXT 0x20E5 +#define GLX_AUX4_EXT 0x20E6 +#define GLX_AUX5_EXT 0x20E7 +#define GLX_AUX6_EXT 0x20E8 +#define GLX_AUX7_EXT 0x20E9 +#define GLX_AUX8_EXT 0x20EA +#define GLX_AUX9_EXT 0x20EB +typedef void ( *PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); +typedef void ( *PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer); +#ifdef GLX_GLXEXT_PROTOTYPES +void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); +void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer); +#endif +#endif /* GLX_EXT_texture_from_pixmap */ + +#ifndef GLX_EXT_visual_info +#define GLX_EXT_visual_info 1 +#define GLX_X_VISUAL_TYPE_EXT 0x22 +#define GLX_TRANSPARENT_TYPE_EXT 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 +#define GLX_NONE_EXT 0x8000 +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_STATIC_GRAY_EXT 0x8007 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 +#endif /* GLX_EXT_visual_info */ + +#ifndef GLX_EXT_visual_rating +#define GLX_EXT_visual_rating 1 +#define GLX_VISUAL_CAVEAT_EXT 0x20 +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D +#endif /* GLX_EXT_visual_rating */ + +#ifndef GLX_INTEL_swap_event +#define GLX_INTEL_swap_event 1 +#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000 +#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180 +#define GLX_COPY_COMPLETE_INTEL 0x8181 +#define GLX_FLIP_COMPLETE_INTEL 0x8182 +#endif /* GLX_INTEL_swap_event */ + +#ifndef GLX_MESA_agp_offset +#define GLX_MESA_agp_offset 1 +typedef unsigned int ( *PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); +#ifdef GLX_GLXEXT_PROTOTYPES +unsigned int glXGetAGPOffsetMESA (const void *pointer); +#endif +#endif /* GLX_MESA_agp_offset */ + +#ifndef GLX_MESA_copy_sub_buffer +#define GLX_MESA_copy_sub_buffer 1 +typedef void ( *PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); +#ifdef GLX_GLXEXT_PROTOTYPES +void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); +#endif +#endif /* GLX_MESA_copy_sub_buffer */ + +#ifndef GLX_MESA_pixmap_colormap +#define GLX_MESA_pixmap_colormap 1 +typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); +#ifdef GLX_GLXEXT_PROTOTYPES +GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); +#endif +#endif /* GLX_MESA_pixmap_colormap */ + +#ifndef GLX_MESA_query_renderer +#define GLX_MESA_query_renderer 1 +#define GLX_RENDERER_VENDOR_ID_MESA 0x8183 +#define GLX_RENDERER_DEVICE_ID_MESA 0x8184 +#define GLX_RENDERER_VERSION_MESA 0x8185 +#define GLX_RENDERER_ACCELERATED_MESA 0x8186 +#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187 +#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188 +#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189 +#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A +#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B +#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C +#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D +typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value); +typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute); +typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value); +typedef const char *( *PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXQueryCurrentRendererIntegerMESA (int attribute, unsigned int *value); +const char *glXQueryCurrentRendererStringMESA (int attribute); +Bool glXQueryRendererIntegerMESA (Display *dpy, int screen, int renderer, int attribute, unsigned int *value); +const char *glXQueryRendererStringMESA (Display *dpy, int screen, int renderer, int attribute); +#endif +#endif /* GLX_MESA_query_renderer */ + +#ifndef GLX_MESA_release_buffers +#define GLX_MESA_release_buffers 1 +typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable); +#endif +#endif /* GLX_MESA_release_buffers */ + +#ifndef GLX_MESA_set_3dfx_mode +#define GLX_MESA_set_3dfx_mode 1 +#define GLX_3DFX_WINDOW_MODE_MESA 0x1 +#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 +typedef GLboolean ( *PFNGLXSET3DFXMODEMESAPROC) (GLint mode); +#ifdef GLX_GLXEXT_PROTOTYPES +GLboolean glXSet3DfxModeMESA (GLint mode); +#endif +#endif /* GLX_MESA_set_3dfx_mode */ + +#ifndef GLX_MESA_swap_control +#define GLX_MESA_swap_control 1 +typedef int ( *PFNGLXGETSWAPINTERVALMESAPROC) (void); +typedef int ( *PFNGLXSWAPINTERVALMESAPROC) (unsigned int interval); +#ifdef GLX_GLXEXT_PROTOTYPES +int glXGetSwapIntervalMESA (void); +int glXSwapIntervalMESA (unsigned int interval); +#endif +#endif /* GLX_MESA_swap_control */ + +#ifndef GLX_NV_copy_buffer +#define GLX_NV_copy_buffer 1 +typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +#ifdef GLX_GLXEXT_PROTOTYPES +void glXCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +void glXNamedCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +#endif +#endif /* GLX_NV_copy_buffer */ + +#ifndef GLX_NV_copy_image +#define GLX_NV_copy_image 1 +typedef void ( *PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#ifdef GLX_GLXEXT_PROTOTYPES +void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif +#endif /* GLX_NV_copy_image */ + +#ifndef GLX_NV_delay_before_swap +#define GLX_NV_delay_before_swap 1 +typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds); +#endif +#endif /* GLX_NV_delay_before_swap */ + +#ifndef GLX_NV_float_buffer +#define GLX_NV_float_buffer 1 +#define GLX_FLOAT_COMPONENTS_NV 0x20B0 +#endif /* GLX_NV_float_buffer */ + +#ifndef GLX_NV_multigpu_context +#define GLX_NV_multigpu_context 1 +#define GLX_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA +#define GLX_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB +#define GLX_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC +#define GLX_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD +#define GLX_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE +#endif /* GLX_NV_multigpu_context */ + +#ifndef GLX_NV_multisample_coverage +#define GLX_NV_multisample_coverage 1 +#define GLX_COVERAGE_SAMPLES_NV 100001 +#define GLX_COLOR_SAMPLES_NV 0x20B3 +#endif /* GLX_NV_multisample_coverage */ + +#ifndef GLX_NV_present_video +#define GLX_NV_present_video 1 +#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 +typedef unsigned int *( *PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements); +typedef int ( *PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); +#ifdef GLX_GLXEXT_PROTOTYPES +unsigned int *glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements); +int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); +#endif +#endif /* GLX_NV_present_video */ + +#ifndef GLX_NV_robustness_video_memory_purge +#define GLX_NV_robustness_video_memory_purge 1 +#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x20F7 +#endif /* GLX_NV_robustness_video_memory_purge */ + +#ifndef GLX_NV_swap_group +#define GLX_NV_swap_group 1 +typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group); +typedef Bool ( *PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier); +typedef Bool ( *PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); +typedef Bool ( *PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); +typedef Bool ( *PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count); +typedef Bool ( *PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group); +Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier); +Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); +Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); +Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count); +Bool glXResetFrameCountNV (Display *dpy, int screen); +#endif +#endif /* GLX_NV_swap_group */ + +#ifndef GLX_NV_video_capture +#define GLX_NV_video_capture 1 +typedef XID GLXVideoCaptureDeviceNV; +#define GLX_DEVICE_ID_NV 0x20CD +#define GLX_UNIQUE_ID_NV 0x20CE +#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +typedef int ( *PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); +typedef GLXVideoCaptureDeviceNV *( *PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements); +typedef void ( *PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); +typedef int ( *PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); +typedef void ( *PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); +#ifdef GLX_GLXEXT_PROTOTYPES +int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); +GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements); +void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); +int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); +void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); +#endif +#endif /* GLX_NV_video_capture */ + +#ifndef GLX_NV_video_out +#define GLX_NV_video_out 1 +typedef unsigned int GLXVideoDeviceNV; +#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 +#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 +#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 +#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define GLX_VIDEO_OUT_FRAME_NV 0x20C8 +#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 +#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA +#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB +#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC +typedef int ( *PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); +typedef int ( *PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); +typedef int ( *PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); +typedef int ( *PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf); +typedef int ( *PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); +typedef int ( *PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#ifdef GLX_GLXEXT_PROTOTYPES +int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); +int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); +int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); +int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf); +int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); +int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif +#endif /* GLX_NV_video_out */ + +#ifndef GLX_OML_swap_method +#define GLX_OML_swap_method 1 +#define GLX_SWAP_METHOD_OML 0x8060 +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 +#endif /* GLX_OML_swap_method */ + +#ifndef GLX_OML_sync_control +#define GLX_OML_sync_control 1 +#ifndef GLEXT_64_TYPES_DEFINED +/* This code block is duplicated in glext.h, so must be protected */ +#define GLEXT_64_TYPES_DEFINED +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +/* (as used in the GLX_OML_sync_control extension). */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include <inttypes.h> +#elif defined(__sun__) || defined(__digital__) +#include <inttypes.h> +#if defined(__STDC__) +#if defined(__arch64__) || defined(_LP64) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) || defined(__sgi) +#include <inttypes.h> +#elif defined(__SCO__) || defined(__USLC__) +#include <stdint.h> +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(_WIN32) && defined(__GNUC__) +#include <stdint.h> +#elif defined(_WIN32) +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +/* Fallback if nothing above works */ +#include <inttypes.h> +#endif +#endif +typedef Bool ( *PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( *PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); +typedef int64_t ( *PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +typedef Bool ( *PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( *PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); +Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); +int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); +Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); +#endif +#endif /* GLX_OML_sync_control */ + +#ifndef GLX_SGIS_blended_overlay +#define GLX_SGIS_blended_overlay 1 +#define GLX_BLENDED_RGBA_SGIS 0x8025 +#endif /* GLX_SGIS_blended_overlay */ + +#ifndef GLX_SGIS_multisample +#define GLX_SGIS_multisample 1 +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 +#endif /* GLX_SGIS_multisample */ + +#ifndef GLX_SGIS_shared_multisample +#define GLX_SGIS_shared_multisample 1 +#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 +#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 +#endif /* GLX_SGIS_shared_multisample */ + +#ifndef GLX_SGIX_dmbuffer +#define GLX_SGIX_dmbuffer 1 +typedef XID GLXPbufferSGIX; +#ifdef _DM_BUFFER_H_ +#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 +typedef Bool ( *PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); +#endif +#endif /* _DM_BUFFER_H_ */ +#endif /* GLX_SGIX_dmbuffer */ + +#ifndef GLX_SGIX_fbconfig +#define GLX_SGIX_fbconfig 1 +typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; +#define GLX_WINDOW_BIT_SGIX 0x00000001 +#define GLX_PIXMAP_BIT_SGIX 0x00000002 +#define GLX_RGBA_BIT_SGIX 0x00000001 +#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 +#define GLX_DRAWABLE_TYPE_SGIX 0x8010 +#define GLX_RENDER_TYPE_SGIX 0x8011 +#define GLX_X_RENDERABLE_SGIX 0x8012 +#define GLX_FBCONFIG_ID_SGIX 0x8013 +#define GLX_RGBA_TYPE_SGIX 0x8014 +#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 +typedef int ( *PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); +typedef GLXFBConfigSGIX *( *PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); +typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); +typedef GLXContext ( *PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); +typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); +typedef GLXFBConfigSGIX ( *PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); +#ifdef GLX_GLXEXT_PROTOTYPES +int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); +GLXFBConfigSGIX *glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements); +GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); +GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); +XVisualInfo *glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config); +GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis); +#endif +#endif /* GLX_SGIX_fbconfig */ + +#ifndef GLX_SGIX_hyperpipe +#define GLX_SGIX_hyperpipe 1 +typedef struct { + char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ + int networkId; +} GLXHyperpipeNetworkSGIX; +typedef struct { + char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ + int channel; + unsigned int participationType; + int timeSlice; +} GLXHyperpipeConfigSGIX; +typedef struct { + char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ + int srcXOrigin, srcYOrigin, srcWidth, srcHeight; + int destXOrigin, destYOrigin, destWidth, destHeight; +} GLXPipeRect; +typedef struct { + char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */ + int XOrigin, YOrigin, maxHeight, maxWidth; +} GLXPipeRectLimits; +#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 +#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 +#define GLX_BAD_HYPERPIPE_SGIX 92 +#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 +#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 +#define GLX_PIPE_RECT_SGIX 0x00000001 +#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 +#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 +#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 +#define GLX_HYPERPIPE_ID_SGIX 0x8030 +typedef GLXHyperpipeNetworkSGIX *( *PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); +typedef int ( *PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); +typedef GLXHyperpipeConfigSGIX *( *PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); +typedef int ( *PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); +typedef int ( *PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); +typedef int ( *PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); +typedef int ( *PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); +typedef int ( *PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); +#ifdef GLX_GLXEXT_PROTOTYPES +GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes); +int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); +GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes); +int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId); +int glXBindHyperpipeSGIX (Display *dpy, int hpId); +int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); +int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList); +int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); +#endif +#endif /* GLX_SGIX_hyperpipe */ + +#ifndef GLX_SGIX_pbuffer +#define GLX_SGIX_pbuffer 1 +#define GLX_PBUFFER_BIT_SGIX 0x00000004 +#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 +#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 +#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 +#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 +#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 +#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 +#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 +#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A +#define GLX_PRESERVED_CONTENTS_SGIX 0x801B +#define GLX_LARGEST_PBUFFER_SGIX 0x801C +#define GLX_WIDTH_SGIX 0x801D +#define GLX_HEIGHT_SGIX 0x801E +#define GLX_EVENT_MASK_SGIX 0x801F +#define GLX_DAMAGED_SGIX 0x8020 +#define GLX_SAVED_SGIX 0x8021 +#define GLX_WINDOW_SGIX 0x8022 +#define GLX_PBUFFER_SGIX 0x8023 +typedef GLXPbufferSGIX ( *PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); +typedef void ( *PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); +typedef void ( *PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); +typedef void ( *PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); +typedef void ( *PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); +#ifdef GLX_GLXEXT_PROTOTYPES +GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); +void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf); +void glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); +void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask); +void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask); +#endif +#endif /* GLX_SGIX_pbuffer */ + +#ifndef GLX_SGIX_swap_barrier +#define GLX_SGIX_swap_barrier 1 +typedef void ( *PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); +typedef Bool ( *PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); +#ifdef GLX_GLXEXT_PROTOTYPES +void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier); +Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max); +#endif +#endif /* GLX_SGIX_swap_barrier */ + +#ifndef GLX_SGIX_swap_group +#define GLX_SGIX_swap_group 1 +typedef void ( *PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); +#ifdef GLX_GLXEXT_PROTOTYPES +void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member); +#endif +#endif /* GLX_SGIX_swap_group */ + +#ifndef GLX_SGIX_video_resize +#define GLX_SGIX_video_resize 1 +#define GLX_SYNC_FRAME_SGIX 0x00000000 +#define GLX_SYNC_SWAP_SGIX 0x00000001 +typedef int ( *PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); +typedef int ( *PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); +typedef int ( *PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); +typedef int ( *PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); +typedef int ( *PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); +#ifdef GLX_GLXEXT_PROTOTYPES +int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window); +int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h); +int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); +int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); +int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype); +#endif +#endif /* GLX_SGIX_video_resize */ + +#ifndef GLX_SGIX_video_source +#define GLX_SGIX_video_source 1 +typedef XID GLXVideoSourceSGIX; +#ifdef _VL_H +typedef GLXVideoSourceSGIX ( *PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); +typedef void ( *PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); +#ifdef GLX_GLXEXT_PROTOTYPES +GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); +void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource); +#endif +#endif /* _VL_H */ +#endif /* GLX_SGIX_video_source */ + +#ifndef GLX_SGIX_visual_select_group +#define GLX_SGIX_visual_select_group 1 +#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 +#endif /* GLX_SGIX_visual_select_group */ + +#ifndef GLX_SGI_cushion +#define GLX_SGI_cushion 1 +typedef void ( *PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); +#ifdef GLX_GLXEXT_PROTOTYPES +void glXCushionSGI (Display *dpy, Window window, float cushion); +#endif +#endif /* GLX_SGI_cushion */ + +#ifndef GLX_SGI_make_current_read +#define GLX_SGI_make_current_read 1 +typedef Bool ( *PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +GLXDrawable glXGetCurrentReadDrawableSGI (void); +#endif +#endif /* GLX_SGI_make_current_read */ + +#ifndef GLX_SGI_swap_control +#define GLX_SGI_swap_control 1 +typedef int ( *PFNGLXSWAPINTERVALSGIPROC) (int interval); +#ifdef GLX_GLXEXT_PROTOTYPES +int glXSwapIntervalSGI (int interval); +#endif +#endif /* GLX_SGI_swap_control */ + +#ifndef GLX_SGI_video_sync +#define GLX_SGI_video_sync 1 +typedef int ( *PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); +typedef int ( *PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); +#ifdef GLX_GLXEXT_PROTOTYPES +int glXGetVideoSyncSGI (unsigned int *count); +int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count); +#endif +#endif /* GLX_SGI_video_sync */ + +#ifndef GLX_SUN_get_transparent_index +#define GLX_SUN_get_transparent_index 1 +typedef Status ( *PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex); +#ifdef GLX_GLXEXT_PROTOTYPES +Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex); +#endif +#endif /* GLX_SUN_get_transparent_index */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GL/wgl.h b/opengles/api/GL/wgl.h new file mode 100644 index 0000000000..da02dbf64e --- /dev/null +++ b/opengles/api/GL/wgl.h @@ -0,0 +1,936 @@ +#ifndef __wgl_wgl_h_ +#define __wgl_wgl_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +/* Generated on date 20200813 */ + +/* Generated C header for: + * API: wgl + * Versions considered: .* + * Versions emitted: .* + * Default extensions included: wgl + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef WGL_VERSION_1_0 +#define WGL_VERSION_1_0 1 +#define WGL_FONT_LINES 0 +#define WGL_FONT_POLYGONS 1 +#define WGL_SWAP_MAIN_PLANE 0x00000001 +#define WGL_SWAP_OVERLAY1 0x00000002 +#define WGL_SWAP_OVERLAY2 0x00000004 +#define WGL_SWAP_OVERLAY3 0x00000008 +#define WGL_SWAP_OVERLAY4 0x00000010 +#define WGL_SWAP_OVERLAY5 0x00000020 +#define WGL_SWAP_OVERLAY6 0x00000040 +#define WGL_SWAP_OVERLAY7 0x00000080 +#define WGL_SWAP_OVERLAY8 0x00000100 +#define WGL_SWAP_OVERLAY9 0x00000200 +#define WGL_SWAP_OVERLAY10 0x00000400 +#define WGL_SWAP_OVERLAY11 0x00000800 +#define WGL_SWAP_OVERLAY12 0x00001000 +#define WGL_SWAP_OVERLAY13 0x00002000 +#define WGL_SWAP_OVERLAY14 0x00004000 +#define WGL_SWAP_OVERLAY15 0x00008000 +#define WGL_SWAP_UNDERLAY1 0x00010000 +#define WGL_SWAP_UNDERLAY2 0x00020000 +#define WGL_SWAP_UNDERLAY3 0x00040000 +#define WGL_SWAP_UNDERLAY4 0x00080000 +#define WGL_SWAP_UNDERLAY5 0x00100000 +#define WGL_SWAP_UNDERLAY6 0x00200000 +#define WGL_SWAP_UNDERLAY7 0x00400000 +#define WGL_SWAP_UNDERLAY8 0x00800000 +#define WGL_SWAP_UNDERLAY9 0x01000000 +#define WGL_SWAP_UNDERLAY10 0x02000000 +#define WGL_SWAP_UNDERLAY11 0x04000000 +#define WGL_SWAP_UNDERLAY12 0x08000000 +#define WGL_SWAP_UNDERLAY13 0x10000000 +#define WGL_SWAP_UNDERLAY14 0x20000000 +#define WGL_SWAP_UNDERLAY15 0x40000000 +typedef int (WINAPI * PFNCHOOSEPIXELFORMATPROC) (HDC hDc, const PIXELFORMATDESCRIPTOR *pPfd); +typedef int (WINAPI * PFNDESCRIBEPIXELFORMATPROC) (HDC hdc, int ipfd, UINT cjpfd, const PIXELFORMATDESCRIPTOR *ppfd); +typedef UINT (WINAPI * PFNGETENHMETAFILEPIXELFORMATPROC) (HENHMETAFILE hemf, const PIXELFORMATDESCRIPTOR *ppfd); +typedef int (WINAPI * PFNGETPIXELFORMATPROC) (HDC hdc); +typedef BOOL (WINAPI * PFNSETPIXELFORMATPROC) (HDC hdc, int ipfd, const PIXELFORMATDESCRIPTOR *ppfd); +typedef BOOL (WINAPI * PFNSWAPBUFFERSPROC) (HDC hdc); +typedef BOOL (WINAPI * PFNWGLCOPYCONTEXTPROC) (HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); +typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTPROC) (HDC hDc); +typedef HGLRC (WINAPI * PFNWGLCREATELAYERCONTEXTPROC) (HDC hDc, int level); +typedef BOOL (WINAPI * PFNWGLDELETECONTEXTPROC) (HGLRC oldContext); +typedef BOOL (WINAPI * PFNWGLDESCRIBELAYERPLANEPROC) (HDC hDc, int pixelFormat, int layerPlane, UINT nBytes, const LAYERPLANEDESCRIPTOR *plpd); +typedef HGLRC (WINAPI * PFNWGLGETCURRENTCONTEXTPROC) (void); +typedef HDC (WINAPI * PFNWGLGETCURRENTDCPROC) (void); +typedef int (WINAPI * PFNWGLGETLAYERPALETTEENTRIESPROC) (HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr); +typedef PROC (WINAPI * PFNWGLGETPROCADDRESSPROC) (LPCSTR lpszProc); +typedef BOOL (WINAPI * PFNWGLMAKECURRENTPROC) (HDC hDc, HGLRC newContext); +typedef BOOL (WINAPI * PFNWGLREALIZELAYERPALETTEPROC) (HDC hdc, int iLayerPlane, BOOL bRealize); +typedef int (WINAPI * PFNWGLSETLAYERPALETTEENTRIESPROC) (HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr); +typedef BOOL (WINAPI * PFNWGLSHARELISTSPROC) (HGLRC hrcSrvShare, HGLRC hrcSrvSource); +typedef BOOL (WINAPI * PFNWGLSWAPLAYERBUFFERSPROC) (HDC hdc, UINT fuFlags); +typedef BOOL (WINAPI * PFNWGLUSEFONTBITMAPSPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase); +typedef BOOL (WINAPI * PFNWGLUSEFONTBITMAPSAPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase); +typedef BOOL (WINAPI * PFNWGLUSEFONTBITMAPSWPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase); +typedef BOOL (WINAPI * PFNWGLUSEFONTOUTLINESPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); +typedef BOOL (WINAPI * PFNWGLUSEFONTOUTLINESAPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); +typedef BOOL (WINAPI * PFNWGLUSEFONTOUTLINESWPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); +#ifdef WGL_WGLEXT_PROTOTYPES +int WINAPI ChoosePixelFormat (HDC hDc, const PIXELFORMATDESCRIPTOR *pPfd); +int WINAPI DescribePixelFormat (HDC hdc, int ipfd, UINT cjpfd, const PIXELFORMATDESCRIPTOR *ppfd); +UINT WINAPI GetEnhMetaFilePixelFormat (HENHMETAFILE hemf, const PIXELFORMATDESCRIPTOR *ppfd); +int WINAPI GetPixelFormat (HDC hdc); +BOOL WINAPI SetPixelFormat (HDC hdc, int ipfd, const PIXELFORMATDESCRIPTOR *ppfd); +BOOL WINAPI SwapBuffers (HDC hdc); +BOOL WINAPI wglCopyContext (HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); +HGLRC WINAPI wglCreateContext (HDC hDc); +HGLRC WINAPI wglCreateLayerContext (HDC hDc, int level); +BOOL WINAPI wglDeleteContext (HGLRC oldContext); +BOOL WINAPI wglDescribeLayerPlane (HDC hDc, int pixelFormat, int layerPlane, UINT nBytes, const LAYERPLANEDESCRIPTOR *plpd); +HGLRC WINAPI wglGetCurrentContext (void); +HDC WINAPI wglGetCurrentDC (void); +int WINAPI wglGetLayerPaletteEntries (HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr); +PROC WINAPI wglGetProcAddress (LPCSTR lpszProc); +BOOL WINAPI wglMakeCurrent (HDC hDc, HGLRC newContext); +BOOL WINAPI wglRealizeLayerPalette (HDC hdc, int iLayerPlane, BOOL bRealize); +int WINAPI wglSetLayerPaletteEntries (HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr); +BOOL WINAPI wglShareLists (HGLRC hrcSrvShare, HGLRC hrcSrvSource); +BOOL WINAPI wglSwapLayerBuffers (HDC hdc, UINT fuFlags); +BOOL WINAPI wglUseFontBitmaps (HDC hDC, DWORD first, DWORD count, DWORD listBase); +BOOL WINAPI wglUseFontBitmapsA (HDC hDC, DWORD first, DWORD count, DWORD listBase); +BOOL WINAPI wglUseFontBitmapsW (HDC hDC, DWORD first, DWORD count, DWORD listBase); +BOOL WINAPI wglUseFontOutlines (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); +BOOL WINAPI wglUseFontOutlinesA (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); +BOOL WINAPI wglUseFontOutlinesW (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); +#endif +#endif /* WGL_VERSION_1_0 */ + +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region 1 +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); +typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); +typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#ifdef WGL_WGLEXT_PROTOTYPES +HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType); +VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion); +BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height); +BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#endif +#endif /* WGL_ARB_buffer_region */ + +#ifndef WGL_ARB_context_flush_control +#define WGL_ARB_context_flush_control 1 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 +#endif /* WGL_ARB_context_flush_control */ + +#ifndef WGL_ARB_create_context +#define WGL_ARB_create_context 1 +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#define ERROR_INVALID_VERSION_ARB 0x2095 +typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); +#ifdef WGL_WGLEXT_PROTOTYPES +HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList); +#endif +#endif /* WGL_ARB_create_context */ + +#ifndef WGL_ARB_create_context_no_error +#define WGL_ARB_create_context_no_error 1 +#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 +#endif /* WGL_ARB_create_context_no_error */ + +#ifndef WGL_ARB_create_context_profile +#define WGL_ARB_create_context_profile 1 +#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 +#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define ERROR_INVALID_PROFILE_ARB 0x2096 +#endif /* WGL_ARB_create_context_profile */ + +#ifndef WGL_ARB_create_context_robustness +#define WGL_ARB_create_context_robustness 1 +#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif /* WGL_ARB_create_context_robustness */ + +#ifndef WGL_ARB_extensions_string +#define WGL_ARB_extensions_string 1 +typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); +#ifdef WGL_WGLEXT_PROTOTYPES +const char *WINAPI wglGetExtensionsStringARB (HDC hdc); +#endif +#endif /* WGL_ARB_extensions_string */ + +#ifndef WGL_ARB_framebuffer_sRGB +#define WGL_ARB_framebuffer_sRGB 1 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 +#endif /* WGL_ARB_framebuffer_sRGB */ + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read 1 +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +HDC WINAPI wglGetCurrentReadDCARB (void); +#endif +#endif /* WGL_ARB_make_current_read */ + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample 1 +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif /* WGL_ARB_multisample */ + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer 1 +DECLARE_HANDLE(HPBUFFERARB); +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 +typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer); +int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC); +BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer); +BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#endif +#endif /* WGL_ARB_pbuffer */ + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format 1 +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif +#endif /* WGL_ARB_pixel_format */ + +#ifndef WGL_ARB_pixel_format_float +#define WGL_ARB_pixel_format_float 1 +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#endif /* WGL_ARB_pixel_format_float */ + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture 1 +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 +typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList); +#endif +#endif /* WGL_ARB_render_texture */ + +#ifndef WGL_ARB_robustness_application_isolation +#define WGL_ARB_robustness_application_isolation 1 +#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 +#endif /* WGL_ARB_robustness_application_isolation */ + +#ifndef WGL_ARB_robustness_share_group_isolation +#define WGL_ARB_robustness_share_group_isolation 1 +#endif /* WGL_ARB_robustness_share_group_isolation */ + +#ifndef WGL_3DFX_multisample +#define WGL_3DFX_multisample 1 +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLES_3DFX 0x2061 +#endif /* WGL_3DFX_multisample */ + +#ifndef WGL_3DL_stereo_control +#define WGL_3DL_stereo_control 1 +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState); +#endif +#endif /* WGL_3DL_stereo_control */ + +#ifndef WGL_AMD_gpu_association +#define WGL_AMD_gpu_association 1 +#define WGL_GPU_VENDOR_AMD 0x1F00 +#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 +#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define WGL_GPU_RAM_AMD 0x21A3 +#define WGL_GPU_CLOCK_AMD 0x21A4 +#define WGL_GPU_NUM_PIPES_AMD 0x21A5 +#define WGL_GPU_NUM_SIMD_AMD 0x21A6 +#define WGL_GPU_NUM_RB_AMD 0x21A7 +#define WGL_GPU_NUM_SPI_AMD 0x21A8 +typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids); +typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void *data); +typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList); +typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc); +typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); +typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#ifdef WGL_WGLEXT_PROTOTYPES +UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids); +INT WINAPI wglGetGPUInfoAMD (UINT id, INT property, GLenum dataType, UINT size, void *data); +UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc); +HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id); +HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList); +BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc); +BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc); +HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void); +VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif +#endif /* WGL_AMD_gpu_association */ + +#ifndef WGL_ATI_pixel_format_float +#define WGL_ATI_pixel_format_float 1 +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +#endif /* WGL_ATI_pixel_format_float */ + +#ifndef WGL_ATI_render_texture_rectangle +#define WGL_ATI_render_texture_rectangle 1 +#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5 +#endif /* WGL_ATI_render_texture_rectangle */ + +#ifndef WGL_EXT_colorspace +#define WGL_EXT_colorspace 1 +#define WGL_COLORSPACE_EXT 0x309D +#define WGL_COLORSPACE_SRGB_EXT 0x3089 +#define WGL_COLORSPACE_LINEAR_EXT 0x308A +#endif /* WGL_EXT_colorspace */ + +#ifndef WGL_EXT_create_context_es2_profile +#define WGL_EXT_create_context_es2_profile 1 +#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#endif /* WGL_EXT_create_context_es2_profile */ + +#ifndef WGL_EXT_create_context_es_profile +#define WGL_EXT_create_context_es_profile 1 +#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 +#endif /* WGL_EXT_create_context_es_profile */ + +#ifndef WGL_EXT_depth_float +#define WGL_EXT_depth_float 1 +#define WGL_DEPTH_FLOAT_EXT 0x2040 +#endif /* WGL_EXT_depth_float */ + +#ifndef WGL_EXT_display_color_table +#define WGL_EXT_display_color_table 1 +typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); +typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); +#ifdef WGL_WGLEXT_PROTOTYPES +GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id); +GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length); +GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id); +VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id); +#endif +#endif /* WGL_EXT_display_color_table */ + +#ifndef WGL_EXT_extensions_string +#define WGL_EXT_extensions_string 1 +typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +const char *WINAPI wglGetExtensionsStringEXT (void); +#endif +#endif /* WGL_EXT_extensions_string */ + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_EXT_framebuffer_sRGB 1 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 +#endif /* WGL_EXT_framebuffer_sRGB */ + +#ifndef WGL_EXT_make_current_read +#define WGL_EXT_make_current_read 1 +#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +HDC WINAPI wglGetCurrentReadDCEXT (void); +#endif +#endif /* WGL_EXT_make_current_read */ + +#ifndef WGL_EXT_multisample +#define WGL_EXT_multisample 1 +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SAMPLES_EXT 0x2042 +#endif /* WGL_EXT_multisample */ + +#ifndef WGL_EXT_pbuffer +#define WGL_EXT_pbuffer 1 +DECLARE_HANDLE(HPBUFFEREXT); +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer); +int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC); +BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer); +BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#endif +#endif /* WGL_EXT_pbuffer */ + +#ifndef WGL_EXT_pixel_format +#define WGL_EXT_pixel_format 1 +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_STEREO_EXT 0x2012 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_COLORINDEX_EXT 0x202C +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif +#endif /* WGL_EXT_pixel_format */ + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_EXT_pixel_format_packed_float 1 +#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 +#endif /* WGL_EXT_pixel_format_packed_float */ + +#ifndef WGL_EXT_swap_control +#define WGL_EXT_swap_control 1 +typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); +typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglSwapIntervalEXT (int interval); +int WINAPI wglGetSwapIntervalEXT (void); +#endif +#endif /* WGL_EXT_swap_control */ + +#ifndef WGL_EXT_swap_control_tear +#define WGL_EXT_swap_control_tear 1 +#endif /* WGL_EXT_swap_control_tear */ + +#ifndef WGL_I3D_digital_video_control +#define WGL_I3D_digital_video_control 1 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue); +BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue); +#endif +#endif /* WGL_I3D_digital_video_control */ + +#ifndef WGL_I3D_gamma +#define WGL_I3D_gamma 1 +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue); +BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue); +BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#endif +#endif /* WGL_I3D_gamma */ + +#ifndef WGL_I3D_genlock +#define WGL_I3D_genlock 1 +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); +typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); +typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglEnableGenlockI3D (HDC hDC); +BOOL WINAPI wglDisableGenlockI3D (HDC hDC); +BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag); +BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource); +BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource); +BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge); +BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge); +BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate); +BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate); +BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay); +BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay); +BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#endif +#endif /* WGL_I3D_genlock */ + +#ifndef WGL_I3D_image_buffer +#define WGL_I3D_image_buffer 1 +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); +typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); +typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); +#ifdef WGL_WGLEXT_PROTOTYPES +LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags); +BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress); +BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count); +#endif +#endif /* WGL_I3D_image_buffer */ + +#ifndef WGL_I3D_swap_frame_lock +#define WGL_I3D_swap_frame_lock 1 +typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglEnableFrameLockI3D (void); +BOOL WINAPI wglDisableFrameLockI3D (void); +BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag); +BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag); +#endif +#endif /* WGL_I3D_swap_frame_lock */ + +#ifndef WGL_I3D_swap_frame_usage +#define WGL_I3D_swap_frame_usage 1 +typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); +typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetFrameUsageI3D (float *pUsage); +BOOL WINAPI wglBeginFrameTrackingI3D (void); +BOOL WINAPI wglEndFrameTrackingI3D (void); +BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#endif +#endif /* WGL_I3D_swap_frame_usage */ + +#ifndef WGL_NV_DX_interop +#define WGL_NV_DX_interop 1 +#define WGL_ACCESS_READ_ONLY_NV 0x00000000 +#define WGL_ACCESS_READ_WRITE_NV 0x00000001 +#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002 +typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle); +typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice); +typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice); +typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); +typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject); +typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access); +typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); +typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle); +HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice); +BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice); +HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); +BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject); +BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access); +BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); +BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); +#endif +#endif /* WGL_NV_DX_interop */ + +#ifndef WGL_NV_DX_interop2 +#define WGL_NV_DX_interop2 1 +#endif /* WGL_NV_DX_interop2 */ + +#ifndef WGL_NV_copy_image +#define WGL_NV_copy_image 1 +typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif +#endif /* WGL_NV_copy_image */ + +#ifndef WGL_NV_delay_before_swap +#define WGL_NV_delay_before_swap 1 +typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglDelayBeforeSwapNV (HDC hDC, GLfloat seconds); +#endif +#endif /* WGL_NV_delay_before_swap */ + +#ifndef WGL_NV_float_buffer +#define WGL_NV_float_buffer 1 +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#endif /* WGL_NV_float_buffer */ + +#ifndef WGL_NV_gpu_affinity +#define WGL_NV_gpu_affinity 1 +DECLARE_HANDLE(HGPUNV); +struct _GPU_DEVICE { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; +}; +typedef struct _GPU_DEVICE *PGPU_DEVICE; +#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 +#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 +typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); +typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); +typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu); +BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList); +BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +BOOL WINAPI wglDeleteDCNV (HDC hdc); +#endif +#endif /* WGL_NV_gpu_affinity */ + +#ifndef WGL_NV_multigpu_context +#define WGL_NV_multigpu_context 1 +#define WGL_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA +#define WGL_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB +#define WGL_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC +#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD +#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE +#endif /* WGL_NV_multigpu_context */ + +#ifndef WGL_NV_multisample_coverage +#define WGL_NV_multisample_coverage 1 +#define WGL_COVERAGE_SAMPLES_NV 0x2042 +#define WGL_COLOR_SAMPLES_NV 0x20B9 +#endif /* WGL_NV_multisample_coverage */ + +#ifndef WGL_NV_present_video +#define WGL_NV_present_video 1 +DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 +typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +int WINAPI wglEnumerateVideoDevicesNV (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList); +BOOL WINAPI wglBindVideoDeviceNV (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue); +#endif +#endif /* WGL_NV_present_video */ + +#ifndef WGL_NV_render_depth_texture +#define WGL_NV_render_depth_texture 1 +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +#endif /* WGL_NV_render_depth_texture */ + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_NV_render_texture_rectangle 1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif /* WGL_NV_render_texture_rectangle */ + +#ifndef WGL_NV_swap_group +#define WGL_NV_swap_group 1 +typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); +typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); +typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); +typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); +typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group); +BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier); +BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier); +BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count); +BOOL WINAPI wglResetFrameCountNV (HDC hDC); +#endif +#endif /* WGL_NV_swap_group */ + +#ifndef WGL_NV_vertex_array_range +#define WGL_NV_vertex_array_range 1 +typedef void *(WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); +#ifdef WGL_WGLEXT_PROTOTYPES +void *WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +void WINAPI wglFreeMemoryNV (void *pointer); +#endif +#endif /* WGL_NV_vertex_array_range */ + +#ifndef WGL_NV_video_capture +#define WGL_NV_video_capture 1 +DECLARE_HANDLE(HVIDEOINPUTDEVICENV); +#define WGL_UNIQUE_ID_NV 0x20CE +#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#endif +#endif /* WGL_NV_video_capture */ + +#ifndef WGL_NV_video_output +#define WGL_NV_video_output 1 +DECLARE_HANDLE(HPVIDEODEV); +#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 +#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 +#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 +#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 +#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 +#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 +#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define WGL_VIDEO_OUT_FRAME 0x20C8 +#define WGL_VIDEO_OUT_FIELD_1 0x20C9 +#define WGL_VIDEO_OUT_FIELD_2 0x20CA +#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB +#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC +typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); +typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice); +BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer); +BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif +#endif /* WGL_NV_video_output */ + +#ifndef WGL_OML_sync_control +#define WGL_OML_sync_control 1 +typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); +typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator); +INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#endif +#endif /* WGL_OML_sync_control */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GL/wglext.h b/opengles/api/GL/wglext.h new file mode 100644 index 0000000000..70a2613aa4 --- /dev/null +++ b/opengles/api/GL/wglext.h @@ -0,0 +1,845 @@ +#ifndef __wgl_wglext_h_ +#define __wgl_wglext_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#define WGL_WGLEXT_VERSION 20200813 + +/* Generated C header for: + * API: wgl + * Versions considered: .* + * Versions emitted: _nomatch_^ + * Default extensions included: wgl + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region 1 +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); +typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); +typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#ifdef WGL_WGLEXT_PROTOTYPES +HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType); +VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion); +BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height); +BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#endif +#endif /* WGL_ARB_buffer_region */ + +#ifndef WGL_ARB_context_flush_control +#define WGL_ARB_context_flush_control 1 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 +#endif /* WGL_ARB_context_flush_control */ + +#ifndef WGL_ARB_create_context +#define WGL_ARB_create_context 1 +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#define ERROR_INVALID_VERSION_ARB 0x2095 +typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); +#ifdef WGL_WGLEXT_PROTOTYPES +HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList); +#endif +#endif /* WGL_ARB_create_context */ + +#ifndef WGL_ARB_create_context_no_error +#define WGL_ARB_create_context_no_error 1 +#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 +#endif /* WGL_ARB_create_context_no_error */ + +#ifndef WGL_ARB_create_context_profile +#define WGL_ARB_create_context_profile 1 +#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 +#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define ERROR_INVALID_PROFILE_ARB 0x2096 +#endif /* WGL_ARB_create_context_profile */ + +#ifndef WGL_ARB_create_context_robustness +#define WGL_ARB_create_context_robustness 1 +#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif /* WGL_ARB_create_context_robustness */ + +#ifndef WGL_ARB_extensions_string +#define WGL_ARB_extensions_string 1 +typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); +#ifdef WGL_WGLEXT_PROTOTYPES +const char *WINAPI wglGetExtensionsStringARB (HDC hdc); +#endif +#endif /* WGL_ARB_extensions_string */ + +#ifndef WGL_ARB_framebuffer_sRGB +#define WGL_ARB_framebuffer_sRGB 1 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 +#endif /* WGL_ARB_framebuffer_sRGB */ + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read 1 +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +HDC WINAPI wglGetCurrentReadDCARB (void); +#endif +#endif /* WGL_ARB_make_current_read */ + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample 1 +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif /* WGL_ARB_multisample */ + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer 1 +DECLARE_HANDLE(HPBUFFERARB); +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 +typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer); +int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC); +BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer); +BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#endif +#endif /* WGL_ARB_pbuffer */ + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format 1 +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif +#endif /* WGL_ARB_pixel_format */ + +#ifndef WGL_ARB_pixel_format_float +#define WGL_ARB_pixel_format_float 1 +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#endif /* WGL_ARB_pixel_format_float */ + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture 1 +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 +typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList); +#endif +#endif /* WGL_ARB_render_texture */ + +#ifndef WGL_ARB_robustness_application_isolation +#define WGL_ARB_robustness_application_isolation 1 +#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 +#endif /* WGL_ARB_robustness_application_isolation */ + +#ifndef WGL_ARB_robustness_share_group_isolation +#define WGL_ARB_robustness_share_group_isolation 1 +#endif /* WGL_ARB_robustness_share_group_isolation */ + +#ifndef WGL_3DFX_multisample +#define WGL_3DFX_multisample 1 +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLES_3DFX 0x2061 +#endif /* WGL_3DFX_multisample */ + +#ifndef WGL_3DL_stereo_control +#define WGL_3DL_stereo_control 1 +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState); +#endif +#endif /* WGL_3DL_stereo_control */ + +#ifndef WGL_AMD_gpu_association +#define WGL_AMD_gpu_association 1 +#define WGL_GPU_VENDOR_AMD 0x1F00 +#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 +#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define WGL_GPU_RAM_AMD 0x21A3 +#define WGL_GPU_CLOCK_AMD 0x21A4 +#define WGL_GPU_NUM_PIPES_AMD 0x21A5 +#define WGL_GPU_NUM_SIMD_AMD 0x21A6 +#define WGL_GPU_NUM_RB_AMD 0x21A7 +#define WGL_GPU_NUM_SPI_AMD 0x21A8 +typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids); +typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void *data); +typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList); +typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc); +typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); +typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#ifdef WGL_WGLEXT_PROTOTYPES +UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids); +INT WINAPI wglGetGPUInfoAMD (UINT id, INT property, GLenum dataType, UINT size, void *data); +UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc); +HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id); +HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList); +BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc); +BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc); +HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void); +VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif +#endif /* WGL_AMD_gpu_association */ + +#ifndef WGL_ATI_pixel_format_float +#define WGL_ATI_pixel_format_float 1 +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +#endif /* WGL_ATI_pixel_format_float */ + +#ifndef WGL_ATI_render_texture_rectangle +#define WGL_ATI_render_texture_rectangle 1 +#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5 +#endif /* WGL_ATI_render_texture_rectangle */ + +#ifndef WGL_EXT_colorspace +#define WGL_EXT_colorspace 1 +#define WGL_COLORSPACE_EXT 0x309D +#define WGL_COLORSPACE_SRGB_EXT 0x3089 +#define WGL_COLORSPACE_LINEAR_EXT 0x308A +#endif /* WGL_EXT_colorspace */ + +#ifndef WGL_EXT_create_context_es2_profile +#define WGL_EXT_create_context_es2_profile 1 +#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#endif /* WGL_EXT_create_context_es2_profile */ + +#ifndef WGL_EXT_create_context_es_profile +#define WGL_EXT_create_context_es_profile 1 +#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 +#endif /* WGL_EXT_create_context_es_profile */ + +#ifndef WGL_EXT_depth_float +#define WGL_EXT_depth_float 1 +#define WGL_DEPTH_FLOAT_EXT 0x2040 +#endif /* WGL_EXT_depth_float */ + +#ifndef WGL_EXT_display_color_table +#define WGL_EXT_display_color_table 1 +typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); +typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); +#ifdef WGL_WGLEXT_PROTOTYPES +GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id); +GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length); +GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id); +VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id); +#endif +#endif /* WGL_EXT_display_color_table */ + +#ifndef WGL_EXT_extensions_string +#define WGL_EXT_extensions_string 1 +typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +const char *WINAPI wglGetExtensionsStringEXT (void); +#endif +#endif /* WGL_EXT_extensions_string */ + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_EXT_framebuffer_sRGB 1 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 +#endif /* WGL_EXT_framebuffer_sRGB */ + +#ifndef WGL_EXT_make_current_read +#define WGL_EXT_make_current_read 1 +#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +HDC WINAPI wglGetCurrentReadDCEXT (void); +#endif +#endif /* WGL_EXT_make_current_read */ + +#ifndef WGL_EXT_multisample +#define WGL_EXT_multisample 1 +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SAMPLES_EXT 0x2042 +#endif /* WGL_EXT_multisample */ + +#ifndef WGL_EXT_pbuffer +#define WGL_EXT_pbuffer 1 +DECLARE_HANDLE(HPBUFFEREXT); +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer); +int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC); +BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer); +BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#endif +#endif /* WGL_EXT_pbuffer */ + +#ifndef WGL_EXT_pixel_format +#define WGL_EXT_pixel_format 1 +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_STEREO_EXT 0x2012 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_COLORINDEX_EXT 0x202C +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif +#endif /* WGL_EXT_pixel_format */ + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_EXT_pixel_format_packed_float 1 +#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 +#endif /* WGL_EXT_pixel_format_packed_float */ + +#ifndef WGL_EXT_swap_control +#define WGL_EXT_swap_control 1 +typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); +typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglSwapIntervalEXT (int interval); +int WINAPI wglGetSwapIntervalEXT (void); +#endif +#endif /* WGL_EXT_swap_control */ + +#ifndef WGL_EXT_swap_control_tear +#define WGL_EXT_swap_control_tear 1 +#endif /* WGL_EXT_swap_control_tear */ + +#ifndef WGL_I3D_digital_video_control +#define WGL_I3D_digital_video_control 1 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue); +BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue); +#endif +#endif /* WGL_I3D_digital_video_control */ + +#ifndef WGL_I3D_gamma +#define WGL_I3D_gamma 1 +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue); +BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue); +BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#endif +#endif /* WGL_I3D_gamma */ + +#ifndef WGL_I3D_genlock +#define WGL_I3D_genlock 1 +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); +typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); +typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglEnableGenlockI3D (HDC hDC); +BOOL WINAPI wglDisableGenlockI3D (HDC hDC); +BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag); +BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource); +BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource); +BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge); +BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge); +BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate); +BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate); +BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay); +BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay); +BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#endif +#endif /* WGL_I3D_genlock */ + +#ifndef WGL_I3D_image_buffer +#define WGL_I3D_image_buffer 1 +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); +typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); +typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); +#ifdef WGL_WGLEXT_PROTOTYPES +LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags); +BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress); +BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count); +#endif +#endif /* WGL_I3D_image_buffer */ + +#ifndef WGL_I3D_swap_frame_lock +#define WGL_I3D_swap_frame_lock 1 +typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglEnableFrameLockI3D (void); +BOOL WINAPI wglDisableFrameLockI3D (void); +BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag); +BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag); +#endif +#endif /* WGL_I3D_swap_frame_lock */ + +#ifndef WGL_I3D_swap_frame_usage +#define WGL_I3D_swap_frame_usage 1 +typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); +typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetFrameUsageI3D (float *pUsage); +BOOL WINAPI wglBeginFrameTrackingI3D (void); +BOOL WINAPI wglEndFrameTrackingI3D (void); +BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#endif +#endif /* WGL_I3D_swap_frame_usage */ + +#ifndef WGL_NV_DX_interop +#define WGL_NV_DX_interop 1 +#define WGL_ACCESS_READ_ONLY_NV 0x00000000 +#define WGL_ACCESS_READ_WRITE_NV 0x00000001 +#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002 +typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle); +typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice); +typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice); +typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); +typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject); +typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access); +typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); +typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle); +HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice); +BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice); +HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); +BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject); +BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access); +BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); +BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); +#endif +#endif /* WGL_NV_DX_interop */ + +#ifndef WGL_NV_DX_interop2 +#define WGL_NV_DX_interop2 1 +#endif /* WGL_NV_DX_interop2 */ + +#ifndef WGL_NV_copy_image +#define WGL_NV_copy_image 1 +typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif +#endif /* WGL_NV_copy_image */ + +#ifndef WGL_NV_delay_before_swap +#define WGL_NV_delay_before_swap 1 +typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglDelayBeforeSwapNV (HDC hDC, GLfloat seconds); +#endif +#endif /* WGL_NV_delay_before_swap */ + +#ifndef WGL_NV_float_buffer +#define WGL_NV_float_buffer 1 +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#endif /* WGL_NV_float_buffer */ + +#ifndef WGL_NV_gpu_affinity +#define WGL_NV_gpu_affinity 1 +DECLARE_HANDLE(HGPUNV); +struct _GPU_DEVICE { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; +}; +typedef struct _GPU_DEVICE *PGPU_DEVICE; +#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 +#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 +typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); +typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); +typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu); +BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList); +BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +BOOL WINAPI wglDeleteDCNV (HDC hdc); +#endif +#endif /* WGL_NV_gpu_affinity */ + +#ifndef WGL_NV_multigpu_context +#define WGL_NV_multigpu_context 1 +#define WGL_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA +#define WGL_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB +#define WGL_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC +#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD +#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE +#endif /* WGL_NV_multigpu_context */ + +#ifndef WGL_NV_multisample_coverage +#define WGL_NV_multisample_coverage 1 +#define WGL_COVERAGE_SAMPLES_NV 0x2042 +#define WGL_COLOR_SAMPLES_NV 0x20B9 +#endif /* WGL_NV_multisample_coverage */ + +#ifndef WGL_NV_present_video +#define WGL_NV_present_video 1 +DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 +typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +int WINAPI wglEnumerateVideoDevicesNV (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList); +BOOL WINAPI wglBindVideoDeviceNV (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue); +#endif +#endif /* WGL_NV_present_video */ + +#ifndef WGL_NV_render_depth_texture +#define WGL_NV_render_depth_texture 1 +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +#endif /* WGL_NV_render_depth_texture */ + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_NV_render_texture_rectangle 1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif /* WGL_NV_render_texture_rectangle */ + +#ifndef WGL_NV_swap_group +#define WGL_NV_swap_group 1 +typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); +typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); +typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); +typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); +typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group); +BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier); +BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier); +BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count); +BOOL WINAPI wglResetFrameCountNV (HDC hDC); +#endif +#endif /* WGL_NV_swap_group */ + +#ifndef WGL_NV_vertex_array_range +#define WGL_NV_vertex_array_range 1 +typedef void *(WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); +#ifdef WGL_WGLEXT_PROTOTYPES +void *WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +void WINAPI wglFreeMemoryNV (void *pointer); +#endif +#endif /* WGL_NV_vertex_array_range */ + +#ifndef WGL_NV_video_capture +#define WGL_NV_video_capture 1 +DECLARE_HANDLE(HVIDEOINPUTDEVICENV); +#define WGL_UNIQUE_ID_NV 0x20CE +#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#endif +#endif /* WGL_NV_video_capture */ + +#ifndef WGL_NV_video_output +#define WGL_NV_video_output 1 +DECLARE_HANDLE(HPVIDEODEV); +#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 +#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 +#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 +#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 +#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 +#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 +#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define WGL_VIDEO_OUT_FRAME 0x20C8 +#define WGL_VIDEO_OUT_FIELD_1 0x20C9 +#define WGL_VIDEO_OUT_FIELD_2 0x20CA +#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB +#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC +typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); +typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice); +BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer); +BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif +#endif /* WGL_NV_video_output */ + +#ifndef WGL_OML_sync_control +#define WGL_OML_sync_control 1 +typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); +typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator); +INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#endif +#endif /* WGL_OML_sync_control */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GLES/1.0/gl.h b/opengles/api/GLES/1.0/gl.h new file mode 100644 index 0000000000..415482228d --- /dev/null +++ b/opengles/api/GLES/1.0/gl.h @@ -0,0 +1,584 @@ +#ifndef __gl_h_ +#define __gl_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.0 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef signed char GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef unsigned char GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef float GLfloat; +typedef float GLclampf; +typedef void GLvoid; +typedef int GLintptrARB; +typedef int GLsizeiptrARB; +typedef int GLfixed; +typedef int GLclampx; +/* Internal convenience typedefs */ +typedef void (*_GLfuncptr)(); + +/*************************************************************/ + +/* Extensions */ +#define GL_OES_VERSION_1_0 1 +#define GL_OES_read_format 1 +#define GL_OES_compressed_paletted_texture 1 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* AlphaFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 + +/* BlendingFactorSrc */ +/* GL_ZERO */ +/* GL_ONE */ +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + +/* ColorMaterialFace */ +/* GL_FRONT_AND_BACK */ + +/* ColorMaterialParameter */ +/* GL_AMBIENT_AND_DIFFUSE */ + +/* ColorPointerType */ +/* GL_UNSIGNED_BYTE */ +/* GL_FLOAT */ +/* GL_FIXED */ + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* EnableCap */ +#define GL_FOG 0x0B60 +#define GL_LIGHTING 0x0B50 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_ALPHA_TEST 0x0BC0 +#define GL_BLEND 0x0BE2 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +/* GL_LIGHT0 */ +/* GL_LIGHT1 */ +/* GL_LIGHT2 */ +/* GL_LIGHT3 */ +/* GL_LIGHT4 */ +/* GL_LIGHT5 */ +/* GL_LIGHT6 */ +/* GL_LIGHT7 */ +#define GL_POINT_SMOOTH 0x0B10 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_NORMALIZE 0x0BA1 +#define GL_RESCALE_NORMAL 0x803A +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_TEXTURE_COORD_ARRAY 0x8078 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FogMode */ +/* GL_LINEAR */ +#define GL_EXP 0x0800 +#define GL_EXP2 0x0801 + +/* FogParameter */ +#define GL_FOG_DENSITY 0x0B62 +#define GL_FOG_START 0x0B63 +#define GL_FOG_END 0x0B64 +#define GL_FOG_MODE 0x0B65 +#define GL_FOG_COLOR 0x0B66 + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetPName */ +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#define GL_MAX_LIGHTS 0x0D31 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 +#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 +#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_FOG_HINT 0x0C54 + +/* LightModelParameter */ +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 + +/* LightParameter */ +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_POSITION 0x1203 +#define GL_SPOT_DIRECTION 0x1204 +#define GL_SPOT_EXPONENT 0x1205 +#define GL_SPOT_CUTOFF 0x1206 +#define GL_CONSTANT_ATTENUATION 0x1207 +#define GL_LINEAR_ATTENUATION 0x1208 +#define GL_QUADRATIC_ATTENUATION 0x1209 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C + +/* LogicOp */ +#define GL_CLEAR 0x1500 +#define GL_AND 0x1501 +#define GL_AND_REVERSE 0x1502 +#define GL_COPY 0x1503 +#define GL_AND_INVERTED 0x1504 +#define GL_NOOP 0x1505 +#define GL_XOR 0x1506 +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_EQUIV 0x1509 +#define GL_INVERT 0x150A +#define GL_OR_REVERSE 0x150B +#define GL_COPY_INVERTED 0x150C +#define GL_OR_INVERTED 0x150D +#define GL_NAND 0x150E +#define GL_SET 0x150F + +/* MaterialFace */ +/* GL_FRONT_AND_BACK */ + +/* MaterialParameter */ +#define GL_EMISSION 0x1600 +#define GL_SHININESS 0x1601 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 +/* GL_AMBIENT */ +/* GL_DIFFUSE */ +/* GL_SPECULAR */ + +/* MatrixMode */ +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 + +/* NormalPointerType */ +/* GL_BYTE */ +/* GL_SHORT */ +/* GL_FLOAT */ +/* GL_FIXED */ + +/* PixelFormat */ +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +/* PixelStoreParameter */ +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 + +/* PixelType */ +/* GL_UNSIGNED_BYTE */ +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 + +/* ShadingModel */ +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 + +/* StencilFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* StencilOp */ +/* GL_ZERO */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +/* GL_INVERT */ + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TexCoordPointerType */ +/* GL_SHORT */ +/* GL_FLOAT */ +/* GL_FIXED */ +/* GL_BYTE */ + +/* TextureEnvMode */ +#define GL_MODULATE 0x2100 +#define GL_DECAL 0x2101 +/* GL_BLEND */ +#define GL_ADD 0x0104 +/* GL_REPLACE */ + +/* TextureEnvParameter */ +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_ENV_COLOR 0x2201 + +/* TextureEnvTarget */ +#define GL_TEXTURE_ENV 0x2300 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* GL_NEAREST */ +/* GL_LINEAR */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 + +/* TextureTarget */ +/* GL_TEXTURE_2D */ + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F + +/* PixelInternalFormat */ +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 + +/* VertexPointerType */ +/* GL_SHORT */ +/* GL_FLOAT */ +/* GL_FIXED */ +/* GL_BYTE */ + +/* LightName */ +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_LIGHT2 0x4002 +#define GL_LIGHT3 0x4003 +#define GL_LIGHT4 0x4004 +#define GL_LIGHT5 0x4005 +#define GL_LIGHT6 0x4006 +#define GL_LIGHT7 0x4007 + + +/*************************************************************/ + +GLAPI void APIENTRY glActiveTexture (GLenum texture); +GLAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref); +GLAPI void APIENTRY glAlphaFuncx (GLenum func, GLclampx ref); +GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture); +GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GLAPI void APIENTRY glClear (GLbitfield mask); +GLAPI void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GLAPI void APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +GLAPI void APIENTRY glClearDepthf (GLclampf depth); +GLAPI void APIENTRY glClearDepthx (GLclampx depth); +GLAPI void APIENTRY glClearStencil (GLint s); +GLAPI void APIENTRY glClientActiveTexture (GLenum texture); +GLAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GLAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glCullFace (GLenum mode); +GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GLAPI void APIENTRY glDepthFunc (GLenum func); +GLAPI void APIENTRY glDepthMask (GLboolean flag); +GLAPI void APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); +GLAPI void APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar); +GLAPI void APIENTRY glDisable (GLenum cap); +GLAPI void APIENTRY glDisableClientState (GLenum array); +GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); +GLAPI void APIENTRY glEnable (GLenum cap); +GLAPI void APIENTRY glEnableClientState (GLenum array); +GLAPI void APIENTRY glFinish (void); +GLAPI void APIENTRY glFlush (void); +GLAPI void APIENTRY glFogf (GLenum pname, GLfloat param); +GLAPI void APIENTRY glFogfv (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFogx (GLenum pname, GLfixed param); +GLAPI void APIENTRY glFogxv (GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glFrontFace (GLenum mode); +GLAPI void APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GLAPI void APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GLAPI GLenum APIENTRY glGetError (void); +GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params); +GLAPI const GLubyte * APIENTRY glGetString (GLenum name); +GLAPI void APIENTRY glHint (GLenum target, GLenum mode); +GLAPI void APIENTRY glLightModelf (GLenum pname, GLfloat param); +GLAPI void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glLightModelx (GLenum pname, GLfixed param); +GLAPI void APIENTRY glLightModelxv (GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param); +GLAPI void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param); +GLAPI void APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glLineWidth (GLfloat width); +GLAPI void APIENTRY glLineWidthx (GLfixed width); +GLAPI void APIENTRY glLoadIdentity (void); +GLAPI void APIENTRY glLoadMatrixf (const GLfloat *m); +GLAPI void APIENTRY glLoadMatrixx (const GLfixed *m); +GLAPI void APIENTRY glLogicOp (GLenum opcode); +GLAPI void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param); +GLAPI void APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glMatrixMode (GLenum mode); +GLAPI void APIENTRY glMultMatrixf (const GLfloat *m); +GLAPI void APIENTRY glMultMatrixx (const GLfixed *m); +GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GLAPI void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); +GLAPI void APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz); +GLAPI void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GLAPI void APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param); +GLAPI void APIENTRY glPointSize (GLfloat size); +GLAPI void APIENTRY glPointSizex (GLfixed size); +GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GLAPI void APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units); +GLAPI void APIENTRY glPopMatrix (void); +GLAPI void APIENTRY glPushMatrix (void); +GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +GLAPI void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert); +GLAPI void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glShadeModel (GLenum mode); +GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilMask (GLuint mask); +GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GLAPI void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param); +GLAPI void APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params); +GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param); +GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z); +GLAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); + +#ifdef __cplusplus +} +#endif + +#endif /* __gl_h_ */ diff --git a/opengles/api/GLES/egl.h b/opengles/api/GLES/egl.h new file mode 100644 index 0000000000..4f8903d942 --- /dev/null +++ b/opengles/api/GLES/egl.h @@ -0,0 +1,18 @@ +/* +** Copyright 2008-2020 The Khronos Group Inc. +** SPDX-License-Identifier: Apache-2.0 +*/ + +/* + * Skeleton egl.h to provide compatibility for early GLES 1.0 + * applications. Several early implementations included gl.h + * in egl.h leading applications to include only egl.h + */ + +#ifndef __legacy_egl_h_ +#define __legacy_egl_h_ + +#include <EGL/egl.h> +#include <GLES/gl.h> + +#endif /* __legacy_egl_h_ */ diff --git a/opengles/api/GLES/gl.h b/opengles/api/GLES/gl.h new file mode 100644 index 0000000000..215301137d --- /dev/null +++ b/opengles/api/GLES/gl.h @@ -0,0 +1,571 @@ +#ifndef __gles1_gl_h_ +#define __gles1_gl_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#include <GLES/glplatform.h> + +/* Generated on date 20210107 */ + +/* Generated C header for: + * API: gles1 + * Profile: common + * Versions considered: .* + * Versions emitted: .* + * Default extensions included: None + * Additional extensions included: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_VERSION_ES_CM_1_0 +#define GL_VERSION_ES_CM_1_0 1 +#include <KHR/khrplatform.h> +typedef khronos_int8_t GLbyte; +typedef khronos_float_t GLclampf; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort; +typedef void GLvoid; +typedef unsigned int GLenum; +typedef khronos_float_t GLfloat; +typedef khronos_int32_t GLfixed; +typedef unsigned int GLuint; +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +typedef unsigned int GLbitfield; +typedef int GLint; +typedef khronos_uint8_t GLubyte; +typedef unsigned char GLboolean; +typedef int GLsizei; +typedef khronos_int32_t GLclampx; +#define GL_VERSION_ES_CL_1_0 1 +#define GL_VERSION_ES_CM_1_1 1 +#define GL_VERSION_ES_CL_1_1 1 +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_FALSE 0 +#define GL_TRUE 1 +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_CLIP_PLANE0 0x3000 +#define GL_CLIP_PLANE1 0x3001 +#define GL_CLIP_PLANE2 0x3002 +#define GL_CLIP_PLANE3 0x3003 +#define GL_CLIP_PLANE4 0x3004 +#define GL_CLIP_PLANE5 0x3005 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_FOG 0x0B60 +#define GL_LIGHTING 0x0B50 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_ALPHA_TEST 0x0BC0 +#define GL_BLEND 0x0BE2 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_POINT_SMOOTH 0x0B10 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_NORMALIZE 0x0BA1 +#define GL_RESCALE_NORMAL 0x803A +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_TEXTURE_COORD_ARRAY 0x8078 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_EXP 0x0800 +#define GL_EXP2 0x0801 +#define GL_FOG_DENSITY 0x0B62 +#define GL_FOG_START 0x0B63 +#define GL_FOG_END 0x0B64 +#define GL_FOG_MODE 0x0B65 +#define GL_FOG_COLOR 0x0B66 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_CURRENT_COLOR 0x0B00 +#define GL_CURRENT_NORMAL 0x0B02 +#define GL_CURRENT_TEXTURE_COORDS 0x0B03 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_LINE_WIDTH 0x0B21 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_SHADE_MODEL 0x0B54 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_MATRIX_MODE 0x0BA0 +#define GL_VIEWPORT 0x0BA2 +#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 +#define GL_PROJECTION_STACK_DEPTH 0x0BA4 +#define GL_TEXTURE_STACK_DEPTH 0x0BA5 +#define GL_MODELVIEW_MATRIX 0x0BA6 +#define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_TEXTURE_MATRIX 0x0BA8 +#define GL_ALPHA_TEST_FUNC 0x0BC1 +#define GL_ALPHA_TEST_REF 0x0BC2 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_SRC 0x0BE1 +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_MAX_LIGHTS 0x0D31 +#define GL_MAX_CLIP_PLANES 0x0D32 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 +#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 +#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_VERTEX_ARRAY_SIZE 0x807A +#define GL_VERTEX_ARRAY_TYPE 0x807B +#define GL_VERTEX_ARRAY_STRIDE 0x807C +#define GL_NORMAL_ARRAY_TYPE 0x807E +#define GL_NORMAL_ARRAY_STRIDE 0x807F +#define GL_COLOR_ARRAY_SIZE 0x8081 +#define GL_COLOR_ARRAY_TYPE 0x8082 +#define GL_COLOR_ARRAY_STRIDE 0x8083 +#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A +#define GL_VERTEX_ARRAY_POINTER 0x808E +#define GL_NORMAL_ARRAY_POINTER 0x808F +#define GL_COLOR_ARRAY_POINTER 0x8090 +#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_FOG_HINT 0x0C54 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_POSITION 0x1203 +#define GL_SPOT_DIRECTION 0x1204 +#define GL_SPOT_EXPONENT 0x1205 +#define GL_SPOT_CUTOFF 0x1206 +#define GL_CONSTANT_ATTENUATION 0x1207 +#define GL_LINEAR_ATTENUATION 0x1208 +#define GL_QUADRATIC_ATTENUATION 0x1209 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C +#define GL_CLEAR 0x1500 +#define GL_AND 0x1501 +#define GL_AND_REVERSE 0x1502 +#define GL_COPY 0x1503 +#define GL_AND_INVERTED 0x1504 +#define GL_NOOP 0x1505 +#define GL_XOR 0x1506 +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_EQUIV 0x1509 +#define GL_INVERT 0x150A +#define GL_OR_REVERSE 0x150B +#define GL_COPY_INVERTED 0x150C +#define GL_OR_INVERTED 0x150D +#define GL_NAND 0x150E +#define GL_SET 0x150F +#define GL_EMISSION 0x1600 +#define GL_SHININESS 0x1601 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_MODULATE 0x2100 +#define GL_DECAL 0x2101 +#define GL_ADD 0x0104 +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_ENV_COLOR 0x2201 +#define GL_TEXTURE_ENV 0x2300 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_LIGHT2 0x4002 +#define GL_LIGHT3 0x4003 +#define GL_LIGHT4 0x4004 +#define GL_LIGHT5 0x4005 +#define GL_LIGHT6 0x4006 +#define GL_LIGHT7 0x4007 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_SUBTRACT 0x84E7 +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_ALPHA_SCALE 0x0D1C +#define GL_SRC0_RGB 0x8580 +#define GL_SRC1_RGB 0x8581 +#define GL_SRC2_RGB 0x8582 +#define GL_SRC0_ALPHA 0x8588 +#define GL_SRC1_ALPHA 0x8589 +#define GL_SRC2_ALPHA 0x858A +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLfloat ref); +GL_API void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_API void GL_APIENTRY glClearDepthf (GLfloat d); +GL_API void GL_APIENTRY glClipPlanef (GLenum p, const GLfloat *eqn); +GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_API void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glFrustumf (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +GL_API void GL_APIENTRY glGetClipPlanef (GLenum plane, GLfloat *equation); +GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); +GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glLineWidth (GLfloat width); +GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m); +GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m); +GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); +GL_API void GL_APIENTRY glOrthof (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glPointSize (GLfloat size); +GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); +GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); +GL_API void GL_APIENTRY glActiveTexture (GLenum texture); +GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLfixed ref); +GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GL_API void GL_APIENTRY glClear (GLbitfield mask); +GL_API void GL_APIENTRY glClearColorx (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GL_API void GL_APIENTRY glClearDepthx (GLfixed depth); +GL_API void GL_APIENTRY glClearStencil (GLint s); +GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture); +GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation); +GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer); +GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glCullFace (GLenum mode); +GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GL_API void GL_APIENTRY glDepthFunc (GLenum func); +GL_API void GL_APIENTRY glDepthMask (GLboolean flag); +GL_API void GL_APIENTRY glDepthRangex (GLfixed n, GLfixed f); +GL_API void GL_APIENTRY glDisable (GLenum cap); +GL_API void GL_APIENTRY glDisableClientState (GLenum array); +GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); +GL_API void GL_APIENTRY glEnable (GLenum cap); +GL_API void GL_APIENTRY glEnableClientState (GLenum array); +GL_API void GL_APIENTRY glFinish (void); +GL_API void GL_APIENTRY glFlush (void); +GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *param); +GL_API void GL_APIENTRY glFrontFace (GLenum mode); +GL_API void GL_APIENTRY glFrustumx (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); +GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGetClipPlanex (GLenum plane, GLfixed *equation); +GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GL_API GLenum GL_APIENTRY glGetError (void); +GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); +GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params); +GL_API const GLubyte *GL_APIENTRY glGetString (GLenum name); +GL_API void GL_APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGetTexEnvxv (GLenum target, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); +GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture); +GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *param); +GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glLineWidthx (GLfixed width); +GL_API void GL_APIENTRY glLoadIdentity (void); +GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m); +GL_API void GL_APIENTRY glLogicOp (GLenum opcode); +GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *param); +GL_API void GL_APIENTRY glMatrixMode (GLenum mode); +GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m); +GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz); +GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const void *pointer); +GL_API void GL_APIENTRY glOrthox (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glPointSizex (GLfixed size); +GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units); +GL_API void GL_APIENTRY glPopMatrix (void); +GL_API void GL_APIENTRY glPushMatrix (void); +GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert); +GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glShadeModel (GLenum mode); +GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_API void GL_APIENTRY glStencilMask (GLuint mask); +GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const void *pointer); +GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); +GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params); +GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const void *pointer); +GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +#endif /* GL_VERSION_ES_CM_1_0 */ + +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif /* GL_OES_compressed_paletted_texture */ + +#ifndef GL_OES_point_size_array +#define GL_OES_point_size_array 1 +#define GL_POINT_SIZE_ARRAY_OES 0x8B9C +#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A +#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B +#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C +#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F +GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const void *pointer); +#endif /* GL_OES_point_size_array */ + +#ifndef GL_OES_point_sprite +#define GL_OES_point_sprite 1 +#define GL_POINT_SPRITE_OES 0x8861 +#define GL_COORD_REPLACE_OES 0x8862 +#endif /* GL_OES_point_sprite */ + +#ifndef GL_OES_read_format +#define GL_OES_read_format 1 +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif /* GL_OES_read_format */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GLES/glext.h b/opengles/api/GLES/glext.h new file mode 100644 index 0000000000..61a6363c22 --- /dev/null +++ b/opengles/api/GLES/glext.h @@ -0,0 +1,954 @@ +#ifndef __gles1_glext_h_ +#define __gles1_glext_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY* +#endif + +/* Generated on date 20210107 */ + +/* Generated C header for: + * API: gles1 + * Profile: common + * Versions considered: .* + * Versions emitted: _nomatch_^ + * Default extensions included: gles1 + * Additional extensions included: _nomatch_^ + * Extensions removed: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$ + */ + +#ifndef GL_KHR_debug +#define GL_KHR_debug 1 +#endif /* GL_KHR_debug */ + +#ifndef GL_OES_EGL_image +#define GL_OES_EGL_image 1 +typedef void *GLeglImageOES; +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +#endif +#endif /* GL_OES_EGL_image */ + +#ifndef GL_OES_EGL_image_external +#define GL_OES_EGL_image_external 1 +#define GL_TEXTURE_EXTERNAL_OES 0x8D65 +#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 +#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 +#endif /* GL_OES_EGL_image_external */ + +#ifndef GL_OES_blend_equation_separate +#define GL_OES_blend_equation_separate 1 +#define GL_BLEND_EQUATION_RGB_OES 0x8009 +#define GL_BLEND_EQUATION_ALPHA_OES 0x883D +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha); +#endif +#endif /* GL_OES_blend_equation_separate */ + +#ifndef GL_OES_blend_func_separate +#define GL_OES_blend_func_separate 1 +#define GL_BLEND_DST_RGB_OES 0x80C8 +#define GL_BLEND_SRC_RGB_OES 0x80C9 +#define GL_BLEND_DST_ALPHA_OES 0x80CA +#define GL_BLEND_SRC_ALPHA_OES 0x80CB +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif +#endif /* GL_OES_blend_func_separate */ + +#ifndef GL_OES_blend_subtract +#define GL_OES_blend_subtract 1 +#define GL_BLEND_EQUATION_OES 0x8009 +#define GL_FUNC_ADD_OES 0x8006 +#define GL_FUNC_SUBTRACT_OES 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode); +#endif +#endif /* GL_OES_blend_subtract */ + +#ifndef GL_OES_byte_coordinates +#define GL_OES_byte_coordinates 1 +#endif /* GL_OES_byte_coordinates */ + +#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture +#define GL_OES_compressed_ETC1_RGB8_sub_texture 1 +#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */ + +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_OES_compressed_ETC1_RGB8_texture 1 +#define GL_ETC1_RGB8_OES 0x8D64 +#endif /* GL_OES_compressed_ETC1_RGB8_texture */ + +#ifndef GL_OES_depth24 +#define GL_OES_depth24 1 +#define GL_DEPTH_COMPONENT24_OES 0x81A6 +#endif /* GL_OES_depth24 */ + +#ifndef GL_OES_depth32 +#define GL_OES_depth32 1 +#define GL_DEPTH_COMPONENT32_OES 0x81A7 +#endif /* GL_OES_depth32 */ + +#ifndef GL_OES_draw_texture +#define GL_OES_draw_texture 1 +#define GL_TEXTURE_CROP_RECT_OES 0x8B9D +typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords); +typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords); +typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords); +typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); +GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); +GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); +GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords); +GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords); +GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords); +GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); +GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords); +#endif +#endif /* GL_OES_draw_texture */ + +#ifndef GL_OES_element_index_uint +#define GL_OES_element_index_uint 1 +#define GL_UNSIGNED_INT 0x1405 +#endif /* GL_OES_element_index_uint */ + +#ifndef GL_OES_extended_matrix_palette +#define GL_OES_extended_matrix_palette 1 +#endif /* GL_OES_extended_matrix_palette */ + +#ifndef GL_OES_fbo_render_mipmap +#define GL_OES_fbo_render_mipmap 1 +#endif /* GL_OES_fbo_render_mipmap */ + +#ifndef GL_OES_fixed_point +#define GL_OES_fixed_point 1 +#define GL_FIXED_OES 0x140C +typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref); +typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); +typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f); +typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param); +typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation); +typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param); +typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width); +typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); +typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param); +typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); +typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); +typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); +typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert); +typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref); +GL_API void GL_APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GL_API void GL_APIENTRY glClearDepthxOES (GLfixed depth); +GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation); +GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GL_API void GL_APIENTRY glDepthRangexOES (GLfixed n, GLfixed f); +GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *param); +GL_API void GL_APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation); +GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param); +GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width); +GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m); +GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param); +GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m); +GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); +GL_API void GL_APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); +GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glPointSizexOES (GLfixed size); +GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); +GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert); +GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); +#endif +#endif /* GL_OES_fixed_point */ + +#ifndef GL_OES_framebuffer_object +#define GL_OES_framebuffer_object 1 +#define GL_NONE_OES 0 +#define GL_FRAMEBUFFER_OES 0x8D40 +#define GL_RENDERBUFFER_OES 0x8D41 +#define GL_RGBA4_OES 0x8056 +#define GL_RGB5_A1_OES 0x8057 +#define GL_RGB565_OES 0x8D62 +#define GL_DEPTH_COMPONENT16_OES 0x81A5 +#define GL_RENDERBUFFER_WIDTH_OES 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3 +#define GL_COLOR_ATTACHMENT0_OES 0x8CE0 +#define GL_DEPTH_ATTACHMENT_OES 0x8D00 +#define GL_STENCIL_ATTACHMENT_OES 0x8D20 +#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA +#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD +#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6 +#define GL_RENDERBUFFER_BINDING_OES 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8 +#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506 +typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target); +#ifdef GL_GLEXT_PROTOTYPES +GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer); +GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer); +GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint *renderbuffers); +GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint *renderbuffers); +GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint *params); +GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer); +GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer); +GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint *framebuffers); +GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint *framebuffers); +GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target); +GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target); +#endif +#endif /* GL_OES_framebuffer_object */ + +#ifndef GL_OES_mapbuffer +#define GL_OES_mapbuffer 1 +#define GL_WRITE_ONLY_OES 0x88B9 +#define GL_BUFFER_ACCESS_OES 0x88BB +#define GL_BUFFER_MAPPED_OES 0x88BC +#define GL_BUFFER_MAP_POINTER_OES 0x88BD +typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); +GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); +GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params); +#endif +#endif /* GL_OES_mapbuffer */ + +#ifndef GL_OES_matrix_get +#define GL_OES_matrix_get 1 +#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D +#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E +#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F +#endif /* GL_OES_matrix_get */ + +#ifndef GL_OES_matrix_palette +#define GL_OES_matrix_palette 1 +#define GL_MAX_VERTEX_UNITS_OES 0x86A4 +#define GL_MAX_PALETTE_MATRICES_OES 0x8842 +#define GL_MATRIX_PALETTE_OES 0x8840 +#define GL_MATRIX_INDEX_ARRAY_OES 0x8844 +#define GL_WEIGHT_ARRAY_OES 0x86AD +#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843 +#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849 +#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E +#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB +#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA +#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E +typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex); +typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void); +typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex); +GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void); +GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const void *pointer); +GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const void *pointer); +#endif +#endif /* GL_OES_matrix_palette */ + +#ifndef GL_OES_packed_depth_stencil +#define GL_OES_packed_depth_stencil 1 +#define GL_DEPTH_STENCIL_OES 0x84F9 +#define GL_UNSIGNED_INT_24_8_OES 0x84FA +#define GL_DEPTH24_STENCIL8_OES 0x88F0 +#endif /* GL_OES_packed_depth_stencil */ + +#ifndef GL_OES_query_matrix +#define GL_OES_query_matrix 1 +typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent); +#ifdef GL_GLEXT_PROTOTYPES +GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent); +#endif +#endif /* GL_OES_query_matrix */ + +#ifndef GL_OES_required_internalformat +#define GL_OES_required_internalformat 1 +#define GL_ALPHA8_OES 0x803C +#define GL_LUMINANCE4_ALPHA4_OES 0x8043 +#define GL_LUMINANCE8_ALPHA8_OES 0x8045 +#define GL_LUMINANCE8_OES 0x8040 +#define GL_RGB8_OES 0x8051 +#define GL_RGBA8_OES 0x8058 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB10_A2_EXT 0x8059 +#endif /* GL_OES_required_internalformat */ + +#ifndef GL_OES_rgb8_rgba8 +#define GL_OES_rgb8_rgba8 1 +#endif /* GL_OES_rgb8_rgba8 */ + +#ifndef GL_OES_single_precision +#define GL_OES_single_precision 1 +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f); +typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation); +typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth); +GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); +GL_API void GL_APIENTRY glDepthRangefOES (GLclampf n, GLclampf f); +GL_API void GL_APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation); +GL_API void GL_APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +#endif +#endif /* GL_OES_single_precision */ + +#ifndef GL_OES_stencil1 +#define GL_OES_stencil1 1 +#define GL_STENCIL_INDEX1_OES 0x8D46 +#endif /* GL_OES_stencil1 */ + +#ifndef GL_OES_stencil4 +#define GL_OES_stencil4 1 +#define GL_STENCIL_INDEX4_OES 0x8D47 +#endif /* GL_OES_stencil4 */ + +#ifndef GL_OES_stencil8 +#define GL_OES_stencil8 1 +#define GL_STENCIL_INDEX8_OES 0x8D48 +#endif /* GL_OES_stencil8 */ + +#ifndef GL_OES_stencil_wrap +#define GL_OES_stencil_wrap 1 +#define GL_INCR_WRAP_OES 0x8507 +#define GL_DECR_WRAP_OES 0x8508 +#endif /* GL_OES_stencil_wrap */ + +#ifndef GL_OES_surfaceless_context +#define GL_OES_surfaceless_context 1 +#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 +#endif /* GL_OES_surfaceless_context */ + +#ifndef GL_OES_texture_cube_map +#define GL_OES_texture_cube_map 1 +#define GL_NORMAL_MAP_OES 0x8511 +#define GL_REFLECTION_MAP_OES 0x8512 +#define GL_TEXTURE_CUBE_MAP_OES 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C +#define GL_TEXTURE_GEN_MODE_OES 0x2500 +#define GL_TEXTURE_GEN_STR_OES 0x8D60 +typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params); +typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param); +GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params); +GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params); +#endif +#endif /* GL_OES_texture_cube_map */ + +#ifndef GL_OES_texture_env_crossbar +#define GL_OES_texture_env_crossbar 1 +#endif /* GL_OES_texture_env_crossbar */ + +#ifndef GL_OES_texture_mirrored_repeat +#define GL_OES_texture_mirrored_repeat 1 +#define GL_MIRRORED_REPEAT_OES 0x8370 +#endif /* GL_OES_texture_mirrored_repeat */ + +#ifndef GL_OES_texture_npot +#define GL_OES_texture_npot 1 +#endif /* GL_OES_texture_npot */ + +#ifndef GL_OES_vertex_array_object +#define GL_OES_vertex_array_object 1 +#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 +typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array); +GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); +GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); +GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); +#endif +#endif /* GL_OES_vertex_array_object */ + +#ifndef GL_AMD_compressed_3DC_texture +#define GL_AMD_compressed_3DC_texture 1 +#define GL_3DC_X_AMD 0x87F9 +#define GL_3DC_XY_AMD 0x87FA +#endif /* GL_AMD_compressed_3DC_texture */ + +#ifndef GL_AMD_compressed_ATC_texture +#define GL_AMD_compressed_ATC_texture 1 +#define GL_ATC_RGB_AMD 0x8C92 +#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 +#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE +#endif /* GL_AMD_compressed_ATC_texture */ + +#ifndef GL_APPLE_copy_texture_levels +#define GL_APPLE_copy_texture_levels 1 +typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +#endif +#endif /* GL_APPLE_copy_texture_levels */ + +#ifndef GL_APPLE_framebuffer_multisample +#define GL_APPLE_framebuffer_multisample 1 +#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 +#define GL_MAX_SAMPLES_APPLE 0x8D57 +#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); +#endif +#endif /* GL_APPLE_framebuffer_multisample */ + +#ifndef GL_APPLE_sync +#define GL_APPLE_sync 1 +typedef struct __GLsync *GLsync; +typedef khronos_uint64_t GLuint64; +typedef khronos_int64_t GLint64; +#define GL_SYNC_OBJECT_APPLE 0x8A53 +#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 +#define GL_OBJECT_TYPE_APPLE 0x9112 +#define GL_SYNC_CONDITION_APPLE 0x9113 +#define GL_SYNC_STATUS_APPLE 0x9114 +#define GL_SYNC_FLAGS_APPLE 0x9115 +#define GL_SYNC_FENCE_APPLE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 +#define GL_UNSIGNALED_APPLE 0x9118 +#define GL_SIGNALED_APPLE 0x9119 +#define GL_ALREADY_SIGNALED_APPLE 0x911A +#define GL_TIMEOUT_EXPIRED_APPLE 0x911B +#define GL_CONDITION_SATISFIED_APPLE 0x911C +#define GL_WAIT_FAILED_APPLE 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 +#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull +typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); +typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); +typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +#ifdef GL_GLEXT_PROTOTYPES +GL_API GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); +GL_API GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); +GL_API void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); +GL_API GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_API void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_API void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); +GL_API void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +#endif +#endif /* GL_APPLE_sync */ + +#ifndef GL_APPLE_texture_2D_limited_npot +#define GL_APPLE_texture_2D_limited_npot 1 +#endif /* GL_APPLE_texture_2D_limited_npot */ + +#ifndef GL_APPLE_texture_format_BGRA8888 +#define GL_APPLE_texture_format_BGRA8888 1 +#define GL_BGRA_EXT 0x80E1 +#define GL_BGRA8_EXT 0x93A1 +#endif /* GL_APPLE_texture_format_BGRA8888 */ + +#ifndef GL_APPLE_texture_max_level +#define GL_APPLE_texture_max_level 1 +#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D +#endif /* GL_APPLE_texture_max_level */ + +#ifndef GL_ARM_rgba8 +#define GL_ARM_rgba8 1 +#endif /* GL_ARM_rgba8 */ + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#endif /* GL_EXT_blend_minmax */ + +#ifndef GL_EXT_debug_marker +#define GL_EXT_debug_marker 1 +typedef char GLchar; +typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); +GL_API void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); +GL_API void GL_APIENTRY glPopGroupMarkerEXT (void); +#endif +#endif /* GL_EXT_debug_marker */ + +#ifndef GL_EXT_discard_framebuffer +#define GL_EXT_discard_framebuffer 1 +#define GL_COLOR_EXT 0x1800 +#define GL_DEPTH_EXT 0x1801 +#define GL_STENCIL_EXT 0x1802 +typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#endif +#endif /* GL_EXT_discard_framebuffer */ + +#ifndef GL_EXT_map_buffer_range +#define GL_EXT_map_buffer_range 1 +#define GL_MAP_READ_BIT_EXT 0x0001 +#define GL_MAP_WRITE_BIT_EXT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 +typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GL_API void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); +#endif +#endif /* GL_EXT_map_buffer_range */ + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +#endif +#endif /* GL_EXT_multi_draw_arrays */ + +#ifndef GL_EXT_multisampled_render_to_texture +#define GL_EXT_multisampled_render_to_texture 1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#endif +#endif /* GL_EXT_multisampled_render_to_texture */ + +#ifndef GL_EXT_read_format_bgra +#define GL_EXT_read_format_bgra 1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 +#endif /* GL_EXT_read_format_bgra */ + +#ifndef GL_EXT_robustness +#define GL_EXT_robustness 1 +#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 +#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 +#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 +#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 +#define GL_NO_RESET_NOTIFICATION_EXT 0x8261 +typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); +typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_API GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); +GL_API void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GL_API void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GL_API void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); +#endif +#endif /* GL_EXT_robustness */ + +#ifndef GL_EXT_sRGB +#define GL_EXT_sRGB 1 +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 +#endif /* GL_EXT_sRGB */ + +#ifndef GL_EXT_texture_compression_dxt1 +#define GL_EXT_texture_compression_dxt1 1 +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#endif /* GL_EXT_texture_compression_dxt1 */ + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif /* GL_EXT_texture_filter_anisotropic */ + +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_EXT_texture_format_BGRA8888 1 +#endif /* GL_EXT_texture_format_BGRA8888 */ + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#endif /* GL_EXT_texture_lod_bias */ + +#ifndef GL_EXT_texture_storage +#define GL_EXT_texture_storage 1 +#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F +#define GL_ALPHA8_EXT 0x803C +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_RGBA32F_EXT 0x8814 +#define GL_RGB32F_EXT 0x8815 +#define GL_ALPHA32F_EXT 0x8816 +#define GL_LUMINANCE32F_EXT 0x8818 +#define GL_LUMINANCE_ALPHA32F_EXT 0x8819 +#define GL_RGBA16F_EXT 0x881A +#define GL_RGB16F_EXT 0x881B +#define GL_ALPHA16F_EXT 0x881C +#define GL_LUMINANCE16F_EXT 0x881E +#define GL_LUMINANCE_ALPHA16F_EXT 0x881F +#define GL_R8_EXT 0x8229 +#define GL_RG8_EXT 0x822B +#define GL_R32F_EXT 0x822E +#define GL_RG32F_EXT 0x8230 +#define GL_R16F_EXT 0x822D +#define GL_RG16F_EXT 0x822F +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GL_API void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_API void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GL_API void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#endif +#endif /* GL_EXT_texture_storage */ + +#ifndef GL_IMG_multisampled_render_to_texture +#define GL_IMG_multisampled_render_to_texture 1 +#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 +#define GL_MAX_SAMPLES_IMG 0x9135 +#define GL_TEXTURE_SAMPLES_IMG 0x9136 +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#endif +#endif /* GL_IMG_multisampled_render_to_texture */ + +#ifndef GL_IMG_read_format +#define GL_IMG_read_format 1 +#define GL_BGRA_IMG 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 +#endif /* GL_IMG_read_format */ + +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_IMG_texture_compression_pvrtc 1 +#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 +#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 +#endif /* GL_IMG_texture_compression_pvrtc */ + +#ifndef GL_IMG_texture_env_enhanced_fixed_function +#define GL_IMG_texture_env_enhanced_fixed_function 1 +#define GL_MODULATE_COLOR_IMG 0x8C04 +#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05 +#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06 +#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07 +#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08 +#define GL_ADD_BLEND_IMG 0x8C09 +#define GL_DOT3_RGBA_IMG 0x86AF +#endif /* GL_IMG_texture_env_enhanced_fixed_function */ + +#ifndef GL_IMG_user_clip_plane +#define GL_IMG_user_clip_plane 1 +#define GL_CLIP_PLANE0_IMG 0x3000 +#define GL_CLIP_PLANE1_IMG 0x3001 +#define GL_CLIP_PLANE2_IMG 0x3002 +#define GL_CLIP_PLANE3_IMG 0x3003 +#define GL_CLIP_PLANE4_IMG 0x3004 +#define GL_CLIP_PLANE5_IMG 0x3005 +#define GL_MAX_CLIP_PLANES_IMG 0x0D32 +typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glClipPlanefIMG (GLenum p, const GLfloat *eqn); +GL_API void GL_APIENTRY glClipPlanexIMG (GLenum p, const GLfixed *eqn); +#endif +#endif /* GL_IMG_user_clip_plane */ + +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); +GL_API void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); +GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint fence); +GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint fence); +GL_API void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glFinishFenceNV (GLuint fence); +GL_API void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition); +#endif +#endif /* GL_NV_fence */ + +#ifndef GL_QCOM_driver_control +#define GL_QCOM_driver_control 1 +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); +GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); +GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); +#endif +#endif /* GL_QCOM_driver_control */ + +#ifndef GL_QCOM_extended_get +#define GL_QCOM_extended_get 1 +#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 +#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 +#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 +#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 +#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 +#define GL_TEXTURE_TYPE_QCOM 0x8BD7 +#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 +#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 +#define GL_TEXTURE_TARGET_QCOM 0x8BDA +#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB +#define GL_STATE_RESTORE 0x8BDC +typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); +GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); +GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); +GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params); +#endif +#endif /* GL_QCOM_extended_get */ + +#ifndef GL_QCOM_extended_get2 +#define GL_QCOM_extended_get2 1 +typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); +GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); +GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#endif +#endif /* GL_QCOM_extended_get2 */ + +#ifndef GL_QCOM_perfmon_global_mode +#define GL_QCOM_perfmon_global_mode 1 +#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 +#endif /* GL_QCOM_perfmon_global_mode */ + +#ifndef GL_QCOM_tiled_rendering +#define GL_QCOM_tiled_rendering 1 +#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 +#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 +#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 +#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 +#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 +#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 +#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 +#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 +#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 +#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 +#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 +#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 +#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 +#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 +#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 +#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 +#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 +#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 +#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 +#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 +#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 +#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 +#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 +#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 +#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 +#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 +#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 +#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 +#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 +#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 +#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 +#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 +typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); +#endif +#endif /* GL_QCOM_tiled_rendering */ + +#ifndef GL_QCOM_writeonly_rendering +#define GL_QCOM_writeonly_rendering 1 +#define GL_WRITEONLY_RENDERING_QCOM 0x8823 +#endif /* GL_QCOM_writeonly_rendering */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GLES/glplatform.h b/opengles/api/GLES/glplatform.h new file mode 100644 index 0000000000..3155ef29d5 --- /dev/null +++ b/opengles/api/GLES/glplatform.h @@ -0,0 +1,27 @@ +#ifndef __glplatform_h_ +#define __glplatform_h_ + +/* +** Copyright 2017-2020 The Khronos Group Inc. +** SPDX-License-Identifier: Apache-2.0 +*/ + +/* Platform-specific types and definitions for OpenGL ES 1.X gl.h + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * Please contribute modifications back to Khronos as pull requests on the + * public github repository: + * https://github.com/KhronosGroup/OpenGL-Registry + */ + +#include <KHR/khrplatform.h> + +#ifndef GL_API +#define GL_API KHRONOS_APICALL +#endif + +#ifndef GL_APIENTRY +#define GL_APIENTRY KHRONOS_APIENTRY +#endif + +#endif /* __glplatform_h_ */ diff --git a/opengles/api/GLES2/gl2.h b/opengles/api/GLES2/gl2.h new file mode 100644 index 0000000000..3c5e6d3d6e --- /dev/null +++ b/opengles/api/GLES2/gl2.h @@ -0,0 +1,656 @@ +#ifndef __gles2_gl2_h_ +#define __gles2_gl2_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#include <GLES2/gl2platform.h> + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY* +#endif + +#ifndef GL_GLES_PROTOTYPES +#define GL_GLES_PROTOTYPES 1 +#endif + +/* Generated on date 20210107 */ + +/* Generated C header for: + * API: gles2 + * Profile: common + * Versions considered: 2\.[0-9] + * Versions emitted: .* + * Default extensions included: None + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_ES_VERSION_2_0 +#define GL_ES_VERSION_2_0 1 +#include <KHR/khrplatform.h> +typedef khronos_int8_t GLbyte; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort; +typedef void GLvoid; +typedef struct __GLsync *GLsync; +typedef khronos_int64_t GLint64; +typedef khronos_uint64_t GLuint64; +typedef unsigned int GLenum; +typedef unsigned int GLuint; +typedef char GLchar; +typedef khronos_float_t GLfloat; +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +typedef unsigned int GLbitfield; +typedef int GLint; +typedef unsigned char GLboolean; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_FALSE 0 +#define GL_TRUE 1 +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_SHADER_TYPE 0x8B4F +#define GL_DELETE_STATUS 0x8B80 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_TEXTURE 0x1702 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_COMPILE_STATUS 0x8B81 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_NONE 0 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); +typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); +typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); +typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); +typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); +typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); +typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); +typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); +typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); +typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); +typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); +typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); +typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); +typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); +typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); +typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); +typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); +typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); +typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); +typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); +typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); +typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); +GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); +GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); +GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); +GL_APICALL void GL_APIENTRY glClearStencil (GLint s); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); +GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); +GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); +GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); +GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); +GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glDisable (GLenum cap); +GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glEnable (GLenum cap); +GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glFinish (void); +GL_APICALL void GL_APIENTRY glFlush (void); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); +GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); +GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL GLenum GL_APIENTRY glGetError (void); +GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); +GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); +GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); +GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); +GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); +GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); +GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); +GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); +GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); +GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); +GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +#endif +#endif /* GL_ES_VERSION_2_0 */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GLES2/gl2ext.h b/opengles/api/GLES2/gl2ext.h new file mode 100644 index 0000000000..8a66d82fd5 --- /dev/null +++ b/opengles/api/GLES2/gl2ext.h @@ -0,0 +1,3946 @@ +#ifndef __gles2_gl2ext_h_ +#define __gles2_gl2ext_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY* +#endif + +/* Generated on date 20210107 */ + +/* Generated C header for: + * API: gles2 + * Profile: common + * Versions considered: 2\.[0-9] + * Versions emitted: _nomatch_^ + * Default extensions included: gles2 + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_KHR_blend_equation_advanced +#define GL_KHR_blend_equation_advanced 1 +#define GL_MULTIPLY_KHR 0x9294 +#define GL_SCREEN_KHR 0x9295 +#define GL_OVERLAY_KHR 0x9296 +#define GL_DARKEN_KHR 0x9297 +#define GL_LIGHTEN_KHR 0x9298 +#define GL_COLORDODGE_KHR 0x9299 +#define GL_COLORBURN_KHR 0x929A +#define GL_HARDLIGHT_KHR 0x929B +#define GL_SOFTLIGHT_KHR 0x929C +#define GL_DIFFERENCE_KHR 0x929E +#define GL_EXCLUSION_KHR 0x92A0 +#define GL_HSL_HUE_KHR 0x92AD +#define GL_HSL_SATURATION_KHR 0x92AE +#define GL_HSL_COLOR_KHR 0x92AF +#define GL_HSL_LUMINOSITY_KHR 0x92B0 +typedef void (GL_APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void); +#endif +#endif /* GL_KHR_blend_equation_advanced */ + +#ifndef GL_KHR_blend_equation_advanced_coherent +#define GL_KHR_blend_equation_advanced_coherent 1 +#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 +#endif /* GL_KHR_blend_equation_advanced_coherent */ + +#ifndef GL_KHR_context_flush_control +#define GL_KHR_context_flush_control 1 +#define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB +#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x82FC +#endif /* GL_KHR_context_flush_control */ + +#ifndef GL_KHR_debug +#define GL_KHR_debug 1 +typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +#define GL_SAMPLER 0x82E6 +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245 +#define GL_DEBUG_SOURCE_API_KHR 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A +#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B +#define GL_DEBUG_TYPE_ERROR_KHR 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E +#define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250 +#define GL_DEBUG_TYPE_OTHER_KHR 0x8251 +#define GL_DEBUG_TYPE_MARKER_KHR 0x8268 +#define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269 +#define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A +#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B +#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C +#define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D +#define GL_BUFFER_KHR 0x82E0 +#define GL_SHADER_KHR 0x82E1 +#define GL_PROGRAM_KHR 0x82E2 +#define GL_VERTEX_ARRAY_KHR 0x8074 +#define GL_QUERY_KHR 0x82E3 +#define GL_PROGRAM_PIPELINE_KHR 0x82E4 +#define GL_SAMPLER_KHR 0x82E6 +#define GL_MAX_LABEL_LENGTH_KHR 0x82E8 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147 +#define GL_DEBUG_SEVERITY_LOW_KHR 0x9148 +#define GL_DEBUG_OUTPUT_KHR 0x92E0 +#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002 +#define GL_STACK_OVERFLOW_KHR 0x0503 +#define GL_STACK_UNDERFLOW_KHR 0x0504 +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam); +typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); +typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void); +typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam); +GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message); +GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void); +GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params); +#endif +#endif /* GL_KHR_debug */ + +#ifndef GL_KHR_no_error +#define GL_KHR_no_error 1 +#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 +#endif /* GL_KHR_no_error */ + +#ifndef GL_KHR_parallel_shader_compile +#define GL_KHR_parallel_shader_compile 1 +#define GL_MAX_SHADER_COMPILER_THREADS_KHR 0x91B0 +#define GL_COMPLETION_STATUS_KHR 0x91B1 +typedef void (GL_APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSKHRPROC) (GLuint count); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glMaxShaderCompilerThreadsKHR (GLuint count); +#endif +#endif /* GL_KHR_parallel_shader_compile */ + +#ifndef GL_KHR_robust_buffer_access_behavior +#define GL_KHR_robust_buffer_access_behavior 1 +#endif /* GL_KHR_robust_buffer_access_behavior */ + +#ifndef GL_KHR_robustness +#define GL_KHR_robustness 1 +#define GL_CONTEXT_ROBUST_ACCESS_KHR 0x90F3 +#define GL_LOSE_CONTEXT_ON_RESET_KHR 0x8252 +#define GL_GUILTY_CONTEXT_RESET_KHR 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_KHR 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_KHR 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY_KHR 0x8256 +#define GL_NO_RESET_NOTIFICATION_KHR 0x8261 +#define GL_CONTEXT_LOST_KHR 0x0507 +typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC) (void); +typedef void (GL_APIENTRYP PFNGLREADNPIXELSKHRPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusKHR (void); +GL_APICALL void GL_APIENTRY glReadnPixelsKHR (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GL_APICALL void GL_APIENTRY glGetnUniformfvKHR (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetnUniformivKHR (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +#endif +#endif /* GL_KHR_robustness */ + +#ifndef GL_KHR_shader_subgroup +#define GL_KHR_shader_subgroup 1 +#define GL_SUBGROUP_SIZE_KHR 0x9532 +#define GL_SUBGROUP_SUPPORTED_STAGES_KHR 0x9533 +#define GL_SUBGROUP_SUPPORTED_FEATURES_KHR 0x9534 +#define GL_SUBGROUP_QUAD_ALL_STAGES_KHR 0x9535 +#define GL_SUBGROUP_FEATURE_BASIC_BIT_KHR 0x00000001 +#define GL_SUBGROUP_FEATURE_VOTE_BIT_KHR 0x00000002 +#define GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR 0x00000004 +#define GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR 0x00000008 +#define GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR 0x00000010 +#define GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR 0x00000020 +#define GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR 0x00000040 +#define GL_SUBGROUP_FEATURE_QUAD_BIT_KHR 0x00000080 +#endif /* GL_KHR_shader_subgroup */ + +#ifndef GL_KHR_texture_compression_astc_hdr +#define GL_KHR_texture_compression_astc_hdr 1 +#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +#endif /* GL_KHR_texture_compression_astc_hdr */ + +#ifndef GL_KHR_texture_compression_astc_ldr +#define GL_KHR_texture_compression_astc_ldr 1 +#endif /* GL_KHR_texture_compression_astc_ldr */ + +#ifndef GL_KHR_texture_compression_astc_sliced_3d +#define GL_KHR_texture_compression_astc_sliced_3d 1 +#endif /* GL_KHR_texture_compression_astc_sliced_3d */ + +#ifndef GL_OES_EGL_image +#define GL_OES_EGL_image 1 +typedef void *GLeglImageOES; +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +#endif +#endif /* GL_OES_EGL_image */ + +#ifndef GL_OES_EGL_image_external +#define GL_OES_EGL_image_external 1 +#define GL_TEXTURE_EXTERNAL_OES 0x8D65 +#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 +#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 +#define GL_SAMPLER_EXTERNAL_OES 0x8D66 +#endif /* GL_OES_EGL_image_external */ + +#ifndef GL_OES_EGL_image_external_essl3 +#define GL_OES_EGL_image_external_essl3 1 +#endif /* GL_OES_EGL_image_external_essl3 */ + +#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture +#define GL_OES_compressed_ETC1_RGB8_sub_texture 1 +#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */ + +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_OES_compressed_ETC1_RGB8_texture 1 +#define GL_ETC1_RGB8_OES 0x8D64 +#endif /* GL_OES_compressed_ETC1_RGB8_texture */ + +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif /* GL_OES_compressed_paletted_texture */ + +#ifndef GL_OES_copy_image +#define GL_OES_copy_image 1 +typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAOESPROC) (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); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCopyImageSubDataOES (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); +#endif +#endif /* GL_OES_copy_image */ + +#ifndef GL_OES_depth24 +#define GL_OES_depth24 1 +#define GL_DEPTH_COMPONENT24_OES 0x81A6 +#endif /* GL_OES_depth24 */ + +#ifndef GL_OES_depth32 +#define GL_OES_depth32 1 +#define GL_DEPTH_COMPONENT32_OES 0x81A7 +#endif /* GL_OES_depth32 */ + +#ifndef GL_OES_depth_texture +#define GL_OES_depth_texture 1 +#endif /* GL_OES_depth_texture */ + +#ifndef GL_OES_draw_buffers_indexed +#define GL_OES_draw_buffers_indexed 1 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +typedef void (GL_APIENTRYP PFNGLENABLEIOESPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLDISABLEIOESPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIOESPROC) (GLuint buf, GLenum mode); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIOESPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCIOESPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIOESPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (GL_APIENTRYP PFNGLCOLORMASKIOESPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIOESPROC) (GLenum target, GLuint index); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glEnableiOES (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glDisableiOES (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glBlendEquationiOES (GLuint buf, GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparateiOES (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunciOES (GLuint buf, GLenum src, GLenum dst); +GL_APICALL void GL_APIENTRY glBlendFuncSeparateiOES (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GL_APICALL void GL_APIENTRY glColorMaskiOES (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GL_APICALL GLboolean GL_APIENTRY glIsEnablediOES (GLenum target, GLuint index); +#endif +#endif /* GL_OES_draw_buffers_indexed */ + +#ifndef GL_OES_draw_elements_base_vertex +#define GL_OES_draw_elements_base_vertex 1 +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawElementsBaseVertexOES (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertexOES (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexOES (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +GL_APICALL void GL_APIENTRY glMultiDrawElementsBaseVertexEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); +#endif +#endif /* GL_OES_draw_elements_base_vertex */ + +#ifndef GL_OES_element_index_uint +#define GL_OES_element_index_uint 1 +#endif /* GL_OES_element_index_uint */ + +#ifndef GL_OES_fbo_render_mipmap +#define GL_OES_fbo_render_mipmap 1 +#endif /* GL_OES_fbo_render_mipmap */ + +#ifndef GL_OES_fragment_precision_high +#define GL_OES_fragment_precision_high 1 +#endif /* GL_OES_fragment_precision_high */ + +#ifndef GL_OES_geometry_point_size +#define GL_OES_geometry_point_size 1 +#endif /* GL_OES_geometry_point_size */ + +#ifndef GL_OES_geometry_shader +#define GL_OES_geometry_shader 1 +#define GL_GEOMETRY_SHADER_OES 0x8DD9 +#define GL_GEOMETRY_SHADER_BIT_OES 0x00000004 +#define GL_GEOMETRY_LINKED_VERTICES_OUT_OES 0x8916 +#define GL_GEOMETRY_LINKED_INPUT_TYPE_OES 0x8917 +#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_OES 0x8918 +#define GL_GEOMETRY_SHADER_INVOCATIONS_OES 0x887F +#define GL_LAYER_PROVOKING_VERTEX_OES 0x825E +#define GL_LINES_ADJACENCY_OES 0x000A +#define GL_LINE_STRIP_ADJACENCY_OES 0x000B +#define GL_TRIANGLES_ADJACENCY_OES 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_OES 0x000D +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8DDF +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_OES 0x8A2C +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8A32 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_OES 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES 0x9124 +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_OES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_OES 0x8DE1 +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_OES 0x8E5A +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_OES 0x8C29 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES 0x92CF +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_OES 0x92D5 +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_OES 0x90CD +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_OES 0x90D7 +#define GL_FIRST_VERTEX_CONVENTION_OES 0x8E4D +#define GL_LAST_VERTEX_CONVENTION_OES 0x8E4E +#define GL_UNDEFINED_VERTEX_OES 0x8260 +#define GL_PRIMITIVES_GENERATED_OES 0x8C87 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS_OES 0x9312 +#define GL_MAX_FRAMEBUFFER_LAYERS_OES 0x9317 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_OES 0x8DA8 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_OES 0x8DA7 +#define GL_REFERENCED_BY_GEOMETRY_SHADER_OES 0x9309 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREOESPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferTextureOES (GLenum target, GLenum attachment, GLuint texture, GLint level); +#endif +#endif /* GL_OES_geometry_shader */ + +#ifndef GL_OES_get_program_binary +#define GL_OES_get_program_binary 1 +#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE +#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF +typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length); +#endif +#endif /* GL_OES_get_program_binary */ + +#ifndef GL_OES_gpu_shader5 +#define GL_OES_gpu_shader5 1 +#endif /* GL_OES_gpu_shader5 */ + +#ifndef GL_OES_mapbuffer +#define GL_OES_mapbuffer 1 +#define GL_WRITE_ONLY_OES 0x88B9 +#define GL_BUFFER_ACCESS_OES 0x88BB +#define GL_BUFFER_MAPPED_OES 0x88BC +#define GL_BUFFER_MAP_POINTER_OES 0x88BD +typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); +GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); +GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params); +#endif +#endif /* GL_OES_mapbuffer */ + +#ifndef GL_OES_packed_depth_stencil +#define GL_OES_packed_depth_stencil 1 +#define GL_DEPTH_STENCIL_OES 0x84F9 +#define GL_UNSIGNED_INT_24_8_OES 0x84FA +#define GL_DEPTH24_STENCIL8_OES 0x88F0 +#endif /* GL_OES_packed_depth_stencil */ + +#ifndef GL_OES_primitive_bounding_box +#define GL_OES_primitive_bounding_box 1 +#define GL_PRIMITIVE_BOUNDING_BOX_OES 0x92BE +typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXOESPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxOES (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#endif +#endif /* GL_OES_primitive_bounding_box */ + +#ifndef GL_OES_required_internalformat +#define GL_OES_required_internalformat 1 +#define GL_ALPHA8_OES 0x803C +#define GL_DEPTH_COMPONENT16_OES 0x81A5 +#define GL_LUMINANCE4_ALPHA4_OES 0x8043 +#define GL_LUMINANCE8_ALPHA8_OES 0x8045 +#define GL_LUMINANCE8_OES 0x8040 +#define GL_RGBA4_OES 0x8056 +#define GL_RGB5_A1_OES 0x8057 +#define GL_RGB565_OES 0x8D62 +#define GL_RGB8_OES 0x8051 +#define GL_RGBA8_OES 0x8058 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB10_A2_EXT 0x8059 +#endif /* GL_OES_required_internalformat */ + +#ifndef GL_OES_rgb8_rgba8 +#define GL_OES_rgb8_rgba8 1 +#endif /* GL_OES_rgb8_rgba8 */ + +#ifndef GL_OES_sample_shading +#define GL_OES_sample_shading 1 +#define GL_SAMPLE_SHADING_OES 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE_OES 0x8C37 +typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGOESPROC) (GLfloat value); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value); +#endif +#endif /* GL_OES_sample_shading */ + +#ifndef GL_OES_sample_variables +#define GL_OES_sample_variables 1 +#endif /* GL_OES_sample_variables */ + +#ifndef GL_OES_shader_image_atomic +#define GL_OES_shader_image_atomic 1 +#endif /* GL_OES_shader_image_atomic */ + +#ifndef GL_OES_shader_io_blocks +#define GL_OES_shader_io_blocks 1 +#endif /* GL_OES_shader_io_blocks */ + +#ifndef GL_OES_shader_multisample_interpolation +#define GL_OES_shader_multisample_interpolation 1 +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5C +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES 0x8E5D +#endif /* GL_OES_shader_multisample_interpolation */ + +#ifndef GL_OES_standard_derivatives +#define GL_OES_standard_derivatives 1 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B +#endif /* GL_OES_standard_derivatives */ + +#ifndef GL_OES_stencil1 +#define GL_OES_stencil1 1 +#define GL_STENCIL_INDEX1_OES 0x8D46 +#endif /* GL_OES_stencil1 */ + +#ifndef GL_OES_stencil4 +#define GL_OES_stencil4 1 +#define GL_STENCIL_INDEX4_OES 0x8D47 +#endif /* GL_OES_stencil4 */ + +#ifndef GL_OES_surfaceless_context +#define GL_OES_surfaceless_context 1 +#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 +#endif /* GL_OES_surfaceless_context */ + +#ifndef GL_OES_tessellation_point_size +#define GL_OES_tessellation_point_size 1 +#endif /* GL_OES_tessellation_point_size */ + +#ifndef GL_OES_tessellation_shader +#define GL_OES_tessellation_shader 1 +#define GL_PATCHES_OES 0x000E +#define GL_PATCH_VERTICES_OES 0x8E72 +#define GL_TESS_CONTROL_OUTPUT_VERTICES_OES 0x8E75 +#define GL_TESS_GEN_MODE_OES 0x8E76 +#define GL_TESS_GEN_SPACING_OES 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER_OES 0x8E78 +#define GL_TESS_GEN_POINT_MODE_OES 0x8E79 +#define GL_ISOLINES_OES 0x8E7A +#define GL_QUADS_OES 0x0007 +#define GL_FRACTIONAL_ODD_OES 0x8E7B +#define GL_FRACTIONAL_EVEN_OES 0x8E7C +#define GL_MAX_PATCH_VERTICES_OES 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL_OES 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS_OES 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_OES 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E1F +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES 0x92CD +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES 0x92CE +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES 0x92D3 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES 0x92D4 +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES 0x90CB +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES 0x90CC +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES 0x90D8 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES 0x90D9 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES 0x8221 +#define GL_IS_PER_PATCH_OES 0x92E7 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_OES 0x9308 +#define GL_TESS_CONTROL_SHADER_OES 0x8E88 +#define GL_TESS_EVALUATION_SHADER_OES 0x8E87 +#define GL_TESS_CONTROL_SHADER_BIT_OES 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT_OES 0x00000010 +typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIOESPROC) (GLenum pname, GLint value); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPatchParameteriOES (GLenum pname, GLint value); +#endif +#endif /* GL_OES_tessellation_shader */ + +#ifndef GL_OES_texture_3D +#define GL_OES_texture_3D 1 +#define GL_TEXTURE_WRAP_R_OES 0x8072 +#define GL_TEXTURE_3D_OES 0x806F +#define GL_TEXTURE_BINDING_3D_OES 0x806A +#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 +#define GL_SAMPLER_3D_OES 0x8B5F +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 +typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +#endif +#endif /* GL_OES_texture_3D */ + +#ifndef GL_OES_texture_border_clamp +#define GL_OES_texture_border_clamp 1 +#define GL_TEXTURE_BORDER_COLOR_OES 0x1004 +#define GL_CLAMP_TO_BORDER_OES 0x812D +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexParameterIivOES (GLenum target, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glTexParameterIuivOES (GLenum target, GLenum pname, const GLuint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIivOES (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIuivOES (GLenum target, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glSamplerParameterIivOES (GLuint sampler, GLenum pname, const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterIuivOES (GLuint sampler, GLenum pname, const GLuint *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIivOES (GLuint sampler, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivOES (GLuint sampler, GLenum pname, GLuint *params); +#endif +#endif /* GL_OES_texture_border_clamp */ + +#ifndef GL_OES_texture_buffer +#define GL_OES_texture_buffer 1 +#define GL_TEXTURE_BUFFER_OES 0x8C2A +#define GL_TEXTURE_BUFFER_BINDING_OES 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_OES 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_OES 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_OES 0x8C2D +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_OES 0x919F +#define GL_SAMPLER_BUFFER_OES 0x8DC2 +#define GL_INT_SAMPLER_BUFFER_OES 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_OES 0x8DD8 +#define GL_IMAGE_BUFFER_OES 0x9051 +#define GL_INT_IMAGE_BUFFER_OES 0x905C +#define GL_UNSIGNED_INT_IMAGE_BUFFER_OES 0x9067 +#define GL_TEXTURE_BUFFER_OFFSET_OES 0x919D +#define GL_TEXTURE_BUFFER_SIZE_OES 0x919E +typedef void (GL_APIENTRYP PFNGLTEXBUFFEROESPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEOESPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexBufferOES (GLenum target, GLenum internalformat, GLuint buffer); +GL_APICALL void GL_APIENTRY glTexBufferRangeOES (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +#endif +#endif /* GL_OES_texture_buffer */ + +#ifndef GL_OES_texture_compression_astc +#define GL_OES_texture_compression_astc 1 +#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0 +#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1 +#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2 +#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3 +#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4 +#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5 +#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6 +#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7 +#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8 +#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9 +#endif /* GL_OES_texture_compression_astc */ + +#ifndef GL_OES_texture_cube_map_array +#define GL_OES_texture_cube_map_array 1 +#define GL_TEXTURE_CUBE_MAP_ARRAY_OES 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_OES 0x900A +#define GL_SAMPLER_CUBE_MAP_ARRAY_OES 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_OES 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900F +#define GL_IMAGE_CUBE_MAP_ARRAY_OES 0x9054 +#define GL_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x905F +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x906A +#endif /* GL_OES_texture_cube_map_array */ + +#ifndef GL_OES_texture_float +#define GL_OES_texture_float 1 +#endif /* GL_OES_texture_float */ + +#ifndef GL_OES_texture_float_linear +#define GL_OES_texture_float_linear 1 +#endif /* GL_OES_texture_float_linear */ + +#ifndef GL_OES_texture_half_float +#define GL_OES_texture_half_float 1 +#define GL_HALF_FLOAT_OES 0x8D61 +#endif /* GL_OES_texture_half_float */ + +#ifndef GL_OES_texture_half_float_linear +#define GL_OES_texture_half_float_linear 1 +#endif /* GL_OES_texture_half_float_linear */ + +#ifndef GL_OES_texture_npot +#define GL_OES_texture_npot 1 +#endif /* GL_OES_texture_npot */ + +#ifndef GL_OES_texture_stencil8 +#define GL_OES_texture_stencil8 1 +#define GL_STENCIL_INDEX_OES 0x1901 +#define GL_STENCIL_INDEX8_OES 0x8D48 +#endif /* GL_OES_texture_stencil8 */ + +#ifndef GL_OES_texture_storage_multisample_2d_array +#define GL_OES_texture_storage_multisample_2d_array 1 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES 0x9102 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES 0x9105 +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910B +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910C +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910D +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +#endif +#endif /* GL_OES_texture_storage_multisample_2d_array */ + +#ifndef GL_OES_texture_view +#define GL_OES_texture_view 1 +#define GL_TEXTURE_VIEW_MIN_LEVEL_OES 0x82DB +#define GL_TEXTURE_VIEW_NUM_LEVELS_OES 0x82DC +#define GL_TEXTURE_VIEW_MIN_LAYER_OES 0x82DD +#define GL_TEXTURE_VIEW_NUM_LAYERS_OES 0x82DE +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWOESPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTextureViewOES (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +#endif +#endif /* GL_OES_texture_view */ + +#ifndef GL_OES_vertex_array_object +#define GL_OES_vertex_array_object 1 +#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 +typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); +GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); +GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); +GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); +#endif +#endif /* GL_OES_vertex_array_object */ + +#ifndef GL_OES_vertex_half_float +#define GL_OES_vertex_half_float 1 +#endif /* GL_OES_vertex_half_float */ + +#ifndef GL_OES_vertex_type_10_10_10_2 +#define GL_OES_vertex_type_10_10_10_2 1 +#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 +#define GL_INT_10_10_10_2_OES 0x8DF7 +#endif /* GL_OES_vertex_type_10_10_10_2 */ + +#ifndef GL_OES_viewport_array +#define GL_OES_viewport_array 1 +#define GL_MAX_VIEWPORTS_OES 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS_OES 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE_OES 0x825D +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_OES 0x825F +typedef void (GL_APIENTRYP PFNGLVIEWPORTARRAYVOESPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFOESPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFVOESPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLSCISSORARRAYVOESPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDOESPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDVOESPROC) (GLuint index, const GLint *v); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEARRAYFVOESPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEINDEXEDFOESPROC) (GLuint index, GLfloat n, GLfloat f); +typedef void (GL_APIENTRYP PFNGLGETFLOATI_VOESPROC) (GLenum target, GLuint index, GLfloat *data); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glViewportArrayvOES (GLuint first, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glViewportIndexedfOES (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GL_APICALL void GL_APIENTRY glViewportIndexedfvOES (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glScissorArrayvOES (GLuint first, GLsizei count, const GLint *v); +GL_APICALL void GL_APIENTRY glScissorIndexedOES (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glScissorIndexedvOES (GLuint index, const GLint *v); +GL_APICALL void GL_APIENTRY glDepthRangeArrayfvOES (GLuint first, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glDepthRangeIndexedfOES (GLuint index, GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glGetFloati_vOES (GLenum target, GLuint index, GLfloat *data); +#endif +#endif /* GL_OES_viewport_array */ + +#ifndef GL_AMD_compressed_3DC_texture +#define GL_AMD_compressed_3DC_texture 1 +#define GL_3DC_X_AMD 0x87F9 +#define GL_3DC_XY_AMD 0x87FA +#endif /* GL_AMD_compressed_3DC_texture */ + +#ifndef GL_AMD_compressed_ATC_texture +#define GL_AMD_compressed_ATC_texture 1 +#define GL_ATC_RGB_AMD 0x8C92 +#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 +#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE +#endif /* GL_AMD_compressed_ATC_texture */ + +#ifndef GL_AMD_framebuffer_multisample_advanced +#define GL_AMD_framebuffer_multisample_advanced 1 +#define GL_RENDERBUFFER_STORAGE_SAMPLES_AMD 0x91B2 +#define GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD 0x91B3 +#define GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD 0x91B4 +#define GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD 0x91B5 +#define GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B6 +#define GL_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B7 +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAdvancedAMD (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glNamedRenderbufferStorageMultisampleAdvancedAMD (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +#endif /* GL_AMD_framebuffer_multisample_advanced */ + +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor 1 +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data); +typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data); +GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); +GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif +#endif /* GL_AMD_performance_monitor */ + +#ifndef GL_AMD_program_binary_Z400 +#define GL_AMD_program_binary_Z400 1 +#define GL_Z400_BINARY_AMD 0x8740 +#endif /* GL_AMD_program_binary_Z400 */ + +#ifndef GL_ANDROID_extension_pack_es31a +#define GL_ANDROID_extension_pack_es31a 1 +#endif /* GL_ANDROID_extension_pack_es31a */ + +#ifndef GL_ANGLE_depth_texture +#define GL_ANGLE_depth_texture 1 +#endif /* GL_ANGLE_depth_texture */ + +#ifndef GL_ANGLE_framebuffer_blit +#define GL_ANGLE_framebuffer_blit 1 +#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA +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); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif +#endif /* GL_ANGLE_framebuffer_blit */ + +#ifndef GL_ANGLE_framebuffer_multisample +#define GL_ANGLE_framebuffer_multisample 1 +#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 +#define GL_MAX_SAMPLES_ANGLE 0x8D57 +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +#endif /* GL_ANGLE_framebuffer_multisample */ + +#ifndef GL_ANGLE_instanced_arrays +#define GL_ANGLE_instanced_arrays 1 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor); +#endif +#endif /* GL_ANGLE_instanced_arrays */ + +#ifndef GL_ANGLE_pack_reverse_row_order +#define GL_ANGLE_pack_reverse_row_order 1 +#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 +#endif /* GL_ANGLE_pack_reverse_row_order */ + +#ifndef GL_ANGLE_program_binary +#define GL_ANGLE_program_binary 1 +#define GL_PROGRAM_BINARY_ANGLE 0x93A6 +#endif /* GL_ANGLE_program_binary */ + +#ifndef GL_ANGLE_texture_compression_dxt3 +#define GL_ANGLE_texture_compression_dxt3 1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 +#endif /* GL_ANGLE_texture_compression_dxt3 */ + +#ifndef GL_ANGLE_texture_compression_dxt5 +#define GL_ANGLE_texture_compression_dxt5 1 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 +#endif /* GL_ANGLE_texture_compression_dxt5 */ + +#ifndef GL_ANGLE_texture_usage +#define GL_ANGLE_texture_usage 1 +#define GL_TEXTURE_USAGE_ANGLE 0x93A2 +#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 +#endif /* GL_ANGLE_texture_usage */ + +#ifndef GL_ANGLE_translated_shader_source +#define GL_ANGLE_translated_shader_source 1 +#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 +typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +#endif +#endif /* GL_ANGLE_translated_shader_source */ + +#ifndef GL_APPLE_clip_distance +#define GL_APPLE_clip_distance 1 +#define GL_MAX_CLIP_DISTANCES_APPLE 0x0D32 +#define GL_CLIP_DISTANCE0_APPLE 0x3000 +#define GL_CLIP_DISTANCE1_APPLE 0x3001 +#define GL_CLIP_DISTANCE2_APPLE 0x3002 +#define GL_CLIP_DISTANCE3_APPLE 0x3003 +#define GL_CLIP_DISTANCE4_APPLE 0x3004 +#define GL_CLIP_DISTANCE5_APPLE 0x3005 +#define GL_CLIP_DISTANCE6_APPLE 0x3006 +#define GL_CLIP_DISTANCE7_APPLE 0x3007 +#endif /* GL_APPLE_clip_distance */ + +#ifndef GL_APPLE_color_buffer_packed_float +#define GL_APPLE_color_buffer_packed_float 1 +#endif /* GL_APPLE_color_buffer_packed_float */ + +#ifndef GL_APPLE_copy_texture_levels +#define GL_APPLE_copy_texture_levels 1 +typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +#endif +#endif /* GL_APPLE_copy_texture_levels */ + +#ifndef GL_APPLE_framebuffer_multisample +#define GL_APPLE_framebuffer_multisample 1 +#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 +#define GL_MAX_SAMPLES_APPLE 0x8D57 +#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); +#endif +#endif /* GL_APPLE_framebuffer_multisample */ + +#ifndef GL_APPLE_rgb_422 +#define GL_APPLE_rgb_422 1 +#define GL_RGB_422_APPLE 0x8A1F +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#define GL_RGB_RAW_422_APPLE 0x8A51 +#endif /* GL_APPLE_rgb_422 */ + +#ifndef GL_APPLE_sync +#define GL_APPLE_sync 1 +#define GL_SYNC_OBJECT_APPLE 0x8A53 +#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 +#define GL_OBJECT_TYPE_APPLE 0x9112 +#define GL_SYNC_CONDITION_APPLE 0x9113 +#define GL_SYNC_STATUS_APPLE 0x9114 +#define GL_SYNC_FLAGS_APPLE 0x9115 +#define GL_SYNC_FENCE_APPLE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 +#define GL_UNSIGNALED_APPLE 0x9118 +#define GL_SIGNALED_APPLE 0x9119 +#define GL_ALREADY_SIGNALED_APPLE 0x911A +#define GL_TIMEOUT_EXPIRED_APPLE 0x911B +#define GL_CONDITION_SATISFIED_APPLE 0x911C +#define GL_WAIT_FAILED_APPLE 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 +#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull +typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); +typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); +typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); +GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); +GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); +GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); +GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +#endif +#endif /* GL_APPLE_sync */ + +#ifndef GL_APPLE_texture_format_BGRA8888 +#define GL_APPLE_texture_format_BGRA8888 1 +#define GL_BGRA_EXT 0x80E1 +#define GL_BGRA8_EXT 0x93A1 +#endif /* GL_APPLE_texture_format_BGRA8888 */ + +#ifndef GL_APPLE_texture_max_level +#define GL_APPLE_texture_max_level 1 +#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D +#endif /* GL_APPLE_texture_max_level */ + +#ifndef GL_APPLE_texture_packed_float +#define GL_APPLE_texture_packed_float 1 +#define GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE 0x8C3B +#define GL_UNSIGNED_INT_5_9_9_9_REV_APPLE 0x8C3E +#define GL_R11F_G11F_B10F_APPLE 0x8C3A +#define GL_RGB9_E5_APPLE 0x8C3D +#endif /* GL_APPLE_texture_packed_float */ + +#ifndef GL_ARM_mali_program_binary +#define GL_ARM_mali_program_binary 1 +#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61 +#endif /* GL_ARM_mali_program_binary */ + +#ifndef GL_ARM_mali_shader_binary +#define GL_ARM_mali_shader_binary 1 +#define GL_MALI_SHADER_BINARY_ARM 0x8F60 +#endif /* GL_ARM_mali_shader_binary */ + +#ifndef GL_ARM_rgba8 +#define GL_ARM_rgba8 1 +#endif /* GL_ARM_rgba8 */ + +#ifndef GL_ARM_shader_framebuffer_fetch +#define GL_ARM_shader_framebuffer_fetch 1 +#define GL_FETCH_PER_SAMPLE_ARM 0x8F65 +#define GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM 0x8F66 +#endif /* GL_ARM_shader_framebuffer_fetch */ + +#ifndef GL_ARM_shader_framebuffer_fetch_depth_stencil +#define GL_ARM_shader_framebuffer_fetch_depth_stencil 1 +#endif /* GL_ARM_shader_framebuffer_fetch_depth_stencil */ + +#ifndef GL_ARM_texture_unnormalized_coordinates +#define GL_ARM_texture_unnormalized_coordinates 1 +#define GL_TEXTURE_UNNORMALIZED_COORDINATES_ARM 0x8F6A +#endif /* GL_ARM_texture_unnormalized_coordinates */ + +#ifndef GL_DMP_program_binary +#define GL_DMP_program_binary 1 +#define GL_SMAPHS30_PROGRAM_BINARY_DMP 0x9251 +#define GL_SMAPHS_PROGRAM_BINARY_DMP 0x9252 +#define GL_DMP_PROGRAM_BINARY_DMP 0x9253 +#endif /* GL_DMP_program_binary */ + +#ifndef GL_DMP_shader_binary +#define GL_DMP_shader_binary 1 +#define GL_SHADER_BINARY_DMP 0x9250 +#endif /* GL_DMP_shader_binary */ + +#ifndef GL_EXT_EGL_image_array +#define GL_EXT_EGL_image_array 1 +#endif /* GL_EXT_EGL_image_array */ + +#ifndef GL_EXT_EGL_image_storage +#define GL_EXT_EGL_image_storage 1 +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC) (GLenum target, GLeglImageOES image, const GLint* attrib_list); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC) (GLuint texture, GLeglImageOES image, const GLint* attrib_list); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glEGLImageTargetTexStorageEXT (GLenum target, GLeglImageOES image, const GLint* attrib_list); +GL_APICALL void GL_APIENTRY glEGLImageTargetTextureStorageEXT (GLuint texture, GLeglImageOES image, const GLint* attrib_list); +#endif +#endif /* GL_EXT_EGL_image_storage */ + +#ifndef GL_EXT_YUV_target +#define GL_EXT_YUV_target 1 +#define GL_SAMPLER_EXTERNAL_2D_Y2Y_EXT 0x8BE7 +#endif /* GL_EXT_YUV_target */ + +#ifndef GL_EXT_base_instance +#define GL_EXT_base_instance 1 +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawArraysInstancedBaseInstanceEXT (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +#endif +#endif /* GL_EXT_base_instance */ + +#ifndef GL_EXT_blend_func_extended +#define GL_EXT_blend_func_extended 1 +#define GL_SRC1_COLOR_EXT 0x88F9 +#define GL_SRC1_ALPHA_EXT 0x8589 +#define GL_ONE_MINUS_SRC1_COLOR_EXT 0x88FA +#define GL_ONE_MINUS_SRC1_ALPHA_EXT 0x88FB +#define GL_SRC_ALPHA_SATURATE_EXT 0x0308 +#define GL_LOCATION_INDEX_EXT 0x930F +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT 0x88FC +typedef void (GL_APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDEXTPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATAINDEXEXTPROC) (GLuint program, const GLchar *name); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBindFragDataLocationIndexedEXT (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +GL_APICALL void GL_APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); +GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocationIndexEXT (GLuint program, GLenum programInterface, const GLchar *name); +GL_APICALL GLint GL_APIENTRY glGetFragDataIndexEXT (GLuint program, const GLchar *name); +#endif +#endif /* GL_EXT_blend_func_extended */ + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#endif /* GL_EXT_blend_minmax */ + +#ifndef GL_EXT_buffer_storage +#define GL_EXT_buffer_storage 1 +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_PERSISTENT_BIT_EXT 0x0040 +#define GL_MAP_COHERENT_BIT_EXT 0x0080 +#define GL_DYNAMIC_STORAGE_BIT_EXT 0x0100 +#define GL_CLIENT_STORAGE_BIT_EXT 0x0200 +#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT 0x00004000 +#define GL_BUFFER_IMMUTABLE_STORAGE_EXT 0x821F +#define GL_BUFFER_STORAGE_FLAGS_EXT 0x8220 +typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEEXTPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBufferStorageEXT (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +#endif +#endif /* GL_EXT_buffer_storage */ + +#ifndef GL_EXT_clear_texture +#define GL_EXT_clear_texture 1 +typedef void (GL_APIENTRYP PFNGLCLEARTEXIMAGEEXTPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +typedef void (GL_APIENTRYP PFNGLCLEARTEXSUBIMAGEEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glClearTexImageEXT (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +GL_APICALL void GL_APIENTRY glClearTexSubImageEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); +#endif +#endif /* GL_EXT_clear_texture */ + +#ifndef GL_EXT_clip_control +#define GL_EXT_clip_control 1 +#define GL_LOWER_LEFT_EXT 0x8CA1 +#define GL_UPPER_LEFT_EXT 0x8CA2 +#define GL_NEGATIVE_ONE_TO_ONE_EXT 0x935E +#define GL_ZERO_TO_ONE_EXT 0x935F +#define GL_CLIP_ORIGIN_EXT 0x935C +#define GL_CLIP_DEPTH_MODE_EXT 0x935D +typedef void (GL_APIENTRYP PFNGLCLIPCONTROLEXTPROC) (GLenum origin, GLenum depth); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glClipControlEXT (GLenum origin, GLenum depth); +#endif +#endif /* GL_EXT_clip_control */ + +#ifndef GL_EXT_clip_cull_distance +#define GL_EXT_clip_cull_distance 1 +#define GL_MAX_CLIP_DISTANCES_EXT 0x0D32 +#define GL_MAX_CULL_DISTANCES_EXT 0x82F9 +#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT 0x82FA +#define GL_CLIP_DISTANCE0_EXT 0x3000 +#define GL_CLIP_DISTANCE1_EXT 0x3001 +#define GL_CLIP_DISTANCE2_EXT 0x3002 +#define GL_CLIP_DISTANCE3_EXT 0x3003 +#define GL_CLIP_DISTANCE4_EXT 0x3004 +#define GL_CLIP_DISTANCE5_EXT 0x3005 +#define GL_CLIP_DISTANCE6_EXT 0x3006 +#define GL_CLIP_DISTANCE7_EXT 0x3007 +#endif /* GL_EXT_clip_cull_distance */ + +#ifndef GL_EXT_color_buffer_float +#define GL_EXT_color_buffer_float 1 +#endif /* GL_EXT_color_buffer_float */ + +#ifndef GL_EXT_color_buffer_half_float +#define GL_EXT_color_buffer_half_float 1 +#define GL_RGBA16F_EXT 0x881A +#define GL_RGB16F_EXT 0x881B +#define GL_RG16F_EXT 0x822F +#define GL_R16F_EXT 0x822D +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211 +#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17 +#endif /* GL_EXT_color_buffer_half_float */ + +#ifndef GL_EXT_conservative_depth +#define GL_EXT_conservative_depth 1 +#endif /* GL_EXT_conservative_depth */ + +#ifndef GL_EXT_copy_image +#define GL_EXT_copy_image 1 +typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (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); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (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); +#endif +#endif /* GL_EXT_copy_image */ + +#ifndef GL_EXT_debug_label +#define GL_EXT_debug_label 1 +#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F +#define GL_PROGRAM_OBJECT_EXT 0x8B40 +#define GL_SHADER_OBJECT_EXT 0x8B48 +#define GL_BUFFER_OBJECT_EXT 0x9151 +#define GL_QUERY_OBJECT_EXT 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 +#define GL_TRANSFORM_FEEDBACK 0x8E22 +typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif +#endif /* GL_EXT_debug_label */ + +#ifndef GL_EXT_debug_marker +#define GL_EXT_debug_marker 1 +typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); +GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); +GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); +#endif +#endif /* GL_EXT_debug_marker */ + +#ifndef GL_EXT_depth_clamp +#define GL_EXT_depth_clamp 1 +#define GL_DEPTH_CLAMP_EXT 0x864F +#endif /* GL_EXT_depth_clamp */ + +#ifndef GL_EXT_discard_framebuffer +#define GL_EXT_discard_framebuffer 1 +#define GL_COLOR_EXT 0x1800 +#define GL_DEPTH_EXT 0x1801 +#define GL_STENCIL_EXT 0x1802 +typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#endif +#endif /* GL_EXT_discard_framebuffer */ + +#ifndef GL_EXT_disjoint_timer_query +#define GL_EXT_disjoint_timer_query 1 +#define GL_QUERY_COUNTER_BITS_EXT 0x8864 +#define GL_CURRENT_QUERY_EXT 0x8865 +#define GL_QUERY_RESULT_EXT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 +#define GL_TIME_ELAPSED_EXT 0x88BF +#define GL_TIMESTAMP_EXT 0x8E28 +#define GL_GPU_DISJOINT_EXT 0x8FBB +typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids); +typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id); +typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id); +typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target); +typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64VEXTPROC) (GLenum pname, GLint64 *data); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids); +GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids); +GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id); +GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target); +GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target); +GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params); +GL_APICALL void GL_APIENTRY glGetInteger64vEXT (GLenum pname, GLint64 *data); +#endif +#endif /* GL_EXT_disjoint_timer_query */ + +#ifndef GL_EXT_draw_buffers +#define GL_EXT_draw_buffers 1 +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_MAX_DRAW_BUFFERS_EXT 0x8824 +#define GL_DRAW_BUFFER0_EXT 0x8825 +#define GL_DRAW_BUFFER1_EXT 0x8826 +#define GL_DRAW_BUFFER2_EXT 0x8827 +#define GL_DRAW_BUFFER3_EXT 0x8828 +#define GL_DRAW_BUFFER4_EXT 0x8829 +#define GL_DRAW_BUFFER5_EXT 0x882A +#define GL_DRAW_BUFFER6_EXT 0x882B +#define GL_DRAW_BUFFER7_EXT 0x882C +#define GL_DRAW_BUFFER8_EXT 0x882D +#define GL_DRAW_BUFFER9_EXT 0x882E +#define GL_DRAW_BUFFER10_EXT 0x882F +#define GL_DRAW_BUFFER11_EXT 0x8830 +#define GL_DRAW_BUFFER12_EXT 0x8831 +#define GL_DRAW_BUFFER13_EXT 0x8832 +#define GL_DRAW_BUFFER14_EXT 0x8833 +#define GL_DRAW_BUFFER15_EXT 0x8834 +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs); +#endif +#endif /* GL_EXT_draw_buffers */ + +#ifndef GL_EXT_draw_buffers_indexed +#define GL_EXT_draw_buffers_indexed 1 +typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, GLuint index); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glEnableiEXT (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glDisableiEXT (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glBlendEquationiEXT (GLuint buf, GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, GLenum dst); +GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index); +#endif +#endif /* GL_EXT_draw_buffers_indexed */ + +#ifndef GL_EXT_draw_elements_base_vertex +#define GL_EXT_draw_elements_base_vertex 1 +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawElementsBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertexEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +#endif +#endif /* GL_EXT_draw_elements_base_vertex */ + +#ifndef GL_EXT_draw_instanced +#define GL_EXT_draw_instanced 1 +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#endif +#endif /* GL_EXT_draw_instanced */ + +#ifndef GL_EXT_draw_transform_feedback +#define GL_EXT_draw_transform_feedback 1 +typedef void (GL_APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKEXTPROC) (GLenum mode, GLuint id); +typedef void (GL_APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDEXTPROC) (GLenum mode, GLuint id, GLsizei instancecount); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawTransformFeedbackEXT (GLenum mode, GLuint id); +GL_APICALL void GL_APIENTRY glDrawTransformFeedbackInstancedEXT (GLenum mode, GLuint id, GLsizei instancecount); +#endif +#endif /* GL_EXT_draw_transform_feedback */ + +#ifndef GL_EXT_external_buffer +#define GL_EXT_external_buffer 1 +typedef void *GLeglClientBufferEXT; +typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEEXTERNALEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTERNALEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBufferStorageExternalEXT (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +GL_APICALL void GL_APIENTRY glNamedBufferStorageExternalEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +#endif +#endif /* GL_EXT_external_buffer */ + +#ifndef GL_EXT_float_blend +#define GL_EXT_float_blend 1 +#endif /* GL_EXT_float_blend */ + +#ifndef GL_EXT_geometry_point_size +#define GL_EXT_geometry_point_size 1 +#endif /* GL_EXT_geometry_point_size */ + +#ifndef GL_EXT_geometry_shader +#define GL_EXT_geometry_shader 1 +#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +#define GL_GEOMETRY_SHADER_BIT_EXT 0x00000004 +#define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916 +#define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917 +#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918 +#define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F +#define GL_LAYER_PROVOKING_VERTEX_EXT 0x825E +#define GL_LINES_ADJACENCY_EXT 0x000A +#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B +#define GL_TRIANGLES_ADJACENCY_EXT 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124 +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5 +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7 +#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D +#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E +#define GL_UNDEFINED_VERTEX_EXT 0x8260 +#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312 +#define GL_MAX_FRAMEBUFFER_LAYERS_EXT 0x9317 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); +#endif +#endif /* GL_EXT_geometry_shader */ + +#ifndef GL_EXT_gpu_shader5 +#define GL_EXT_gpu_shader5 1 +#endif /* GL_EXT_gpu_shader5 */ + +#ifndef GL_EXT_instanced_arrays +#define GL_EXT_instanced_arrays 1 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, GLuint divisor); +#endif +#endif /* GL_EXT_instanced_arrays */ + +#ifndef GL_EXT_map_buffer_range +#define GL_EXT_map_buffer_range 1 +#define GL_MAP_READ_BIT_EXT 0x0001 +#define GL_MAP_WRITE_BIT_EXT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 +typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); +#endif +#endif /* GL_EXT_map_buffer_range */ + +#ifndef GL_EXT_memory_object +#define GL_EXT_memory_object 1 +#define GL_TEXTURE_TILING_EXT 0x9580 +#define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581 +#define GL_PROTECTED_MEMORY_OBJECT_EXT 0x959B +#define GL_NUM_TILING_TYPES_EXT 0x9582 +#define GL_TILING_TYPES_EXT 0x9583 +#define GL_OPTIMAL_TILING_EXT 0x9584 +#define GL_LINEAR_TILING_EXT 0x9585 +#define GL_NUM_DEVICE_UUIDS_EXT 0x9596 +#define GL_DEVICE_UUID_EXT 0x9597 +#define GL_DRIVER_UUID_EXT 0x9598 +#define GL_UUID_SIZE_EXT 16 +typedef void (GL_APIENTRYP PFNGLGETUNSIGNEDBYTEVEXTPROC) (GLenum pname, GLubyte *data); +typedef void (GL_APIENTRYP PFNGLGETUNSIGNEDBYTEI_VEXTPROC) (GLenum target, GLuint index, GLubyte *data); +typedef void (GL_APIENTRYP PFNGLDELETEMEMORYOBJECTSEXTPROC) (GLsizei n, const GLuint *memoryObjects); +typedef GLboolean (GL_APIENTRYP PFNGLISMEMORYOBJECTEXTPROC) (GLuint memoryObject); +typedef void (GL_APIENTRYP PFNGLCREATEMEMORYOBJECTSEXTPROC) (GLsizei n, GLuint *memoryObjects); +typedef void (GL_APIENTRYP PFNGLMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLGETMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM2DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM3DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEMEMEXTPROC) (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM2DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM2DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM3DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM3DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERSTORAGEMEMEXTPROC) (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetUnsignedBytevEXT (GLenum pname, GLubyte *data); +GL_APICALL void GL_APIENTRY glGetUnsignedBytei_vEXT (GLenum target, GLuint index, GLubyte *data); +GL_APICALL void GL_APIENTRY glDeleteMemoryObjectsEXT (GLsizei n, const GLuint *memoryObjects); +GL_APICALL GLboolean GL_APIENTRY glIsMemoryObjectEXT (GLuint memoryObject); +GL_APICALL void GL_APIENTRY glCreateMemoryObjectsEXT (GLsizei n, GLuint *memoryObjects); +GL_APICALL void GL_APIENTRY glMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glGetMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glTexStorageMem2DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glTexStorageMem2DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glTexStorageMem3DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glTexStorageMem3DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glBufferStorageMemEXT (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glTextureStorageMem2DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glTextureStorageMem2DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glTextureStorageMem3DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glTextureStorageMem3DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glNamedBufferStorageMemEXT (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset); +#endif +#endif /* GL_EXT_memory_object */ + +#ifndef GL_EXT_memory_object_fd +#define GL_EXT_memory_object_fd 1 +#define GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586 +typedef void (GL_APIENTRYP PFNGLIMPORTMEMORYFDEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, GLint fd); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glImportMemoryFdEXT (GLuint memory, GLuint64 size, GLenum handleType, GLint fd); +#endif +#endif /* GL_EXT_memory_object_fd */ + +#ifndef GL_EXT_memory_object_win32 +#define GL_EXT_memory_object_win32 1 +#define GL_HANDLE_TYPE_OPAQUE_WIN32_EXT 0x9587 +#define GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT 0x9588 +#define GL_DEVICE_LUID_EXT 0x9599 +#define GL_DEVICE_NODE_MASK_EXT 0x959A +#define GL_LUID_SIZE_EXT 8 +#define GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT 0x9589 +#define GL_HANDLE_TYPE_D3D12_RESOURCE_EXT 0x958A +#define GL_HANDLE_TYPE_D3D11_IMAGE_EXT 0x958B +#define GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT 0x958C +typedef void (GL_APIENTRYP PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, void *handle); +typedef void (GL_APIENTRYP PFNGLIMPORTMEMORYWIN32NAMEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, const void *name); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glImportMemoryWin32HandleEXT (GLuint memory, GLuint64 size, GLenum handleType, void *handle); +GL_APICALL void GL_APIENTRY glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GLenum handleType, const void *name); +#endif +#endif /* GL_EXT_memory_object_win32 */ + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +#endif +#endif /* GL_EXT_multi_draw_arrays */ + +#ifndef GL_EXT_multi_draw_indirect +#define GL_EXT_multi_draw_indirect 1 +typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTEXTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTEXTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glMultiDrawArraysIndirectEXT (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +GL_APICALL void GL_APIENTRY glMultiDrawElementsIndirectEXT (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +#endif +#endif /* GL_EXT_multi_draw_indirect */ + +#ifndef GL_EXT_multisampled_compatibility +#define GL_EXT_multisampled_compatibility 1 +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#endif /* GL_EXT_multisampled_compatibility */ + +#ifndef GL_EXT_multisampled_render_to_texture +#define GL_EXT_multisampled_render_to_texture 1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#endif +#endif /* GL_EXT_multisampled_render_to_texture */ + +#ifndef GL_EXT_multisampled_render_to_texture2 +#define GL_EXT_multisampled_render_to_texture2 1 +#endif /* GL_EXT_multisampled_render_to_texture2 */ + +#ifndef GL_EXT_multiview_draw_buffers +#define GL_EXT_multiview_draw_buffers 1 +#define GL_COLOR_ATTACHMENT_EXT 0x90F0 +#define GL_MULTIVIEW_EXT 0x90F1 +#define GL_DRAW_BUFFER_EXT 0x0C01 +#define GL_READ_BUFFER_EXT 0x0C02 +#define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2 +typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index); +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices); +typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index); +GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices); +GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data); +#endif +#endif /* GL_EXT_multiview_draw_buffers */ + +#ifndef GL_EXT_multiview_tessellation_geometry_shader +#define GL_EXT_multiview_tessellation_geometry_shader 1 +#endif /* GL_EXT_multiview_tessellation_geometry_shader */ + +#ifndef GL_EXT_multiview_texture_multisample +#define GL_EXT_multiview_texture_multisample 1 +#endif /* GL_EXT_multiview_texture_multisample */ + +#ifndef GL_EXT_multiview_timer_query +#define GL_EXT_multiview_timer_query 1 +#endif /* GL_EXT_multiview_timer_query */ + +#ifndef GL_EXT_occlusion_query_boolean +#define GL_EXT_occlusion_query_boolean 1 +#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A +#endif /* GL_EXT_occlusion_query_boolean */ + +#ifndef GL_EXT_polygon_offset_clamp +#define GL_EXT_polygon_offset_clamp 1 +#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp); +#endif +#endif /* GL_EXT_polygon_offset_clamp */ + +#ifndef GL_EXT_post_depth_coverage +#define GL_EXT_post_depth_coverage 1 +#endif /* GL_EXT_post_depth_coverage */ + +#ifndef GL_EXT_primitive_bounding_box +#define GL_EXT_primitive_bounding_box 1 +#define GL_PRIMITIVE_BOUNDING_BOX_EXT 0x92BE +typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#endif +#endif /* GL_EXT_primitive_bounding_box */ + +#ifndef GL_EXT_protected_textures +#define GL_EXT_protected_textures 1 +#define GL_CONTEXT_FLAG_PROTECTED_CONTENT_BIT_EXT 0x00000010 +#define GL_TEXTURE_PROTECTED_EXT 0x8BFA +#endif /* GL_EXT_protected_textures */ + +#ifndef GL_EXT_pvrtc_sRGB +#define GL_EXT_pvrtc_sRGB 1 +#define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54 +#define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55 +#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56 +#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57 +#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0 +#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1 +#endif /* GL_EXT_pvrtc_sRGB */ + +#ifndef GL_EXT_raster_multisample +#define GL_EXT_raster_multisample 1 +#define GL_RASTER_MULTISAMPLE_EXT 0x9327 +#define GL_RASTER_SAMPLES_EXT 0x9328 +#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 +#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A +#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B +#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C +typedef void (GL_APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations); +#endif +#endif /* GL_EXT_raster_multisample */ + +#ifndef GL_EXT_read_format_bgra +#define GL_EXT_read_format_bgra 1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 +#endif /* GL_EXT_read_format_bgra */ + +#ifndef GL_EXT_render_snorm +#define GL_EXT_render_snorm 1 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM_EXT 0x8F98 +#define GL_RG16_SNORM_EXT 0x8F99 +#define GL_RGBA16_SNORM_EXT 0x8F9B +#endif /* GL_EXT_render_snorm */ + +#ifndef GL_EXT_robustness +#define GL_EXT_robustness 1 +#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 +#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 +#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 +#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 +#define GL_NO_RESET_NOTIFICATION_EXT 0x8261 +typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); +typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); +GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); +#endif +#endif /* GL_EXT_robustness */ + +#ifndef GL_EXT_sRGB +#define GL_EXT_sRGB 1 +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 +#endif /* GL_EXT_sRGB */ + +#ifndef GL_EXT_sRGB_write_control +#define GL_EXT_sRGB_write_control 1 +#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +#endif /* GL_EXT_sRGB_write_control */ + +#ifndef GL_EXT_semaphore +#define GL_EXT_semaphore 1 +#define GL_LAYOUT_GENERAL_EXT 0x958D +#define GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E +#define GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F +#define GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590 +#define GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591 +#define GL_LAYOUT_TRANSFER_SRC_EXT 0x9592 +#define GL_LAYOUT_TRANSFER_DST_EXT 0x9593 +#define GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT 0x9530 +#define GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT 0x9531 +typedef void (GL_APIENTRYP PFNGLGENSEMAPHORESEXTPROC) (GLsizei n, GLuint *semaphores); +typedef void (GL_APIENTRYP PFNGLDELETESEMAPHORESEXTPROC) (GLsizei n, const GLuint *semaphores); +typedef GLboolean (GL_APIENTRYP PFNGLISSEMAPHOREEXTPROC) (GLuint semaphore); +typedef void (GL_APIENTRYP PFNGLSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, const GLuint64 *params); +typedef void (GL_APIENTRYP PFNGLGETSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, GLuint64 *params); +typedef void (GL_APIENTRYP PFNGLWAITSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts); +typedef void (GL_APIENTRYP PFNGLSIGNALSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGenSemaphoresEXT (GLsizei n, GLuint *semaphores); +GL_APICALL void GL_APIENTRY glDeleteSemaphoresEXT (GLsizei n, const GLuint *semaphores); +GL_APICALL GLboolean GL_APIENTRY glIsSemaphoreEXT (GLuint semaphore); +GL_APICALL void GL_APIENTRY glSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, const GLuint64 *params); +GL_APICALL void GL_APIENTRY glGetSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, GLuint64 *params); +GL_APICALL void GL_APIENTRY glWaitSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts); +GL_APICALL void GL_APIENTRY glSignalSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts); +#endif +#endif /* GL_EXT_semaphore */ + +#ifndef GL_EXT_semaphore_fd +#define GL_EXT_semaphore_fd 1 +typedef void (GL_APIENTRYP PFNGLIMPORTSEMAPHOREFDEXTPROC) (GLuint semaphore, GLenum handleType, GLint fd); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glImportSemaphoreFdEXT (GLuint semaphore, GLenum handleType, GLint fd); +#endif +#endif /* GL_EXT_semaphore_fd */ + +#ifndef GL_EXT_semaphore_win32 +#define GL_EXT_semaphore_win32 1 +#define GL_HANDLE_TYPE_D3D12_FENCE_EXT 0x9594 +#define GL_D3D12_FENCE_VALUE_EXT 0x9595 +typedef void (GL_APIENTRYP PFNGLIMPORTSEMAPHOREWIN32HANDLEEXTPROC) (GLuint semaphore, GLenum handleType, void *handle); +typedef void (GL_APIENTRYP PFNGLIMPORTSEMAPHOREWIN32NAMEEXTPROC) (GLuint semaphore, GLenum handleType, const void *name); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glImportSemaphoreWin32HandleEXT (GLuint semaphore, GLenum handleType, void *handle); +GL_APICALL void GL_APIENTRY glImportSemaphoreWin32NameEXT (GLuint semaphore, GLenum handleType, const void *name); +#endif +#endif /* GL_EXT_semaphore_win32 */ + +#ifndef GL_EXT_separate_shader_objects +#define GL_EXT_separate_shader_objects 1 +#define GL_ACTIVE_PROGRAM_EXT 0x8259 +#define GL_VERTEX_SHADER_BIT_EXT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002 +#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE_EXT 0x8258 +#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A +typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program); +typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline); +typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings); +typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines); +typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program); +GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline); +GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings); +GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines); +GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines); +GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params); +GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline); +GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); +GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); +GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program); +GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline); +GL_APICALL void GL_APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); +GL_APICALL void GL_APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); +GL_APICALL void GL_APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GL_APICALL void GL_APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif +#endif /* GL_EXT_separate_shader_objects */ + +#ifndef GL_EXT_shader_framebuffer_fetch +#define GL_EXT_shader_framebuffer_fetch 1 +#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 +#endif /* GL_EXT_shader_framebuffer_fetch */ + +#ifndef GL_EXT_shader_framebuffer_fetch_non_coherent +#define GL_EXT_shader_framebuffer_fetch_non_coherent 1 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFETCHBARRIEREXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferFetchBarrierEXT (void); +#endif +#endif /* GL_EXT_shader_framebuffer_fetch_non_coherent */ + +#ifndef GL_EXT_shader_group_vote +#define GL_EXT_shader_group_vote 1 +#endif /* GL_EXT_shader_group_vote */ + +#ifndef GL_EXT_shader_implicit_conversions +#define GL_EXT_shader_implicit_conversions 1 +#endif /* GL_EXT_shader_implicit_conversions */ + +#ifndef GL_EXT_shader_integer_mix +#define GL_EXT_shader_integer_mix 1 +#endif /* GL_EXT_shader_integer_mix */ + +#ifndef GL_EXT_shader_io_blocks +#define GL_EXT_shader_io_blocks 1 +#endif /* GL_EXT_shader_io_blocks */ + +#ifndef GL_EXT_shader_non_constant_global_initializers +#define GL_EXT_shader_non_constant_global_initializers 1 +#endif /* GL_EXT_shader_non_constant_global_initializers */ + +#ifndef GL_EXT_shader_pixel_local_storage +#define GL_EXT_shader_pixel_local_storage 1 +#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63 +#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT 0x8F67 +#define GL_SHADER_PIXEL_LOCAL_STORAGE_EXT 0x8F64 +#endif /* GL_EXT_shader_pixel_local_storage */ + +#ifndef GL_EXT_shader_pixel_local_storage2 +#define GL_EXT_shader_pixel_local_storage2 1 +#define GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_FAST_SIZE_EXT 0x9650 +#define GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_SIZE_EXT 0x9651 +#define GL_FRAMEBUFFER_INCOMPLETE_INSUFFICIENT_SHADER_COMBINED_LOCAL_STORAGE_EXT 0x9652 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target, GLsizei size); +typedef GLsizei (GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target); +typedef void (GL_APIENTRYP PFNGLCLEARPIXELLOCALSTORAGEUIEXTPROC) (GLsizei offset, GLsizei n, const GLuint *values); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferPixelLocalStorageSizeEXT (GLuint target, GLsizei size); +GL_APICALL GLsizei GL_APIENTRY glGetFramebufferPixelLocalStorageSizeEXT (GLuint target); +GL_APICALL void GL_APIENTRY glClearPixelLocalStorageuiEXT (GLsizei offset, GLsizei n, const GLuint *values); +#endif +#endif /* GL_EXT_shader_pixel_local_storage2 */ + +#ifndef GL_EXT_shader_texture_lod +#define GL_EXT_shader_texture_lod 1 +#endif /* GL_EXT_shader_texture_lod */ + +#ifndef GL_EXT_shadow_samplers +#define GL_EXT_shadow_samplers 1 +#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C +#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D +#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E +#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62 +#endif /* GL_EXT_shadow_samplers */ + +#ifndef GL_EXT_sparse_texture +#define GL_EXT_sparse_texture 1 +#define GL_TEXTURE_SPARSE_EXT 0x91A6 +#define GL_VIRTUAL_PAGE_SIZE_INDEX_EXT 0x91A7 +#define GL_NUM_SPARSE_LEVELS_EXT 0x91AA +#define GL_NUM_VIRTUAL_PAGE_SIZES_EXT 0x91A8 +#define GL_VIRTUAL_PAGE_SIZE_X_EXT 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_Y_EXT 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Z_EXT 0x9197 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_TEXTURE_3D 0x806F +#define GL_MAX_SPARSE_TEXTURE_SIZE_EXT 0x9198 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_EXT 0x9199 +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_EXT 0x919A +#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_EXT 0x91A9 +typedef void (GL_APIENTRYP PFNGLTEXPAGECOMMITMENTEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexPageCommitmentEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#endif +#endif /* GL_EXT_sparse_texture */ + +#ifndef GL_EXT_sparse_texture2 +#define GL_EXT_sparse_texture2 1 +#endif /* GL_EXT_sparse_texture2 */ + +#ifndef GL_EXT_tessellation_point_size +#define GL_EXT_tessellation_point_size 1 +#endif /* GL_EXT_tessellation_point_size */ + +#ifndef GL_EXT_tessellation_shader +#define GL_EXT_tessellation_shader 1 +#define GL_PATCHES_EXT 0x000E +#define GL_PATCH_VERTICES_EXT 0x8E72 +#define GL_TESS_CONTROL_OUTPUT_VERTICES_EXT 0x8E75 +#define GL_TESS_GEN_MODE_EXT 0x8E76 +#define GL_TESS_GEN_SPACING_EXT 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER_EXT 0x8E78 +#define GL_TESS_GEN_POINT_MODE_EXT 0x8E79 +#define GL_ISOLINES_EXT 0x8E7A +#define GL_QUADS_EXT 0x0007 +#define GL_FRACTIONAL_ODD_EXT 0x8E7B +#define GL_FRACTIONAL_EVEN_EXT 0x8E7C +#define GL_MAX_PATCH_VERTICES_EXT 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL_EXT 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS_EXT 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT 0x92CE +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT 0x92D3 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT 0x92D4 +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT 0x90CB +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT 0x90CC +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT 0x90D8 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT 0x90D9 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 +#define GL_IS_PER_PATCH_EXT 0x92E7 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT 0x9308 +#define GL_TESS_CONTROL_SHADER_EXT 0x8E88 +#define GL_TESS_EVALUATION_SHADER_EXT 0x8E87 +#define GL_TESS_CONTROL_SHADER_BIT_EXT 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010 +typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value); +#endif +#endif /* GL_EXT_tessellation_shader */ + +#ifndef GL_EXT_texture_border_clamp +#define GL_EXT_texture_border_clamp 1 +#define GL_TEXTURE_BORDER_COLOR_EXT 0x1004 +#define GL_CLAMP_TO_BORDER_EXT 0x812D +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, GLenum pname, const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, GLenum pname, const GLuint *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum pname, GLuint *params); +#endif +#endif /* GL_EXT_texture_border_clamp */ + +#ifndef GL_EXT_texture_buffer +#define GL_EXT_texture_buffer 1 +#define GL_TEXTURE_BUFFER_EXT 0x8C2A +#define GL_TEXTURE_BUFFER_BINDING_EXT 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT 0x919F +#define GL_SAMPLER_BUFFER_EXT 0x8DC2 +#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +#define GL_IMAGE_BUFFER_EXT 0x9051 +#define GL_INT_IMAGE_BUFFER_EXT 0x905C +#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 +#define GL_TEXTURE_BUFFER_OFFSET_EXT 0x919D +#define GL_TEXTURE_BUFFER_SIZE_EXT 0x919E +typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); +GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +#endif +#endif /* GL_EXT_texture_buffer */ + +#ifndef GL_EXT_texture_compression_astc_decode_mode +#define GL_EXT_texture_compression_astc_decode_mode 1 +#define GL_TEXTURE_ASTC_DECODE_PRECISION_EXT 0x8F69 +#endif /* GL_EXT_texture_compression_astc_decode_mode */ + +#ifndef GL_EXT_texture_compression_bptc +#define GL_EXT_texture_compression_bptc 1 +#define GL_COMPRESSED_RGBA_BPTC_UNORM_EXT 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT 0x8E8F +#endif /* GL_EXT_texture_compression_bptc */ + +#ifndef GL_EXT_texture_compression_dxt1 +#define GL_EXT_texture_compression_dxt1 1 +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#endif /* GL_EXT_texture_compression_dxt1 */ + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_EXT_texture_compression_rgtc 1 +#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +#endif /* GL_EXT_texture_compression_rgtc */ + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_EXT_texture_compression_s3tc 1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif /* GL_EXT_texture_compression_s3tc */ + +#ifndef GL_EXT_texture_compression_s3tc_srgb +#define GL_EXT_texture_compression_s3tc_srgb 1 +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#endif /* GL_EXT_texture_compression_s3tc_srgb */ + +#ifndef GL_EXT_texture_cube_map_array +#define GL_EXT_texture_cube_map_array 1 +#define GL_TEXTURE_CUBE_MAP_ARRAY_EXT 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A +#define GL_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F +#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 +#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A +#endif /* GL_EXT_texture_cube_map_array */ + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif /* GL_EXT_texture_filter_anisotropic */ + +#ifndef GL_EXT_texture_filter_minmax +#define GL_EXT_texture_filter_minmax 1 +#define GL_TEXTURE_REDUCTION_MODE_EXT 0x9366 +#define GL_WEIGHTED_AVERAGE_EXT 0x9367 +#endif /* GL_EXT_texture_filter_minmax */ + +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_EXT_texture_format_BGRA8888 1 +#endif /* GL_EXT_texture_format_BGRA8888 */ + +#ifndef GL_EXT_texture_format_sRGB_override +#define GL_EXT_texture_format_sRGB_override 1 +#define GL_TEXTURE_FORMAT_SRGB_OVERRIDE_EXT 0x8FBF +#endif /* GL_EXT_texture_format_sRGB_override */ + +#ifndef GL_EXT_texture_mirror_clamp_to_edge +#define GL_EXT_texture_mirror_clamp_to_edge 1 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#endif /* GL_EXT_texture_mirror_clamp_to_edge */ + +#ifndef GL_EXT_texture_norm16 +#define GL_EXT_texture_norm16 1 +#define GL_R16_EXT 0x822A +#define GL_RG16_EXT 0x822C +#define GL_RGBA16_EXT 0x805B +#define GL_RGB16_EXT 0x8054 +#define GL_RGB16_SNORM_EXT 0x8F9A +#endif /* GL_EXT_texture_norm16 */ + +#ifndef GL_EXT_texture_query_lod +#define GL_EXT_texture_query_lod 1 +#endif /* GL_EXT_texture_query_lod */ + +#ifndef GL_EXT_texture_rg +#define GL_EXT_texture_rg 1 +#define GL_RED_EXT 0x1903 +#define GL_RG_EXT 0x8227 +#define GL_R8_EXT 0x8229 +#define GL_RG8_EXT 0x822B +#endif /* GL_EXT_texture_rg */ + +#ifndef GL_EXT_texture_sRGB_R8 +#define GL_EXT_texture_sRGB_R8 1 +#define GL_SR8_EXT 0x8FBD +#endif /* GL_EXT_texture_sRGB_R8 */ + +#ifndef GL_EXT_texture_sRGB_RG8 +#define GL_EXT_texture_sRGB_RG8 1 +#define GL_SRG8_EXT 0x8FBE +#endif /* GL_EXT_texture_sRGB_RG8 */ + +#ifndef GL_EXT_texture_sRGB_decode +#define GL_EXT_texture_sRGB_decode 1 +#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 +#define GL_DECODE_EXT 0x8A49 +#define GL_SKIP_DECODE_EXT 0x8A4A +#endif /* GL_EXT_texture_sRGB_decode */ + +#ifndef GL_EXT_texture_shadow_lod +#define GL_EXT_texture_shadow_lod 1 +#endif /* GL_EXT_texture_shadow_lod */ + +#ifndef GL_EXT_texture_storage +#define GL_EXT_texture_storage 1 +#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F +#define GL_ALPHA8_EXT 0x803C +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_RGBA32F_EXT 0x8814 +#define GL_RGB32F_EXT 0x8815 +#define GL_ALPHA32F_EXT 0x8816 +#define GL_LUMINANCE32F_EXT 0x8818 +#define GL_LUMINANCE_ALPHA32F_EXT 0x8819 +#define GL_ALPHA16F_EXT 0x881C +#define GL_LUMINANCE16F_EXT 0x881E +#define GL_LUMINANCE_ALPHA16F_EXT 0x881F +#define GL_R32F_EXT 0x822E +#define GL_RG32F_EXT 0x8230 +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#endif +#endif /* GL_EXT_texture_storage */ + +#ifndef GL_EXT_texture_type_2_10_10_10_REV +#define GL_EXT_texture_type_2_10_10_10_REV 1 +#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 +#endif /* GL_EXT_texture_type_2_10_10_10_REV */ + +#ifndef GL_EXT_texture_view +#define GL_EXT_texture_view 1 +#define GL_TEXTURE_VIEW_MIN_LEVEL_EXT 0x82DB +#define GL_TEXTURE_VIEW_NUM_LEVELS_EXT 0x82DC +#define GL_TEXTURE_VIEW_MIN_LAYER_EXT 0x82DD +#define GL_TEXTURE_VIEW_NUM_LAYERS_EXT 0x82DE +typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +#endif +#endif /* GL_EXT_texture_view */ + +#ifndef GL_EXT_unpack_subimage +#define GL_EXT_unpack_subimage 1 +#define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2 +#define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4 +#endif /* GL_EXT_unpack_subimage */ + +#ifndef GL_EXT_win32_keyed_mutex +#define GL_EXT_win32_keyed_mutex 1 +typedef GLboolean (GL_APIENTRYP PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key, GLuint timeout); +typedef GLboolean (GL_APIENTRYP PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLboolean GL_APIENTRY glAcquireKeyedMutexWin32EXT (GLuint memory, GLuint64 key, GLuint timeout); +GL_APICALL GLboolean GL_APIENTRY glReleaseKeyedMutexWin32EXT (GLuint memory, GLuint64 key); +#endif +#endif /* GL_EXT_win32_keyed_mutex */ + +#ifndef GL_EXT_window_rectangles +#define GL_EXT_window_rectangles 1 +#define GL_INCLUSIVE_EXT 0x8F10 +#define GL_EXCLUSIVE_EXT 0x8F11 +#define GL_WINDOW_RECTANGLE_EXT 0x8F12 +#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 +#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 +#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 +typedef void (GL_APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box); +#endif +#endif /* GL_EXT_window_rectangles */ + +#ifndef GL_FJ_shader_binary_GCCSO +#define GL_FJ_shader_binary_GCCSO 1 +#define GL_GCCSO_SHADER_BINARY_FJ 0x9260 +#endif /* GL_FJ_shader_binary_GCCSO */ + +#ifndef GL_IMG_bindless_texture +#define GL_IMG_bindless_texture 1 +typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLEIMGPROC) (GLuint texture); +typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEIMGPROC) (GLuint texture, GLuint sampler); +typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64IMGPROC) (GLint location, GLuint64 value); +typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64VIMGPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64IMGPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VIMGPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLuint64 GL_APIENTRY glGetTextureHandleIMG (GLuint texture); +GL_APICALL GLuint64 GL_APIENTRY glGetTextureSamplerHandleIMG (GLuint texture, GLuint sampler); +GL_APICALL void GL_APIENTRY glUniformHandleui64IMG (GLint location, GLuint64 value); +GL_APICALL void GL_APIENTRY glUniformHandleui64vIMG (GLint location, GLsizei count, const GLuint64 *value); +GL_APICALL void GL_APIENTRY glProgramUniformHandleui64IMG (GLuint program, GLint location, GLuint64 value); +GL_APICALL void GL_APIENTRY glProgramUniformHandleui64vIMG (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +#endif +#endif /* GL_IMG_bindless_texture */ + +#ifndef GL_IMG_framebuffer_downsample +#define GL_IMG_framebuffer_downsample 1 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_AND_DOWNSAMPLE_IMG 0x913C +#define GL_NUM_DOWNSAMPLE_SCALES_IMG 0x913D +#define GL_DOWNSAMPLE_SCALES_IMG 0x913E +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SCALE_IMG 0x913F +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DDOWNSAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint xscale, GLint yscale); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERDOWNSAMPLEIMGPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer, GLint xscale, GLint yscale); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferTexture2DDownsampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint xscale, GLint yscale); +GL_APICALL void GL_APIENTRY glFramebufferTextureLayerDownsampleIMG (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer, GLint xscale, GLint yscale); +#endif +#endif /* GL_IMG_framebuffer_downsample */ + +#ifndef GL_IMG_multisampled_render_to_texture +#define GL_IMG_multisampled_render_to_texture 1 +#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 +#define GL_MAX_SAMPLES_IMG 0x9135 +#define GL_TEXTURE_SAMPLES_IMG 0x9136 +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#endif +#endif /* GL_IMG_multisampled_render_to_texture */ + +#ifndef GL_IMG_program_binary +#define GL_IMG_program_binary 1 +#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 +#endif /* GL_IMG_program_binary */ + +#ifndef GL_IMG_read_format +#define GL_IMG_read_format 1 +#define GL_BGRA_IMG 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 +#endif /* GL_IMG_read_format */ + +#ifndef GL_IMG_shader_binary +#define GL_IMG_shader_binary 1 +#define GL_SGX_BINARY_IMG 0x8C0A +#endif /* GL_IMG_shader_binary */ + +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_IMG_texture_compression_pvrtc 1 +#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 +#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 +#endif /* GL_IMG_texture_compression_pvrtc */ + +#ifndef GL_IMG_texture_compression_pvrtc2 +#define GL_IMG_texture_compression_pvrtc2 1 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138 +#endif /* GL_IMG_texture_compression_pvrtc2 */ + +#ifndef GL_IMG_texture_filter_cubic +#define GL_IMG_texture_filter_cubic 1 +#define GL_CUBIC_IMG 0x9139 +#define GL_CUBIC_MIPMAP_NEAREST_IMG 0x913A +#define GL_CUBIC_MIPMAP_LINEAR_IMG 0x913B +#endif /* GL_IMG_texture_filter_cubic */ + +#ifndef GL_INTEL_blackhole_render +#define GL_INTEL_blackhole_render 1 +#define GL_BLACKHOLE_RENDER_INTEL 0x83FC +#endif /* GL_INTEL_blackhole_render */ + +#ifndef GL_INTEL_conservative_rasterization +#define GL_INTEL_conservative_rasterization 1 +#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE +#endif /* GL_INTEL_conservative_rasterization */ + +#ifndef GL_INTEL_framebuffer_CMAA +#define GL_INTEL_framebuffer_CMAA 1 +typedef void (GL_APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void); +#endif +#endif /* GL_INTEL_framebuffer_CMAA */ + +#ifndef GL_INTEL_performance_query +#define GL_INTEL_performance_query 1 +#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 +#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 +#define GL_PERFQUERY_WAIT_INTEL 0x83FB +#define GL_PERFQUERY_FLUSH_INTEL 0x83FA +#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 +#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 +#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 +#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 +#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 +#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 +#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 +#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 +#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 +#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA +#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB +#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC +#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD +#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE +#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF +#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 +typedef void (GL_APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (GL_APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle); +typedef void (GL_APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (GL_APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (GL_APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); +typedef void (GL_APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); +typedef void (GL_APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); +typedef void (GL_APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten); +typedef void (GL_APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); +typedef void (GL_APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle); +GL_APICALL void GL_APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle); +GL_APICALL void GL_APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle); +GL_APICALL void GL_APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); +GL_APICALL void GL_APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); +GL_APICALL void GL_APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); +GL_APICALL void GL_APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); +GL_APICALL void GL_APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten); +GL_APICALL void GL_APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); +GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#endif +#endif /* GL_INTEL_performance_query */ + +#ifndef GL_MESA_framebuffer_flip_x +#define GL_MESA_framebuffer_flip_x 1 +#define GL_FRAMEBUFFER_FLIP_X_MESA 0x8BBC +#endif /* GL_MESA_framebuffer_flip_x */ + +#ifndef GL_MESA_framebuffer_flip_y +#define GL_MESA_framebuffer_flip_y 1 +#define GL_FRAMEBUFFER_FLIP_Y_MESA 0x8BBB +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERIMESAPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC) (GLenum target, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferParameteriMESA (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glGetFramebufferParameterivMESA (GLenum target, GLenum pname, GLint *params); +#endif +#endif /* GL_MESA_framebuffer_flip_y */ + +#ifndef GL_MESA_framebuffer_swap_xy +#define GL_MESA_framebuffer_swap_xy 1 +#define GL_FRAMEBUFFER_SWAP_XY_MESA 0x8BBD +#endif /* GL_MESA_framebuffer_swap_xy */ + +#ifndef GL_MESA_program_binary_formats +#define GL_MESA_program_binary_formats 1 +#define GL_PROGRAM_BINARY_FORMAT_MESA 0x875F +#endif /* GL_MESA_program_binary_formats */ + +#ifndef GL_MESA_shader_integer_functions +#define GL_MESA_shader_integer_functions 1 +#endif /* GL_MESA_shader_integer_functions */ + +#ifndef GL_NVX_blend_equation_advanced_multi_draw_buffers +#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1 +#endif /* GL_NVX_blend_equation_advanced_multi_draw_buffers */ + +#ifndef GL_NV_bindless_texture +#define GL_NV_bindless_texture 1 +typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); +typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); +typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef GLuint64 (GL_APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); +typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); +typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef GLboolean (GL_APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLuint64 GL_APIENTRY glGetTextureHandleNV (GLuint texture); +GL_APICALL GLuint64 GL_APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); +GL_APICALL void GL_APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); +GL_APICALL void GL_APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); +GL_APICALL GLuint64 GL_APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +GL_APICALL void GL_APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); +GL_APICALL void GL_APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); +GL_APICALL void GL_APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); +GL_APICALL void GL_APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); +GL_APICALL void GL_APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); +GL_APICALL void GL_APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +GL_APICALL GLboolean GL_APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); +GL_APICALL GLboolean GL_APIENTRY glIsImageHandleResidentNV (GLuint64 handle); +#endif +#endif /* GL_NV_bindless_texture */ + +#ifndef GL_NV_blend_equation_advanced +#define GL_NV_blend_equation_advanced 1 +#define GL_BLEND_OVERLAP_NV 0x9281 +#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 +#define GL_BLUE_NV 0x1905 +#define GL_COLORBURN_NV 0x929A +#define GL_COLORDODGE_NV 0x9299 +#define GL_CONJOINT_NV 0x9284 +#define GL_CONTRAST_NV 0x92A1 +#define GL_DARKEN_NV 0x9297 +#define GL_DIFFERENCE_NV 0x929E +#define GL_DISJOINT_NV 0x9283 +#define GL_DST_ATOP_NV 0x928F +#define GL_DST_IN_NV 0x928B +#define GL_DST_NV 0x9287 +#define GL_DST_OUT_NV 0x928D +#define GL_DST_OVER_NV 0x9289 +#define GL_EXCLUSION_NV 0x92A0 +#define GL_GREEN_NV 0x1904 +#define GL_HARDLIGHT_NV 0x929B +#define GL_HARDMIX_NV 0x92A9 +#define GL_HSL_COLOR_NV 0x92AF +#define GL_HSL_HUE_NV 0x92AD +#define GL_HSL_LUMINOSITY_NV 0x92B0 +#define GL_HSL_SATURATION_NV 0x92AE +#define GL_INVERT_OVG_NV 0x92B4 +#define GL_INVERT_RGB_NV 0x92A3 +#define GL_LIGHTEN_NV 0x9298 +#define GL_LINEARBURN_NV 0x92A5 +#define GL_LINEARDODGE_NV 0x92A4 +#define GL_LINEARLIGHT_NV 0x92A7 +#define GL_MINUS_CLAMPED_NV 0x92B3 +#define GL_MINUS_NV 0x929F +#define GL_MULTIPLY_NV 0x9294 +#define GL_OVERLAY_NV 0x9296 +#define GL_PINLIGHT_NV 0x92A8 +#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 +#define GL_PLUS_CLAMPED_NV 0x92B1 +#define GL_PLUS_DARKER_NV 0x9292 +#define GL_PLUS_NV 0x9291 +#define GL_RED_NV 0x1903 +#define GL_SCREEN_NV 0x9295 +#define GL_SOFTLIGHT_NV 0x929C +#define GL_SRC_ATOP_NV 0x928E +#define GL_SRC_IN_NV 0x928A +#define GL_SRC_NV 0x9286 +#define GL_SRC_OUT_NV 0x928C +#define GL_SRC_OVER_NV 0x9288 +#define GL_UNCORRELATED_NV 0x9282 +#define GL_VIVIDLIGHT_NV 0x92A6 +#define GL_XOR_NV 0x1506 +typedef void (GL_APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBlendParameteriNV (GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glBlendBarrierNV (void); +#endif +#endif /* GL_NV_blend_equation_advanced */ + +#ifndef GL_NV_blend_equation_advanced_coherent +#define GL_NV_blend_equation_advanced_coherent 1 +#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 +#endif /* GL_NV_blend_equation_advanced_coherent */ + +#ifndef GL_NV_blend_minmax_factor +#define GL_NV_blend_minmax_factor 1 +#define GL_FACTOR_MIN_AMD 0x901C +#define GL_FACTOR_MAX_AMD 0x901D +#endif /* GL_NV_blend_minmax_factor */ + +#ifndef GL_NV_clip_space_w_scaling +#define GL_NV_clip_space_w_scaling 1 +#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C +#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D +#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E +typedef void (GL_APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC) (GLuint index, GLfloat xcoeff, GLfloat ycoeff); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glViewportPositionWScaleNV (GLuint index, GLfloat xcoeff, GLfloat ycoeff); +#endif +#endif /* GL_NV_clip_space_w_scaling */ + +#ifndef GL_NV_compute_shader_derivatives +#define GL_NV_compute_shader_derivatives 1 +#endif /* GL_NV_compute_shader_derivatives */ + +#ifndef GL_NV_conditional_render +#define GL_NV_conditional_render 1 +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +typedef void (GL_APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void (GL_APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); +GL_APICALL void GL_APIENTRY glEndConditionalRenderNV (void); +#endif +#endif /* GL_NV_conditional_render */ + +#ifndef GL_NV_conservative_raster +#define GL_NV_conservative_raster 1 +#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 +#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 +#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 +#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 +typedef void (GL_APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits); +#endif +#endif /* GL_NV_conservative_raster */ + +#ifndef GL_NV_conservative_raster_pre_snap +#define GL_NV_conservative_raster_pre_snap 1 +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV 0x9550 +#endif /* GL_NV_conservative_raster_pre_snap */ + +#ifndef GL_NV_conservative_raster_pre_snap_triangles +#define GL_NV_conservative_raster_pre_snap_triangles 1 +#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D +#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F +typedef void (GL_APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param); +#endif +#endif /* GL_NV_conservative_raster_pre_snap_triangles */ + +#ifndef GL_NV_copy_buffer +#define GL_NV_copy_buffer 1 +#define GL_COPY_READ_BUFFER_NV 0x8F36 +#define GL_COPY_WRITE_BUFFER_NV 0x8F37 +typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATANVPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +#endif +#endif /* GL_NV_copy_buffer */ + +#ifndef GL_NV_coverage_sample +#define GL_NV_coverage_sample 1 +#define GL_COVERAGE_COMPONENT_NV 0x8ED0 +#define GL_COVERAGE_COMPONENT4_NV 0x8ED1 +#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 +#define GL_COVERAGE_BUFFERS_NV 0x8ED3 +#define GL_COVERAGE_SAMPLES_NV 0x8ED4 +#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 +#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 +#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 +#define GL_COVERAGE_BUFFER_BIT_NV 0x00008000 +typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); +typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); +GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); +#endif +#endif /* GL_NV_coverage_sample */ + +#ifndef GL_NV_depth_nonlinear +#define GL_NV_depth_nonlinear 1 +#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C +#endif /* GL_NV_depth_nonlinear */ + +#ifndef GL_NV_draw_buffers +#define GL_NV_draw_buffers 1 +#define GL_MAX_DRAW_BUFFERS_NV 0x8824 +#define GL_DRAW_BUFFER0_NV 0x8825 +#define GL_DRAW_BUFFER1_NV 0x8826 +#define GL_DRAW_BUFFER2_NV 0x8827 +#define GL_DRAW_BUFFER3_NV 0x8828 +#define GL_DRAW_BUFFER4_NV 0x8829 +#define GL_DRAW_BUFFER5_NV 0x882A +#define GL_DRAW_BUFFER6_NV 0x882B +#define GL_DRAW_BUFFER7_NV 0x882C +#define GL_DRAW_BUFFER8_NV 0x882D +#define GL_DRAW_BUFFER9_NV 0x882E +#define GL_DRAW_BUFFER10_NV 0x882F +#define GL_DRAW_BUFFER11_NV 0x8830 +#define GL_DRAW_BUFFER12_NV 0x8831 +#define GL_DRAW_BUFFER13_NV 0x8832 +#define GL_DRAW_BUFFER14_NV 0x8833 +#define GL_DRAW_BUFFER15_NV 0x8834 +#define GL_COLOR_ATTACHMENT0_NV 0x8CE0 +#define GL_COLOR_ATTACHMENT1_NV 0x8CE1 +#define GL_COLOR_ATTACHMENT2_NV 0x8CE2 +#define GL_COLOR_ATTACHMENT3_NV 0x8CE3 +#define GL_COLOR_ATTACHMENT4_NV 0x8CE4 +#define GL_COLOR_ATTACHMENT5_NV 0x8CE5 +#define GL_COLOR_ATTACHMENT6_NV 0x8CE6 +#define GL_COLOR_ATTACHMENT7_NV 0x8CE7 +#define GL_COLOR_ATTACHMENT8_NV 0x8CE8 +#define GL_COLOR_ATTACHMENT9_NV 0x8CE9 +#define GL_COLOR_ATTACHMENT10_NV 0x8CEA +#define GL_COLOR_ATTACHMENT11_NV 0x8CEB +#define GL_COLOR_ATTACHMENT12_NV 0x8CEC +#define GL_COLOR_ATTACHMENT13_NV 0x8CED +#define GL_COLOR_ATTACHMENT14_NV 0x8CEE +#define GL_COLOR_ATTACHMENT15_NV 0x8CEF +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); +#endif +#endif /* GL_NV_draw_buffers */ + +#ifndef GL_NV_draw_instanced +#define GL_NV_draw_instanced 1 +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +#endif +#endif /* GL_NV_draw_instanced */ + +#ifndef GL_NV_draw_vulkan_image +#define GL_NV_draw_vulkan_image 1 +typedef void (GL_APIENTRY *GLVULKANPROCNV)(void); +typedef void (GL_APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +typedef GLVULKANPROCNV (GL_APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name); +typedef void (GL_APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (GL_APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (GL_APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +GL_APICALL GLVULKANPROCNV GL_APIENTRY glGetVkProcAddrNV (const GLchar *name); +GL_APICALL void GL_APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore); +GL_APICALL void GL_APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore); +GL_APICALL void GL_APIENTRY glSignalVkFenceNV (GLuint64 vkFence); +#endif +#endif /* GL_NV_draw_vulkan_image */ + +#ifndef GL_NV_explicit_attrib_location +#define GL_NV_explicit_attrib_location 1 +#endif /* GL_NV_explicit_attrib_location */ + +#ifndef GL_NV_fbo_color_attachments +#define GL_NV_fbo_color_attachments 1 +#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF +#endif /* GL_NV_fbo_color_attachments */ + +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); +GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); +GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence); +GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence); +GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence); +GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition); +#endif +#endif /* GL_NV_fence */ + +#ifndef GL_NV_fill_rectangle +#define GL_NV_fill_rectangle 1 +#define GL_FILL_RECTANGLE_NV 0x933C +#endif /* GL_NV_fill_rectangle */ + +#ifndef GL_NV_fragment_coverage_to_color +#define GL_NV_fragment_coverage_to_color 1 +#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD +#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE +typedef void (GL_APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFragmentCoverageColorNV (GLuint color); +#endif +#endif /* GL_NV_fragment_coverage_to_color */ + +#ifndef GL_NV_fragment_shader_barycentric +#define GL_NV_fragment_shader_barycentric 1 +#endif /* GL_NV_fragment_shader_barycentric */ + +#ifndef GL_NV_fragment_shader_interlock +#define GL_NV_fragment_shader_interlock 1 +#endif /* GL_NV_fragment_shader_interlock */ + +#ifndef GL_NV_framebuffer_blit +#define GL_NV_framebuffer_blit 1 +#define GL_READ_FRAMEBUFFER_NV 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_NV 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA +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); +#ifdef GL_GLEXT_PROTOTYPES +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); +#endif +#endif /* GL_NV_framebuffer_blit */ + +#ifndef GL_NV_framebuffer_mixed_samples +#define GL_NV_framebuffer_mixed_samples 1 +#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#define GL_DEPTH_SAMPLES_NV 0x932D +#define GL_STENCIL_SAMPLES_NV 0x932E +#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F +#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 +#define GL_COVERAGE_MODULATION_NV 0x9332 +#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 +typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufSize, GLfloat *v); +typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v); +GL_APICALL void GL_APIENTRY glGetCoverageModulationTableNV (GLsizei bufSize, GLfloat *v); +GL_APICALL void GL_APIENTRY glCoverageModulationNV (GLenum components); +#endif +#endif /* GL_NV_framebuffer_mixed_samples */ + +#ifndef GL_NV_framebuffer_multisample +#define GL_NV_framebuffer_multisample 1 +#define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56 +#define GL_MAX_SAMPLES_NV 0x8D57 +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +#endif /* GL_NV_framebuffer_multisample */ + +#ifndef GL_NV_generate_mipmap_sRGB +#define GL_NV_generate_mipmap_sRGB 1 +#endif /* GL_NV_generate_mipmap_sRGB */ + +#ifndef GL_NV_geometry_shader_passthrough +#define GL_NV_geometry_shader_passthrough 1 +#endif /* GL_NV_geometry_shader_passthrough */ + +#ifndef GL_NV_gpu_shader5 +#define GL_NV_gpu_shader5 1 +typedef khronos_int64_t GLint64EXT; +typedef khronos_uint64_t GLuint64EXT; +#define GL_INT64_NV 0x140E +#define GL_UNSIGNED_INT64_NV 0x140F +#define GL_INT8_NV 0x8FE0 +#define GL_INT8_VEC2_NV 0x8FE1 +#define GL_INT8_VEC3_NV 0x8FE2 +#define GL_INT8_VEC4_NV 0x8FE3 +#define GL_INT16_NV 0x8FE4 +#define GL_INT16_VEC2_NV 0x8FE5 +#define GL_INT16_VEC3_NV 0x8FE6 +#define GL_INT16_VEC4_NV 0x8FE7 +#define GL_INT64_VEC2_NV 0x8FE9 +#define GL_INT64_VEC3_NV 0x8FEA +#define GL_INT64_VEC4_NV 0x8FEB +#define GL_UNSIGNED_INT8_NV 0x8FEC +#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +#define GL_UNSIGNED_INT16_NV 0x8FF0 +#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +#define GL_PATCHES 0x000E +typedef void (GL_APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void (GL_APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void (GL_APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (GL_APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (GL_APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); +GL_APICALL void GL_APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +GL_APICALL void GL_APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GL_APICALL void GL_APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GL_APICALL void GL_APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); +GL_APICALL void GL_APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +GL_APICALL void GL_APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GL_APICALL void GL_APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GL_APICALL void GL_APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +GL_APICALL void GL_APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +GL_APICALL void GL_APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +GL_APICALL void GL_APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GL_APICALL void GL_APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GL_APICALL void GL_APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +GL_APICALL void GL_APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +GL_APICALL void GL_APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GL_APICALL void GL_APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GL_APICALL void GL_APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif +#endif /* GL_NV_gpu_shader5 */ + +#ifndef GL_NV_image_formats +#define GL_NV_image_formats 1 +#endif /* GL_NV_image_formats */ + +#ifndef GL_NV_instanced_arrays +#define GL_NV_instanced_arrays 1 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor); +#endif +#endif /* GL_NV_instanced_arrays */ + +#ifndef GL_NV_internalformat_sample_query +#define GL_NV_internalformat_sample_query 1 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_MULTISAMPLES_NV 0x9371 +#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 +#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 +#define GL_CONFORMANT_NV 0x9374 +typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params); +#endif +#endif /* GL_NV_internalformat_sample_query */ + +#ifndef GL_NV_memory_attachment +#define GL_NV_memory_attachment 1 +#define GL_ATTACHED_MEMORY_OBJECT_NV 0x95A4 +#define GL_ATTACHED_MEMORY_OFFSET_NV 0x95A5 +#define GL_MEMORY_ATTACHABLE_ALIGNMENT_NV 0x95A6 +#define GL_MEMORY_ATTACHABLE_SIZE_NV 0x95A7 +#define GL_MEMORY_ATTACHABLE_NV 0x95A8 +#define GL_DETACHED_MEMORY_INCARNATION_NV 0x95A9 +#define GL_DETACHED_TEXTURES_NV 0x95AA +#define GL_DETACHED_BUFFERS_NV 0x95AB +#define GL_MAX_DETACHED_TEXTURES_NV 0x95AC +#define GL_MAX_DETACHED_BUFFERS_NV 0x95AD +typedef void (GL_APIENTRYP PFNGLGETMEMORYOBJECTDETACHEDRESOURCESUIVNVPROC) (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params); +typedef void (GL_APIENTRYP PFNGLRESETMEMORYOBJECTPARAMETERNVPROC) (GLuint memory, GLenum pname); +typedef void (GL_APIENTRYP PFNGLTEXATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLBUFFERATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLTEXTUREATTACHMEMORYNVPROC) (GLuint texture, GLuint memory, GLuint64 offset); +typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERATTACHMEMORYNVPROC) (GLuint buffer, GLuint memory, GLuint64 offset); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetMemoryObjectDetachedResourcesuivNV (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params); +GL_APICALL void GL_APIENTRY glResetMemoryObjectParameterNV (GLuint memory, GLenum pname); +GL_APICALL void GL_APIENTRY glTexAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glBufferAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glTextureAttachMemoryNV (GLuint texture, GLuint memory, GLuint64 offset); +GL_APICALL void GL_APIENTRY glNamedBufferAttachMemoryNV (GLuint buffer, GLuint memory, GLuint64 offset); +#endif +#endif /* GL_NV_memory_attachment */ + +#ifndef GL_NV_memory_object_sparse +#define GL_NV_memory_object_sparse 1 +typedef void (GL_APIENTRYP PFNGLBUFFERPAGECOMMITMENTMEMNVPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +typedef void (GL_APIENTRYP PFNGLTEXPAGECOMMITMENTMEMNVPROC) (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTMEMNVPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +typedef void (GL_APIENTRYP PFNGLTEXTUREPAGECOMMITMENTMEMNVPROC) (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBufferPageCommitmentMemNV (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +GL_APICALL void GL_APIENTRY glTexPageCommitmentMemNV (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +GL_APICALL void GL_APIENTRY glNamedBufferPageCommitmentMemNV (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit); +GL_APICALL void GL_APIENTRY glTexturePageCommitmentMemNV (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit); +#endif +#endif /* GL_NV_memory_object_sparse */ + +#ifndef GL_NV_mesh_shader +#define GL_NV_mesh_shader 1 +#define GL_MESH_SHADER_NV 0x9559 +#define GL_TASK_SHADER_NV 0x955A +#define GL_MAX_MESH_UNIFORM_BLOCKS_NV 0x8E60 +#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_NV 0x8E61 +#define GL_MAX_MESH_IMAGE_UNIFORMS_NV 0x8E62 +#define GL_MAX_MESH_UNIFORM_COMPONENTS_NV 0x8E63 +#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV 0x8E64 +#define GL_MAX_MESH_ATOMIC_COUNTERS_NV 0x8E65 +#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_NV 0x8E66 +#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV 0x8E67 +#define GL_MAX_TASK_UNIFORM_BLOCKS_NV 0x8E68 +#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_NV 0x8E69 +#define GL_MAX_TASK_IMAGE_UNIFORMS_NV 0x8E6A +#define GL_MAX_TASK_UNIFORM_COMPONENTS_NV 0x8E6B +#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV 0x8E6C +#define GL_MAX_TASK_ATOMIC_COUNTERS_NV 0x8E6D +#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_NV 0x8E6E +#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV 0x8E6F +#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_NV 0x95A2 +#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_NV 0x95A3 +#define GL_MAX_MESH_TOTAL_MEMORY_SIZE_NV 0x9536 +#define GL_MAX_TASK_TOTAL_MEMORY_SIZE_NV 0x9537 +#define GL_MAX_MESH_OUTPUT_VERTICES_NV 0x9538 +#define GL_MAX_MESH_OUTPUT_PRIMITIVES_NV 0x9539 +#define GL_MAX_TASK_OUTPUT_COUNT_NV 0x953A +#define GL_MAX_DRAW_MESH_TASKS_COUNT_NV 0x953D +#define GL_MAX_MESH_VIEWS_NV 0x9557 +#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV 0x92DF +#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV 0x9543 +#define GL_MAX_MESH_WORK_GROUP_SIZE_NV 0x953B +#define GL_MAX_TASK_WORK_GROUP_SIZE_NV 0x953C +#define GL_MESH_WORK_GROUP_SIZE_NV 0x953E +#define GL_TASK_WORK_GROUP_SIZE_NV 0x953F +#define GL_MESH_VERTICES_OUT_NV 0x9579 +#define GL_MESH_PRIMITIVES_OUT_NV 0x957A +#define GL_MESH_OUTPUT_TYPE_NV 0x957B +#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV 0x959C +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV 0x959D +#define GL_REFERENCED_BY_MESH_SHADER_NV 0x95A0 +#define GL_REFERENCED_BY_TASK_SHADER_NV 0x95A1 +#define GL_MESH_SHADER_BIT_NV 0x00000040 +#define GL_TASK_SHADER_BIT_NV 0x00000080 +#define GL_MESH_SUBROUTINE_NV 0x957C +#define GL_TASK_SUBROUTINE_NV 0x957D +#define GL_MESH_SUBROUTINE_UNIFORM_NV 0x957E +#define GL_TASK_SUBROUTINE_UNIFORM_NV 0x957F +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV 0x959E +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV 0x959F +typedef void (GL_APIENTRYP PFNGLDRAWMESHTASKSNVPROC) (GLuint first, GLuint count); +typedef void (GL_APIENTRYP PFNGLDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect, GLsizei drawcount, GLsizei stride); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTNVPROC) (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawMeshTasksNV (GLuint first, GLuint count); +GL_APICALL void GL_APIENTRY glDrawMeshTasksIndirectNV (GLintptr indirect); +GL_APICALL void GL_APIENTRY glMultiDrawMeshTasksIndirectNV (GLintptr indirect, GLsizei drawcount, GLsizei stride); +GL_APICALL void GL_APIENTRY glMultiDrawMeshTasksIndirectCountNV (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +#endif +#endif /* GL_NV_mesh_shader */ + +#ifndef GL_NV_non_square_matrices +#define GL_NV_non_square_matrices 1 +#define GL_FLOAT_MAT2x3_NV 0x8B65 +#define GL_FLOAT_MAT2x4_NV 0x8B66 +#define GL_FLOAT_MAT3x2_NV 0x8B67 +#define GL_FLOAT_MAT3x4_NV 0x8B68 +#define GL_FLOAT_MAT4x2_NV 0x8B69 +#define GL_FLOAT_MAT4x3_NV 0x8B6A +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif +#endif /* GL_NV_non_square_matrices */ + +#ifndef GL_NV_path_rendering +#define GL_NV_path_rendering 1 +typedef double GLdouble; +#define GL_PATH_FORMAT_SVG_NV 0x9070 +#define GL_PATH_FORMAT_PS_NV 0x9071 +#define GL_STANDARD_FONT_NAME_NV 0x9072 +#define GL_SYSTEM_FONT_NAME_NV 0x9073 +#define GL_FILE_NAME_NV 0x9074 +#define GL_PATH_STROKE_WIDTH_NV 0x9075 +#define GL_PATH_END_CAPS_NV 0x9076 +#define GL_PATH_INITIAL_END_CAP_NV 0x9077 +#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 +#define GL_PATH_JOIN_STYLE_NV 0x9079 +#define GL_PATH_MITER_LIMIT_NV 0x907A +#define GL_PATH_DASH_CAPS_NV 0x907B +#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C +#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D +#define GL_PATH_DASH_OFFSET_NV 0x907E +#define GL_PATH_CLIENT_LENGTH_NV 0x907F +#define GL_PATH_FILL_MODE_NV 0x9080 +#define GL_PATH_FILL_MASK_NV 0x9081 +#define GL_PATH_FILL_COVER_MODE_NV 0x9082 +#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 +#define GL_PATH_STROKE_MASK_NV 0x9084 +#define GL_COUNT_UP_NV 0x9088 +#define GL_COUNT_DOWN_NV 0x9089 +#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A +#define GL_CONVEX_HULL_NV 0x908B +#define GL_BOUNDING_BOX_NV 0x908D +#define GL_TRANSLATE_X_NV 0x908E +#define GL_TRANSLATE_Y_NV 0x908F +#define GL_TRANSLATE_2D_NV 0x9090 +#define GL_TRANSLATE_3D_NV 0x9091 +#define GL_AFFINE_2D_NV 0x9092 +#define GL_AFFINE_3D_NV 0x9094 +#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 +#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 +#define GL_UTF8_NV 0x909A +#define GL_UTF16_NV 0x909B +#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C +#define GL_PATH_COMMAND_COUNT_NV 0x909D +#define GL_PATH_COORD_COUNT_NV 0x909E +#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F +#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 +#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 +#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 +#define GL_SQUARE_NV 0x90A3 +#define GL_ROUND_NV 0x90A4 +#define GL_TRIANGULAR_NV 0x90A5 +#define GL_BEVEL_NV 0x90A6 +#define GL_MITER_REVERT_NV 0x90A7 +#define GL_MITER_TRUNCATE_NV 0x90A8 +#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 +#define GL_USE_MISSING_GLYPH_NV 0x90AA +#define GL_PATH_ERROR_POSITION_NV 0x90AB +#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD +#define GL_ADJACENT_PAIRS_NV 0x90AE +#define GL_FIRST_TO_REST_NV 0x90AF +#define GL_PATH_GEN_MODE_NV 0x90B0 +#define GL_PATH_GEN_COEFF_NV 0x90B1 +#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 +#define GL_PATH_STENCIL_FUNC_NV 0x90B7 +#define GL_PATH_STENCIL_REF_NV 0x90B8 +#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 +#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD +#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE +#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF +#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 +#define GL_MOVE_TO_RESETS_NV 0x90B5 +#define GL_MOVE_TO_CONTINUES_NV 0x90B6 +#define GL_CLOSE_PATH_NV 0x00 +#define GL_MOVE_TO_NV 0x02 +#define GL_RELATIVE_MOVE_TO_NV 0x03 +#define GL_LINE_TO_NV 0x04 +#define GL_RELATIVE_LINE_TO_NV 0x05 +#define GL_HORIZONTAL_LINE_TO_NV 0x06 +#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 +#define GL_VERTICAL_LINE_TO_NV 0x08 +#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 +#define GL_QUADRATIC_CURVE_TO_NV 0x0A +#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B +#define GL_CUBIC_CURVE_TO_NV 0x0C +#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D +#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E +#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F +#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 +#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 +#define GL_SMALL_CCW_ARC_TO_NV 0x12 +#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 +#define GL_SMALL_CW_ARC_TO_NV 0x14 +#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 +#define GL_LARGE_CCW_ARC_TO_NV 0x16 +#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 +#define GL_LARGE_CW_ARC_TO_NV 0x18 +#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 +#define GL_RESTART_PATH_NV 0xF0 +#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 +#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 +#define GL_RECT_NV 0xF6 +#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 +#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA +#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC +#define GL_ARC_TO_NV 0xFE +#define GL_RELATIVE_ARC_TO_NV 0xFF +#define GL_BOLD_BIT_NV 0x01 +#define GL_ITALIC_BIT_NV 0x02 +#define GL_GLYPH_WIDTH_BIT_NV 0x01 +#define GL_GLYPH_HEIGHT_BIT_NV 0x02 +#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 +#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 +#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 +#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 +#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 +#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 +#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 +#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 +#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 +#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 +#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 +#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 +#define GL_FONT_ASCENDER_BIT_NV 0x00200000 +#define GL_FONT_DESCENDER_BIT_NV 0x00400000 +#define GL_FONT_HEIGHT_BIT_NV 0x00800000 +#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 +#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 +#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 +#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 +#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 +#define GL_ROUNDED_RECT_NV 0xE8 +#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 +#define GL_ROUNDED_RECT2_NV 0xEA +#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB +#define GL_ROUNDED_RECT4_NV 0xEC +#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED +#define GL_ROUNDED_RECT8_NV 0xEE +#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF +#define GL_RELATIVE_RECT_NV 0xF7 +#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 +#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 +#define GL_FONT_UNAVAILABLE_NV 0x936A +#define GL_FONT_UNINTELLIGIBLE_NV 0x936B +#define GL_CONIC_CURVE_TO_NV 0x1A +#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B +#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 +#define GL_STANDARD_FONT_FORMAT_NV 0x936C +#define GL_PATH_PROJECTION_NV 0x1701 +#define GL_PATH_MODELVIEW_NV 0x1700 +#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 +#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 +#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 +#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 +#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 +#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 +#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 +#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 +#define GL_FRAGMENT_INPUT_NV 0x936D +typedef GLuint (GL_APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); +typedef void (GL_APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); +typedef GLboolean (GL_APIENTRYP PFNGLISPATHNVPROC) (GLuint path); +typedef void (GL_APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (GL_APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (GL_APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (GL_APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (GL_APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString); +typedef void (GL_APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (GL_APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (GL_APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +typedef void (GL_APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); +typedef void (GL_APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +typedef void (GL_APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); +typedef void (GL_APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +typedef void (GL_APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); +typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); +typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); +typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); +typedef void (GL_APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); +typedef void (GL_APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); +typedef void (GL_APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); +typedef void (GL_APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +typedef void (GL_APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +typedef void (GL_APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); +typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); +typedef GLfloat (GL_APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); +typedef GLboolean (GL_APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef GLenum (GL_APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (GL_APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (GL_APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (GL_APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (GL_APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (GL_APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void (GL_APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void (GL_APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (GL_APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (GL_APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (GL_APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLuint GL_APIENTRY glGenPathsNV (GLsizei range); +GL_APICALL void GL_APIENTRY glDeletePathsNV (GLuint path, GLsizei range); +GL_APICALL GLboolean GL_APIENTRY glIsPathNV (GLuint path); +GL_APICALL void GL_APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GL_APICALL void GL_APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +GL_APICALL void GL_APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GL_APICALL void GL_APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +GL_APICALL void GL_APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString); +GL_APICALL void GL_APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GL_APICALL void GL_APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GL_APICALL void GL_APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +GL_APICALL void GL_APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); +GL_APICALL void GL_APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +GL_APICALL void GL_APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); +GL_APICALL void GL_APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); +GL_APICALL void GL_APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); +GL_APICALL void GL_APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +GL_APICALL void GL_APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glPathCoverDepthFuncNV (GLenum func); +GL_APICALL void GL_APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); +GL_APICALL void GL_APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); +GL_APICALL void GL_APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); +GL_APICALL void GL_APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); +GL_APICALL void GL_APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); +GL_APICALL void GL_APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); +GL_APICALL void GL_APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); +GL_APICALL void GL_APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +GL_APICALL void GL_APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +GL_APICALL void GL_APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +GL_APICALL GLboolean GL_APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); +GL_APICALL GLboolean GL_APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); +GL_APICALL GLfloat GL_APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); +GL_APICALL GLboolean GL_APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +GL_APICALL void GL_APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GL_APICALL GLenum GL_APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GL_APICALL void GL_APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +GL_APICALL void GL_APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params); +GL_APICALL void GL_APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GL_APICALL void GL_APIENTRY glMatrixLoadIdentityEXT (GLenum mode); +GL_APICALL void GL_APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); +GL_APICALL void GL_APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); +GL_APICALL void GL_APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); +GL_APICALL void GL_APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); +GL_APICALL void GL_APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GL_APICALL void GL_APIENTRY glMatrixPopEXT (GLenum mode); +GL_APICALL void GL_APIENTRY glMatrixPushEXT (GLenum mode); +GL_APICALL void GL_APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +GL_APICALL void GL_APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GL_APICALL void GL_APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +#endif +#endif /* GL_NV_path_rendering */ + +#ifndef GL_NV_path_rendering_shared_edge +#define GL_NV_path_rendering_shared_edge 1 +#define GL_SHARED_EDGE_NV 0xC0 +#endif /* GL_NV_path_rendering_shared_edge */ + +#ifndef GL_NV_pixel_buffer_object +#define GL_NV_pixel_buffer_object 1 +#define GL_PIXEL_PACK_BUFFER_NV 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_NV 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_NV 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_NV 0x88EF +#endif /* GL_NV_pixel_buffer_object */ + +#ifndef GL_NV_polygon_mode +#define GL_NV_polygon_mode 1 +#define GL_POLYGON_MODE_NV 0x0B40 +#define GL_POLYGON_OFFSET_POINT_NV 0x2A01 +#define GL_POLYGON_OFFSET_LINE_NV 0x2A02 +#define GL_POINT_NV 0x1B00 +#define GL_LINE_NV 0x1B01 +#define GL_FILL_NV 0x1B02 +typedef void (GL_APIENTRYP PFNGLPOLYGONMODENVPROC) (GLenum face, GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPolygonModeNV (GLenum face, GLenum mode); +#endif +#endif /* GL_NV_polygon_mode */ + +#ifndef GL_NV_primitive_shading_rate +#define GL_NV_primitive_shading_rate 1 +#define GL_SHADING_RATE_IMAGE_PER_PRIMITIVE_NV 0x95B1 +#define GL_SHADING_RATE_IMAGE_PALETTE_COUNT_NV 0x95B2 +#endif /* GL_NV_primitive_shading_rate */ + +#ifndef GL_NV_read_buffer +#define GL_NV_read_buffer 1 +#define GL_READ_BUFFER_NV 0x0C02 +typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); +#endif +#endif /* GL_NV_read_buffer */ + +#ifndef GL_NV_read_buffer_front +#define GL_NV_read_buffer_front 1 +#endif /* GL_NV_read_buffer_front */ + +#ifndef GL_NV_read_depth +#define GL_NV_read_depth 1 +#endif /* GL_NV_read_depth */ + +#ifndef GL_NV_read_depth_stencil +#define GL_NV_read_depth_stencil 1 +#endif /* GL_NV_read_depth_stencil */ + +#ifndef GL_NV_read_stencil +#define GL_NV_read_stencil 1 +#endif /* GL_NV_read_stencil */ + +#ifndef GL_NV_representative_fragment_test +#define GL_NV_representative_fragment_test 1 +#define GL_REPRESENTATIVE_FRAGMENT_TEST_NV 0x937F +#endif /* GL_NV_representative_fragment_test */ + +#ifndef GL_NV_sRGB_formats +#define GL_NV_sRGB_formats 1 +#define GL_SLUMINANCE_NV 0x8C46 +#define GL_SLUMINANCE_ALPHA_NV 0x8C44 +#define GL_SRGB8_NV 0x8C41 +#define GL_SLUMINANCE8_NV 0x8C47 +#define GL_SLUMINANCE8_ALPHA8_NV 0x8C45 +#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F +#define GL_ETC1_SRGB8_NV 0x88EE +#endif /* GL_NV_sRGB_formats */ + +#ifndef GL_NV_sample_locations +#define GL_NV_sample_locations 1 +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 +#define GL_SAMPLE_LOCATION_NV 0x8E50 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glResolveDepthValuesNV (void); +#endif +#endif /* GL_NV_sample_locations */ + +#ifndef GL_NV_sample_mask_override_coverage +#define GL_NV_sample_mask_override_coverage 1 +#endif /* GL_NV_sample_mask_override_coverage */ + +#ifndef GL_NV_scissor_exclusive +#define GL_NV_scissor_exclusive 1 +#define GL_SCISSOR_TEST_EXCLUSIVE_NV 0x9555 +#define GL_SCISSOR_BOX_EXCLUSIVE_NV 0x9556 +typedef void (GL_APIENTRYP PFNGLSCISSOREXCLUSIVENVPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSCISSOREXCLUSIVEARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glScissorExclusiveNV (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glScissorExclusiveArrayvNV (GLuint first, GLsizei count, const GLint *v); +#endif +#endif /* GL_NV_scissor_exclusive */ + +#ifndef GL_NV_shader_atomic_fp16_vector +#define GL_NV_shader_atomic_fp16_vector 1 +#endif /* GL_NV_shader_atomic_fp16_vector */ + +#ifndef GL_NV_shader_noperspective_interpolation +#define GL_NV_shader_noperspective_interpolation 1 +#endif /* GL_NV_shader_noperspective_interpolation */ + +#ifndef GL_NV_shader_subgroup_partitioned +#define GL_NV_shader_subgroup_partitioned 1 +#define GL_SUBGROUP_FEATURE_PARTITIONED_BIT_NV 0x00000100 +#endif /* GL_NV_shader_subgroup_partitioned */ + +#ifndef GL_NV_shader_texture_footprint +#define GL_NV_shader_texture_footprint 1 +#endif /* GL_NV_shader_texture_footprint */ + +#ifndef GL_NV_shading_rate_image +#define GL_NV_shading_rate_image 1 +#define GL_SHADING_RATE_IMAGE_NV 0x9563 +#define GL_SHADING_RATE_NO_INVOCATIONS_NV 0x9564 +#define GL_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV 0x9565 +#define GL_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV 0x9566 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV 0x9567 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV 0x9568 +#define GL_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV 0x9569 +#define GL_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV 0x956A +#define GL_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV 0x956B +#define GL_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV 0x956C +#define GL_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV 0x956D +#define GL_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV 0x956E +#define GL_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV 0x956F +#define GL_SHADING_RATE_IMAGE_BINDING_NV 0x955B +#define GL_SHADING_RATE_IMAGE_TEXEL_WIDTH_NV 0x955C +#define GL_SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV 0x955D +#define GL_SHADING_RATE_IMAGE_PALETTE_SIZE_NV 0x955E +#define GL_MAX_COARSE_FRAGMENT_SAMPLES_NV 0x955F +#define GL_SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV 0x95AE +#define GL_SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV 0x95AF +#define GL_SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV 0x95B0 +typedef void (GL_APIENTRYP PFNGLBINDSHADINGRATEIMAGENVPROC) (GLuint texture); +typedef void (GL_APIENTRYP PFNGLGETSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint entry, GLenum *rate); +typedef void (GL_APIENTRYP PFNGLGETSHADINGRATESAMPLELOCATIONIVNVPROC) (GLenum rate, GLuint samples, GLuint index, GLint *location); +typedef void (GL_APIENTRYP PFNGLSHADINGRATEIMAGEBARRIERNVPROC) (GLboolean synchronize); +typedef void (GL_APIENTRYP PFNGLSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates); +typedef void (GL_APIENTRYP PFNGLSHADINGRATESAMPLEORDERNVPROC) (GLenum order); +typedef void (GL_APIENTRYP PFNGLSHADINGRATESAMPLEORDERCUSTOMNVPROC) (GLenum rate, GLuint samples, const GLint *locations); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBindShadingRateImageNV (GLuint texture); +GL_APICALL void GL_APIENTRY glGetShadingRateImagePaletteNV (GLuint viewport, GLuint entry, GLenum *rate); +GL_APICALL void GL_APIENTRY glGetShadingRateSampleLocationivNV (GLenum rate, GLuint samples, GLuint index, GLint *location); +GL_APICALL void GL_APIENTRY glShadingRateImageBarrierNV (GLboolean synchronize); +GL_APICALL void GL_APIENTRY glShadingRateImagePaletteNV (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates); +GL_APICALL void GL_APIENTRY glShadingRateSampleOrderNV (GLenum order); +GL_APICALL void GL_APIENTRY glShadingRateSampleOrderCustomNV (GLenum rate, GLuint samples, const GLint *locations); +#endif +#endif /* GL_NV_shading_rate_image */ + +#ifndef GL_NV_shadow_samplers_array +#define GL_NV_shadow_samplers_array 1 +#define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4 +#endif /* GL_NV_shadow_samplers_array */ + +#ifndef GL_NV_shadow_samplers_cube +#define GL_NV_shadow_samplers_cube 1 +#define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5 +#endif /* GL_NV_shadow_samplers_cube */ + +#ifndef GL_NV_stereo_view_rendering +#define GL_NV_stereo_view_rendering 1 +#endif /* GL_NV_stereo_view_rendering */ + +#ifndef GL_NV_texture_border_clamp +#define GL_NV_texture_border_clamp 1 +#define GL_TEXTURE_BORDER_COLOR_NV 0x1004 +#define GL_CLAMP_TO_BORDER_NV 0x812D +#endif /* GL_NV_texture_border_clamp */ + +#ifndef GL_NV_texture_compression_s3tc_update +#define GL_NV_texture_compression_s3tc_update 1 +#endif /* GL_NV_texture_compression_s3tc_update */ + +#ifndef GL_NV_texture_npot_2D_mipmap +#define GL_NV_texture_npot_2D_mipmap 1 +#endif /* GL_NV_texture_npot_2D_mipmap */ + +#ifndef GL_NV_timeline_semaphore +#define GL_NV_timeline_semaphore 1 +#define GL_TIMELINE_SEMAPHORE_VALUE_NV 0x9595 +#define GL_SEMAPHORE_TYPE_NV 0x95B3 +#define GL_SEMAPHORE_TYPE_BINARY_NV 0x95B4 +#define GL_SEMAPHORE_TYPE_TIMELINE_NV 0x95B5 +#define GL_MAX_TIMELINE_SEMAPHORE_VALUE_DIFFERENCE_NV 0x95B6 +typedef void (GL_APIENTRYP PFNGLCREATESEMAPHORESNVPROC) (GLsizei n, GLuint *semaphores); +typedef void (GL_APIENTRYP PFNGLSEMAPHOREPARAMETERIVNVPROC) (GLuint semaphore, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSEMAPHOREPARAMETERIVNVPROC) (GLuint semaphore, GLenum pname, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCreateSemaphoresNV (GLsizei n, GLuint *semaphores); +GL_APICALL void GL_APIENTRY glSemaphoreParameterivNV (GLuint semaphore, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glGetSemaphoreParameterivNV (GLuint semaphore, GLenum pname, GLint *params); +#endif +#endif /* GL_NV_timeline_semaphore */ + +#ifndef GL_NV_viewport_array +#define GL_NV_viewport_array 1 +#define GL_MAX_VIEWPORTS_NV 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS_NV 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE_NV 0x825D +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_NV 0x825F +typedef void (GL_APIENTRYP PFNGLVIEWPORTARRAYVNVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFVNVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLSCISSORARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDNVPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDVNVPROC) (GLuint index, const GLint *v); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEARRAYFVNVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEINDEXEDFNVPROC) (GLuint index, GLfloat n, GLfloat f); +typedef void (GL_APIENTRYP PFNGLGETFLOATI_VNVPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (GL_APIENTRYP PFNGLENABLEINVPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLDISABLEINVPROC) (GLenum target, GLuint index); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDINVPROC) (GLenum target, GLuint index); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glViewportArrayvNV (GLuint first, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glViewportIndexedfNV (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GL_APICALL void GL_APIENTRY glViewportIndexedfvNV (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glScissorArrayvNV (GLuint first, GLsizei count, const GLint *v); +GL_APICALL void GL_APIENTRY glScissorIndexedNV (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glScissorIndexedvNV (GLuint index, const GLint *v); +GL_APICALL void GL_APIENTRY glDepthRangeArrayfvNV (GLuint first, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glDepthRangeIndexedfNV (GLuint index, GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glGetFloati_vNV (GLenum target, GLuint index, GLfloat *data); +GL_APICALL void GL_APIENTRY glEnableiNV (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glDisableiNV (GLenum target, GLuint index); +GL_APICALL GLboolean GL_APIENTRY glIsEnablediNV (GLenum target, GLuint index); +#endif +#endif /* GL_NV_viewport_array */ + +#ifndef GL_NV_viewport_array2 +#define GL_NV_viewport_array2 1 +#endif /* GL_NV_viewport_array2 */ + +#ifndef GL_NV_viewport_swizzle +#define GL_NV_viewport_swizzle 1 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 +#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 +#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 +#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A +#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B +typedef void (GL_APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#endif +#endif /* GL_NV_viewport_swizzle */ + +#ifndef GL_OVR_multiview +#define GL_OVR_multiview 1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 +#define GL_MAX_VIEWS_OVR 0x9631 +#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#endif +#endif /* GL_OVR_multiview */ + +#ifndef GL_OVR_multiview2 +#define GL_OVR_multiview2 1 +#endif /* GL_OVR_multiview2 */ + +#ifndef GL_OVR_multiview_multisampled_render_to_texture +#define GL_OVR_multiview_multisampled_render_to_texture 1 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferTextureMultisampleMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews); +#endif +#endif /* GL_OVR_multiview_multisampled_render_to_texture */ + +#ifndef GL_QCOM_YUV_texture_gather +#define GL_QCOM_YUV_texture_gather 1 +#endif /* GL_QCOM_YUV_texture_gather */ + +#ifndef GL_QCOM_alpha_test +#define GL_QCOM_alpha_test 1 +#define GL_ALPHA_TEST_QCOM 0x0BC0 +#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 +#define GL_ALPHA_TEST_REF_QCOM 0x0BC2 +typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); +#endif +#endif /* GL_QCOM_alpha_test */ + +#ifndef GL_QCOM_binning_control +#define GL_QCOM_binning_control 1 +#define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0 +#define GL_CPU_OPTIMIZED_QCOM 0x8FB1 +#define GL_GPU_OPTIMIZED_QCOM 0x8FB2 +#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3 +#endif /* GL_QCOM_binning_control */ + +#ifndef GL_QCOM_driver_control +#define GL_QCOM_driver_control 1 +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); +GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); +GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); +#endif +#endif /* GL_QCOM_driver_control */ + +#ifndef GL_QCOM_extended_get +#define GL_QCOM_extended_get 1 +#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 +#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 +#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 +#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 +#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 +#define GL_TEXTURE_TYPE_QCOM 0x8BD7 +#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 +#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 +#define GL_TEXTURE_TARGET_QCOM 0x8BDA +#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB +#define GL_STATE_RESTORE 0x8BDC +typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); +GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); +GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params); +#endif +#endif /* GL_QCOM_extended_get */ + +#ifndef GL_QCOM_extended_get2 +#define GL_QCOM_extended_get2 1 +typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); +GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); +GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#endif +#endif /* GL_QCOM_extended_get2 */ + +#ifndef GL_QCOM_frame_extrapolation +#define GL_QCOM_frame_extrapolation 1 +typedef void (GL_APIENTRYP PFNGLEXTRAPOLATETEX2DQCOMPROC) (GLuint src1, GLuint src2, GLuint output, GLfloat scaleFactor); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glExtrapolateTex2DQCOM (GLuint src1, GLuint src2, GLuint output, GLfloat scaleFactor); +#endif +#endif /* GL_QCOM_frame_extrapolation */ + +#ifndef GL_QCOM_framebuffer_foveated +#define GL_QCOM_framebuffer_foveated 1 +#define GL_FOVEATION_ENABLE_BIT_QCOM 0x00000001 +#define GL_FOVEATION_SCALED_BIN_METHOD_BIT_QCOM 0x00000002 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFOVEATIONCONFIGQCOMPROC) (GLuint framebuffer, GLuint numLayers, GLuint focalPointsPerLayer, GLuint requestedFeatures, GLuint *providedFeatures); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFOVEATIONPARAMETERSQCOMPROC) (GLuint framebuffer, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferFoveationConfigQCOM (GLuint framebuffer, GLuint numLayers, GLuint focalPointsPerLayer, GLuint requestedFeatures, GLuint *providedFeatures); +GL_APICALL void GL_APIENTRY glFramebufferFoveationParametersQCOM (GLuint framebuffer, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea); +#endif +#endif /* GL_QCOM_framebuffer_foveated */ + +#ifndef GL_QCOM_motion_estimation +#define GL_QCOM_motion_estimation 1 +#define GL_MOTION_ESTIMATION_SEARCH_BLOCK_X_QCOM 0x8C90 +#define GL_MOTION_ESTIMATION_SEARCH_BLOCK_Y_QCOM 0x8C91 +typedef void (GL_APIENTRYP PFNGLTEXESTIMATEMOTIONQCOMPROC) (GLuint ref, GLuint target, GLuint output); +typedef void (GL_APIENTRYP PFNGLTEXESTIMATEMOTIONREGIONSQCOMPROC) (GLuint ref, GLuint target, GLuint output, GLuint mask); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexEstimateMotionQCOM (GLuint ref, GLuint target, GLuint output); +GL_APICALL void GL_APIENTRY glTexEstimateMotionRegionsQCOM (GLuint ref, GLuint target, GLuint output, GLuint mask); +#endif +#endif /* GL_QCOM_motion_estimation */ + +#ifndef GL_QCOM_perfmon_global_mode +#define GL_QCOM_perfmon_global_mode 1 +#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 +#endif /* GL_QCOM_perfmon_global_mode */ + +#ifndef GL_QCOM_shader_framebuffer_fetch_noncoherent +#define GL_QCOM_shader_framebuffer_fetch_noncoherent 1 +#define GL_FRAMEBUFFER_FETCH_NONCOHERENT_QCOM 0x96A2 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFETCHBARRIERQCOMPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferFetchBarrierQCOM (void); +#endif +#endif /* GL_QCOM_shader_framebuffer_fetch_noncoherent */ + +#ifndef GL_QCOM_shader_framebuffer_fetch_rate +#define GL_QCOM_shader_framebuffer_fetch_rate 1 +#endif /* GL_QCOM_shader_framebuffer_fetch_rate */ + +#ifndef GL_QCOM_shading_rate +#define GL_QCOM_shading_rate 1 +#define GL_SHADING_RATE_QCOM 0x96A4 +#define GL_SHADING_RATE_PRESERVE_ASPECT_RATIO_QCOM 0x96A5 +#define GL_SHADING_RATE_1X1_PIXELS_QCOM 0x96A6 +#define GL_SHADING_RATE_1X2_PIXELS_QCOM 0x96A7 +#define GL_SHADING_RATE_2X1_PIXELS_QCOM 0x96A8 +#define GL_SHADING_RATE_2X2_PIXELS_QCOM 0x96A9 +#define GL_SHADING_RATE_4X2_PIXELS_QCOM 0x96AC +#define GL_SHADING_RATE_4X4_PIXELS_QCOM 0x96AE +typedef void (GL_APIENTRYP PFNGLSHADINGRATEQCOMPROC) (GLenum rate); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glShadingRateQCOM (GLenum rate); +#endif +#endif /* GL_QCOM_shading_rate */ + +#ifndef GL_QCOM_texture_foveated +#define GL_QCOM_texture_foveated 1 +#define GL_TEXTURE_FOVEATED_FEATURE_BITS_QCOM 0x8BFB +#define GL_TEXTURE_FOVEATED_MIN_PIXEL_DENSITY_QCOM 0x8BFC +#define GL_TEXTURE_FOVEATED_FEATURE_QUERY_QCOM 0x8BFD +#define GL_TEXTURE_FOVEATED_NUM_FOCAL_POINTS_QUERY_QCOM 0x8BFE +#define GL_FRAMEBUFFER_INCOMPLETE_FOVEATION_QCOM 0x8BFF +typedef void (GL_APIENTRYP PFNGLTEXTUREFOVEATIONPARAMETERSQCOMPROC) (GLuint texture, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTextureFoveationParametersQCOM (GLuint texture, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea); +#endif +#endif /* GL_QCOM_texture_foveated */ + +#ifndef GL_QCOM_texture_foveated2 +#define GL_QCOM_texture_foveated2 1 +#define GL_TEXTURE_FOVEATED_CUTOFF_DENSITY_QCOM 0x96A0 +#endif /* GL_QCOM_texture_foveated2 */ + +#ifndef GL_QCOM_texture_foveated_subsampled_layout +#define GL_QCOM_texture_foveated_subsampled_layout 1 +#define GL_FOVEATION_SUBSAMPLED_LAYOUT_METHOD_BIT_QCOM 0x00000004 +#define GL_MAX_SHADER_SUBSAMPLED_IMAGE_UNITS_QCOM 0x8FA1 +#endif /* GL_QCOM_texture_foveated_subsampled_layout */ + +#ifndef GL_QCOM_tiled_rendering +#define GL_QCOM_tiled_rendering 1 +#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 +#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 +#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 +#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 +#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 +#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 +#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 +#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 +#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 +#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 +#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 +#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 +#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 +#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 +#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 +#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 +#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 +#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 +#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 +#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 +#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 +#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 +#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 +#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 +#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 +#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 +#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 +#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 +#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 +#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 +#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 +#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 +typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); +#endif +#endif /* GL_QCOM_tiled_rendering */ + +#ifndef GL_QCOM_writeonly_rendering +#define GL_QCOM_writeonly_rendering 1 +#define GL_WRITEONLY_RENDERING_QCOM 0x8823 +#endif /* GL_QCOM_writeonly_rendering */ + +#ifndef GL_VIV_shader_binary +#define GL_VIV_shader_binary 1 +#define GL_SHADER_BINARY_VIV 0x8FC4 +#endif /* GL_VIV_shader_binary */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GLES2/gl2platform.h b/opengles/api/GLES2/gl2platform.h new file mode 100644 index 0000000000..5bcce6d89e --- /dev/null +++ b/opengles/api/GLES2/gl2platform.h @@ -0,0 +1,27 @@ +#ifndef __gl2platform_h_ +#define __gl2platform_h_ + +/* +** Copyright 2017-2020 The Khronos Group Inc. +** SPDX-License-Identifier: Apache-2.0 +*/ + +/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * Please contribute modifications back to Khronos as pull requests on the + * public github repository: + * https://github.com/KhronosGroup/OpenGL-Registry + */ + +#include <KHR/khrplatform.h> + +#ifndef GL_APICALL +#define GL_APICALL KHRONOS_APICALL +#endif + +#ifndef GL_APIENTRY +#define GL_APIENTRY KHRONOS_APIENTRY +#endif + +#endif /* __gl2platform_h_ */ diff --git a/opengles/api/GLES3/gl3.h b/opengles/api/GLES3/gl3.h new file mode 100644 index 0000000000..6bb4d8f919 --- /dev/null +++ b/opengles/api/GLES3/gl3.h @@ -0,0 +1,1192 @@ +#ifndef __gles2_gl3_h_ +#define __gles2_gl3_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#include <GLES3/gl3platform.h> + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY* +#endif + +#ifndef GL_GLES_PROTOTYPES +#define GL_GLES_PROTOTYPES 1 +#endif + +/* Generated on date 20210107 */ + +/* Generated C header for: + * API: gles2 + * Profile: common + * Versions considered: 2\.[0-9]|3\.0 + * Versions emitted: .* + * Default extensions included: None + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_ES_VERSION_2_0 +#define GL_ES_VERSION_2_0 1 +#include <KHR/khrplatform.h> +typedef khronos_int8_t GLbyte; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort; +typedef void GLvoid; +typedef struct __GLsync *GLsync; +typedef khronos_int64_t GLint64; +typedef khronos_uint64_t GLuint64; +typedef unsigned int GLenum; +typedef unsigned int GLuint; +typedef char GLchar; +typedef khronos_float_t GLfloat; +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +typedef unsigned int GLbitfield; +typedef int GLint; +typedef unsigned char GLboolean; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_FALSE 0 +#define GL_TRUE 1 +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_SHADER_TYPE 0x8B4F +#define GL_DELETE_STATUS 0x8B80 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_TEXTURE 0x1702 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_COMPILE_STATUS 0x8B81 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_NONE 0 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); +typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); +typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); +typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); +typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); +typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); +typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); +typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); +typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); +typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); +typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); +typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); +typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); +typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); +typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); +typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); +typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); +typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); +typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); +typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); +typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); +typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); +GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); +GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); +GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); +GL_APICALL void GL_APIENTRY glClearStencil (GLint s); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); +GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); +GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); +GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); +GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); +GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glDisable (GLenum cap); +GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glEnable (GLenum cap); +GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glFinish (void); +GL_APICALL void GL_APIENTRY glFlush (void); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); +GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); +GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL GLenum GL_APIENTRY glGetError (void); +GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); +GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); +GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); +GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); +GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); +GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); +GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); +GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); +GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); +GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); +GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +#endif +#endif /* GL_ES_VERSION_2_0 */ + +#ifndef GL_ES_VERSION_3_0 +#define GL_ES_VERSION_3_0 1 +typedef khronos_uint16_t GLhalf; +#define GL_READ_BUFFER 0x0C02 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_RED 0x1903 +#define GL_RGB8 0x8051 +#define GL_RGBA8 0x8058 +#define GL_RGB10_A2 0x8059 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_HALF_FLOAT 0x140B +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_RG8 0x822B +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFFu +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_SAMPLER_BINDING 0x8919 +#define GL_RGB10_A2UI 0x906F +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_GREEN 0x1904 +#define GL_BLUE 0x1905 +#define GL_INT_2_10_10_10_REV 0x8D9F +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +typedef void (GL_APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); +typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (GL_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); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (GL_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); +typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (GL_APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (GL_APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (GL_APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (GL_APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (GL_APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +typedef void (GL_APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); +typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); +GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); +GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); +GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); +GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); +GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); +GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); +GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); +GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); +GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); +GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); +GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); +GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); +GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); +GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); +GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); +GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); +GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); +GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); +GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); +GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); +GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); +GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); +GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); +GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); +GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); +GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); +GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); +GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); +GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); +GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); +GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params); +#endif +#endif /* GL_ES_VERSION_3_0 */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GLES3/gl31.h b/opengles/api/GLES3/gl31.h new file mode 100644 index 0000000000..502d6feec8 --- /dev/null +++ b/opengles/api/GLES3/gl31.h @@ -0,0 +1,1507 @@ +#ifndef __gles2_gl31_h_ +#define __gles2_gl31_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#include <GLES3/gl3platform.h> + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY* +#endif + +#ifndef GL_GLES_PROTOTYPES +#define GL_GLES_PROTOTYPES 1 +#endif + +/* Generated on date 20191013 */ + +/* Generated C header for: + * API: gles2 + * Profile: common + * Versions considered: 2\.[0-9]|3\.[01] + * Versions emitted: .* + * Default extensions included: None + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_ES_VERSION_2_0 +#define GL_ES_VERSION_2_0 1 +#include <KHR/khrplatform.h> +typedef khronos_int8_t GLbyte; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort; +typedef void GLvoid; +typedef struct __GLsync *GLsync; +typedef khronos_int64_t GLint64; +typedef khronos_uint64_t GLuint64; +typedef unsigned int GLenum; +typedef unsigned int GLuint; +typedef char GLchar; +typedef khronos_float_t GLfloat; +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +typedef unsigned int GLbitfield; +typedef int GLint; +typedef unsigned char GLboolean; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_FALSE 0 +#define GL_TRUE 1 +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_SHADER_TYPE 0x8B4F +#define GL_DELETE_STATUS 0x8B80 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_TEXTURE 0x1702 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_COMPILE_STATUS 0x8B81 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_NONE 0 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); +typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); +typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); +typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); +typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); +typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); +typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); +typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); +typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); +typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); +typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); +typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); +typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); +typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); +typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); +typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); +typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); +typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); +typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); +typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); +typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); +typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); +GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); +GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); +GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); +GL_APICALL void GL_APIENTRY glClearStencil (GLint s); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); +GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); +GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); +GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); +GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); +GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glDisable (GLenum cap); +GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glEnable (GLenum cap); +GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glFinish (void); +GL_APICALL void GL_APIENTRY glFlush (void); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); +GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); +GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL GLenum GL_APIENTRY glGetError (void); +GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); +GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); +GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); +GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); +GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); +GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); +GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); +GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); +GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); +GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); +GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +#endif +#endif /* GL_ES_VERSION_2_0 */ + +#ifndef GL_ES_VERSION_3_0 +#define GL_ES_VERSION_3_0 1 +typedef khronos_uint16_t GLhalf; +#define GL_READ_BUFFER 0x0C02 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_RED 0x1903 +#define GL_RGB8 0x8051 +#define GL_RGBA8 0x8058 +#define GL_RGB10_A2 0x8059 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_HALF_FLOAT 0x140B +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_RG8 0x822B +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFFu +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_SAMPLER_BINDING 0x8919 +#define GL_RGB10_A2UI 0x906F +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_GREEN 0x1904 +#define GL_BLUE 0x1905 +#define GL_INT_2_10_10_10_REV 0x8D9F +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +typedef void (GL_APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); +typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (GL_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); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (GL_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); +typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (GL_APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (GL_APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (GL_APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (GL_APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (GL_APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +typedef void (GL_APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); +typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); +GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); +GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); +GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); +GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); +GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); +GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); +GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); +GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); +GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); +GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); +GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); +GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); +GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); +GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); +GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); +GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); +GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); +GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); +GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); +GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); +GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); +GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); +GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); +GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); +GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); +GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); +GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); +GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); +GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); +GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +#endif +#endif /* GL_ES_VERSION_3_0 */ + +#ifndef GL_ES_VERSION_3_1 +#define GL_ES_VERSION_3_1 1 +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 +#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +#define GL_COMPUTE_SHADER_BIT 0x00000020 +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#define GL_MAX_UNIFORM_LOCATIONS 0x826E +#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +#define GL_UNIFORM 0x92E1 +#define GL_UNIFORM_BLOCK 0x92E2 +#define GL_PROGRAM_INPUT 0x92E3 +#define GL_PROGRAM_OUTPUT 0x92E4 +#define GL_BUFFER_VARIABLE 0x92E5 +#define GL_SHADER_STORAGE_BLOCK 0x92E6 +#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +#define GL_ACTIVE_RESOURCES 0x92F5 +#define GL_MAX_NAME_LENGTH 0x92F6 +#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +#define GL_NAME_LENGTH 0x92F9 +#define GL_TYPE 0x92FA +#define GL_ARRAY_SIZE 0x92FB +#define GL_OFFSET 0x92FC +#define GL_BLOCK_INDEX 0x92FD +#define GL_ARRAY_STRIDE 0x92FE +#define GL_MATRIX_STRIDE 0x92FF +#define GL_IS_ROW_MAJOR 0x9300 +#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +#define GL_BUFFER_BINDING 0x9302 +#define GL_BUFFER_DATA_SIZE 0x9303 +#define GL_NUM_ACTIVE_VARIABLES 0x9304 +#define GL_ACTIVE_VARIABLES 0x9305 +#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +#define GL_LOCATION 0x930E +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +#define GL_MAX_IMAGE_UNITS 0x8F38 +#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#define GL_IMAGE_BINDING_NAME 0x8F3A +#define GL_IMAGE_BINDING_LEVEL 0x8F3B +#define GL_IMAGE_BINDING_LAYERED 0x8F3C +#define GL_IMAGE_BINDING_LAYER 0x8F3D +#define GL_IMAGE_BINDING_ACCESS 0x8F3E +#define GL_IMAGE_BINDING_FORMAT 0x906E +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +#define GL_COMMAND_BARRIER_BIT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +#define GL_ALL_BARRIER_BITS 0xFFFFFFFF +#define GL_IMAGE_2D 0x904D +#define GL_IMAGE_3D 0x904E +#define GL_IMAGE_CUBE 0x9050 +#define GL_IMAGE_2D_ARRAY 0x9053 +#define GL_INT_IMAGE_2D 0x9058 +#define GL_INT_IMAGE_3D 0x9059 +#define GL_INT_IMAGE_CUBE 0x905B +#define GL_INT_IMAGE_2D_ARRAY 0x905E +#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_SHADER_STORAGE_BUFFER 0x90D2 +#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 +#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 +#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +#define GL_STENCIL_INDEX 0x1901 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_INTEGER_SAMPLES 0x9110 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_GREEN_SIZE 0x805D +#define GL_TEXTURE_BLUE_SIZE 0x805E +#define GL_TEXTURE_ALPHA_SIZE 0x805F +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_VERTEX_ATTRIB_BINDING 0x82D4 +#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +#define GL_VERTEX_BINDING_DIVISOR 0x82D6 +#define GL_VERTEX_BINDING_OFFSET 0x82D7 +#define GL_VERTEX_BINDING_STRIDE 0x82D8 +#define GL_VERTEX_BINDING_BUFFER 0x8F4F +#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 +typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +typedef GLuint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); +typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); +typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); +typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (GL_APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); +typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); +typedef void (GL_APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect); +GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); +GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); +GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); +GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); +GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); +GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); +GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline); +GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); +GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline); +GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); +GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline); +GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers); +GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); +GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); +GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); +GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); +#endif +#endif /* GL_ES_VERSION_3_1 */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GLES3/gl32.h b/opengles/api/GLES3/gl32.h new file mode 100644 index 0000000000..ae56b0e95f --- /dev/null +++ b/opengles/api/GLES3/gl32.h @@ -0,0 +1,1808 @@ +#ifndef __gles2_gl32_h_ +#define __gles2_gl32_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#include <GLES3/gl3platform.h> + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY* +#endif + +#ifndef GL_GLES_PROTOTYPES +#define GL_GLES_PROTOTYPES 1 +#endif + +/* Generated on date 20191013 */ + +/* Generated C header for: + * API: gles2 + * Profile: common + * Versions considered: 2\.[0-9]|3\.[012] + * Versions emitted: .* + * Default extensions included: None + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_ES_VERSION_2_0 +#define GL_ES_VERSION_2_0 1 +#include <KHR/khrplatform.h> +typedef khronos_int8_t GLbyte; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort; +typedef void GLvoid; +typedef struct __GLsync *GLsync; +typedef khronos_int64_t GLint64; +typedef khronos_uint64_t GLuint64; +typedef unsigned int GLenum; +typedef unsigned int GLuint; +typedef char GLchar; +typedef khronos_float_t GLfloat; +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +typedef unsigned int GLbitfield; +typedef int GLint; +typedef unsigned char GLboolean; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_FALSE 0 +#define GL_TRUE 1 +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_SHADER_TYPE 0x8B4F +#define GL_DELETE_STATUS 0x8B80 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_TEXTURE 0x1702 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_COMPILE_STATUS 0x8B81 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_NONE 0 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); +typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); +typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); +typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); +typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); +typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); +typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); +typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); +typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); +typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); +typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); +typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); +typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); +typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); +typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); +typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); +typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); +typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); +typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); +typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); +typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); +typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); +typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); +GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); +GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); +GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); +GL_APICALL void GL_APIENTRY glClearStencil (GLint s); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); +GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); +GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); +GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); +GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); +GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glDisable (GLenum cap); +GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glEnable (GLenum cap); +GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glFinish (void); +GL_APICALL void GL_APIENTRY glFlush (void); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); +GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); +GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL GLenum GL_APIENTRY glGetError (void); +GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); +GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); +GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); +GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); +GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); +GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); +GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); +GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); +GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); +GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); +GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +#endif +#endif /* GL_ES_VERSION_2_0 */ + +#ifndef GL_ES_VERSION_3_0 +#define GL_ES_VERSION_3_0 1 +typedef khronos_uint16_t GLhalf; +#define GL_READ_BUFFER 0x0C02 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_RED 0x1903 +#define GL_RGB8 0x8051 +#define GL_RGBA8 0x8058 +#define GL_RGB10_A2 0x8059 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_HALF_FLOAT 0x140B +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_RG8 0x822B +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFFu +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_SAMPLER_BINDING 0x8919 +#define GL_RGB10_A2UI 0x906F +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_GREEN 0x1904 +#define GL_BLUE 0x1905 +#define GL_INT_2_10_10_10_REV 0x8D9F +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +typedef void (GL_APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); +typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (GL_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); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (GL_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); +typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (GL_APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (GL_APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (GL_APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (GL_APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (GL_APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +typedef void (GL_APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); +typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); +GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); +GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); +GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); +GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); +GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); +GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); +GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); +GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); +GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); +GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); +GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); +GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); +GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); +GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); +GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); +GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); +GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); +GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); +GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); +GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); +GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); +GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); +GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); +GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); +GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); +GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); +GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); +GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); +GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); +GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +#endif +#endif /* GL_ES_VERSION_3_0 */ + +#ifndef GL_ES_VERSION_3_1 +#define GL_ES_VERSION_3_1 1 +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 +#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +#define GL_COMPUTE_SHADER_BIT 0x00000020 +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#define GL_MAX_UNIFORM_LOCATIONS 0x826E +#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +#define GL_UNIFORM 0x92E1 +#define GL_UNIFORM_BLOCK 0x92E2 +#define GL_PROGRAM_INPUT 0x92E3 +#define GL_PROGRAM_OUTPUT 0x92E4 +#define GL_BUFFER_VARIABLE 0x92E5 +#define GL_SHADER_STORAGE_BLOCK 0x92E6 +#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +#define GL_ACTIVE_RESOURCES 0x92F5 +#define GL_MAX_NAME_LENGTH 0x92F6 +#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +#define GL_NAME_LENGTH 0x92F9 +#define GL_TYPE 0x92FA +#define GL_ARRAY_SIZE 0x92FB +#define GL_OFFSET 0x92FC +#define GL_BLOCK_INDEX 0x92FD +#define GL_ARRAY_STRIDE 0x92FE +#define GL_MATRIX_STRIDE 0x92FF +#define GL_IS_ROW_MAJOR 0x9300 +#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +#define GL_BUFFER_BINDING 0x9302 +#define GL_BUFFER_DATA_SIZE 0x9303 +#define GL_NUM_ACTIVE_VARIABLES 0x9304 +#define GL_ACTIVE_VARIABLES 0x9305 +#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +#define GL_LOCATION 0x930E +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +#define GL_MAX_IMAGE_UNITS 0x8F38 +#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#define GL_IMAGE_BINDING_NAME 0x8F3A +#define GL_IMAGE_BINDING_LEVEL 0x8F3B +#define GL_IMAGE_BINDING_LAYERED 0x8F3C +#define GL_IMAGE_BINDING_LAYER 0x8F3D +#define GL_IMAGE_BINDING_ACCESS 0x8F3E +#define GL_IMAGE_BINDING_FORMAT 0x906E +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +#define GL_COMMAND_BARRIER_BIT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +#define GL_ALL_BARRIER_BITS 0xFFFFFFFF +#define GL_IMAGE_2D 0x904D +#define GL_IMAGE_3D 0x904E +#define GL_IMAGE_CUBE 0x9050 +#define GL_IMAGE_2D_ARRAY 0x9053 +#define GL_INT_IMAGE_2D 0x9058 +#define GL_INT_IMAGE_3D 0x9059 +#define GL_INT_IMAGE_CUBE 0x905B +#define GL_INT_IMAGE_2D_ARRAY 0x905E +#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_SHADER_STORAGE_BUFFER 0x90D2 +#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 +#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 +#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +#define GL_STENCIL_INDEX 0x1901 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_INTEGER_SAMPLES 0x9110 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_GREEN_SIZE 0x805D +#define GL_TEXTURE_BLUE_SIZE 0x805E +#define GL_TEXTURE_ALPHA_SIZE 0x805F +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_VERTEX_ATTRIB_BINDING 0x82D4 +#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +#define GL_VERTEX_BINDING_DIVISOR 0x82D6 +#define GL_VERTEX_BINDING_OFFSET 0x82D7 +#define GL_VERTEX_BINDING_STRIDE 0x82D8 +#define GL_VERTEX_BINDING_BUFFER 0x8F4F +#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 +typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +typedef GLuint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); +typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); +typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); +typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (GL_APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); +typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); +typedef void (GL_APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect); +GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); +GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); +GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); +GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); +GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); +GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); +GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); +GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline); +GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); +GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline); +GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); +GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline); +GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers); +GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); +GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); +GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); +GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); +#endif +#endif /* GL_ES_VERSION_3_1 */ + +#ifndef GL_ES_VERSION_3_2 +#define GL_ES_VERSION_3_2 1 +typedef void (GL_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +#define GL_MULTISAMPLE_LINE_WIDTH_RANGE 0x9381 +#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY 0x9382 +#define GL_MULTIPLY 0x9294 +#define GL_SCREEN 0x9295 +#define GL_OVERLAY 0x9296 +#define GL_DARKEN 0x9297 +#define GL_LIGHTEN 0x9298 +#define GL_COLORDODGE 0x9299 +#define GL_COLORBURN 0x929A +#define GL_HARDLIGHT 0x929B +#define GL_SOFTLIGHT 0x929C +#define GL_DIFFERENCE 0x929E +#define GL_EXCLUSION 0x92A0 +#define GL_HSL_HUE 0x92AD +#define GL_HSL_SATURATION 0x92AE +#define GL_HSL_COLOR 0x92AF +#define GL_HSL_LUMINOSITY 0x92B0 +#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +#define GL_DEBUG_SOURCE_API 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION 0x824A +#define GL_DEBUG_SOURCE_OTHER 0x824B +#define GL_DEBUG_TYPE_ERROR 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +#define GL_DEBUG_TYPE_PORTABILITY 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +#define GL_DEBUG_TYPE_OTHER 0x8251 +#define GL_DEBUG_TYPE_MARKER 0x8268 +#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +#define GL_DEBUG_TYPE_POP_GROUP 0x826A +#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +#define GL_BUFFER 0x82E0 +#define GL_SHADER 0x82E1 +#define GL_PROGRAM 0x82E2 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_QUERY 0x82E3 +#define GL_PROGRAM_PIPELINE 0x82E4 +#define GL_SAMPLER 0x82E6 +#define GL_MAX_LABEL_LENGTH 0x82E8 +#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES 0x9145 +#define GL_DEBUG_SEVERITY_HIGH 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +#define GL_DEBUG_SEVERITY_LOW 0x9148 +#define GL_DEBUG_OUTPUT 0x92E0 +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_SHADER_BIT 0x00000004 +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +#define GL_LAYER_PROVOKING_VERTEX 0x825E +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +#define GL_FIRST_VERTEX_CONVENTION 0x8E4D +#define GL_LAST_VERTEX_CONVENTION 0x8E4E +#define GL_UNDEFINED_VERTEX 0x8260 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +#define GL_PRIMITIVE_BOUNDING_BOX 0x92BE +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 +#define GL_CONTEXT_FLAGS 0x821E +#define GL_LOSE_CONTEXT_ON_RESET 0x8252 +#define GL_GUILTY_CONTEXT_RESET 0x8253 +#define GL_INNOCENT_CONTEXT_RESET 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 +#define GL_NO_RESET_NOTIFICATION 0x8261 +#define GL_CONTEXT_LOST 0x0507 +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +#define GL_PATCHES 0x000E +#define GL_PATCH_VERTICES 0x8E72 +#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +#define GL_TESS_GEN_MODE 0x8E76 +#define GL_TESS_GEN_SPACING 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +#define GL_TESS_GEN_POINT_MODE 0x8E79 +#define GL_ISOLINES 0x8E7A +#define GL_QUADS 0x0007 +#define GL_FRACTIONAL_ODD 0x8E7B +#define GL_FRACTIONAL_EVEN 0x8E7C +#define GL_MAX_PATCH_VERTICES 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 +#define GL_IS_PER_PATCH 0x92E7 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +#define GL_TESS_CONTROL_SHADER 0x8E88 +#define GL_TESS_EVALUATION_SHADER 0x8E87 +#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +#define GL_TEXTURE_BORDER_COLOR 0x1004 +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_TEXTURE_BUFFER_BINDING 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_IMAGE_BUFFER 0x9051 +#define GL_INT_IMAGE_BUFFER 0x905C +#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +#define GL_TEXTURE_BUFFER_OFFSET 0x919D +#define GL_TEXTURE_BUFFER_SIZE 0x919E +#define GL_COMPRESSED_RGBA_ASTC_4x4 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8 0x93B7 +#define GL_COMPRESSED_RGBA_ASTC_10x5 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_10x10 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_12x10 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12 0x93BD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 0x93DD +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +typedef void (GL_APIENTRYP PFNGLBLENDBARRIERPROC) (void); +typedef void (GL_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); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); +typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); +typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); +typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params); +typedef void (GL_APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (GL_APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void); +typedef void (GL_APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); +typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +#if GL_GLES_PROTOTYPES +GL_APICALL void GL_APIENTRY glBlendBarrier (void); +GL_APICALL void GL_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); +GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); +GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); +GL_APICALL void GL_APIENTRY glPopDebugGroup (void); +GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params); +GL_APICALL void GL_APIENTRY glEnablei (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glDisablei (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glBlendEquationi (GLuint buf, GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); +GL_APICALL void GL_APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GL_APICALL void GL_APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GL_APICALL GLboolean GL_APIENTRY glIsEnabledi (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +GL_APICALL void GL_APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glPrimitiveBoundingBox (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatus (void); +GL_APICALL void GL_APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GL_APICALL void GL_APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GL_APICALL void GL_APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GL_APICALL void GL_APIENTRY glMinSampleShading (GLfloat value); +GL_APICALL void GL_APIENTRY glPatchParameteri (GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); +GL_APICALL void GL_APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +#endif +#endif /* GL_ES_VERSION_3_2 */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GLES3/gl3platform.h b/opengles/api/GLES3/gl3platform.h new file mode 100644 index 0000000000..8699212de6 --- /dev/null +++ b/opengles/api/GLES3/gl3platform.h @@ -0,0 +1,27 @@ +#ifndef __gl3platform_h_ +#define __gl3platform_h_ + +/* +** Copyright 2017-2020 The Khronos Group Inc. +** SPDX-License-Identifier: Apache-2.0 +*/ + +/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * Please contribute modifications back to Khronos as pull requests on the + * public github repository: + * https://github.com/KhronosGroup/OpenGL-Registry + */ + +#include <KHR/khrplatform.h> + +#ifndef GL_APICALL +#define GL_APICALL KHRONOS_APICALL +#endif + +#ifndef GL_APIENTRY +#define GL_APIENTRY KHRONOS_APIENTRY +#endif + +#endif /* __gl3platform_h_ */ diff --git a/opengles/api/GLSC/1.0.1/gl.h b/opengles/api/GLSC/1.0.1/gl.h new file mode 100644 index 0000000000..9211565d9a --- /dev/null +++ b/opengles/api/GLSC/1.0.1/gl.h @@ -0,0 +1,578 @@ +#ifndef __gl_h_ +#define __gl_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef signed char GLbyte; +typedef int GLint; +typedef int GLsizei; +typedef unsigned char GLubyte; +typedef short GLshort; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef float GLfloat; +typedef float GLclampf; +typedef void GLvoid; +/* Internal convenience typedefs */ +typedef void (*_GLfuncptr)(void); + +/*************************************************************/ + +/* Extensions */ +#define GL_OSC_VERSION_1_0 1 +#define GL_EXT_paletted_texture 1 +#define GL_OES_single_precision 1 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* AlphaFunction */ +/* #define GL_LEQUAL 0x0203 */ +/* #define GL_ALWAYS 0x0207 */ + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 + +/* BlendingFactorSrc */ +/* #define GL_ONE 1 */ +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_SRC_ALPHA 0x0302 + +/* ColorMaterialFace */ +/* #define GL_FRONT_AND_BACK 0x0408 */ + +/* ColorMaterialParameter */ +/* #define GL_AMBIENT_AND_DIFFUSE 0x1602 */ + +/* ColorPointerType */ +/* #define GL_FLOAT 0x1406 */ +/* #define GL_UNSIGNED_BYTE 0x1401 */ + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* #define GL_LESS 0x0201 */ +/* #define GL_LEQUAL 0x0203 */ +/* #define GL_ALWAYS 0x0207 */ + +/* EnableCap */ +#define GL_LIGHTING 0x0B50 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_ALPHA_TEST 0x0BC0 +#define GL_BLEND 0x0BE2 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_POINT_SMOOTH 0x0B10 +#define GL_LINE_STIPPLE 0x0B24 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_NORMALIZE 0x0BA1 +#define GL_RESCALE_NORMAL 0x803A +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_STIPPLE 0x0B42 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_TEXTURE_COORD_ARRAY 0x8078 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FogMode */ + +/* FogParameter */ + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetBooleanv */ +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_COLOR_WRITEMASK 0x0C23 + +/* GetFloatv */ +#define GL_CURRENT_COLOR 0x0B00 +#define GL_CURRENT_NORMAL 0x0B02 +#define GL_CURRENT_TEXTURE_COORDS 0x0B03 +#define GL_CURRENT_RASTER_COLOR 0x0B04 +#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 +#define GL_POINT_SIZE 0x0B11 +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_LINE_WIDTH 0x0B21 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_ALPHA_TEST_REF 0x0BC2 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E + +/* GetIntegerv */ +#define GL_MATRIX_MODE 0x0BA0 +#define GL_VIEWPORT 0x0BA2 +#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 +#define GL_PROJECTION_STACK_DEPTH 0x0BA4 +#define GL_MODELVIEW_MATRIX 0x0BA6 +#define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_LINE_STIPPLE_PATTERN 0x0B25 +#define GL_LINE_STIPPLE_REPEAT 0x0B26 +#define GL_MAX_LIST_NESTING 0x0B31 +#define GL_LIST_BASE 0x0B32 +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_ALPHA_TEST_FUNC 0x0BC1 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_SRC 0x0BE1 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_LIGHTS 0x0D31 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 +#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_VERTEX_ARRAY_SIZE 0x807A +#define GL_VERTEX_ARRAY_TYPE 0x807B +#define GL_VERTEX_ARRAY_STRIDE 0x807C +#define GL_NORMAL_ARRAY_TYPE 0x807E +#define GL_NORMAL_ARRAY_STRIDE 0x807F +#define GL_COLOR_ARRAY_SIZE 0x8081 +#define GL_COLOR_ARRAY_TYPE 0x8082 +#define GL_COLOR_ARRAY_STRIDE 0x8083 +#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A +#define GL_SHADE_MODEL 0x0B54 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 + +/* GetMaterialfv */ +/* #define GL_AMBIENT 0x1200 */ +/* #define GL_DIFFUSE 0x1201 */ +/* #define GL_SPECULAR 0x1202 */ +/* #define GL_EMISSION 0x1600 */ +/* #define GL_SHININESS 0x1601 */ + +/* GetLightfv */ +/* #define GL_AMBIENT 0x1200 */ +/* #define GL_DIFFUSE 0x1201 */ +/* #define GL_SPECULAR 0x1202 */ +/* #define GL_POSITION 0x1203 */ + +/* GetPointerv */ +#define GL_VERTEX_ARRAY_POINTER 0x808E +#define GL_NORMAL_ARRAY_POINTER 0x808F +#define GL_COLOR_ARRAY_POINTER 0x8090 +#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 + +/* GetTexParameter */ +/* #define GL_TEXTURE_MAG_FILTER 0x2800 */ +/* #define GL_TEXTURE_MIN_FILTER 0x2801 */ +/* #define GL_TEXTURE_WRAP_S 0x2802 */ +/* #define GL_TEXTURE_WRAP_T 0x2803 */ + +/* GetTexEnvfv */ +/* #define GL_TEXTURE_ENV_MODE 0x2200 */ +/* #define GL_TEXTURE_ENV_COLOR 0x2201 */ + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 + +/* IsEnabled */ +/* #define GL_LIGHTING 0x0B50 */ +/* #define GL_TEXTURE_2D 0x0DE1 */ +/* #define GL_CULL_FACE 0x0B44 */ +/* #define GL_ALPHA_TEST 0x0BC0 */ +/* #define GL_BLEND 0x0BE2 */ +/* #define GL_STENCIL_TEST 0x0B90 */ +/* #define GL_DEPTH_TEST 0x0B71 */ +/* #define GL_LIGHT0 0x4000 */ +/* #define GL_LIGHT1 0x4001 */ +/* #define GL_POINT_SMOOTH 0x0B10 */ +/* #define GL_LINE_STIPPLE 0x0B24 */ +/* #define GL_LINE_SMOOTH 0x0B20 */ +/* #define GL_SCISSOR_TEST 0x0C11 */ +/* #define GL_COLOR_MATERIAL 0x0B57 */ +/* #define GL_NORMALIZE 0x0BA1 */ +/* #define GL_RESCALE_NORMAL 0x803A */ +/* #define GL_POLYGON_OFFSET_FILL 0x8037 */ +/* #define GL_POLYGON_STIPPLE 0x0B42 */ +/* #define GL_VERTEX_ARRAY 0x8074 */ +/* #define GL_NORMAL_ARRAY 0x8075 */ +/* #define GL_COLOR_ARRAY 0x8076 */ +/* #define GL_TEXTURE_COORD_ARRAY 0x8078 */ + +/* LightModelParameter */ +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 + +/* LightParameter */ +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_POSITION 0x1203 + +/* ListMode */ +#define GL_COMPILE 0x1300 +/* #define GL_COMPILE_AND_EXECUTE 0x1301 */ + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +/* #define GL_SHORT 0x1402 */ +/* #define GL_UNSIGNED_SHORT 0x1403 */ +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 + +/* LogicOp */ + +/* MaterialFace */ +/* #define GL_FRONT_AND_BACK 0x0408 */ + +/* MaterialParameter */ +/* #define GL_AMBIENT 0x1200 */ +/* #define GL_DIFFUSE 0x1201 */ +/* #define GL_SPECULAR 0x1202 */ +#define GL_EMISSION 0x1600 +#define GL_SHININESS 0x1601 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 + +/* MatrixMode */ +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 + +/* NormalPointerType */ +/* #define GL_FLOAT 0x1406 */ + +/* PixelFormat */ +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_COLOR_INDEX 0x1900 + +/* PixelStoreParameter */ +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 + +/* PixelType */ +/* #define GL_UNSIGNED_BYTE 0x1401 */ + +/* ReadPixels */ +#define GL_COLOR 0x1800 + +/* ShadingModel */ +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 + +/* StencilFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* StencilOp */ +/* #define GL_ZERO 0 */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TexCoordPointerType */ +/* #define GL_FLOAT 0x1406 */ + +/* TextureEnvMode */ +#define GL_MODULATE 0x2100 +#define GL_DECAL 0x2101 +/* #define GL_BLEND 0x0BE2 */ +#define GL_ADD 0x0104 +/* #define GL_REPLACE 0x1E01 */ + +/* TextureEnvParameter */ +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_ENV_COLOR 0x2201 + +/* TextureEnvTarget */ +#define GL_TEXTURE_ENV 0x2300 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* #define GL_NEAREST 0x2600 */ +/* #define GL_LINEAR 0x2601 */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 + +/* TextureTarget */ +/* #define GL_TEXTURE_2D 0x0DE1 */ + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F + +/* PixelInternalFormat */ +#define GL_COLOR_INDEX8_EXT 0x80E5 + +/* VertexPointerType */ +/* #define GL_FLOAT 0x1406 */ + +/* Paletted Textures Extension */ +#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8 +#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF + +/*************************************************************/ + +GLAPI void APIENTRY glActiveTexture (GLenum texture); +GLAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref); +GLAPI void APIENTRY glBegin(GLenum mode); +GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture); +GLAPI void APIENTRY glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); +GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GLAPI void APIENTRY glCallLists (GLsizei n, GLenum type, const GLvoid *lists); +GLAPI void APIENTRY glClear (GLbitfield mask); +GLAPI void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GLAPI void APIENTRY glClearDepthf (GLclampf depth); +GLAPI void APIENTRY glClearStencil (GLint s); +GLAPI void APIENTRY glClientActiveTexture (GLenum texture); +GLAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void APIENTRY glColor4fv (const GLfloat *v); +GLAPI void APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GLAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); +GLAPI void APIENTRY glCullFace (GLenum mode); +GLAPI void APIENTRY glDepthFunc (GLenum func); +GLAPI void APIENTRY glDepthMask (GLboolean flag); +GLAPI void APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); +GLAPI void APIENTRY glDisable (GLenum cap); +GLAPI void APIENTRY glDisableClientState (GLenum array); +GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); +GLAPI void APIENTRY glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glEnable (GLenum cap); +GLAPI void APIENTRY glEnableClientState (GLenum array); +GLAPI void APIENTRY glEnd (void); +GLAPI void APIENTRY glEndList (void); +GLAPI void APIENTRY glFinish (void); +GLAPI void APIENTRY glFlush (void); +GLAPI void APIENTRY glFrontFace (GLenum mode); +GLAPI void APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GLAPI GLuint APIENTRY glGenLists (GLsizei range); +GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GLAPI GLenum APIENTRY glGetError (void); +GLAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *params); +GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *table); +GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params); +GLAPI void APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetPointerv (GLenum pname, GLvoid * *params); +GLAPI void APIENTRY glGetPolygonStipple (GLubyte *mask); +GLAPI void APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI const GLubyte * APIENTRY glGetString (GLenum name); +GLAPI void APIENTRY glHint (GLenum target, GLenum mode); +GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap); +GLAPI void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glLineStipple (GLint factor, GLushort pattern); +GLAPI void APIENTRY glLineWidth (GLfloat width); +GLAPI void APIENTRY glListBase (GLuint base); +GLAPI void APIENTRY glLoadIdentity (void); +GLAPI void APIENTRY glLoadMatrixf (const GLfloat *m); +GLAPI void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMatrixMode (GLenum mode); +GLAPI void APIENTRY glMultMatrixf (const GLfloat *m); +GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glNewList (GLuint list, GLenum mode); +GLAPI void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); +GLAPI void APIENTRY glNormal3fv (const GLfloat *v); +GLAPI void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param); +GLAPI void APIENTRY glPointSize (GLfloat size); +GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GLAPI void APIENTRY glPolygonStipple (const GLubyte *mask); +GLAPI void APIENTRY glPopMatrix (void); +GLAPI void APIENTRY glPushMatrix (void); +GLAPI void APIENTRY glRasterPos3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +GLAPI void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glShadeModel (GLenum mode); +GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilMask (GLuint mask); +GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GLAPI void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertex2f (GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertex2fv (const GLfloat *v); +GLAPI void APIENTRY glVertex3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertex3fv (const GLfloat *v); +GLAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); + +#ifdef __cplusplus +} +#endif + +#endif /* __gl_h_ */ + + diff --git a/opengles/api/GLSC/1.0/gl.h b/opengles/api/GLSC/1.0/gl.h new file mode 100644 index 0000000000..d54ace7397 --- /dev/null +++ b/opengles/api/GLSC/1.0/gl.h @@ -0,0 +1,573 @@ +#ifndef __gl_h_ +#define __gl_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Copyright 1991-2000 Silicon Graphics, Inc. This document is + * licensed under the SGI Free Software B License. For details, see + * http://oss.sgi.com/projects/FreeB/ + */ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SYMBIAN32__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef signed char GLbyte; +typedef int GLint; +typedef int GLsizei; +typedef unsigned char GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef float GLfloat; +typedef float GLclampf; +typedef void GLvoid; +/* Internal convenience typedefs */ +typedef void (*_GLfuncptr)(); + +/*************************************************************/ + +/* Extensions */ +#define GL_OES_SC_VERSION_1_0 1 +#define GL_EXT_paletted_texture 1 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* AlphaFunction */ +/* #define GL_LEQUAL 0x0203 */ +/* #define GL_ALWAYS 0x0207 */ + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 + +/* BlendingFactorSrc */ +/* #define GL_ONE 1 */ +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_SRC_ALPHA 0x0302 + +/* ColorMaterialFace */ +/* #define GL_FRONT_AND_BACK 0x0408 */ + +/* ColorMaterialParameter */ +/* #define GL_AMBIENT_AND_DIFFUSE 0x1602 */ + +/* ColorPointerType */ +/* #define GL_FLOAT 0x1406 */ +/* #define GL_UNSIGNED_BYTE 0x1401 */ + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* #define GL_LESS 0x0201 */ +/* #define GL_LEQUAL 0x0203 */ +/* #define GL_ALWAYS 0x0207 */ + +/* EnableCap */ +#define GL_LIGHTING 0x0B50 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_ALPHA_TEST 0x0BC0 +#define GL_BLEND 0x0BE2 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_POINT_SMOOTH 0x0B10 +#define GL_LINE_STIPPLE 0x0B24 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_NORMALIZE 0x0BA1 +#define GL_RESCALE_NORMAL 0x803A +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_STIPPLE 0x0B42 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_TEXTURE_COORD_ARRAY 0x8078 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FogMode */ + +/* FogParameter */ + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetBooleanv */ +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_COLOR_WRITEMASK 0x0C23 + +/* GetFloatv */ +#define GL_CURRENT_COLOR 0x0B00 +#define GL_CURRENT_NORMAL 0x0B02 +#define GL_CURRENT_TEXTURE_COORDS 0x0B03 +#define GL_CURRENT_RASTER_COLOR 0x0B04 +#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 +#define GL_POINT_SIZE 0x0B11 +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_LINE_WIDTH 0x0B21 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_ALPHA_TEST_REF 0x0BC2 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E + +/* GetIntegerv */ +#define GL_MATRIX_MODE 0x0BA0 +#define GL_VIEWPORT 0x0BA2 +#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 +#define GL_PROJECTION_STACK_DEPTH 0x0BA4 +#define GL_MODELVIEW_MATRIX 0x0BA6 +#define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_LINE_STIPPLE_PATTERN 0x0B25 +#define GL_LINE_STIPPLE_REPEAT 0x0B26 +#define GL_MAX_LIST_NESTING 0x0B31 +#define GL_LIST_BASE 0x0B32 +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_ALPHA_TEST_FUNC 0x0BC1 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_SRC 0x0BE1 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_LIGHTS 0x0D31 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 +#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_VERTEX_ARRAY_SIZE 0x807A +#define GL_VERTEX_ARRAY_TYPE 0x807B +#define GL_VERTEX_ARRAY_STRIDE 0x807C +#define GL_NORMAL_ARRAY_TYPE 0x807E +#define GL_NORMAL_ARRAY_STRIDE 0x807F +#define GL_COLOR_ARRAY_SIZE 0x8081 +#define GL_COLOR_ARRAY_TYPE 0x8082 +#define GL_COLOR_ARRAY_STRIDE 0x8083 +#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A +#define GL_SHADE_MODEL 0x0B54 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 + +/* GetMaterialfv */ +/* #define GL_AMBIENT 0x1200 */ +/* #define GL_DIFFUSE 0x1201 */ +/* #define GL_SPECULAR 0x1202 */ +/* #define GL_EMISSION 0x1600 */ +/* #define GL_SHININESS 0x1601 */ + +/* GetLightfv */ +/* #define GL_AMBIENT 0x1200 */ +/* #define GL_DIFFUSE 0x1201 */ +/* #define GL_SPECULAR 0x1202 */ +/* #define GL_POSITION 0x1203 */ + +/* GetPointerv */ +#define GL_VERTEX_ARRAY_POINTER 0x808E +#define GL_NORMAL_ARRAY_POINTER 0x808F +#define GL_COLOR_ARRAY_POINTER 0x8090 +#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 + +/* GetTexParameter */ +/* #define GL_TEXTURE_MAG_FILTER 0x2800 */ +/* #define GL_TEXTURE_MIN_FILTER 0x2801 */ +/* #define GL_TEXTURE_WRAP_S 0x2802 */ +/* #define GL_TEXTURE_WRAP_T 0x2803 */ + +/* GetTexEnvfv */ +/* #define GL_TEXTURE_ENV_MODE 0x2200 */ +/* #define GL_TEXTURE_ENV_COLOR 0x2201 */ + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 + +/* IsEnabled */ +/* #define GL_LIGHTING 0x0B50 */ +/* #define GL_TEXTURE_2D 0x0DE1 */ +/* #define GL_CULL_FACE 0x0B44 */ +/* #define GL_ALPHA_TEST 0x0BC0 */ +/* #define GL_BLEND 0x0BE2 */ +/* #define GL_STENCIL_TEST 0x0B90 */ +/* #define GL_DEPTH_TEST 0x0B71 */ +/* #define GL_LIGHT0 0x4000 */ +/* #define GL_LIGHT1 0x4001 */ +/* #define GL_POINT_SMOOTH 0x0B10 */ +/* #define GL_LINE_STIPPLE 0x0B24 */ +/* #define GL_LINE_SMOOTH 0x0B20 */ +/* #define GL_SCISSOR_TEST 0x0C11 */ +/* #define GL_COLOR_MATERIAL 0x0B57 */ +/* #define GL_NORMALIZE 0x0BA1 */ +/* #define GL_RESCALE_NORMAL 0x803A */ +/* #define GL_POLYGON_OFFSET_FILL 0x8037 */ +/* #define GL_POLYGON_STIPPLE 0x0B42 */ +/* #define GL_VERTEX_ARRAY 0x8074 */ +/* #define GL_NORMAL_ARRAY 0x8075 */ +/* #define GL_COLOR_ARRAY 0x8076 */ +/* #define GL_TEXTURE_COORD_ARRAY 0x8078 */ + +/* LightModelParameter */ +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 + +/* LightParameter */ +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_POSITION 0x1203 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_FLOAT 0x1406 + +/* LogicOp */ + +/* MaterialFace */ +/* #define GL_FRONT_AND_BACK 0x0408 */ + +/* MaterialParameter */ +/* #define GL_AMBIENT 0x1200 */ +/* #define GL_DIFFUSE 0x1201 */ +/* #define GL_SPECULAR 0x1202 */ +#define GL_EMISSION 0x1600 +#define GL_SHININESS 0x1601 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 + +/* MatrixMode */ +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 + +/* NormalPointerType */ +/* #define GL_FLOAT 0x1406 */ + +/* PixelFormat */ +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_COLOR_INDEX 0x1900 + +/* PixelStoreParameter */ +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 + +/* PixelType */ +/* #define GL_UNSIGNED_BYTE 0x1401 */ + +/* ReadPixels */ +#define GL_COLOR 0x1800 + +/* ShadingModel */ +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 + +/* StencilFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* StencilOp */ +/* #define GL_ZERO 0 */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TexCoordPointerType */ +/* #define GL_FLOAT 0x1406 */ + +/* TextureEnvMode */ +#define GL_MODULATE 0x2100 +#define GL_DECAL 0x2101 +/* #define GL_BLEND 0x0BE2 */ +#define GL_ADD 0x0104 +/* #define GL_REPLACE 0x1E01 */ + +/* TextureEnvParameter */ +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_ENV_COLOR 0x2201 + +/* TextureEnvTarget */ +#define GL_TEXTURE_ENV 0x2300 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* #define GL_NEAREST 0x2600 */ +/* #define GL_LINEAR 0x2601 */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 + +/* TextureTarget */ +/* #define GL_TEXTURE_2D 0x0DE1 */ + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F + +/* PixelInternalFormat */ +#define GL_COLOR_INDEX8_EXT 0x80E5 + +/* VertexPointerType */ +/* #define GL_FLOAT 0x1406 */ + +/* Paletted Textures Extension */ +#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8 +#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF + +/*************************************************************/ + +GLAPI void APIENTRY glActiveTexture (GLenum texture); +GLAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref); +GLAPI void APIENTRY glBegin(GLenum mode); +GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture); +GLAPI void APIENTRY glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); +GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GLAPI void APIENTRY glCallLists (GLsizei n, GLenum type, const GLvoid *lists); +GLAPI void APIENTRY glClear (GLbitfield mask); +GLAPI void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GLAPI void APIENTRY glClearDepthf (GLclampf depth); +GLAPI void APIENTRY glClearStencil (GLint s); +GLAPI void APIENTRY glClientActiveTexture (GLenum texture); +GLAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void APIENTRY glColor4fv (const GLfloat *v); +GLAPI void APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GLAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); +GLAPI void APIENTRY glCullFace (GLenum mode); +GLAPI void APIENTRY glDepthFunc (GLenum func); +GLAPI void APIENTRY glDepthMask (GLboolean flag); +GLAPI void APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); +GLAPI void APIENTRY glDisable (GLenum cap); +GLAPI void APIENTRY glDisableClientState (GLenum array); +GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); +GLAPI void APIENTRY glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glEnable (GLenum cap); +GLAPI void APIENTRY glEnableClientState (GLenum array); +GLAPI void APIENTRY glEnd (void); +GLAPI void APIENTRY glEndList (void); +GLAPI void APIENTRY glFinish (void); +GLAPI void APIENTRY glFlush (void); +GLAPI void APIENTRY glFrontFace (GLenum mode); +GLAPI void APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GLAPI GLuint APIENTRY glGenLists (GLsizei range); +GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GLAPI GLenum APIENTRY glGetError (void); +GLAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *params); +GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *table); +GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params); +GLAPI void APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetPointerv (GLenum pname, GLvoid * *params); +GLAPI void APIENTRY glGetPolygonStipple (GLubyte *mask); +GLAPI void APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI const GLubyte * APIENTRY glGetString (GLenum name); +GLAPI void APIENTRY glHint (GLenum target, GLenum mode); +GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap); +GLAPI void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glLightModelf (GLenum pname, GLfloat param); +GLAPI void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glLineStipple (GLint factor, GLushort pattern); +GLAPI void APIENTRY glLineWidth (GLfloat width); +GLAPI void APIENTRY glListBase (GLuint base); +GLAPI void APIENTRY glLoadIdentity (void); +GLAPI void APIENTRY glLoadMatrixf (const GLfloat *m); +GLAPI void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMatrixMode (GLenum mode); +GLAPI void APIENTRY glMultMatrixf (const GLfloat *m); +GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glNewList (GLuint list, GLenum mode); +GLAPI void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); +GLAPI void APIENTRY glNormal3fv (const GLfloat *v); +GLAPI void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param); +GLAPI void APIENTRY glPointSize (GLfloat size); +GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GLAPI void APIENTRY glPolygonStipple (const GLubyte *mask); +GLAPI void APIENTRY glPopMatrix (void); +GLAPI void APIENTRY glPushMatrix (void); +GLAPI void APIENTRY glRasterPos3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +GLAPI void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glShadeModel (GLenum mode); +GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilMask (GLuint mask); +GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GLAPI void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertex2f (GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertex2fv (const GLfloat *v); +GLAPI void APIENTRY glVertex3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertex3fv (const GLfloat *v); +GLAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); + +#ifdef __cplusplus +} +#endif + +#endif /* __gl_h_ */ + diff --git a/opengles/api/GLSC2/gl2platform.h b/opengles/api/GLSC2/gl2platform.h new file mode 100644 index 0000000000..3c182230f0 --- /dev/null +++ b/opengles/api/GLSC2/gl2platform.h @@ -0,0 +1,27 @@ +#ifndef __gl2platform_h_ +#define __gl2platform_h_ + +/* +** Copyright 2017-2020 The Khronos Group Inc. +** SPDX-License-Identifier: Apache-2.0 +*/ + +/* Platform-specific types and definitions for OpenGL SC 2.0 glsc2.h + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * Please contribute modifications back to Khronos as pull requests on the + * public github repository: + * https://github.com/KhronosGroup/OpenGL-Registry + */ + +#include <KHR/khrplatform.h> + +#ifndef GL_APICALL +#define GL_APICALL KHRONOS_APICALL +#endif + +#ifndef GL_APIENTRY +#define GL_APIENTRY KHRONOS_APIENTRY +#endif + +#endif /* __gl2platform_h_ */ diff --git a/opengles/api/GLSC2/glsc2.h b/opengles/api/GLSC2/glsc2.h new file mode 100644 index 0000000000..9480202660 --- /dev/null +++ b/opengles/api/GLSC2/glsc2.h @@ -0,0 +1,443 @@ +#ifndef __glsc2_glsc2_h_ +#define __glsc2_glsc2_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#include <GLSC2/gl2platform.h> + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY* +#endif + +/* Generated on date 20191013 */ + +/* Generated C header for: + * API: glsc2 + * Profile: common + * Versions considered: 2\.[0-9] + * Versions emitted: .* + * Default extensions included: None + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_SC_VERSION_2_0 +#define GL_SC_VERSION_2_0 1 +#include <KHR/khrplatform.h> +typedef khronos_int8_t GLbyte; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort; +typedef unsigned int GLenum; +typedef unsigned int GLuint; +typedef khronos_float_t GLfloat; +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +typedef unsigned int GLbitfield; +typedef int GLint; +typedef unsigned char GLboolean; +typedef int GLsizei; +typedef char GLchar; +typedef khronos_uint8_t GLubyte; +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_FALSE 0 +#define GL_TRUE 1 +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_CONTEXT_LOST 0x0507 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_RED 0x1903 +#define GL_RG 0x8227 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_LINK_STATUS 0x8B82 +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#define GL_TEXTURE 0x1702 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_SAMPLER_2D 0x8B5E +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_R8 0x8229 +#define GL_RG8 0x822B +#define GL_RGB8 0x8051 +#define GL_RGBA8 0x8058 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_NONE 0 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_GUILTY_CONTEXT_RESET 0x8253 +#define GL_INNOCENT_CONTEXT_RESET 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET 0x8255 +#define GL_CONTEXT_ROBUST_ACCESS 0x90F3 +#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 +#define GL_LOSE_CONTEXT_ON_RESET 0x8252 +GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); +GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); +GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); +GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); +GL_APICALL void GL_APIENTRY glClearStencil (GLint s); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); +GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); +GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); +GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); +GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glDisable (GLenum cap); +GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glEnable (GLenum cap); +GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glFinish (void); +GL_APICALL void GL_APIENTRY glFlush (void); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); +GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); +GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); +GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL GLenum GL_APIENTRY glGetError (void); +GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatus (void); +GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); +GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); +GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +#endif /* GL_SC_VERSION_2_0 */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/api/GLSC2/glsc2ext.h b/opengles/api/GLSC2/glsc2ext.h new file mode 100644 index 0000000000..e7dd8d2552 --- /dev/null +++ b/opengles/api/GLSC2/glsc2ext.h @@ -0,0 +1,67 @@ +#ifndef __glsc2_glsc2ext_h_ +#define __glsc2_glsc2ext_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright 2013-2020 The Khronos Group Inc. +** SPDX-License-Identifier: MIT +** +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** https://github.com/KhronosGroup/OpenGL-Registry +*/ + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY* +#endif + +/* Generated on date 20191013 */ + +/* Generated C header for: + * API: glsc2 + * Profile: common + * Versions considered: 2\.[0-9] + * Versions emitted: _nomatch_^ + * Default extensions included: glsc2 + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef GL_OES_depth24 +#define GL_OES_depth24 1 +#define GL_DEPTH_COMPONENT24_OES 0x81A6 +#endif /* GL_OES_depth24 */ + +#ifndef GL_OES_depth32 +#define GL_OES_depth32 1 +#define GL_DEPTH_COMPONENT32_OES 0x81A7 +#endif /* GL_OES_depth32 */ + +#ifndef GL_OES_rgb8_rgba8 +#define GL_OES_rgb8_rgba8 1 +#define GL_RGB8_OES 0x8051 +#define GL_RGBA8_OES 0x8058 +#endif /* GL_OES_rgb8_rgba8 */ + +#ifndef GL_OES_standard_derivatives +#define GL_OES_standard_derivatives 1 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B +#endif /* GL_OES_standard_derivatives */ + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_EXT_texture_compression_s3tc 1 +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif /* GL_EXT_texture_compression_s3tc */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengles/docs/GLSLExtensionRules.txt b/opengles/docs/GLSLExtensionRules.txt new file mode 100644 index 0000000000..f02fa59a7e --- /dev/null +++ b/opengles/docs/GLSLExtensionRules.txt @@ -0,0 +1,409 @@ +OpenGL(R) Shading Language Extension Conventions + +Last Modified Date: 2006/12/18 +Author Revision: 11 + +Document Source: the OpenGL Extension Registry at + + http://www.opengl.org/registry/ + +Contributors: + + Pat Brown, NVIDIA + John Kessenich, 3Dlabs + Jon Leech + Barthold Lichtenbelt, 3Dlabs + Bill Licea-Kane, ATI + Kent Lin, Intel + Jeremy Sandmel, ATI + Folker Schamel, Spinor + +The ARB OpenGL Shading Language working group has defined the following +conventions for writing OpenGL extension specifications that extend the +Shading Language syntax or semantics. + +======================================================================= + +Section #1: Conventions to avoid name-space collision + + We expect the Shading Language to continue to evolve through the + use of vendor, EXT, and ARB extensions, as well as through + revisions to the core language specification itself. As a result, + we'd like to establish some name conventions to avoid name-space + collisions between vendors and between the extensions and the core + language. + + We have the same kinds of concerns that resulted in the need for + naming and syntax rules document for the non-shader parts of + OpenGL: + + http://www.opengl.org/registry/doc/rules.html#spec_naming + + We expect that we will need to affix new names with vendor tags + where appropriate, and change and/or remove these tags as + extensions are promoted, in the same fashion as for core GL + function and token names. + + The fact that the Shading Language is modeled after C/C++ means + that we have some additional requirements for what the language + should "look" like. + + Consequently, vendors must use the following naming conventions + when creating new OpenGL extensions that affect the syntax of the + Shading Language. + + General principles: + + - New syntax defined by an extension should be suffixed with a + vendor specific extension (EXT, ARB, SGI, etc), + except as noted below where the constraints of + being "C-like" make it unpalatble. + - Vendors should make a good faith effort to ensure that new + shading language extensions do not conflict in syntax or + semantics with the extensions of other vendors + or the ARB. + + Rules for adding or modifying specific Shading Language + constructs defined by extensions follow. + + Note: VEN stands for any vendor tag, e.g. ARB, EXT, SGI, etc. + + Summary: + -------- + 1a) variables: gl_<Name>VEN + 1b) keywords: __<name>VEN + 1c) data types: + 1c1) keywords: __<name>VEN + 1c2) derived types: gl_<Name>VEN + 1d) operators: use new data types as operands or ask ARB + 1e) functions: <name>VEN + + Details: + -------- + 1a) Variables + STATUS: RESOLVED + + New variables defined by an extension should use: + prefix: "gl_" (lower case, single underscore) + suffix: "VEN" (no underscore) + + Form: + gl_<Name>VEN + + <Name> is subject to these constraints: + - Each word in <Name> must start with a capital letter. + - Words should be concatenated, not separated with + underscores. + - Don't use an underscore to separate the + final VEN suffix. + + Notes: + All of the variables defined in the core + shading language specification already follow this + convention. + + New variables added by shading language extensions should + match the naming style of the core specification + where possible. + + Examples: + uniform float gl_SomeNewBuiltinScalarARB; + varying vec4 gl_YetAnotherVaryingEXT; + attribute vec4 gl_OneMoreAttributeATI + + 1b) keywords: + STATUS: RESOLVED + + New keywords defined by an extension should use: + prefix: "__" (double underscore) + suffix: VEN (no underscore) + + Form: + __<name>VEN + + Notes: + New keywords should be prefixed with "__" because this is + how C/C++ handle keyword extensions. The core language + specification reserves the use of "__" anywhere within a + keyword so that future language revisions from the ARB will + not conflict with user level names. + + To avoid name collisions between OpenGL implementations from + different IHV's, extended keywords should also use a vendor + suffix. + + The working group considered requiring a "gl_" for the + prefix instead of "__", but felt this diverged too far from + the conventions of C/C++ + + Examples: + __float4EXT + __sampler4DSGI + __elifARB + __some_new_kind_of_while_loopARB + + 1c) New data types: + STATUS: RESOLVED + + Naming conventions for new data types defined by an extension + differ depending on whether the data type is a new fundamental + type defined as a keyword (case 1c1), or a new derived type + defined by Shading Language constructs (case 1c2). Currently the + only derived types are "struct"s. + + 1c1) For new data type keywords defined by an extension: + + prefix: "__" (double underscore) + suffix: VEN + + Form: + __<name>VEN + + Examples: + __float4SGI + __half2NV + __triplefloatARB + __mat5EXT + + 1c2) For new derived types defined by an extension: + + prefix: "gl_" (gl and single underscore) + suffix: VEN + + Form: + gl_<name>VEN + + Examples: + gl_skinningParametersEXT + gl_newDerivedStateStructARB + + Notes: + If new data types are defined as keywords, then they + should follow the rules for keywords. If new data types + are derived types, then they should follow a different + naming convention, like the one for variables. + + New data types should not be added as keywords unless + absolutely necessary. + + 1d) New operators: + STATUS: RESOLVED + + To avoid name space collisions for new operators + defined by an extension, or existing operators whose + behavior is re-defined by an extensions, extensions should + either: + + 1d1) Add a new data type along with the operator and use at + least one of these new data types for the operands of the + (re)defined operator. The new data type name should follow + the rules given in (1c) above for new data types. + + or + + 1d2) For IHVs who want to define a new operator to work on + existing data types or to redefine an existing operator to + work on existing data types, the IHV should come to the ARB + and request the new operator to avoid colliding with any + upcoming uses for the operator by the ARB. + + Examples: + An extension which overloads the "+" operator to add an int + and a "triple" should define a new gl_tripleEXT type, then + define the behavior of the + operator when one operand is an + int and the other is a gl_tripleEXT. + + An extension needing to overload the "+" operator to add an + int and a float must obtain permission from the ARB. If it + approves, the ARB would revise the shading language grammar + to define the behavior of the + operator when one operand is + an int and the other is a float. + + An extension needing to define an entirely new operator for + exponentiation must obtain permission from the ARB. If it + approves, the ARB would agree to reserve an appropriate new + operator, such as "**", and the extension would define the + behavior of that operator with respect to some data types. + + Notes: + On the surface, operators by themselves need no additional + name-space syntax. No one wants "+" redefined as gl_+ARB, for + instance. + + However, the ARB still wants to avoid name space and semantic + collisions as extensions are promoted. The ARB reserves the + use of operators with existing types. + + Therefore we've adopted the two-pronged approach listed above. + (A) is borrowed from C++ operator overloading conventions. + (B) is a fall-back position in the event that (A) is + inconvenient. + + 1e) functions: + STATUS: RESOLVED + + New functions defined by an extension should use: + prefix: none (note, no "gl_" or "__") + suffix: VEN + + Form: + <name>VEN + + Examples: + newfunctionEXT() + SomeOtherFuncARB() + Yet_Another_FunctionSGI() + + Notes: + Since none of the standard core Shading Language functions + start with the "gl_" prefix, new functions do not need this + prefix either. There is no need to avoid collisions between + implementation-defined and user-defined functions, because + the Shading Language specifically allows user overloading of + built-in functions. In other words, name collisions are + expected and intentional. Further, when a name collision + occurs between a user function and an implementation-defined + function, the user function takes precedence. + + However, we still must avoid name collisions between IHV's + and to allow for promotion of new functions into EXT, ARB + and core status. So, new functions should use a VENDOR + suffix. + + +============================================================= + +Section #2: Protocol for accessing extension features in the + shading language + + 2a) Extension #defines? + + STATUS: RESOLVED + + Every extension which affects shading language semantics or + syntax must create a Shading Language preprocessor #define that + matches the GL extension name string. This #define would be + available in the shading language if and only if the extension + were supported on a given Shading Language implementation. + + Further, extensions which do not affect shading language + semantics or syntax *must not* create this Shading Language + preprocessor #define. + + The extension-writing template in the OpenGL Extension Registry + will be updated to include a placeholder for shading language + extensions showing the corresponding #define. + + Example: + An extension which adds the extension string + "GL_ARB_shading_extension_1" + should also add a Shading Language preprocessor #define called + GL_ARB_shading_extension_1 + + Doing so means that a shader can do something like: + + #ifdef GL_ARB_shading_extension_1 + // do something using the extension + #else + // do something else or #error! + #endif + + Notes: + If an application wishes to emulate this behavior for any + other extensions which do not directly affect the shading + language syntax or behavior, they can simply query the + extension string for the presence of these extensions and + create their own #defines to be prepended to their shader + strings. + + Pseudo-code example: + char* prefixStr; + if (glIsExtensionSupported("GL_ARB_texture_mirrored_repeat")) + { + ConcatString(prefixStr, "#define GL_ARB_texture_mirrored_repeat 1\n"); + } + // use prefixStr as the first string given to glShaderSource() + + 2b) Should we allow and/or require a shader author to declare + their intended use of a given extension prior to use? + + STATUS: RESOLVED - YES + + The ARB has received developer feedback requesting we strive + towards portability in the shading language. The concern is + shaders written on one implementation with an extension will not + run on an implementation without the extension and that without + an explicit "enable", the shader author may not realize that + he/she was using any extended features. + + After much discussion, the resolution is as follows: + + For any extension which can affect shaders written without + knowledge of the extension (i.e. no change in syntax to the + shading language), the extension must introduce an API which + explicitly "enables" the extended behavior. New extensions + should not be allowed to change the behavior of old shaders + without an explicit request to do so from the application. + + Further, for any extension which affects the syntax or semantics + of the shading language, the shader author must explicitly make + a request allow the use of the extension, by inserting this + request within the shader text itself. + + This request is made using the following syntax: + #extension <name> : <behavior> + where + <name> = the GL extension name string (as defined in section 2a, + starting with "GL_"). + and + <behavior> can be one of the following: + require, enable, warn, or disable + + Example: + To use an extension which adds the extension string + "GL_ARB_shading_extension_1", a shader should include a line like: + + #extension GL_ARB_shading_extension_1: enable + + See section 3.3 of the OpenGL Shading Language specification + (Language Version 1.20) for details about using this mechanism. + +----------------------------------- + +Revision history: + + #11 - 12/18/2006 - Jon Leech + - Clarify that #extension name must be the extension name string + starting with "GL_", give an example, fix an old URL. + + #10 - 10/09/2006 - Jon Leech + - Move registry URL to www.opengl.org. + + #9 - 05/12/2004 - js + - no changes from rev #8, whitespace cleanup only + + #8 - 05/11/2004 - js + - minor typos fixed + - cleaned up language about when to use 1c1 or 1c2 + + #7 - 05/07/2004 - Jon Leech + - language cleanups including removing use of "built in" + + #6 - 04/29/04 - js + - cleaned up psuedo code example in section 2a + - change language about "decorate"ing names to "affix" + + #5 - 04/29/04 - js + - added to contributors list + + #4 - 04/29/04 - js + - cleaned up section 2 to reflect #extension resolution + + #3 - 03/15/04 - js + - summarized section 1 conventions on name decorations + + #2 - 03/24/04 - js + - reorganized doc to reflect recent working group discussions + + #1 - 03/19/04 - js + - initial revision diff --git a/opengles/docs/enums.html b/opengles/docs/enums.html new file mode 100644 index 0000000000..5bdb42de17 --- /dev/null +++ b/opengles/docs/enums.html @@ -0,0 +1,133 @@ +<html> + +<head> +<title>OpenGL Enumerant Allocation Policies + + + +

OpenGL Enumerant Allocation Policies

+ +

If an OpenGL vendor defines a single-vendor OpenGL or GLX extension + that requires one or more new enumerant values, then each of those + values must be contained in a block of enumerant values that has + been allocated by Khronos for the exclusive use of that vendor. + Khronos maintains a registry of such allocations. To allocate + enumerants, file a request against project 'registry' in the Khronos + Bugzilla. If you are unable to access Bugzilla, you may submit a + request via email to "registry 'at' khronos.org". However, + response time to email requests is unpredictable. + +

OpenGL and OpenGL ES use enumerant values in the range [0,24575], as + well as reusing some enumerant values in the range [32768,65535]. + The latter values were initially assigned to extensions which later + became part of the OpenGL core. Enumerant values are grouped into + blocks of 16 values, and each block begins with a value that is a + multiple of 16. Most blocks in the range [0,24575] are unused, and + reserved for use with future versions of OpenGL. + +

Historically, enumerant values for some single-vendor extensions + were allocated in blocks of 1000, beginning with the block + [102000,102999] and progressing upward. Values in this range cannot + be represented as 16-bit unsigned integers. This imposes a + significant and unnecessary performance penalty on some + implementations. Such blocks that have already been allocated to + vendors will remain allocated unless and until the vendor + voluntarily releases the entire block, but no further blocks in this + range will be allocated. + +

Allocating Enumerants

+ +

Enumerant values for single-vendor extensions will be allocated upon + request in blocks of 16 values, beginning with the block + [32768,32783] and progressing upward. There are a limited number of + available blocks in the more desirable 16-bit range [32768,65535], + so do not request enumerants until you actually require them to ship + an extension, or request more than you need. + + +

Vendors must adhere to the following guidelines for requesting and + using enumerants: + +

    + +
  • No extension can be shipped using OpenGL or GLX enumerant values + that have not been allocated by the Registrar. + +
  • The Registrar will allocate official enumerant values for an + extension only when there is a commitment to release that extension. + Prior to this point, development work on the extension should be + done using temporarily assigned enumerant values. Enumerant values + in the range [0x6000,0x7FFF] (e.g. [24576,32767] are reserved for + temporary use, and will never be assigned to any shipping core or + extension enumerant. + +
  • An extension specification, following the template, must exist prior to releasing an + extension. The specification will ideally include all fields from + the template; if this is proving difficult due to lack of + familiarity with the appropriate API Specification, please consult + with other implementers on the corresponding Khronos Working Group + mailing list. Vendors are strongly encouraged to submit this + specification to the registry. + +
  • Minimize the number of unused enumerant values in an allocated + block. + +
  • Do not request blocks solely to reserve enumerants against + anticipated future use. If you are likely to need a large contiguous + block of enumerants in the future, this should be discussed with the + Registrar. + +
  • If a vendor determines that it does not need a block of enumerant + values that has been previously allocated to that vendor, the vendor + may voluntarily return the entire block for future reallocation. + +
  • If an extension is promoted from single-vendor to multi-vendor + EXT or ARB status, the following rule applies: for + each enumerant that is present in both the single-vendor version and + the multi-vendor version, a new multi-vendor extension enumerant + will be defined with the same value as the single-vendor extension + enumerant. The name of the new enumerant will be the name of the + extension enumerant with the suffix EXT or ARB + replacing the vendor-specific suffix. + +

    Here, promoted is taken to mean that use of the + single-vendor and multi-vendor enumerants is semantically + equivalent, e.g. the effects of such use on GL and framebuffer state + are identical. If this is not true, new values should be assigned to + the multi-vendor enumerants. The intent is that it should be + possible for the single-vendor and multi-vendor versions of the + extension to coexist in a single implementation. + +

  • If an extension becomes part of a new version of OpenGL, + the following rule applies: for each enumerant that is present in + both the extension and the new version of OpenGL, the ARB will + choose one of the following two options: + +
      +
    • Define a new OpenGL enumerant with the same value as the + extension enumerant. The name of the new enumerant will be the + name of the extension enumerant with the extension suffix + deleted. + +
    • Define a new OpenGL enumerant with a previously unused value in + the range [0,32767]. The name of the new enumerant will be the + name of the extension enumerant with the extension suffix + deleted. +
    + +
  • If a group of vendors introduces an extension, one of the vendors + in the group must be designated as the "lead vendor" for that + extension. The lead vendor will then allocate enumerant values for + the extension in the same way that it would allocate enumerant + values for a single-vendor extension. +
+ +

If at some future time all blocks up to [99984,99999] have been +allocated, allocations of blocks of 16 values will continue in an upward +direction, skipping over any block of 16 values that contains one or +more values from a currently allocated 1000-value block. + +

Last modified August 13, 2006 by Jon Leech + + diff --git a/opengles/docs/fog_coord.txt b/opengles/docs/fog_coord.txt new file mode 100644 index 0000000000..9fd9a2d8e1 --- /dev/null +++ b/opengles/docs/fog_coord.txt @@ -0,0 +1,380 @@ +Name + + EXT_fog_coord + +Name Strings + + GL_EXT_fog_coord + +Contact + + Jon Leech, Silicon Graphics (ljp 'at' sgi.com) + +Status + + Shipping (version 1.6) + +Version + + $Date: 1999/06/21 19:57:19 $ $Revision: 1.11 $ + +Number + + 149 + +Dependencies + + OpenGL 1.1 is required. + The extension is written against the OpenGL 1.2 Specification. + +Overview + + This extension allows specifying an explicit per-vertex fog + coordinate to be used in fog computations, rather than using a + fragment depth-based fog equation. + +Issues + + * Should the specified value be used directly as the fog weighting + factor, or in place of the z input to the fog equations? + + As the z input; more flexible and meets ISV requests. + + * Do we want vertex array entry points? Interleaved array formats? + + Yes for entry points, no for interleaved formats, following the + argument for secondary_color. + + * Which scalar types should FogCoord accept? The full range, or just + the unsigned and float versions? At the moment it follows Index(), + which takes unsigned byte, signed short, signed int, float, and + double. + + Since we're now specifying a number which behaves like an + eye-space distance, rather than a [0,1] quantity, integer types + are less useful. However, restricting the commands to floating + point forms only introduces some nonorthogonality. + + Restrict to only float and double, for now. + + * Interpolation of the fog coordinate may be perspective-correct or + not. Should this be affected by PERSPECTIVE_CORRECTION_HINT, + FOG_HINT, or another to-be-defined hint? + + PERSPECTIVE_CORRECTION_HINT; this is already defined to affect + all interpolated parameters. Admittedly this is a loss of + orthogonality. + + * Should the current fog coordinate be queryable? + + Yes, but it's not returned by feedback. + + * Control the fog coordinate source via an Enable instead of a fog + parameter? + + No. We might want to add more sources later. + + * Should the fog coordinate be restricted to non-negative values? + + Perhaps. Eye-coordinate distance of fragments will be + non-negative due to clipping. Specifying explicit negative + coordinates may result in very large computed f values, although + they are defined to be clipped after computation. + + * Use existing DEPTH enum instead of FRAGMENT_DEPTH? Change name of + FRAGMENT_DEPTH_EXT to FOG_FRAGMENT_DEPTH_EXT? + + Use FRAGMENT_DEPTH_EXT; FOG_FRAGMENT_DEPTH_EXT is somewhat + misleading, since fragment depth itself has no dependence on + fog. + +New Procedures and Functions + + void FogCoord[fd]EXT(T coord) + void FogCoord[fd]vEXT(T coord) + void FogCoordPointerEXT(enum type, sizei stride, void *pointer) + +New Tokens + + Accepted by the parameter of Fogi and Fogf: + + FOG_COORDINATE_SOURCE_EXT 0x8450 + + Accepted by the parameter of Fogi and Fogf: + + FOG_COORDINATE_EXT 0x8451 + FRAGMENT_DEPTH_EXT 0x8452 + + Accepted by the parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev: + + CURRENT_FOG_COORDINATE_EXT 0x8453 + FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 + FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 + + Accepted by the parameter of GetPointerv: + + FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 + + Accepted by the parameter of EnableClientState and + DisableClientState: + + FOG_COORDINATE_ARRAY_EXT 0x8457 + +Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation) + + These changes describe a new current state type, the fog coordinate, + and the commands to specify it: + + - (2.6, p. 12) Second paragraph changed to: + + "Each vertex is specified with two, three, or four coordinates. + In addition, a current normal, current texture coordinates, + current color, and current fog coordinate may be used in + processing each vertex." + + - 2.6.3, p. 19) First paragraph changed to + + "The only GL commands that are allowed within any Begin/End + pairs are the commands for specifying vertex coordinates, vertex + colors, normal coordinates, texture coordinates, and fog + coordinates (Vertex, Color, Index, Normal, TexCoord, + FogCoord)..." + + - (2.7, p. 20) Insert the following paragraph following the third + paragraph describing current normals: + + " The current fog coodinate is set using + void FogCoord[fd]EXT(T coord) + void FogCoord[fd]vEXT(T coord)." + + The last paragraph is changed to read: + + "The state required to support vertex specification consists of + four floating-point numbers to store the current texture + coordinates s, t, r, and q, one floating-point value to store + the current fog coordinate, four floating-point values to store + the current RGBA color, and one floating-point value to store + the current color index. There is no notion of a current vertex, + so no state is devoted to vertex coordinates. The initial values + of s, t, and r of the current texture coordinates are zero; the + initial value of q is one. The initial fog coordinate is zero. + The initial current normal has coordinates (0,0,1). The initial + RGBA color is (R,G,B,A) = (1,1,1,1). The initial color index is + 1." + + - (2.8, p. 21) Added fog coordinate command for vertex arrays: + + Change first paragraph to read: + + "The vertex specification commands described in section 2.7 + accept data in almost any format, but their use requires many + command executions to specify even simple geometry. Vertex data + may also be placed into arrays that are stored in the client's + address space. Blocks of data in these arrays may then be used + to specify multiple geometric primitives through the execution + of a single GL command. The client may specify up to seven + arrays: one each to store edge flags, texture coordinates, fog + coordinates, colors, color indices, normals, and vertices. The + commands" + + Add to functions listed following first paragraph: + + void FogCoordPointerEXT(enum type, sizei stride, void *pointer) + + Add to table 2.4 (p. 22): + + Command Sizes Types + ------- ----- ----- + FogCoordPointerEXT 1 float,double + + Starting with the second paragraph on p. 23, change to add + FOG_COORDINATE_ARRAY_EXT: + + "An individual array is enabled or disabled by calling one of + + void EnableClientState(enum array) + void DisableClientState(enum array) + + with array set to EDGE_FLAG_ARRAY, TEXTURE_COORD_ARRAY, + FOG_COORDINATE_ARRAY_EXT, COLOR_ARRAY, INDEX_ARRAY, + NORMAL_ARRAY, or VERTEX_ARRAY, for the edge flag, texture + coordinate, fog coordinate, color, color index, normal, or + vertex array, respectively. + + The ith element of every enabled array is transferred to the GL + by calling + + void ArrayElement(int i) + + For each enabled array, it is as though the corresponding + command from section 2.7 or section 2.6.2 were called with a + pointer to element i. For the vertex array, the corresponding + command is Vertexv, where is one of [2,3,4], + and is one of [s,i,f,d], corresponding to array types + short, int, float, and double respectively. The corresponding + commands for the edge flag, texture coordinate, fog coordinate, + color, color, color index, and normal arrays are EdgeFlagv, + TexCoordv, FogCoordv, Colorv, + Indexv, and Normalv, respectively..." + + Change pseudocode on p. 27 to disable fog coordinate array for + canned interleaved array formats. After the lines + + DisableClientState(EDGE_FLAG_ARRAY); + DisableClientState(INDEX_ARRAY); + + insert the line + + DisableClientState(FOG_COORDINATE_ARRAY_EXT); + + Substitute "seven" for every occurence of "six" in the final + paragraph on p. 27. + + - (2.12, p. 41) Add fog coordinate to the current rasterpos state. + + Change the first sentence of the first paragraph to read + + "The state required for the current raster position consists of + three window coordinates x_w, y_w, and z_w, a clip coordinate + w_c value, an eye coordinate distance, a fog coordinate, a valid + bit, and associated data consisting of a color and texture + coordinates." + + Change the last paragraph to read + + "The current raster position requires six single-precision + floating-point values for its x_w, y_w, and z_w window + coordinates, its w_c clip coordinate, its eye coordinate + distance, and its fog coordinate, a single valid bit, a color + (RGBA color and color index), and texture coordinates for + associated data. In the initial state, the coordinates and + texture coordinates are both (0,0,0,1), the fog coordinate is 0, + the eye coordinate distance is 0, the valid bit is set, the + associated RGBA color is (1,1,1,1), and the associated color + index color is 1. In RGBA mode, the associated color index + always has its initial value; in color index mode, the RGBA + color always maintains its initial value." + + - (3.10, p. 139) Change the second and third paragraphs to read + + "This factor f may be computed according to one of three + equations:" + + f = exp(-d*c) (3.24) + f = exp(-(d*c)^2) (3.25) + f = (e-c)/(e-s) (3.26) + + If the fog source (as defined below) is FRAGMENT_DEPTH_EXT, then + c is the eye-coordinate distance from the eye, (0 0 0 1) in eye + coordinates, to the fragment center. If the fog source is + FOG_COORDINATE_EXT, then c is the interpolated value of the fog + coordinate for this fragment. The equation and the fog source, + along with either d or e and s, is specified with + + void Fog{if}(enum pname, T param); + void Fog{if}v(enum pname, T params); + + If is FOG_MODE, then must be, or must + point to an integer that is one of the symbolic constants EXP, + EXP2, or LINEAR, in which case equation 3.24, 3.25, or 3.26,, + respectively, is selected for the fog calculation (if, when 3.26 + is selected, e = s, results are undefined). If is + FOG_COORDINATE_SOURCE_EXT, then is or points to + an integer that is one of the symbolic constants + FRAGMENT_DEPTH_EXT or FOG_COORDINATE_EXT. If is + FOG_DENSITY, FOG_START, or FOG_END, then is or + points to a value that is d, s, or e, respectively. If d is + specified less than zero, the error INVALID_VALUE results." + + - (3.10, p. 140) Change the last paragraph preceding section 3.11 + to read + + "The state required for fog consists of a three valued integer + to select the fog equation, three floating-point values d, e, + and s, an RGBA fog color and a fog color index, a two-valued + integer to select the fog coordinate source, and a single bit to + indicate whether or not fog is enabled. In the initial state, + fog is disabled, FOG_COORDINATE_SOURCE_EXT is + FRAGMENT_DEPTH_EXT, FOG_MODE is EXP, d = 1.0, e = 1.0, and s = + 0.0; C_f = (0,0,0,0) and i_f=0." + +Additions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization) + + None + +Additions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment +Operations and the Frame Buffer) + + None + +Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) + + None + +Additions to Chapter 6 of the OpenGL 1.2 Specification (State and State +Requests) + + None + +Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance) + + None + +Additions to the GLX / WGL / AGL Specifications + + None + +GLX Protocol + + Two new GL rendering commands are added. The following commands are + sent to the server as part of a glXRender request: + + FogCoordfvEXT + 2 8 rendering command length + 2 4124 rendering command opcode + 4 FLOAT32 v[0] + + FogCoorddvEXT + 2 12 rendering command length + 2 4125 rendering command opcode + 8 FLOAT64 v[0] + +Errors + + INVALID_ENUM is generated if FogCoordPointerEXT parameter is + not FLOAT or DOUBLE. + + INVALID_VALUE is generated if FogCoordPointerEXT parameter + is negative. + +New State + +(table 6.5, p. 195) + Get Value Type Get Command Initial Value Description Sec Attribute + --------- ---- ----------- ------------- ----------- --- --------- + CURRENT_FOG_COORDINATE_EXT R GetIntegerv, 0 Current 2.7 current + GetFloatv fog coordinate + +(table 6.6, p. 197) + Get Value Type Get Command Initial Value Description Sec Attribute + --------- ---- ----------- ------------- ----------- --- --------- + FOG_COORDINATE_ARRAY_EXT B IsEnabled False Fog coord array enable 2.8 vertex-array + FOG_COORDINATE_ARRAY_TYPE_EXT Z8 GetIntegerv FLOAT Type of fog coordinate 2.8 vertex-array + FOG_COORDINATE_ARRAY_STRIDE_EXT Z+ GetIntegerv 0 Stride between fog coords 2.8 vertex-array + FOG_COORDINATE_ARRAY_POINTER_EXT Y GetPointerv 0 Pointer to the fog coord array 2.8 vertex-array + + +(table 6.8, p. 198) + Get Value Type Get Command Initial Value Description Sec Attribute + --------- ---- ----------- ------------- ----------- --- --------- + FOG_COORDINATE_SOURCE_EXT Z2 GetIntegerv, FRAGMENT_DEPTH_EXT Source of fog 3.10 fog + GetFloatv coordinate for + fog calculation + +Revision History + + * Revision 1.6 - Functionality complete + + * Revision 1.7-1.9 - Fix typos and add fields to bring up to date with + the new extension template. No functionality changes. diff --git a/opengles/docs/promoting.html b/opengles/docs/promoting.html new file mode 100644 index 0000000000..3e3bc165d2 --- /dev/null +++ b/opengles/docs/promoting.html @@ -0,0 +1,88 @@ + + + +Promoting OpenGL Extensions + + + +

Promoting OpenGL Extensions

+ +

Promoting an extension refers to moving it from single-vendor +to multi-vendor or ARB-approved status, usually by changing the vendor +tag attached to the extension name string, enumerants and API entry +points. This is sometimes done when an extension is successful and more +licensees want to support it. This document describes the steps to +follow when promoting an extension. + +

Is Promotion Required?

+ +

Changing the names creates a significant burden for ISVs supporting +the existing extension. It should not be done gratuitously; if the +existing interface is sufficient, there's no inherent reason an +implementation shipped by one vendor cannot advertise and support an +extension using another vendor's prefix. + +

If you do this, make certain that the original vendor agrees +to freeze the definition of the extension, and that what you ship is +identical in behavior to what the original vendor is shipping. Shipping +what appears to be the "same" extension while implementing different +behavior on multiple platforms is a great disservice to ISVs trying to +use extensions, and to OpenGL in general. + +

Do not, under any circumstances, ship an extension defined by +another vendor without first clearing it with that vendor. + + +

Promoting Without Changes in Behavior

+ +

If you nevertheless want to promote an extension from +vendor-specific to e.g. EXT status, without changing the +behavior or definition of that extension, then advertise and export +both the old and the new forms of the extension for maximum +backwards compatibility. This means that: + +

    +
  • Both extensions strings should be included in the + GL_EXTENSIONS string query (or the corresponding + WGL/GLX query, if it extends those APIs). +
  • All enumerants should exist in both + GL_VENDOR_ENUM_NAME and + GL_EXT_ENUM_NAME forms, with the same values. +
  • All entry points should exist in both + glExtensionNameVendor and + glExtensionNameEXT forms, resolving to the same code. +
  • For an extension supported under GLX, the same GLX protocol + should be generated no matter whether the vendor or EXT + version of the extension is called. +
+ + +

Promoting With Changes in Behavior

+ +

If you are promoting an extension while changing its definition or +behavior, do not treat it as identical to the old extension. This +means that: + +

    +
  • Any new EXT enumerants which differ in definition from + the original VENDOR enumerants should be assigned new + values, and those values registered with SGI. +
  • All new EXT entry points should resolve to different code + in the GL client library than the original Vendor + extension entry points. +
  • For an extension supported under GLX, different GLX protocol + requests should be generated for the two extensions, so + they can be distinguished on the server side. +
+ +

None of this should be taken to indicate that code cannot be shared +between implementations of the old and new extensions; simply that the +implementation must be able to distinguish whether the old or new form +is being called, since they are de facto different extensions despite +sharing similar purposes. + +


+ +

Last modified April 5, 1999 Jon Leech + + diff --git a/opengles/docs/rules.html b/opengles/docs/rules.html new file mode 100644 index 0000000000..2d9e950e96 --- /dev/null +++ b/opengles/docs/rules.html @@ -0,0 +1,538 @@ + + + +How to Create Khronos API Extensions + + + +

How to Create Khronos API Extensions

+ +

This document outlines the steps to create, define, and use + an extension for some of the APIs supported by Khronos. It + is currently focused on OpenGL, OpenGL ES, GLX, and EGL. + Some discussion of OpenVG and WGL is also included. + +

    +
  • Specifying an extension prior to coding it. +
  • Implementing an extension (this + discusses only aspects of the implemention visible to users - + primarily determining if the extension is available and + defining its interface in header files. +
  • Using an extension in an application (this + discusses the mechanics of using an extension if and only if + it's supported by an implementation). +
+ +


+ + +

Specification

+ +

When initially creating an extension, take the following steps: + +

    +
  • Determine if an existing extension + can be used, instead of writing a new one. This may involve + reuse of an existing specification, or + promotion to multivendor or + Khronos-approved status. In either case, coordinate this use + with the vendor(s) defining and shipping the existing extension. +
  • If no suitable extension already exists, determine if you can + agree on a multivendor or Khronos + extension, or if the extension must be specific to a single + vendor. +
  • Develop and write an extension + specification, following the naming + conventions. +
  • When you're ready to release the extension, freeze the + specification and add it to the + registry maintained by Khronos. At this time (but not + before), you can obtain permanent token (enumerant) assignments. +
  • When shipping an extension, make sure that its interfaces are + defined in header files accessible to ISVs. If the extension is + Khronos-approved, use the Khronos-provided headers. +
+ + +

Is there already an extension that does what I want?

+ +

Specifications for extensions that have already been developed can +be obtained from the Extension +Registry maintained by Khronos. Since we are just getting started +with most of the Khronos APIs, the registry currently contains only +OpenGL, GLX, and WGL extension specifications. + +

It's possible that additional extensions may have been submitted to +the registry but not yet updated on the website, or that another +licensee may be working on a similar extension but not yet have released +the specification. So it's worth asking on the appropriate Working +Group mailing list if anyone has defined related functionality already. + + +

Should the extension be Khronos-approved, multivendor, or specific + to a single vendor?

+ +

OpenGL's history has made clear that ISVs do not want to deal + with vendor-specific extensions if they can possibly avoid it. So if + the functionality being exposed is going to be available on multiple + platforms - as most will - it's a good idea to agree on a single + extension with other vendors providing that functionality. This + makes it easier for ISVs to justify using extensions. + +

If the functionality is well-understood, it may be appropriate to + define a Khronos-approved extension. This is the most + "blessed" category of extension; it goes through the + entire standards process, and is approved by the group, but remains + optional functionality. Many core features have been promoted + directly from existing Khronos-approved extensions. + +

If Khronos as a whole isn't ready to deal with the extension, but + other vendors are, then it should be defined as a multivendor + extension. The interested parties can develop the specification + entirely among themselves, outside the standards process; or they + may be able to use Khronos Working Groups as a forum to develop the + specification. + +

In some cases, vendors may share a common core of functionality, + with vendor-specific additional features. Here, it may make sense to + agree on a multivendor extension to access the core, with additional + vendor-specific extensions layered on the core exposing unique + features. + +

Finally, some extensions will probably have to remain proprietary. + + +

How do I write a specification?

+ +

Start with the template for writing + extension specifications. There are different templates for + different APIs, but general comments apply: + +

    +
  • It's important to think about all the different areas of the core + language specification(s) that are affected. How are queries for + state handled? What attribute group does new state belong in? How + are existing calls modified or expanded in scope? How are existing + objects affected by use of the extension? The template helps with + this by at least reminding you to consider each part of the core + language specification. +
  • Extension specifications must be written against a specific version + of the core API specification. If possible, it's highly preferable + to write against the most recent public version. "Written + against" means that new language must be written as + well-defined modifications to the Specification being referenced. It + should be possible for someone not involved with the development of + an extension to sit down with a copy of the Specification and the + extension and produce a merged document identical to that you + intended. +
  • Extension specifications may also be specified as Docbook XML + documents, although we're still using plain text for the most part. + Docbook is a very powerful structural representation of documents, + but we're still feeling our way into using it. Known Docbook tools and editors are described + elsewhere. +
+ +

One complete, shipping example to refer to is the + Fog Coordinate OpenGL extension + specification. + + + +

Naming Conventions

+ +

API entry points and enumerants in an extension must be named +according to the syntax rules specific to +that API. In particular, follow the sections "Extension name +rules" and "Shared extensions". + +

All extensions must be named and the name included in the extension +specification. The extension name is of the form +"api_category_name" where + +

    +
  • "api" identifies the API + ("GL" for OpenGL and OpenGL ES; + "EGL", "GLX", and + "WGL" for the corresponding window-system + abstraction APIs EGL, GLX, and WGL; "GLU" for the + OpenGL Utility Library; and "OVG" for OpenVG. + + (Note: OpenMAX, OpenSL, OpenML TBD). + +
  • "category" identifies the extension category. + For a vendor-specific extension, the category is a 2-3 letter string + identifying the vendor: "NV" for NVIDIA, + "ATI" for ATI, etc. For a multivendor extensions, + the category is "EXT". For Khronos-approved + extensions, one of several API-specific categories is used + ("ARB" for OpenGL extensions, + "OES" for OpenGL ES extensions, + "OML" for OpenML extensions, and so on). + +
  • "name" is one or more words separated by + underscores, providing a short label for the extension. + Conventionally the name is entirely lower-case. +
+ +

For example, the extension name + "GL_EXT_framebuffer_object" is used for a + multivendor OpenGL extension adding support for framebuffer objects. + +

Choose names that are + +

    +
  • Short. +
  • Meaningful. +
  • Not prefixes of any existing extension name (disregarding the + category). For example, "GL_ARB_fog" is a prefix + of "GL_EXT_fog_coord", so should not be chosen. +
  • Not prefixed by any existing extension name (again, disregarding + the category). +
+ +

The goal is for names to be clear, but not at the cost of confusion + or ambiguity. + + +

Advertising Extension Names to Applications

+ +

Each Khronos API provides a way of describing the supported + extensions at compile- and run-time. This is done by a combination + of preprocessor tokens in header files, and queryable extension + strings. + +

OpenGL and OpenGL ES #define a preprocessor token + corresponding to the extension name in <GL/gl.h> (or + an include file that gl.h includes, such as the + glext.h header provided in the registry). When this token + is defined, it indicates that the function prototypes and enumerant + definitions required to use the extension are available at compile + time. + +

If an OpenGL or OpenGL ES extension is supported at runtime, the + extension name must also be included in the string returned by + glGetString(GL_EXTENSIONS). + +

GLX #defines a preprocessor token corresponding to the + extension name in <GL/glx.h> (or an include file that + glx.h includes, such as the glxext.h header + provided in the registry). When this token is defined, it indicates + that the function prototypes and enumerant definitions required to + use the extension are available at compile time. + +

If a GLX extension is supported at runtime, the extension name must + also be included in the strings returned by + glXQueryExtensionsString, glXGetClientString, and/or + glXQueryServerString (see below for a description of the + different routines). + +

WGL #defines a preprocessor token corresponding to the + extension name in the wglext.h header provided in the + registry (the wgl.h supplied with Microsoft Windows does not + #include wglext.h, or define any extensions itself). When + this token is defined, it indicates that the function prototypes and + enumerant definitions required to use the extension are available at + compile time. + +

If a WGL extension is supported at runtime, the extension name must + also be included in the string returned by + wglGetExtensionsStringEXT. + +

OpenVG extension conventions are To Be Determined. + +

Note that extensions can have both OpenGL components and windowing + system components. For example, the ARB multisampling extension + modifies both GLX and OpenGL. In this case there will be two tokens + associated with the extension (e.g., GL_ARB_multisample and + GLX_ARB_multisample) and the extension will be advertised + by both OpenGL and GLX. + + +

Extension Registry

+ +

Khronos keeps a registry of extension specifications, enumerated + type values, GLX codes (vendor private opcodes, vendor private with + reply opcodes, new visual attribute type values, GLX error codes and + GLX event codes), OpenGL rendering codes for GLX, and OpenGL + rendering codes for GLS and extension numbers. Vendors shipping + extensions using any of these values must obtain them from Khronos. + +

If an extension defines new OpenGL enumerant names, values for those + names must be requested in one or more blocks of 16 values. If an + extension defines new OpenGL rendering commands then you need to + register GLS rendering codes for it. If you want the extensions to + work with the X windowing system (i.e., with GLX), then you must + request GLX opcodes and define GLX protocol for it. + +

There are detailed enumerant allocation + policies for OpenGL, GLX, and WGL enumerants. + +

All new extensions must have a number associated with them for + documentation purposes. If an extension depends on another + extension, the other extension must have a lower number. (Note that + when an extension is deprecated, the number associated with it is + not reassigned.) This number will also be assigned by Khronos when + you register the extension. + +

Include all new enumerated values, GLX codes, and the extension + number in the specification. + +

Once you have completed the extension, please make it available to + other Khronos members and application developers, by submitting the + extension specification to the Khronos Registrar for inclusion in + the public registry. + +


+ + +

Implementing and Advertising Extensions

+ +

Errors

+ +

Whenever possible, extensions should use existing errors instead of + defining new error returns. For GLX, if a new protocol error is + introduced, then an error number must be obtained from and + registered with Khronos. + +

Vendors may ship a single OpenGL library, containing extensions, for + a variety of platforms. It is possible that some of the extension + routines defined in the library may not be supported on some of the + platforms. If this is the case and an application calls a routine + that is not supported by the current OpenGL renderer then a + GL_INVALID_OPERATION error should be returned. + +

OpenGL Extension Availability

+ +

OpenGL extensions must be advertised in the extension string + returned by glGetString. Note that in a client-server + environment, this call returns the set of extensions that can be + supported on the connection. GLX client libraries must send a + glXClientInfo request to the server at start up time (if the + client libarary is 1.1 or later) indicating the version of the + client library and the OpenGL extensions that it supports. Then, + when glGetString is called, the client issues a GetString + request. The server intersects the set of extensions that the client + supports with the set of extensions that it supports (if a + glXClientInfo request was never received then the server + assumes that the client supports no OpenGL extensions) and returns + the result to the client. The client library then appends any + client-side only extensions to the list and returns the result. + +

Extension names for all known OpenGL extensions are #defined in the + glext.h header included in the registry. + +

EGL Extension Availability

+ +

EGL extensions must be advertised in the extension string returned + by eglQueryString(EGL_EXTENSIONS). Extension names for all + known EGL extensions are #defined in the eglext.h header + included in the registry. + +

GLX Extension Availability

+ +

GLX client-side extensions must be advertised in the extension + string returned by glXGetClientString; server-side extensions + must be advertised in the extension string returned by + glXQueryServerString. + +

glXQueryExtensionsString returns the list of extensions that + can be supported on the connection. The client then issues a + glXQueryServerString request, intersects the returned string + with the set of extensions it can support and then appends any + client-side only extensions to the list. + +

Extension names for all known GLX extensions are #defined in the + glxext.h header included in the registry. + +

WGL Extension Availability

+ +

WGL initially had no mechanism for returning its own extensions + string. For this reason, WGL extension names were initially + advertised in the GL extensions string returned by + glGetString. With the creation of a more formal WGL extension + mechanism, all implementations offering WGL extensions should export + the WGL_EXT_extensions_string extension, and should + advertise WGL extensions in the extensions string returned by the + wglGetExtensionsStringEXT interface defined by + WGL_EXT_extensions_string, as well as via + glGetString, for compatibility with older programs.

+ +

Extension names for all known WGL extensions are #defined in the + wglext.h header included in the registry. + +


+ + +

Use of Extensions

+ +

Using OpenGL Extensions

+ +

Programmers that wish to use a particular OpenGL extension should + check both compile-time defines (to ensure that the extension is + supported by the library they are compiling against) and the + extension string returned by glGetString (to ensure that the + renderer supports the extension). For Windows, extensions usually + are not defined at link time, and function pointers to extension + APIs should be obtained by calling wglGetProcAddress. + +

For example, the following code could be used to check whether the + renderer supports an OpenGL extension called + GL_EXT_new_extension. This code would need to be executed + after the context had been made current: + +


+    static GLboolean CheckExtension(char *extName, const char *extString)
+    {
+	/*
+	 ** Search for extName in the extensions string.  Use of strstr()
+	 ** is not sufficient because extension names can be prefixes of
+	 ** other extension names.  Could use strtok() but the constant
+	 ** string returned by glGetString can be in read-only memory.
+	 */
+	char *p = (char *)extString;
+	char *end;
+	int extNameLen;
+
+	extNameLen = strlen(extName);
+	end = p + strlen(p);
+
+	while (p < end) {
+	    int n = strcspn(p, " ");
+	    if ((extNameLen == n) && (strncmp(extName, p, n) == 0)) {
+		return GL_TRUE;
+	    }
+	    p += (n + 1);
+	}
+	return GL_FALSE;
+    }
+
+    const GLubyte *ext_string;
+    int new_ext_supported = GL_FALSE;
+
+    if (CheckExtension("GL_EXT_new_extension", glGetString(GL_EXTENSIONS)))
+	new_ext_supported = GL_TRUE;
+
+ +

If the renderer supports the extension, then it is safe to use it at + runtime. (Note that in a client-server environment, + glGetString will only return the set of extensions that can + be supported by the client and server.) However, compile time checks + must be made to ensure that the library that you are linked against + supports the extension. For example: + +


+    #ifdef GL_EXT_new_extension
+	if (new_ext_supported)
+	    glNewExtensionEXT()
+    #endif
+
+ +

For a Windows OpenGL implementation, extensions are usually + dynamically loaded from the device driver, rather than statically + linked. Function pointers to extension APIs are obtained from + wglGetProcAddress and use to invoke the extension. For + example: + +


+    typedef void (WINAPI *PFNGLNEWEXTENSIONEXTPROC)();
+    PFNGLNEWEXTENSIONEXTPROC *glNewExtensionEXT = NULL;
+
+    /* Do this once, after context creation */
+    #ifdef GL_EXT_new_extension
+	if (new_ext_supported)
+	    glNewExtensionEXT = (PFNGLNEWEXTENSIONEXTPROC)
+		wglGetProcAddress("glNewExtensionEXT");
+    #endif
+
+    /* Do this when calling the extension */
+    #ifdef GL_EXT_new_extension
+	if (new_ext_supported)
+	    (*glNewExtensionEXT)();
+    #endif
+
+ +

Using EGL Extensions

+ +

Before using an EGL extension, check for the extension name in both + the compile-time #defines and the extension string returned by + eglGetString(EGL_EXTENSIONS). For example, this code could + be used to check whether an extension called + EGL_OES_new_extension can be used. + +


+	EGLDisplay dpy; // Initialized elsewhere
+	int new_ext_supported = FALSE;
+
+	if (CheckExtension("EGL_OES_new_extension",
+			       eglGetString(display, EGL_EXTENSIONS));
+		new_ext_supported = TRUE;
+    #endif
+
+ +

If the extension is supported, then it is safe to use it at runtime. + However, compile time checks must be made to ensure that you can + call the extension. For example: + +


+    #ifdef EGL_OES_new_extension
+	if (new_ext_supported)
+	    eglNewExtensionEXT(...);
+    #endif
+
+ +

Using GLX Extensions

+ +

Before using a GLX extension, programmers should check the compile + time defines and the extension string returned by + glXQueryExtensionsString. + +

The following code could be used to check whether an extension + called GLX_EXT_new_extension can be used on the connection. + This code would be executed after the connection had been opened and + the existence of the GLX extension had been established. + +


+	Display *dpy;
+	int new_ext_supported = GL_FALSE;
+	int major, minor, screen;
+
+	if (!glXQueryVersion(dpy, &major, &minor))
+	    exit(1);
+	screen = DefaultScreen(dpy);
+
+    #ifdef GLX_VERSION_1_1
+	if (minor > 0 || major > 1)
+	    if (CheckExtension("GLX_EXT_new_extension",
+			       glXQueryExtensionsString(dpy, screen)))
+		new_ext_supported = GL_TRUE;
+    #endif
+
+ +

If the extension is supported on the connection, then it is safe to + use it at runtime. However, compile time checks must be made to + ensure that the library that you are linked against supports the + extension. For example: + +


+    #ifdef GLX_EXT_new_extension
+	if (new_ext_supported)
+	    glXNewExtensionEXT(...);
+    #endif
+
+ +

Using WGL Extensions

+ +

Before using a WGL extension, check for its presence in the WGL + extensions string. Note that the WGL extension string query is + itself an extension; if not supported, WGL extensions are also + advertised in the base GL extensions string. + +

Code snippet should go here + +


+ +

Last modified August 13, 2006 by Jon Leech + + + diff --git a/opengles/docs/syntaxrules.txt b/opengles/docs/syntaxrules.txt new file mode 100644 index 0000000000..279d719742 --- /dev/null +++ b/opengles/docs/syntaxrules.txt @@ -0,0 +1,758 @@ +Syntax Rules for OpenGL Extensions + +Based on a version edited by Kurt Akeley on September 10, 2003. +Updates proposed by Eskil Steenberg, May 2006. +Revised by Benj Lipchak under the direction of the Ecosystem TSG, December 2006. + + +Reserved terms +-------------- + + ** NOTE ** + Whereas some of the other rules in subsequent sections of this document + are intended to be strictly adhered to, this section is intended as a + set of guidelines to assist in name decisions. The guidelines should + be considered, and then accepted or rejected, on a case by case basis. + ** NOTE ** + + The terms used in OpenGL should have a consistent meaning. Any time + new functionality is introduced it is desired to use terms that are + previously established in GL. If no term exists that fits with the + new functionality, a new term may be used. Whenever a new term is used, + the precise meaning of that term should be specified and added to this + text so that future functionality has the option of reusing the term + with a consistent meaning. + + A term in GL should encompass more then the meaning of the word found + in a dictionary. It should encompass limitations and usages and give the + reader a broader sense of the usage of the word in the context of OpenGL. + + When choosing new words one should always name it for what it does and + never name it for its intended usage. In a general programmable + environment the naming should not suggest usage. + + It is desired to keep data and the usage of data separated in the name + space. "image" data can be used for "texturing." The two should not be + named the same. This maintains consistency if in some future version + something other than an image can be used for texturing, or if an image + can be used for something other then texturing. This is why it is + strongly encouraged to name any storage class for what it stores, not the + usage of the data. + + Whenever a procedure sets the state that is directly associated with + something that can be found in the language grammar, it is preferred to + use terms from the language like "attribute," "uniform" or "texture." + + + 1: Asking for information + + "Get" is used as a prefix whenever the procedure returns state from the GL. + + + 2: Storage + + "Create" is used for any procedure that creates an object. No other + creations should be named "create." + + "Delete" is used for any procedure that marks an object for + destruction. No other destructions should be named "delete." + + + 4: Object content + + TBD: Names must be chosen. + + + 5: Types of state setting + + "Pname" is used to define what a subsequent parameter refers to. Pname + is always followed by a "param." + + "Param" is only used when a generic parameter or array of parameters is + being passed in. + + "Count" always refers to the length of an array. + + "Size" always refers to size measured in units or number of bytes. + + "Render" refers to the later parts of the pipeline that apply the + resulting data of a computation to a storage container. (Examples of + operations that can be refered to as rendering are sampling, depth test, + blending, and resolve.) + + "Draw" refers to the earlier part of the pipeline when results are + being computed. + + + 6: References + + Any time an object is referenced by the context or another object the + following words should be used: + + TBD: Names must be chosen. + + +Accepted terms +-------------- + + Notes: + + 1. Abbreviations are required for all usage unless otherwise noted. + + 2. Compound words (e.g. Doublebuffer) must always be used as + compounds. Embedded words are not capitalized in function + names, and are not separated by underscores in token names. + (e.g. Doublebuffer, not DoubleBuffer. DOUBLEBUFFER, not + DOUBLE_BUFFER.) + + Exceptions: + + (1) Abbreviation is used in function names, but not in token names. + + (2) Abbreviation is used in token names, but not in function names. + + (3) Abbreviation is used for GL and GL extensions, but not for + WGL abbreviations. + + (4) Abbreviation is used only as the last characters of token names + that identify packed data types. + (E.g. GL_UNSIGNED_BYTE_2_3_3_REV) + + (5) Abbreviation is used only in interleaved vertex array token names. + (e.g. GL_T4F_C4F_N3F_V4F) + + (6) Abbreviation is used only for specific operations, such as + logical operations (Logic Op) or stencil operations (Stencil Op). + Abbreviation is not used for generic operations (e.g. Invalid + Operation). + + + + Abbrev. Term or phrase Specification(s) used in + ------- -------------- ------------------------ + Access 28 + Accum Accumulation Buffer GL, 9 + Active GL, 15 + Add GL, 6, 17 + Address 2, 26 + Aliased GL + Alignment GL + All GL + Alpha GL, 5, 9, 12, 17 + Always GL + Ambient GL + ASCII American Standard ... 26, 27 + And GL + Are GL + ALU Arithmetic Logic Unit 27 + Array GL, 15, 16, 26, 28 + Attenuation GL, 14 + Attrib Attribute GL, 9, 20, 26, 27, 28 + Auto Automatic GL + Aux Auxiliary GL, 9, 20 + Back GL, 20 + Base GL + Begin GL + Bias GL + Bind GL, 20, 26, 27, 28 + Binding GL, 7, 26, 27, 28 + Bit GL, 9 + Bitfield GL + Bitmap GL, 9 + Blend GL, 15 + Blue GL, 9 + BGR Blue Green Red GL + BGRA Blue Green Red Alpha GL + Boolean GL + Border GL, 13 + Box GL + Buffer GL, 4, 5, 9, 11, 28 + Byte GL + Call GL + Care GL + Choose 9 + Clamp GL, 13 + Clear GL + Client GL + Clip Clipping GL + CW Clockwise GL + Coeff Coefficient GL + C (5) Color GL, 3, 9, 17, 26, 28 + Index Color Index GL, 9, 28 + Combine GL, 17 + Compare GL, 23, 24 + Compile GL + Component GL, 22 + Compressed GL, 12 + Compression GL, 12 + Constant GL, 17 + Control GL + Convolution GL + Context 10 + Coord Coordinate GL, 27 + Copy GL, 9, 28 + Correction GL + CCW Counter Clockwise GL + Coverage GL, 5 + Cube GL, 7, 20 + Cube Map 7, 20 + Cull GL + Current GL, 10, 15, 16, 26, 27 + Cutoff GL + Data 28 + Decal GL + Decr Decrement GL + Delete GL, 4, 26, 27, 28 + Density GL + Depth GL, 9, 16, 22, 26, 27 + Dst Destination GL + Destroy 11 + Diffuse GL + Dim Dimension GL + Direction GL + Disable GL, 26 + List Display List + Distance GL, 14 + Dither GL + Dont Do Not GL + Domain GL + Dot 19 + Dot3 GL, 19 + Double GL + Doublebuffer GL + Draw GL, 9, 11, 28 + Dynamic 28 + Edge GL, 28 + Element GL, 28 + Emission GL + Enable GL, 26 + Enabled GL + End GL + Enum Enumerant GL + Env Environment GL, 26, 27 + Equal GL + Equation GL + Equiv Equivalent GL + Error GL, 10, 26, 27 + Eval Evaluate GL + XOR Exclusive OR GL + Execute GL + Exponent GL + Exp Exponential GL + Exp2 Exponential Squared GL + Extension GL, 5 + Eye GL + Face GL, 20 + Factor GL + Fade GL, 14 + Fail GL, 24 + False GL + Fan GL + Fastest GL + Feedback GL + Fill GL + Filter GL + Finish GL + First GL + Flag GL + Flat GL + Float GL + Flush GL + Fog GL, 28 + Format GL, 9, 12, 20, 26, 27 + Fragment GL, 27 + Framebuffer (documentation only) + Front GL, 20 + Frustum GL + Func Function GL, 23 + Gen Generate GL, 26, 27, 28 + Get GL, 2, 5, 9, 10, 11, 26, 27, 28 + Granularity GL + GL Graphics Library GL + Greater GL + Gequal Greater than or equal to GL + Green GL, 9 + Grid GL + Half GL + Height GL, 11 + Hint GL, 12 + Histogram GL + Identity GL + Ignore GL + Image GL, 12, 20, 27 + Incr Increment GL + Index 16 + Indices GL + Indirection 27 + Init Initial GL + Init Initialize GL + Instruction 26, 27 + Int (2) Integer GL + Intensity GL, 12 + Interleaved GL + Internal GL + Interpolate GL, 17 + Invalid GL, 10 + Invert GL, 5 + Inverted GL + Is GL, 26, 27, 28 + Keep GL + LSB Least significant bit GL + Left GL, 20 + Length GL, 26, 27 + Less GL + Lequal Less than or equal to GL + Level GL, 20 + LOD Level of Detail GL + Light GL + Light Model Lighting Model + Line GL + Linear GL + List GL + Limit 26, 27 + Load GL, 3 + Local GL, 26, 27 + Logic Op Logical Operation GL + Loop GL + Luminance GL, 12 + Mag Magnify GL + Make 10 + Map GL, 7, 20, 28 + Mapped 3, 28 + Mask GL + Material GL + Matrix, Matrices GL, 16, 26, 27 + Max Maximum GL, 7, 11, 14, 15, 16, 26, 27 + Memory GL + Mesh GL + Win Microsoft Windows OS GL + Min Minimum GL, 14 + Minmax Minimum Maximum GL + Min Minify GL, 14 + Minus GL, 17 + Mirrored GL, 21 + Mode GL, 22, 23 + Model GL + Modelview GL, 3, 15 + Modulate GL, 17 + Mipmap Multim in parvo map GL, 20 + Multi Multiple GL + Mult Multiply GL, 3 + Multisample GL, 5 + Name GL + Native 26, 27 + Nearest GL + NAND Negated AND GL + NOR Negated OR GL + Negative GL, 7, 20 + Nesting GL + Never GL + New GL + Nicest GL + No GL, 9, 28 + Noop No Operation GL + None GL + N (5) Normal GL, 7, 28 + Normalize, Normalized GL, 26 + Notequal GL + Num (3) Number Of GL + Object GL + Of GL + Offset GL + One GL, 17 + Only 28 + Operand GL, 17 + Op (6) Operation GL + Or GL + Order GL + Ortho Orthographic GL + Out GL + Overflow GL + Pack GL + Palette 9, 16 + Param Parameter GL, 14, 26, 27, 28 + Pname Parameter Name GL + Pass GL + Pattern GL + Perspective GL + Phong GL + Pixel GL, 9, 10, 11 + Pbuffer Pixel Buffer 11, 20 + Plane GL + Point GL, 14, 26 + Pointer GL, 15, 16, 26, 28 + Polygon GL + Pop GL + Position GL + Pos (1) Position GL, 25, 26, 27 + Positive GL, 7, 20 + Post GL + Previous GL, 17 + Primary GL, 17 + Prioritize, Priority GL + Proc Procedure 2 + Program 26, 27 + Projection GL, 3 + Proxy GL, 7 + Push GL + Quad Quadrilateral GL + Quadratic GL + Query 11 + Range GL + Raster GL + Read GL, 10, 28 + Rect Rectangle GL + Red GL, 9 + RGB Red Green Blue GL, 12, 17, 19, 20 + RGBA Red Green Blue Alpha GL, 9, 12, 19, 20 + Reduce GL + Ref Reference GL + Reflection GL, 7 + Region GL, 4 + Register 26 + Render GL + Renderer GL + Repeat GL, 21 + Replace GL, 17 + Replicate GL + Rescale GL + Reset GL + Resident GL + Return GL + Rev (4) Reverse GL + Right GL, 20 + Rotate, Rotated GL + Row GL + Sample GL, 5 + Saturate GL + Scale, Scaled GL, 17 + Scissor GL + Secondary GL, 28 + Segment GL + Select GL + Selection GL + Separable GL + Separate GL + Set (noun only!) GL + Shade GL + Shade Model Shading Model + Shift GL, 9 + Shininess GL + Short GL + Side GL, 26 + Signed GL, 17 + Single GL + Sink GL + Size GL, 7, 12, 14, 15, 16, 22, 26, 28 + Skip GL + Smooth GL + Src Source GL, 17 + Specular GL + Sphere GL + Spot GL + Stack GL, 16, 26, 27 + Start GL + State GL + Static 28 + Stencil GL, 9 + Stereo GL, 9 + Stipple GL + Store GL + Stream 28 + Stride GL, 15, 16, 26 + String GL, 5, 26, 27 + Strip GL + Sub GL, 12 + Subtract 17 + Sub Image 12 + Subpixel GL + Sub Table GL + Sum GL, 15, 26 + Swap GL, 9 + Table GL + Target 20 + Temporary 26, 27 + Test GL + Tex (1), Texture GL, 3, 7, 12, 17, 18, 20, 22, 23, + T(5) 24, 27, 28 + Threshold GL, 14 + Through GL + To GL, 9, 11, 13, 20, 23 + Token GL + Transfer GL + Transform GL + Translate, Translated GL + Transpose GL, 3, 26, 27 + Triangle GL + True GL + Two GL, 26 + Type GL, 9, 10, 15, 16, 26 + Under 26, 27 + Underflow GL + Unit GL, 15, 27 + Unity 15 + Unmap 28 + Unpack GL + Unsigned GL + Ubyte Unsigned Byte GL + Uint Unsigned Int GL + Ushort Unsigned Short GL + Usage 28 + Valid GL + Value GL, 5, 9, 24 + Vendor GL + Version GL + V (5) Vertex GL, 15, 26, 28 + Vertices GL + Viewer GL + Viewport GL + Weight 15, 28 + Width GL, 11 + Window GL, 25 + Wrap GL + Write 28 + Writemask GL + Zero GL + Zoom GL + + + +Abbreviations specifically not allowed +-------------------------------------- + Bgn Begin + Mat Matrix + Pnt Point + Poly Polygon + Tri Triangle + + + +Used in WGL specs only (or differently) +--------------------------------------- + + Abbrev. Term or phrase Specification(s) used in + ------- -------------- ------------------------ + Acceleration 9 + Create 4, 11 + DC ??? 10 + Declare 11 + Device 10 + Exchange 9 + Full 9 + Generic 9 + GDI ??? 9 + Handle 11 + HP ??? 11 + Incompatible 10 + Largest 11 + Layer 9 + Lost 11 + Method 9 + Need 9 + Number Number Of 9 + OpenGL 9 + Overlay 9 + Release 20 + Restore 4 + Save 4 + Share 9 + Support 9 + System 9 + Transparent 9 + Undefined 9 + Underlay 9 + + + +Name rules (for all names) +-------------------------- + + Always use the specified abbreviations. Never abbreviate terms + that are already in the OpenGL API and are not abbreviated. If you + add terms to your extensions, abbreviate consistently, maintaining + a local version of additions to the list of abbreviations. + + Use Depth, never Z. + + The word "object" should not be used in a function name unless it + operates on all object types. + + Longer descriptive names are desired if they are believed to help + developers identify the purpose of a name. + + The opposite of "create" is "destroy." "delete" marks an object for + later destruction. + + All names should describe what functionality does, never its expected + usage. + + Begin each word with a capital letter, except the second word of + compound words. + + +Procedure name rules +-------------------- + + Never use set, as in SetFeedbackBuffer. Set is implicit, unless + otherwise specified. + + Use Verb-noun (DeleteList) and adjective-noun (EdgeFlag) formats. + + Append a corporate-specific suffix to all procedures. For example: + glNewCommandSGI. All upper case is preferred for this suffix, but + is not required. The suffix is always last, following OpenGL type + and count suffixes. (e.g. glNewVertex3iSGI, not glNewVertexSGI3i.) + + +Definition name rules +--------------------- + + Use all capital letters. + + Separate words with underscores, except words within compound words. + + Append simple numeric suffixes directly to the end of definition + tokens (LIGHT0). Begin these sequences with 0. + + Use an underscore to separate complex suffixes from the token body + (MAP_3V). + + Append a corporate-specific suffix to the token, after any other + suffixes. For example: GL_NEW_TOKEN0_SGI. All upper case is + required. + + All tokens that are used only for a single use should be grouped + together using enum types. + + +Parameter name rules +-------------------- + + is reserved for the notion of "which is affected", and for + the corresponding "which is returned" get commands. + + is reserved for an array of parameters whose contents are + defined by a second enumerated argument, called . + + Begin number sequences with 1, not 0. (e.g. u1,u2, not u0,u1) + + Any parameters that contain more then one word should have the + second and subsequent words capitalized. + + Long descriptive parameters are encouraged. + + +Parameter order +--------------- + + precedes precedes precedes . + + precedes precedes precedes . + + precedes precedes precedes . + + precedes . + + The array being passed is always the last argument. + + If a passed array has a type, the type specification argument immediately + precedes the array. + + always precedes . + + and precede and . + + precedes . + + is first. + + is first. + + is first. + + always precedes the thing that it counts. + + Any time the function parameters contain an address of what they + operate on, the address is last. + + Arrays are never terminated by NULL or any other termination but are + always specified by length. + + For variable length arrays passed into the GL, the parameter list should + end with: "sizei count, const void* data" + + For variable length arrays passed back from the GL, the parameter list + should end with: "sizei maxCount, sizei* count, void* data" + + +Parameter types +--------------- + + All integer quantity parameters (widths, heights, array lengths, etc.) + should be typed GLsizei, not GLint or GLuint. Note that GLsizei + generates an error only for negative values, so all integer quantity + parameters should accept the value zero. + + Handles to specific object types are typed as pointers to the corresponding + abstract structs. Generic objects are passed around as void pointers. + + Generic masks that do not have explicitly defined bit values (e.g. + color index write masks and stencil write masks) should be typed + GLuint. GLuint is also used for unsigned integer components, such as + color components and depth components. + + Masks that do have explicitly defined bit values (e.g. attribute mask, + clear mask) should be typed GLbitfield, not GLuint. + + All floating point parameters that are clamped to the range [0,1] when + received should be typed GLclampf or GLclampd, not GLfloat or GLdouble. + + +Extension name rules +-------------------- + + An extension name is prefixed with the same string that suffixes its + procedures and definitions. The prefix and the individual words are + separated with underscores, the prefix is all upper case, and the other + text is all lower case. For example, extension ARB_cool_feature, which + specifies glCoolProcedureARB() and defines GL_COOL_DEFINITION_ARB. + + +Suffix codes +------------ + + i signed 32-bit integer + ui unsigned 32-bit integer + s signed 16-bit integer + us unsigned 16-bit integer + b signed 8-bit integer + ub unsigned 8-bit integer + l signed 64-bit integer + ul unsigned 64-bit integer + f 32-bit float + d 64-bit float + t token enum + v vector format + N normalize values + + # number of components (e.g. 3) + #x# matrix dimensions (e.g. 2x4) + + +Shared extensions +----------------- + + An OpenGL extension may be deemed a shared extension if either: + + 1. Two or more OpenGL licensees agree in good faith to implement + and ship the extension, or + + 2. The OpenGL ARB determines that it is in the best interest of + the licensees that the extension be shared. + + The procedures and definitions that are defined by a shared extension + are suffixed with EXT, rather than by a company-specific suffix. + Likewise, the extension name is prefixed by EXT. To avoid name + conflicts Silicon Graphics will maintain a registry of EXT extensions, + including all their procedures and definitions, in a location that is + accessible to all licensees. diff --git a/opengles/docs/template.txt b/opengles/docs/template.txt new file mode 100644 index 0000000000..2259b48496 --- /dev/null +++ b/opengles/docs/template.txt @@ -0,0 +1,723 @@ +* Template for specifying an extension to OpenGL, OpenGL ES, +* and related APIs. +* +* Last Modified Date: January 20, 2010 +* Revision: 8 +* +* Document Source: the OpenGL Extension Registry at +* +* http://www.opengl.org/registry/ +* +* and the OpenGL ES Extension Registry at +* +* http://www.khronos.org/registry/gles/ +* +* Notes: +* +* Comments in this template document are preceded by an asterisk. +* This entire section is one big comment. +* +* Extension documents are simple fixed-width ASCII text, up to 132 +* characters wide. Here is a line of 132 characters for calibration: +* +*00000000011111111112222222222333333333344444444445555555555666666666677777777778888888888999999999900000000001111111111222222222233 +* +* Lines should end with a hard newline. Do not assume that any +* special formatting or interpretation will be made by software +* displaying the specification. +* +* Although the extension file is formally 132 characters wide, +* text is limited to 72 characters, and only tables that require +* more than 72 character width extend to the full file width. +* Here is a line of 72 characters for calibration: +* +*00000000011111111112222222222333333333344444444445555555555666666666677 +* +* The extension is completely described by its specification, mostly +* in the "Additions to
" sections. These sections are +* written as though the additions described by previous extensions +* had actually been made to specified portions of the OpenGL, OpenGL +* ES, OpenGL Shading Language, GLX, EGL, or other Specification +* documents. +* +* The "Dependencies on Extension" sections are used to describe how +* the extension semantics are modified if a previous extension is not +* supported, or to indicate that a previous extension must be +* supported. +* +* When changes are made to the contents of a table, new, changed, +* and removed table entries must be identified. All fields of +* changed table entires should be included, even if not all fields +* have changed. +* +* An extension specification is always written against given +* version(s) of Specifications, which must be identified in the +* Dependencies section. That is, the references and modifications in +* the extension are applied to that version of the Specification. +* +* The latest Khronos-approved version of Specifications should be +* used when writing an extension. If it is possible for the extension +* to be used with older versions of a Specification, this should also +* be described in the Dependencies section. +* +* For consistency with OpenGL and ES Specifications, extension +* documents omit gl prefixes on command names, GL_ prefixes on +* token names, and GL prefixes on type names. Vendor-specific +* suffixes are included in these files, however. The terms +* "GL" and "ES" below should be taken to refer to OpenGL and +* OpenGL ES, respectively. +* +* To be consistent with the GLX Specification, however, extensions +* defining GLX functionality include glX prefixes on command names +* and GLX_ prefixes on token names. Similarly, WGL extensions +* include wgl and WGL_ prefixes on command and token names. +* +* An extension document should by preference include all the +* sections in this template unless a particular section indicates +* its inclusion is optional. If there is no text in a section, +* this is indicated by the word "None", such as: +* +* Dependencies +* +* None +* +* While this may appear excessively verbose, the purpose is to ensure +* that extension authors document all affected parts of Specifications. +* An exception is that headers for sections of Specifications that +* are not altered by the extension may be omitted, once the extension +* has been completed. Thus for example a GLX extension need not +* retain "Changes to Chapter of the OpenGL 1.X Specification" +* headers, and an OpenGL extension that does not affect per-vertex +* processing in any way need not retain "Changes to Chapter 2...". +* +* Lower-case or numeric subscripts of upper-case variables are +* simply appended to the variable. For example "R subscript t" +* is written as Rt. If it is not easy to distinguish the variable +* from the subscript, an underbar is used to separate them. For +* example, "R subscript T" is written as R_T. +* +* Multiplication is indicated with an asterisk, not by adjacency +* of two variables. +* +* In text, parameter names are distinguished by being surrounded +* with angle brackets. For example, the pname parameter to +* TexParameter is written as . +* +* Math symbols (such as the 'tau', 'lambda', and 'rho' defined +* by the texturing section) should be completely written out +* in ASCII as described, rather than assuming a non-ASCII +* character set. +* +* The template proper follows. + +************************************************************************ + +Name + + * The formal name of the extension. The prefix of the name is a + * vendor-specific tag. This is a short, capitalized string unique + * to that vendor, such as "SGI" and "IBM" for those respective + * companies. The prefix may also be "EXT" is two or more vendors + * have agreed to support the extension, "ARB" if the OpenGL ARB + * Working Group has voted to approve the extension, "OES" is the + * OpenGL ES Working Group has voted to approve the extension, + * and "KHR" if the EGL Working Group has voted to approve + * the extension. + * + * Some vendors use an additional convention where the vendor + * tag may be followed by "S" to indicate an extension + * only supported on a subset of their supported platforms, + * and may be followed by an "X" to indicate an experimental + * extension, which may be changed or withdrawn in the future. + * + * The prefix is separated from the body of the name by an + * underscore. Words within the name are also separated by + * underscores. There is no capitalization used in the body of the + * name. For example: + + * Name + * + * SGI_new_extension + +Name Strings + + * Extensions may apply to several different APIs, and extension + * names are prefixed accordingly. The possible categories are: + * + * Extension of String query function Name prefixed by + * ------------ --------------------- ---------------- + * GL and/or ES glGetString GL_ + * GLU gluGetString GLU_ + * GLX glXQueryExtensionsString GLX_ + * EGL eglQueryString EGL_ + * WGL glGetString, WGL_ + * wglGetExtensionsStringEXT(*) + * AGL ??? ???_ + * + * (*) Note: WGL extension strings are returned by both glGetString + * and (if the WGL_EXT_extensions_string extension is supported) by + * wglGetExtensionsStringEXT. + * + * For example, an SGI-specific extension which adds entry points to + * both GLX and OpenGL would be listed as: + + * Name Strings + * + * GL_SGI_new_extension + * GLX_SGI_new_extension + + * A multivendor extension which adds an entry point to WGL would be + * listed as: + + * Name Strings + * + * WGL_EXT_new_extension + + * The name strings are included in header files, and are returned + * by the string query functions as shown in the table above. + * In most cases the Name String is simply the Name prefixed + * by the relevant API. + +Contact + + * Name, company, and email address of people responsible for the + * extension. We suggest using 'at' instead of '@' in email + * addresses, to help prevent spam. For multivendor extensions, + * contacts from each vendor supporting the extension are preferred. + * A backup contact, in case the principal moves on, will be + * helpful. Example: + + * Contact + * + * Jon Leech, Khronos (jon 'at' alumni.caltech.edu) + +Contributors + + * Name and company of other people who helped develop the + * extension. Credit may be given to an entire Working + * Group if contributions are too diffuse. + + * Contributors + * Members of the Khronos ARB-ES Convergence TSG + +Status + + * If the specification is incomplete, the Status section should + * be something like + * + * XXX - Not complete yet. Do not ship!!! + * + * to indicate that nobody should ship the extension in its + * current, unfinished state. Once it is complete, Status should be + * changed to "Complete". For extensions approved by Khronos, this + * should be extended to note when the extension was approved by + * the relevant Working Group(s) and by the Khronos Promoters. + * + * Once the extension ships, its status should be changed to + * indicate this, as well as what the version number at shipping + * time is. Finally, if an extension is withdrawn (or never shipped + * due to e.g. cancellation of a product), it should be marked + * obsolete. Examples: + + * Status + * + * XXX - Not complete yet!!! + + * Status + * + * Complete. Approved by the Khronos Promoters on April 1, 2009. + + * Status + * + * Shipping (version Major.minor) + + * Status + * + * Obsolete + +Version + + * It's hard to generate good version numbers with version control + * systems, since extension specs may live in many different source + * trees. We now suggest including a manually-inserted date of last + * modification and version number. These should be updated only + * for meaningful changes to the extension, not just formatting. + + * Version + * + * Last Modified Date: January 20, 2010 + * Revision: 8 + + * If you do not include a date and version number when submitting + * an extension to the registry, Khronos will generate one based on + * the date the specification was received. + +Number + + * Extensions are numbered for documentation purposes. Each + * extension should document its interactions with the core + * Specification and with all other extensions (that are also + * supported by the vendors shipping this extension) that have lower + * numbers. For example, extension 3 should document its interactions + * with the core document and (if any) with extensions 1 and 2. + * + * The extension number has no meaning outside of the documentation. + * In particular, it is not revealed to programmers who use OpenGL. + * Extension numbers are assigned by Khronos when an extension is + * submitted to the registry. + * + * ARB and ES extensions follow separate numbering schemes from + * vendor extensions. If an extension can be implemented against + * both GL and ES, assign numbers from both registries. + + Examples: + + * Number + * + * 12 + + * Number + * + * ARB Extension #12 + + * Number + * + * ARB Extension #23 + * OpenGL ES Extension #17 + +Dependencies + + * List the oldest version of GL, ES, OpenGL Shading Language, GLX, + * etc.) against which this extension can be implemented, as well + * as the version and, if relevant, profile against which the + * extension is written. Because specifications can be revised + * after their initial release, affecting page and table numbering, + * also include the release date of the specifications. It is + * usually best to write the extension against the current + * versions of Specifications even if it can be successfully + * implemented against older versions). + * + * Separately list all API profiles and extensions that must be + * present for this extension to be implemented, and all extensions + * whose presence or absence modifies the operation of this + * extension. + * + * If an extension can be implemented against both GL and ES, + * document both requirements, and note if their are any + * functionality differences (typically an extension which + * works with both GL and ES will not support interactions + * with GL features not present in ES in the ES version, but + * it is still valuable to have a common extension spec). + + * Dependencies + * OpenGL 3.2 (either core or compatibility profiles) is + * required. + * + * This extension is written against the OpenGL 3.2 + * (Core Profile) Specification (August 3, 2009). + + * Dependencies + * OpenGL 2.0 or OpenGL ES 2.0 are required. + * + * Some of the functionality of this extension is not supported + * when implemented against OpenGL ES 2.0. + * + * This extension is written against the OpenGL 2.0 + * Specification (October 22, 2004). + + * Dependencies + * OpenGL 1.2 is required. + * + * ARB_texture_float affects the definition of this extension. + * + * This extension is written against the OpenGL 2.1 + * Specification (May 16, 2008). + +Overview + + * What does the extension do? What problem does it solve? This + * can include background and rationale (unlike the specification + * language proper). A common format is a single sentence + * summarizing the extension, followed by greater levels of detail + * which will help people understand the extension. Note that the + * GL Specification explicitly does not include rationale, so the + * overview is a good place to put it instead. + +IP Status + + * Document any known patents or other IP claims that may prohibit + * royalty-free implementation of an extension, or impose other + * constraints on implementations. It is better to write "No + * known IP claims" rather than "None", since Khronos, or the + * vendor for vendor extensions, may not know of relevant IP. + * + * Examples: + + * IP Status + * + * ReallyBigCo has made unspecified IP claims against + * all implementations of this extension. + + * IP Status + * + * US Patent #7,654,321, owned by ReallyBigCo, may + * be infringed by implementations of this extension. + + * (note: extensions which have been approved by the Khronos + * Promoters fall under the Khronos IP agreements, which + * offer mutual protections to the members who implement + * such extensions). + + * IP Status + * + * No known IP claims. + +New Procedures and Functions + + * List all the procedures and functions that are defined by this + * extension. Each should be suffixed using the same string as was + * chosen as the extension name prefix. All parameter names and + * types must be included, including the return values of functions. + * Follow the style used in the appropriate Specifications. + * Example: + + * New Procedures and Functions + * + * void NewCommandEXT(int arg1, float arg2); + +New Types + + * List all new GL types defined by this extension. Include enough + * information to define a common underlying C-language binding + * definition on a per-architecture basis. For example, instead + * of saying "GLhandleARB", say: + + * New Types + * + * typedef unsigned int GLhandleARB; + +New Tokens + + * This list should be complete. It should separate the new tokens + * based on which procedures and parameters accept them, and + * explicitly list those procedures and parameters. Token suffixes + * must match the prefix chosen for the extension name. If + * enumerant values have been assigned, include them; otherwise + * list the values as "0x????". For example: + + * New Tokens + * + * Accepted by the parameters of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + * + * NEW_TOKEN_EXT 0x6042 + * ANOTHER_TOKEN_EXT 0x???? + +* Now, for each section of the relevant Specification (GL, ES, GLX, +* EGL, etc.), show in detail all changes to the Specification +* document required to completely describe this extension. Changes +* should be written in the style of the specifications and should be +* phrased as changes to specific, identifiable parts of the document. +* In each section heading, include the version of the specification +* being modified. If an extension is being written against both GL +* and ES, it is usually best to show changes against the GL +* Specification, then summarize differences when implemented with +* ES in a "Dependencies" section following the changes (see below). + +Additions to Chapter 2 of the OpenGL 3.2 (Core Profile) Specification +(OpenGL Operation) + + * Include any new command suffixes here (section 2.3) + * Include any new error types here (section 2.5) + +Additions to Chapter 3 of the OpenGL 3.2 (Core Profile) Specification +(Rasterization) + +Additions to Chapter 4 of the OpenGL 3.2 (Core Profile) Specification +(Per-Fragment Operations and the Frame Buffer) + +Additions to Chapter 5 of the OpenGL 3.2 (Core Profile) Specification +(Special Functions) + + * List commands that are not included in display lists + * (typically, Get* commands) + +Additions to Chapter 6 of the OpenGL 3.2 (Core Profile) Specification +(State and State Requests) + + * The lists of state and implementation-dependent state are added + * in the "New State" section. Add queries and new attributes here. + +Additions to Appendix A of the OpenGL 3.2 (Core Profile) Specification +(Invariance) + + * If the utility of the extension would be increased by + * specification of invariance relationships, note that here. + +Additions to Appendix D of the OpenGL 3.2 (Core Profile) Specification +(Shared Objects and Multiple Contexts) + + * If object sharing behavior is affected by the extension, + * describe that in the set of sharing rules in this section. + +************************************************************************ + +* If this is an OpenGL Shading Language extension, include a separate +* section for each affected chapter of the 1.50 (or specified version) +* Specification. + +Additions to Chapter 1 of the OpenGL Shading Language 1.50 Specification +(Introduction) + +Additions to Chapter 2 of the OpenGL Shading Language 1.50 Specification +(Overview of OpenGL Shading) + +Additions to Chapter 3 of the OpenGL Shading Language 1.50 Specification +(Basics) + +Additions to Chapter 4 of the OpenGL Shading Language 1.50 Specification +(Variables and Types) + +Additions to Chapter 5 of the OpenGL Shading Language 1.50 Specification +(Operators and Expressions) + +Additions to Chapter 6 of the OpenGL Shading Language 1.50 Specification +(Statements and Structure) + +Additions to Chapter 7 of the OpenGL Shading Language 1.50 Specification +(Built-in Variables) + +Additions to Chapter 8 of the OpenGL Shading Language 1.50 Specification +(Built-in Functions) + +Additions to Chapter 9 of the OpenGL Shading Language 1.50 Specification +(Shading Language Grammar) + +Additions to Chapter 10 of the OpenGL Shading Language 1.50 Specification +(Issues) + +************************************************************************ + +* If none of the window-system integration APIs are affected by +* this extension, indicate this by + +Additions to the AGL/EGL/GLX/WGL Specifications + + None + +* Otherwise, for a WGL or AGL extension, include a description of how +* the extension affects those APIs. WGL and AGL don't have spec +* documents, but we still phrase these sections as "Changes to the +* Specification" in anticipation of specifications being written. + +Additions to the WGL Specification + +Additions to the AGL Specification + +************************************************************************ + +* For a GLX extension (since GLX has a formal Specification), +* include a separate section for each affected chapter of +* the GLX Specification: + +Additions to Chapter 1 of the GLX 1.4 Specification (Overview) + +Additions to Chapter 2 of the GLX 1.4 Specification (GLX Operation) + +Additions to Chapter 3 of the GLX 1.4 Specification +(Functions and Errors) + +Additions to Chapter 4 of the GLX 1.4 Specification +(Encoding on the X Byte Stream) + +Additions to Chapter 5 of the GLX 1.4 Specification (Extending OpenGL) + +Additions to Chapter 6 of the GLX 1.4 Specification (GLX Versions) + +************************************************************************ + +* Likewise for an EGL extension. + +Additions to Chapter 1 of the EGL 1.4 Specification (Overview) + +Additions to Chapter 2 of the EGL 1.4 Specification (EGL Operation) + +Additions to Chapter 3 of the EGL 1.4 Specification +(EGL Functions and Errors) + +Additions to Chapter 4 of the EGL 1.4 Specification (Extending EGL) + +Additions to Chapter 5 of the EGL 1.4 Specification +(EGL Versions and Enumerants) + +Additions to Chapter 6 of the EGL 1.4 Specification (Glossary) + +************************************************************************ + +* For an extension of any type which is to be supported by GLX indirect +* rendering, include additions to the GLX Protocol Specification. + +GLX Protocol + + * Add protocol here using the same format as the GLX protocol + * document. Be sure to specify the values of enumerated types. + * + * Use glXVendorPrivate for extended requests without a reply + * (e.g., new GLX commands) : + * glXVendorPrivate + * + * 1 CARD8 opcode (X assigned) + * 1 16 GLX opcode + * 2 2+(n+p)/4 request length + * 4 CARD32 vendor-specific opcode + * n LISTofBYTE vendor-specific data + * p unused, p=pad(n) + * + * Make sure to reserve a vendor-specific opcode by request from + * Khronos (just as enumerant values are assigned on request), then + * define the layout of the vendor-specific data. + * + * Use glXVendorPrivateWithReply for extended requests with a reply + * (e.g., new gets for OpenGL): + * + * glXVendorPrivateWithReply + * + * 1 CARD8 opcode (X assigned) + * 1 17 GLX opcode + * 2 2+(n+p)/4 request length + * 4 CARD32 vendor-specific opcode + * n LISTofBYTE vendor-specific data + * p unused, p=pad(n) + * => + * 1 1 reply + * 1 unused + * 2 CARD16 sequence number + * 4 n reply length + * 24 LISTofBYTE returned data + * 4*n LISTofBYTE more returned data + * + * This is similar to glXVendorPrivate except you also need to + * define the layout of the returned data. + * + * For extended OpenGL commands, be sure to specify whether it is a + * rendering command or a non-rendering command, and if it is a + * rendering command, whether or not it can be large. + * + * To specify an extended visual attribute, specify a property + * type/property value pair to use with glXGetVisualConfigs. + + ******************************************************************** + +Dependencies on GL and ES profiles, versions, and other extensions + + * Separately list each interaction which affects the behavior + * of this extension depending on which other extensions + * are present or on which version of Specifications this + * extension is implemented against. Examples: + + * Dependencies on ARB_texture_float + * + * If ARB_texture_float is not supported, then + * delete all references to the R*F* pixel formats. + + * Dependencies on OpenGL ES + * + * If implemented for OpenGL ES, this extension + * behaves as specified, except: + * + * - Ignore all references to display lists and + * immediate mode, including changes to section 5.4. + * - Ignore all references to GLX and GLX Protocol. + +Errors + + * This list summarizes all possible errors generated by the + * extension and should be complete (however, errors are best + * described in the extension body text as well). + +New State + + * Include modifications to the state tables in chapter 6 of the + * GL and/or ES Specifications (other Specifications do not + * have state tables). For each affected table, identify the + * table and describe all new or modified state values in the + * format of that table. Client state (for e.g. vertex arrays or + * pixel packing parameters) should have "client" listed in the + * Attribute column. Example: + + * Changes to table 6.99, p. 516 (Funky Geometry State) + * + * Initial + * Get Value Type Get Command Value Description Sec. Attribute + * --------- ---- ----------- ------- ----------- ---- --------- + * RADIUS R GetFloatv 1.0 Disk radius 2.6 vertex + +New Implementation Dependent State + + * Describe all implementation dependent state in the same + * fashion. Example: + + * (Changes to table 6.100, p. 518 (Implementation-Dependent State) + * + * Minimum + * Get Value Type Get Command Value Description Sec. Attribute + * --------- ---- ----------- ------- ----------- ---- --------- + * MAX_DISKS Z+ GetIntegerv 1000 Max. # of 2.5 - + * disks. + +Sample Code + + * For complex extensions, it may be worthwhile to include + * code samples of how to use the extension. + +Conformance Tests + + * If a conformance test is defined for the extension, + * summarize its basic purpose, if not necessarily its + * source code, here. If no test has been defined, note that + * they are needed. + +Issues + + * List remaining open issues, or closed issues whose resolution + * set a precedent or was otherwise especially interesting. + * Briefly describe each issue, options considered, the choice + * made, and the reason for that choice. The Issues section + * documents motivation, rationale, etc. while not being a + * normative part of the extension. We suggest a numerically + * order list so that issues can refer to other issues. + * + * We now recommend placing the Issues list near the end of + * the extension, since it can grow very long yet is ancillary + * to the specification itself. + +Revision History + + * Include important changes in the evolution of the extension. + * It's especially important to include this section if the + * extension is modified after a version has been shipped. + * + * Example (and actual revision history of the template): + +* Revision 8, 2010/01/20 +* - Minor updates for completeness and consistency. Push updated +* template to the public Registry. +* Revision 7, 2009/12/07 +* - Generalize template to allow for ES and GL extensions +* and change references from SGI to Khronos as the +* Registry owner. +* Revision 6, 2006/10/09 +* - Move registry URL to www.opengl.org. +* Revision 5, 2004/06/22 +* - Update template to allow OpenGL Shading Language and EGL +* extensions. Add "Sample Code" section. Include more examples +* under "IP Status". Add the template's revision history. +* Add state table examples. Cleanup overall formatting to make +* clear what are the section headers which must be present, +* in contrast to the examples which are just part of this +* template. Add document source URL. +* Revision 4, 2003/12/19 +* - Add "New Types" section. +* Revision 3, 2000/04/26 +* - Add "Author Revision" field to Version section, instead of +* relying on source code control versions. diff --git a/opengles/docs/toolchain.html b/opengles/docs/toolchain.html new file mode 100644 index 0000000000..3d3a4e5cd0 --- /dev/null +++ b/opengles/docs/toolchain.html @@ -0,0 +1,95 @@ + + + +Docbook Toolchain for Khronos Documents + + + +

What is Docbook?

+ +

Docbook is a widely used XML + schema for technical documentation(*). It is an open source project + with a great deal of supporting infrastructure and documentation. + Start with the Docbook + FAQ and the canonical text DocBook: The Definitive Guide + (since we are using Docbook 4.x, read version 2.0 of the Guide). + + +

Like LaTeX, Docbook is a structural description of a document. + Docbook does not define formatting. Using XSL stylesheets, + Docbook documents can be transformed into many other formats such as + XHTML, PDF, Unix nroff man pages, and Windows HTML Help. + +

Khronos has agreed to use Docbook as the format for new man pages + and technical specifications created within the group. + This document captures basic information about Docbook + and the toolchain required to use it. + +

(*) Actually, there are SGML and Relax NG schemas for Docbook + as well. However, for Khronos' purposes we concentrate on + the XML schema. + + +

Docbook Editors

+ +

Since Docbook documents are XML, it is possible (and perhaps + desirable for smaller documents) to simply use a text editor and + mark up XML by hand. Emacs is reputed to have a Docbook and/or XML + editing mode which may be useful. + +

There are a variety of free and commercial XML editors. Some are + described in the Docbook + FAQ. We have experimented with the free Standard version of XMLMind with some + success; unlike many of the other options, XMLMind understands the + Docbook schema and can render Docbook documents in a WYSIWYG-like + fashion, in addition to the straight XML structure editor. + + +

Docbook Schema

+ +

There are many versions of the Docbook XML Schema. We are currently + using Docbook 4.3 with MathML 2.0 support. See the DOCTYPE + declaration in the sample documents for the specific DTDs. + + +

XSL Stylesheets

+ +

To transform Docbook documents into final viewable formats, we use + the standard Modular + Docbook XSL stylesheets (version 1.69). These are available + prepackaged for modern Linux systems (although you may have to + manually select the packages) as well as for the Cygwin environment + on Windows. We are using version 1.69 of the stylesheets. + +

(Note: need links to Cygwin / Red Hat / other Linux distro? + packages). + + +

Tools

+ +

The Docbook 4.3 DTD is also prepackaged for most systems. Some + additional work is required to install the Docbook 4.3+MathML 2.0 + DTD (details to be added). + + (Note: need links to Cygwin / Red Hat / other Linux distro? packages). + +

To transform a Docbook document with the XSL Stylesheets, + a processor like + xsltproc or Saxon is required. Again, xsltproc + is prepackaged. + + (Note: again, need links to Cygwin / Red Hat / other Linux + distro? packages). + +

Examples

+ +

A simple example package containing a Docbook document (sample man + page) and Makefile to transform it are here (link TBD). + +

Last modified August 13, 2006 by Jon Leech + + diff --git a/opengles/docs/update_policy.php b/opengles/docs/update_policy.php new file mode 100644 index 0000000000..99035b773d --- /dev/null +++ b/opengles/docs/update_policy.php @@ -0,0 +1,45 @@ + + +

This page describes policy of the Khronos OpenGL Working Group for + updating API and Shading Language Specification documents, as well as + extension documents.

+ +

This policy was last updated on 2019-03-13.

+ +

Specification Updates

+ +

The current core (OpenGL 4.6, OpenGL ES 3.2, OpenGL SC 2.0, GLSL 4.60, + GLSL ES 3.20, and GLX 1.4) documents are updated in response to issues + and bugs the OpenGL Working Group considers priorities. The update + frequency is irregular and dependent on the accumulated backlog of + issues, up to several times per year.

+ +

While Khronos publishes older (non-current) Specifications such as + OpenGL 4.5 or OpenGL ES 3.0, such Specifications are usually not + updated in response to issues and bugs unless there's a compelling + reason. One such compelling reason has been to update older OpenGL ES + Specifications on which WebGL is based, in response to requests from the + WebGL Working Group.

+ +

Extension Updates

+ +

Khronos-approved (ARB, OES, or KHR vendor + suffixed) extensions are usually updated when corresponding changes are + made to a core Specification, but with some time lag.

+ +

This is a recent policy. Older bug fixes to core Specifications have not + always been back-ported to the corresponding extensions, and we are + unlikely to perform this exercise for closed issues and bugs without + compelling reason.

+ +

We will tag each Khronos-approved extension with a link to this policy + document and a recommendation to refer to the current core Specification + for the latest wording.

+ + + + diff --git a/opengles/extensions/3DFX/3DFX_multisample.txt b/opengles/extensions/3DFX/3DFX_multisample.txt new file mode 100644 index 0000000000..559bd6f778 --- /dev/null +++ b/opengles/extensions/3DFX/3DFX_multisample.txt @@ -0,0 +1,538 @@ +Name + + 3DFX_multisample + +Name Strings + + GL_3DFX_multisample + GLX_3DFX_multisample + WGL_3DFX_multisample + +Contact + + Paula Womack, 3dfx Interactive (paulaw 'at' 3dfx.com) + +Status + + Complete. + +Version + + Date: April 18, 2000; Version 1.1 + +Number + + 207 + +Dependencies + + OpenGL 1.1 is required. + GLX 1.2 is required. + WGL_ARB_extensions_string is required. + WGL_ARB_pixel_format is required. + GLX_EXT_fbconfig and GLX 1.3 affect the definition of this extension. + This spec is written against OpenGL 1.2 and GLX 1.3 + +Overview + + This extension provides a mechanism to antialias all GL primitives: + points, lines, polygons, bitmaps, and images. The technique is to + sample all primitives multiple times at each pixel. The color sample + values are resolved to a single, displayable color each time a pixel + is updated, so the antialiasing appears to be automatic at the + application level. Because each sample includes depth and stencil + information, the depth and stencil functions perform equivalently to + the single-sample mode. + + An additional buffer, called the multisample buffer, is added to the + framebuffer. Pixel sample values, including color, depth, and + stencil values, are stored in this buffer. When the framebuffer + includes a multisample buffer, it does not also include separate + depth or stencil buffers, even if the multisample buffer does not + store depth or stencil values. Color buffers (left/right, + front/back, and aux) do coexist with the multisample buffer, + however. + + Multisample antialiasing is most valuable for rendering polygons, + because it requires no sorting for hidden surface elimination, and + it correctly handles adjacent polygons, object silhouettes, and even + intersecting polygons. If only points or lines are being rendered, + the "smooth" antialiasing mechanism provided by the base GL may + result in a higher quality image. + + This extension is a subset of SGIS_multisample. It differs in these + key ways: + + * Fragment alpha values are not affected by the fragment sample mask + * The sample locations may or may not be fixed. Thus, there is no + support for rendering the scene multiple times with different + sample points. + * Fragment masks are not computed for images or for bitmasks. + + Because of these differences a new extension was created. However, + it is not expected that this extension will co-exist with + SGIS_multisample. Because of this and the fact that there are only + 32 push/pop bits the MULTISAMPLE_BIT_SGIS state value is the same as + MUTLISAMPLE_BIT_3DFX. + +IP Status + + No issues. + +Issues + + Should tbuffer be kept as a separate extension? + + Yes. The ability to define a write mask for the fragment mask should + be kept separate. This feature is orthogonal to SGIS_multisample, + while 3DFX_multisample is not. 3DFX_multisample is a strict subset + of SGIS_multisample. + + Should the multisample buffer be defined as a separate buffer? + + Yes. It does not need to be implemented this way though. Since GL + rendering is done off screen and then blitted (to handle window + clipping) the multisample buffer can actually be the same as the + offscreen front and back buffers. The blit engine handles reads and + writes to/from AA buffers so ReadPixels will work correctly. + + Should we allow the depth values for the different samples to differ + when AA is off? + + No. This will be a bug on hardware that operates this way. In + practice it should not be a big issue. + +New Procedures and Functions + + None + +New Tokens + + Accepted by the parameter of glXChooseFBConfig and + glXChooseVisual and by the parameter of + glXGetFBConfigAttrib and glXGetConfig: + + GLX_SAMPLE_BUFFERS_3DFX 0x8050 + GLX_SAMPLES_3DFX 0x8051 + + Accepted in the parameter array of + wglGetPixelFormatAttribivARB, and wglGetPixelFormatAttribfvARB, and + in the and parameter arrays of + wglChoosePixelFormatARB: + + WGL_SAMPLE_BUFFERS_3DFX 0x2060 + WGL_SAMPLES_3DFX 0x2061 + + Accepted by the parameter of Enable, Disable, and IsEnabled, + and by the parameter of GetBooleanv, GetIntegerv, GetFloatv, + and GetDoublev: + + MULTISAMPLE_3DFX 0x86B2 + + Accepted by the parameter of GetBooleanv, GetDoublev, + GetIntegerv, and GetFloatv: + + SAMPLE_BUFFERS_3DFX 0x86B3 + SAMPLES_3DFX 0x86B4 + + Accepted by the parameter of PushAttrib: + + MULTISAMPLE_BIT_3DFX 0x20000000 + +Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation) + + None + +Additions to Chapter 3 of the 1.2 Specification (Rasterization) + + If SAMPLE_BUFFERS_3DFX is one, the rasterization of all GL + primitives is changed, and is referred to as multisample + rasterization. Otherwise primitive rasterization operates as it is + described in the GL specification, and is referred to as + single-sample rasterization. The value of SAMPLE_BUFFERS_3DFX is an + implementation dependent constant, and is queried by calling + GetIntegerv with pname set to SAMPLE_BUFFERS_3DFX. + + During multisample rasterization the contents of a pixel fragment + are changed in two ways. First, each fragment includes a coverage + mask with SAMPLES_3DFX bits. The value of SAMPLES_3DFX is an + implementation dependent constant, and is queried by calling + GetIntegerv with pname set to SAMPLES_3DFX. Second, each fragment + includes SAMPLES_3DFX depth values, instead of the single depth + value that is maintained in single-sample rasterization mode. Each + pixel fragment thus consists of integer x and y grid coordinates, a + color, SAMPLES_3DFX depth values, texture coordinates, a coverage + value, and the SAMPLES_3DFX-bit mask. + + The behavior of multisample rasterization is a function of + MULTISAMPLE_3DFX, which is enabled and disabled by calling Enable or + Disable, with cap set to MULTISAMPLE_3DFX. Its value is queried + using IsEnabled, with cap set to MULTISAMPLE_3DFX. + + If MULTISAMPLE_3DFX is disabled, multisample rasterization of all + primitives is equivalent to single-sample rasterization, except that + the fragment coverage mask is set to all ones. The depth values may + all be set to the single value that would have been assigned by + single-sample rasterization, or they may be assigned as described + below for MULTISAMPLE_3DFX-enabled multisample rasterization. + + If MULTISAMPLE_3DFX is enabled, multisample rasterization of all + primitives differs substantially from single-sample rasterization. + It is understood that each pixel in the framebuffer has SAMPLES_3DFX + locations associated with it. These locations are exact positions, + rather than regions or areas, and each is referred to as a sample + point. The sample points associated with a pixel may be located + inside or outside of the unit square that is considered to bound the + pixel. Furthermore, the pattern (relative location) of sample points + may be identical for each pixel in the framebuffer, or it may + differ. The locations of the sample points are fixed by the + implementation and it is not possible to query the actual sample + locations of a pixel. + + If the sample patterns differ per pixel, they should be aligned to + window, not screen, boundaries. Otherwise rendering results will be + window-position specific. The invariance requirement described in + section 3.1 is relaxed for all enabled multisample rasterization, + because the sample patterns may be a function of pixel location. + + 3.3.2 Point Multisample Rasterization + + If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then + points are rasterized using the following algorithm, regardless of + whether point antialiasing (POINT_SMOOTH) is enabled or disabled. + Point rasterization produces a fragment for each framebuffer pixel + with one or more sample points that intersect the region lying + within the circle having diameter equal to the current point width + and centered at the point's (Xw,Yw). The coverage value for each + fragment is 1. Mask bits that correspond to sample points that + intersect the circular region are 1, other mask bits are 0. All + depth values of the fragment are assigned the depth value of the + point being rasterized. The data associated with each fragment are + otherwise the data associated with the point being rasterized. + + Point size range and number of gradations are equivalent to those + supported for antialiased points. + + 3.4.4 Line Multisample Rasterization + + If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then + lines are rasterized using the following algorithm, regardless of + whether line antialiasing (LINE_SMOOTH) is enabled or disabled. Line + rasterization produces a fragment for each framebuffer pixel with + one or more sample points that intersect the rectangular region that + is described in the Antialiasing section of 3.4.2 (Other Line + Segment Features). If line stippling is enabled, the rectangular + region is subdivided into adjacent unit-length rectangles, with some + rectangles eliminated according to the procedure given under Line + Stipple, where "fragment" is replaced by "rectangle". + + The coverage value for each fragment is 1. Mask bits that correspond + to sample points that intersect a retained rectangle are 1, other + mask bits are 0. Each depth value is produced by substituting the + corresponding sample location into equation 3.1, then using the + result to evaluate equation 3.3. The data associated with each + fragment are otherwise computed by evaluating equation 3.1 at the + fragment center, then substituting into equation 3.2. + + Line width range and number of gradations are equivalent to those + supported for antialiased lines. + + 3.5.7 Polygon Multisample Rasterization + + If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then + polygons are rasterized using the following algorithm, regardless of + whether polygon antialiasing (POLYGON_SMOOTH) is enabled or + disabled. Polygon rasterization produces a fragment for each + framebuffer pixel with one or more sample points that satisfy the + point sampling criteria described in section 3.5.1, including the + special treatment for sample points that lie on a polygon boundary + edge. If a polygon is culled, based on its orientation and the + CullFace mode, then no fragments are produced during rasterization. + Fragments are culled by the polygon stipple just as they are for + aliased and antialiased polygons. + + The coverage value for each fragment is 1. Mask bits that correspond + to sample points that satisfy the point sampling criteria are 1, + other mask bits are 0. Each depth value is produced by substituting + the corresponding sample location into the barycentric equations + described in section 3.5.1, using the approximation to equation 3.4 + that omits w components. The data associated with each fragment are + otherwise computed by barycentric evaluation using the fragment's + center point. + + If POLYGON_OFFSET_FILL is enabled then the offset value computed in + equation 3.7 is added to all sample depth values. + + The rasterization described above applies only to the FILL state of + PolygonMode. For POINT and LINE, the rasterizations described in + 3.3.2 (Point Multisample Rasterization) and 3.4.4 (Line Multisample + Rasterization) apply with the additional requirement that the sample + depth values must be offset by the value computed in equation 3.7 + when POLYGON_OFFSET_POINT or POLYGON_OFFSET_LINE is enabled. + + 3.6.5 Multisample Rasterization of Pixel Rectangles + + If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then + pixel rectangles are rasterized using the following algorithm. Let + (Xrp,Yrp) be the current raster position. (If the current raster + position is invalid, then DrawPixels is ignored.) If a particular + group (index or components) is the nth in a row and belongs to the + mth row, consider the region in window coordinates bounded by the + rectangle with corners + + (Xrp + Zx*n, Yrp + Zy*m) + + and + + (Xrp + Zx*(n+1), Yrp + Zy*(m+1)) + + where Zx and Zy are the pixel zoom factors specified by PixelZoom, + and may each be either positive or negative. A fragment representing + group n,m is produced for each framebuffer pixel with one or more + sample points that lie inside, or on the bottom or left boundary, of + this rectangle. Each fragment so produced takes its associated data + from the group and from the current raster position, in a manner + consistent with SGIX_pixel_texture (if it is implemented) or in a + manner consistent with the discussion in the Conversion to Fragments + subsection of section 3.6.4 of the GL specification. All depth + sample values are assigned the same value, taken either from the + group (if it is a depth component group) or from the current raster + position (if it is not). + + A single pixel rectangle will generate multiple, perhaps very many + fragments for the same framebuffer pixel, depending on the pixel + zoom factors. + + 3.7.1 Bitmap Multisample Rasterization + + If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then + bitmaps are rasterized using the following algorithm. If the current + raster position is invalid, the bitmap is ignored. Otherwise, a + screen-aligned array of pixel-size rectangles is constructed, with + its lower-left corner at (Xrp,Yrp), and its upper right corner a + (Xrp+w,Yrp+h), where w and h are the width and height of the bitmap. + Rectangles in this array are eliminated if the corresponding bit in + the bitmap is zero, and are retained otherwise. Bitmap rasterization + produces a fragment for each framebuffer pixel with one or more + sample points either inside or on the bottom or left edge of a + retained rectangle. + +Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations +and the Frame Buffer) + + 4.1.9 Multisample Fragment Operations + + If the DrawBuffers mode is NONE, no change is made to any + multisample or color buffer. Otherwise, fragment processing is as + described below. + + If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, the + stencil test, depth test, blending, and dithering operations + described in sections 4.1.4, 4.1.5, 4.1.6, and 4.1.7 are performed + for each pixel sample, rather than just once for each fragment. + Failure of the stencil or depth test results in termination of the + processing of that sample, rather than discarding of the fragment. + All operations are performed on the color, depth, and stencil values + stored in the multisample buffer (to be described in a following + section). The contents of the color buffers are not modified at this + point. + + Stencil, depth, blending, and dithering operations are performed for + a pixel sample only if that sample's fragment mask bit is 1. If the + corresponding mask bit is 0, no operations are performed for that + sample. Depth operations use the fragment depth value that is + specific to each sample. The single fragment color value is used for + all sample operations, however, as is the current stencil value. + + If MULTISAMPLE_3DFX is disabled, and SAMPLE_BUFFERS_3DFX is one, the + fragment may be treated exactly as described above, with + optimization possible because the fragment mask must be all 1's. + Further optimization is allowed, however. An implementation may + choose to identify a centermost sample, and to perform stencil and + depth tests on only that sample. Regardless of the outcome of the + stencil test, all multisample buffer stencil sample values are set + to the appropriate new stencil value. If the depth test passes, all + multisample buffer depth sample values are set to the depth of the + fragment's centermost sample's depth value, and all multisample + buffer color sample values are set to the color value of the + incoming fragment. Otherwise, no change is made to any multisample + buffer color or depth value. + + After all operations have been completed on the multisample buffer, + the color sample values are combined to produce a single color + value, and that value is written into each color buffer that is + currently enabled, based on the DrawBuffers mode. The method of + combination is not specified, though a simple average computed + independently for each color component is recommended. + + 4.2.2.5 Fine Control of Multisample Buffer Updates + + When SAMPLE_BUFFERS_3DFX is one, ColorMask, DepthMask, and + StencilMask control the modification of values in the multisample + buffer. The color mask has no effect on modifications to the color + buffers. If the color mask is entirely disabled, the color sample + values must still be combined (as described above) and the result + used to replace the color values of the buffers enabled by + DrawBuffers. + + 4.2.3.5 Clearing the Multisample Buffer + + The color samples of the multisample buffer are cleared when one or + more color buffers are cleared, as specified by the Clear mask bit + COLOR_BUFFER_BIT and the DrawBuffers mode. If the DrawBuffers mode + is NONE, the color samples of the multisample buffer cannot be + cleared. + + Clear mask bits DEPTH_BUFFER_BIT and STENCIL_BUFFER_BIT indicate + that the depth and stencil samples of the multisample buffer are to + be cleared. If Clear mask bit DEPTH_BUFFER_BIT is specified, and if + the DrawBuffers mode is not NONE, then the multisample depth buffer + samples are cleared. Likewise, if Clear mask bit STENCIL_BUFFER_BIT + is specified, and if the DrawBuffers mode is not NONE, then the + multisample stencil buffer is cleared. + + 4.3.2 Reading Pixels + + [These changes are made to the text in section 4.3.2, following the + subheading Obtaining Pixels from the Framebuffer.] + + Follow the sentence "If there is no depth buffer, the error + INVALID_OPERATION occurs." with: If there is a multisample buffer + (SAMPLE_BUFFERS_3DFX is 1) then values are obtained from the depth + samples in this buffer. It is recommended that the depth value of + the centermost sample be used, though implementations may choose any + function of the depth sample values at each pixel. + + Follow the sentence "if there is no stencil buffer, the error + INVALID_OPERATION occurs." with: If there is a multisample buffer, + then values are obtained from the stencil samples in this buffer. It + is recommended that the stencil value of the centermost sample be + used, though implementations may choose any function of the stencil + sample values at each pixel. + + This extension makes no change to the way that color values are + obtained from the framebuffer. + +Additions to Chapter 5 of the 1.2 Specification (Special Functions) + + None + +Additions to Chapter 6 of the 1.2 Specification (State and State Requests) + + An additional group of state variables, MULTISAMPLE_BIT_3DFX, is + defined by this extension. When PushAttrib is called with bit + MULTISAMPLE_BIT_3DFX set, the multisample group of state variables + is pushed onto the attribute stack. When PopAttrib is called, these + state variables are restored to their previous values if they were + pushed. Some multisample state is included in the ENABLE_BIT group + as well. In order to avoid incompatibility with GL implementations + that do not support 3DFX_multisample, ALL_ATTRIB_BITS does not + include MULTISAMPLE_BIT_3DFX. + +Additions to the GLX 1.3 Specification + + The parameter GLX_SAMPLE_BUFFERS_3DFX is added to + glXGetFBConfigAttrib. When queried, by calling glXGetFBConfigAttrib + with attribute set to GLX_SAMPLE_BUFFERS_3DFX, it returns the number + of multisample buffers included in the visual. For a normal visual, + the return value is zero. A return value of one indicates that a + single multisample buffer is available. The number of samples per + pixel is queried by calling glXGetFBConfigAttrib with attribute set + to GLX_SAMPLES_3DFX. It is understood that the number of color, + depth, and stencil bits per sample in the multisample buffer are as + specified by the GLX_*_SIZE parameters. It is also understood that + there are no single-sample depth or stencil buffers associated with + this visual -- the only depth and stencil buffers are those in the + multisample buffer. GLX_SAMPLES_3DFX is zero if + GLX_SAMPLE_BUFFERS_3DFX is zero. + + glXChooseFBConfig accepts GLX_SAMPLE_BUFFERS_3DFX in attrib_list, + followed by the minimum number of multisample buffers that can be + accepted. Visuals with the smallest number of multisample buffers + that meets or exceeds the specified minimum number are preferred. + Currently operation with more than one multisample buffer is + undefined, so the returned value will be either zero or one. + + glXChooseFBConfig accepts GLX_SAMPLES_3DFX in attrib_list, followed + by the minimum number of samples that can be accepted in the + multisample buffer. Visuals with the smallest number of samples that + meets or exceeds the specified minimum number are preferred. + + The multisample FBConfig attributes are added to table 3.4 as follows: + + Attribute Default Selection Criteria Sort Priority + --------- ------- ------------------ ------------- + GLX_SAMPLE_BUFFERS_3DFX 0 Smaller + GLX_SAMPLES_3DFX 0 Smaller + + If the GLX implementation is 1.2 or less, then + GLX_SAMPLE_BUFFERS_3DFX and GLX_SAMPLES_3DFX are accepted by + glXChooseVisual and glXGetConfig. + + If the color samples in the multisample buffer store fewer bits than + are stored in the color buffers, this fact will not be reported + accurately. Presumably a compression scheme is being employed, and + is expected to maintain an aggregate resolution equal to that of the + color buffers. + +Additions to WGL + + The parameters WGL_SAMPLE_BUFFERS_3DFX and WGL_SAMPLES_3DFX are + added to wglGetPixelFormatAttribivARB and + wglGetPixelFormatAttribfvARB. WGL_SAMPLE_BUFFERS_3DFX indicates the + number of multisample buffers included in the pixel format. For a + normal pixel format, the return value is zero. A return value of one + indicates that a single multisample buffer is available. + WGL_SAMPLES_3DFX gives the number of samples per pixel. It is + understood that the number of color, depth, and stencil bits per + sample in the multisample buffer are as specified by the WGL_*_BITS + parameters. It is also understood that there are no single-sample + depth or stencil buffers associated with this pixel format -- the + only depth and stencil buffers are those in the multisample buffer. + WGL_SAMPLES_3DFX is zero if WGL_SAMPLE_BUFFERS_3DFX is zero. + + wglChoosePixelFormatARB accepts WGL_SAMPLE_BUFFERS_3DFX in + piAttribIList and/or pfAttribFList, followed by the minimum number + of multisample buffers that can be accepted. Pixel formats with the + smallest number of multisample buffers that meet or exceed the + specified minimum number are preferred. Currently operation with + more than one multisample buffer is undefined, so the returned value + will be either zero or one. + + wglChoosePixelFormatARB accepts WGL_SAMPLES_3DFX in piAttribIList + and/or pfAttribFList, followed by the minimum number of samples that + can be accepted in the multisample buffer. Pixel formats with the + smallest number of samples that meet or exceed the specified minimum + number are preferred. + +Errors + + None + +New State + + + Get Value Get Command Type Initial Value Attribute + --------- ----------- ---- ------------- --------- + MULTISAMPLE_3DFX IsEnabled B TRUE multisample/enable + +New Implementation Dependent State + + Get Value Get Command Type Minimum Value + --------- ----------- ---- ------------- + SAMPLE_BUFFERS_3DFX GetIntegerv Z+ 0 + SAMPLES_3DFX GetIntegerv Z+ 0 + +Dependencies on GLX 1.3 and GLX_EXT_fbconfig + + If GLX 1.3 is not supported and GLX_EXT_fbconfig is not supported + then all references to glXGetFBConfigAttrib and glXGetConfig are + removed. + +Revision History + + Version 1.1 - April 18, 2000 (Jon Leech, SGI) + + Specified value of MULTISAMPLE_BIT_3DFX. Assigned values to + GLX_SAMPLE_BUFFERS_3DFX and GLX_SAMPLES_3DFX. Conversion from + HTML -> text and formatting cleanup. diff --git a/opengles/extensions/3DFX/3DFX_tbuffer.txt b/opengles/extensions/3DFX/3DFX_tbuffer.txt new file mode 100644 index 0000000000..d2c28b679f --- /dev/null +++ b/opengles/extensions/3DFX/3DFX_tbuffer.txt @@ -0,0 +1,122 @@ +Name + + 3DFX_tbuffer + +Name Strings + + GL_3DFX_tbuffer + +Contact + + Paula Womack, 3dfx Interactive (paulaw 'at' 3dfx.com) + +Status + + Complete + +Version + + Date: April 13, 2000; Revision: 1.0 + +Number + + 208 + +Dependencies + + OpenGL 1.1 is required. + Either SGIS_multisample or 3DFX_multisample is required. + This specification is written against OpenGL 1.2. + +Overview + + This extension allows a write mask to be defined for the fragment + mask which is created during multisample rendering. This can be used + to create effects such as motion blur and depth of field. + +IP Status + + 3DFX has filed for patent protection for some of the techniques + described in this extension document. + +Issues + + None. + +New Procedures and Functions + + void TbufferMask3DFX(uint mask); + +New Tokens + + None. + +Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation) + + None + +Additions to Chapter 3 of the 1.2 Specification (Rasterization) + + The value of TBUFFER_WRITE_MASK_3DFX is specified by calling + TbufferMask3DFX, with mask set to the desired mask value. If + multisample rendering is enabled then the n least significant bits + of TBUFFER_WRITE_MASK_3DFX are bitwise ANDed with the fragment + sample mask, where n is equal to SAMPLES_3DFX. + +Additions to 3.3.2 Point Multisample Rasterization: + + Following the sentence "Mask bits that correspond to sample points + that intersect the circular region are 1, other mask bits are 0." + add "The fragment mask thus computed, is then bitwise ANDed with the + SAMPLES_3DFX least significant bits of TBUFFER_WRITE_MASK_3DFX. + +Additions to 3.4.4 Line Multisample Rasterization: + + Following the sentence "Mask bits that correspond to sample points + that intersect a retained rectangle are 1, other mask bits are 0." + add "The fragment mask thus computed, is then bitwise ANDed with the + SAMPLES_3DFX least significant bits of TBUFFER_WRITE_MASK_3DFX. + +Additions to 3.5.6 Polygon Multisample Rasterization: + + Following the sentence "Mask bits that correspond to sample points + that satisfy the point sampling criteria are 1, other mask bits are + 0." add "The fragment mask thus computed, is then bitwise ANDed with + the SAMPLES_3DFX least significant bits of TBUFFER_WRITE_MASK_3DFX. + +Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations and +the Frame Buffer) + + None + +Additions to Chapter 5 of the 1.2 Specification (Special Functions) + + None + +Additions to Chapter 6 of the 1.2 Specification (State and State Requests) + + An additional group of multisample state variables is defined by the + SGIS_multitexture and 3DFX_multitexture extensions. When PushAttrib + is called with bit MULTISAMPLE_BIT_SGIS or MULTISAMPLE_BIT_3DFX set, + the multisample group of state variables is pushed onto the + attribute stack. When PopAttrib is called, these state variables are + restored to their previous values if they were pushed. This + extension adds state to the multisample group of state variables. + +Additions to the GLX Specification + + None. + +Errors + + INVALID_OPERATION is generated if TbufferWriteMask3DFX is called + between the execution of Begin and the execution of the + corresponding End. + +New State + + Get Value Get Command Type Initial Value Attribute + --------- ----------- ---- ------------- --------- + TBUFFER_WRITE_MASK_3DFX GetIntegerv Z+ 1's multisample + +Revision History diff --git a/opengles/extensions/3DFX/3DFX_texture_compression_FXT1.txt b/opengles/extensions/3DFX/3DFX_texture_compression_FXT1.txt new file mode 100644 index 0000000000..034e6a57ec --- /dev/null +++ b/opengles/extensions/3DFX/3DFX_texture_compression_FXT1.txt @@ -0,0 +1,619 @@ +Name + + 3DFX_texture_compression_FXT1 + +Name Strings + + GL_3DFX_texture_compression_FXT1 + +Contact + + Don Mullis, 3dfx Interactive (dwm 'at' 3dfx.com) + +Status + + CANDIDATE FOR FINAL DRAFT -- NOT YET COMPLETE + +Version + + Draft 0.4, 12 Apr 2000 + +Number + + 206 + +Dependencies + + OpenGL 1.1 is required. + GL_ARB_texture_compression is required. + This extension is written against the OpenGL 1.2.1 Specification. + +Overview + + This extension additional texture compression functionality 's FXT1 + format, specific to 3dfxsubject to all the requirements and + limitations described by the extension GL_ARB_texture_compression. + The FXT1 texture format supports only 2D and 3D images without + borders. + + Because 3dfx expects to make continual improvement to its FXT1 + compressor implementation, 3dfx recommends that to achieve best + visual quality applications adopt the following procedure with + respect to reuse of textures compressed by the GL: + + 1) Save the RENDERER and VERSION strings along with images + compressed by the GL; + 2) Before reuse of the textures, compare the stored strings with + strings newly returned from the current GL; + 3) If out-of-date, repeat the compression and storage steps. + +IP Status + + A royalty-free license is available from 3dfx Interactive + (http://www.3dfx.com/). + +Issues + + (1) Two or only one internalformat tokens: + GL_COMPRESSED_RGBA_FXT1_3DFX and GL_COMPRESSED_RGB_FXT1_3DFX, or + GL_COMPRESSED_RGBA_FXT1_3DFX only. These names are placeholders, + the point in question is whether there should be separate tokens + reflecting extrinsic knowledge of whether the image contains any + non-unity alpha values. This arises because the FXT1 image + format distinguishes non-unity alpha only at the level of an + individual 8x4 compression block. If there are two distinct + tokens, passing GL_COMPRESSED_RGB_FXT1_3DFX to + CompressedTexImage with an image that contained non-unity-alpha + blocks would be an error. + + RESOLVED. Two distinct tokens specified. This is largely to + follow the usual usage by apps of non-compressed tokens. + + (2) Support for borders. + + RESOLVED. Not supported. + + (3) Support for TexSubImage at a level more general than that + guaranteed by ARB_texture_compression. + + RESOLVED. Not supported; See issue (5) of the + GL_ARB_texture_compression spec. + +New Procedures and Functions + + None + +New Tokens + + Accepted by the parameter of TexImage2D, + CopyTexImage2D, TexImage3D, CopyTexImage3D, and by the + and parameters of + CompressedTexImage2D_ARB, CompressedTexSubImage2D_ARB, + CompressedTexImage3D_ARB, CompressedTexSubImage3D_ARB: + + COMPRESSED_RGB_FXT1_3DFX 0x86B0 + COMPRESSED_RGBA_FXT1_3DFX 0x86B1 + +Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation) + + None. + +Additions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization) + + Add Table 3.16.1: Specific Compressed Internal Formats + + Compressed Internal Format Base Internal Format + ========================== ==================== + COMPRESSED_RGB_FXT1_3DFX RGB + COMPRESSED_RGBA_FXT1_3DFX RGBA + + Add to Section 3.8.2, Alternate Image Specification (adding to the + end of the CompressedTexImage section introduced by the + ARB_texture_compression spec) + + If is COMPRESSED_RGB_FXT1_3DFX, + COMPRESSED_RGBA_FXT1_3DFX, the compressed texture is stored using + one of several FXT1 compressed texture image formats. FXT1 texture + compression supports only 2D images without borders. + CompressedTexImage1DARB and CompressedTexImage3DARB produce an + INVALID_ENUM error if is an FXT1 format. + CompressedTexImage2DARB will produce an INVALID_OPERATION error if + is non-zero. + + + Add to Section 3.8.2, Alternate Image Specification (adding to the + end of the CompressedTexSubImage section introduced by the + ARB_texture_compression spec) + + If the internal format of the texture image being modified is + COMPRESSED_RGB_FXT1_3DFX, COMPRESSED_RGBA_FXT1_3DFX, the texture is + stored using one of the several FXT1 compressed texture image + formats. Since the FXT1 texture compression algorithm supports only + 2D images, CompressedTexSubImage1DARB and CompressedTexSubImage3DARB + produce an INVALID_ENUM error if is an FXT1 format. + +Additions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment +Operations and the Frame Buffer) + + None. + +Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) + + None. + +Additions to Chapter 6 of the OpenGL 1.2.1 Specification (State and +State Requests) + + None. + +Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance) + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + INVALID_ENUM is generated by CompressedTexImage1DARB if + is GL_COMPRESSED_RGB_FXT1_3DFX or + GL_COMPRESSED_RGBA_FXT1_3DFX. + + INVALID_OPERATION is generated by CompressedTexImage2DARB or + CompressedTexImage3DARB if is + GL_COMPRESSED_RGB_FXT1_3DFX or GL_COMPRESSED_RGBA_FXT1_3DFX and + is not equal to zero. + + INVALID_ENUM is generated by CompressedTexSubImage1DARB if + is GL_COMPRESSED_RGB_FXT1_3DFX or GL_COMPRESSED_RGBA_FXT1_3DFX. + +Appendix + + FXT1 comprises four different compressed texture formats. Each of + the formats compress an 8x4 texel blocks into 128 bits. During the + compression phase, the encoder selects one of the four formats for + each block based on which encoding scheme results in best overall + visual quality. Unused pixel locations along the right or bottom + edges within a block should contain a repetition of the values in + used locations. The total size of an image is ceil(width/8) * + ceil(height/4) * 16 bytes. + + In each compression format, the 32 texels of the 8x4 block are + partitioned into two 4x4 sub-blocks according to the following + diagram: + + t0 t1 t2 t3 t16 t17 t18 t19 + t4 t5 t6 t7 t20 t21 t22 t23 + t8 t9 t10 t11 t24 t25 t26 t27 + t12 t13 t14 t15 t28 t29 t30 t31 + + In the following bit-level descriptions, bits of increasing index + are stored in bytes at likewise increasing offsets, i.e. the order + is "little-endian". + + + 1. FXT1 Compressed Texture Format CC_HI: + + (rgb555) (3-bit/texel) + mode[1:0] color1 color0 texel 31 to 16 texel 15 to 0 + 2 15 15 48 48 + + + [127:126] mode[1:0] + [125:121] red of color1 + [120:116] green of color1 + [115:111] blue of color1 + [110:106] red of color0 + [105:101] green of color0 + [100:96] blue of color0 + [95:93] texel 31 + ... + [50:48] texel 16 + [47:45] texel 15 + ... + [2:0] texel 0 + + In CC_HI format, mode = 00b, the 15-bit color1 (RGB555 format) and + color0 (RGB555 format) colors are converted into 24-bit RGB888 + colors by duplicating the upper 3 bits for the 3 LSBs. The 24-bit + converted color1 and color0 are then used to linearly interpolate 5 + more levels of color to create seven total levels of colors and 1 + alpha (transparent) color. The first seven colors always have + alpha=ffh (opaque), while the eighth color is defined to be + transparent black (r,g,b=00h, alpha=00h). + + These eight 32-bit colors are used as the contents of an 8-entry (3 + bit index) lookup table. For all 32 texels in the block, each + texel's 3-bit index value is used to index the lookup table, the + output from the lookup table representing the 32-bit color + (ARGB8888) for that texel. + + Generating RGB888 from RGB555: + + Color1 (red) = {[125:121], [125:123]} + Color1 (green) = {[120:116], [120:118]} + Color1 (blue) = {[115:111], [115:113]} + + Color0 (red) = {[110:106], [110:108]} + Color0 (green) = {[105:101], [105:103]} + Color0 (blue) = {[100:96], [100:98]} + + Creating seven ARGB8888 colors from two RGB888 colors (operations + performed individually for each color channel): + + Color[0] = color0[r,g,b], alpha[0] = ffh + Color[1] = (5*color0[r,g,b] + color1[r,g,b] +3 )/6 alpha[1] = ffh + Color[2] = (4*color0[r,g,b] + 2*color1[r,g,b] +3 )/6 alpha[2] = ffh + Color[3] = (3*color0[r,g,b] + 3*color1[r,g,b] +3 )/6 alpha[3] = ffh + Color[4] = (2*color0[r,g,b] + 4*color1[r,g,b] +3 )/6 alpha[4] = ffh + Color[5] = (color0[r,g,b] + 5*color1[r,g,b] +3 )/6 alpha[5] = ffh + Color[6] = color1[r,g,b], alpha[6] = ffh + Color[7] = where r,g,b = 00h, alpha[7]=00h + + Table Lookup: + 3-bit index of Color for texel 31 to texel 0 + texel31 to texel0 (ARGB8888) + + 0 color[0] => {a[7:0], r[7:0], g[7:0], b[7:0]} + 1 color[1] + 2 color[2] + 3 color[3] + 4 color[4] + 5 color[5] + 6 color[6] + 7 color[7] + + + 2. FXT1 Compressed Texture Format CC_CHROMA: + + (rgb555) (2-bit/texel) + Mode[2:0] unused color3 color2 color1 color0 texel 31 to 16 texel 15 to 0 + 3 1 15 15 15 15 32 32 + + [127:125] mode[2:0] + [124] unused + [123:119] color3(r5) + [118:114] color3(g5) + [113:109] color3(b5) + [108:104] color2(r5) + [103:99] color2(g5) + [98:94] color2(b5) + [93:89] color1(r5) + [88:84] color1(g5) + [83:79] color1(b5) + [78:74] color0(r5) + [73:69] color0(g5) + [68:64] color0(b5) + [63:62] texel 31 + ... + [33:32] texel 16 + [31:30] texel 15 + ... + [1:0] texel 0 + + In CC_CHROMA format, mode=010b, the 15-bit colors color[3:0] + (RGB555) are converted into 24-bit RGB888 colors exactly the same as + in the CC_HI format via bit replication. Color3 to Color0 are used + as they are (after conversion to RGB888 format), but without + interpolation. The 24-bit converted colors color3, color2, color1, + and color0 are used as the contents of a 4-entry (2-bit index) + lookup table. The Alpha channel of the output of the lookup table is + always opaque(ffh), regardless of the 2-bit index value. The 32-bit + (ARGB8888) color value for each texel is obtained by performing + table lookup using that texel's 2-bit index. + + Table Lookup: + + 2-bit index of Color for texel 31 to texel 0 + texel 31 to texel 0 (ARGB8888) + + 0 color0, alpha = ffh + 1 color1, alpha = ffh + 2 color2, alpha = ffh + 3 color3, alpha = ffh + + + 3. FXT1 Compressed Texture Format CC_MIXED: + + (rgb555) (2-bit/texel) + mode[0] glsb[1:0] alpha[0] color3 color2 color1 color0 texel 31to16 texel 15to0 + 1 2 1 15 15 15 15 32 32 + + + [127] mode[0] + [126:125] glsb[1:0] (lsbs of green for color 1 & color 3) + [124] alpha[0] + [123:119] color3(r5) + [118:114] color3(g5) + [113:109] color3(b5) + [108:104] color2(r5) + [103:99] color2(g5) + [98:94] color2(b5) + [93:89] color1(r5) + [88:84] color1(g5) + [83:79] color1(b5) + [78:74] color0(r5) + [73:69] color0(g5) + [68:64] color0(b5) + [63:62] texel 31 + ... + [33:32] texel 16 + [31:30] texel 15 + ... + [1:0] texel 0 + + In CC_MIXED format, mode[0]=1 (only one bit), color2 and color3 are + used for texels 31 to 16, and color0 and color1 are used for texels + 15 to 0. When alpha[0] = 0, the two pairs of colors (colors 0 and 1 + for texels 15 to 0 and colors 2 and 3 for texels 31 to 16) are + interpreted as 16-bit RGB565 colors. For color1 and color3, the LSB + (bit 0) of the green channel comes from the glsb bits + (color1.green[0] = bit 125, color3.green[0] = bit 126). For color0 + and color2, the LSB (bit 0) of the green channel comes from the + upper select bit for texel 0 and texel 16, respectively + (color0.green[0] = bit 1 xor bit 125, color2.green[0] = bit 33 xor + bit 126). The two 16-bit colors are then expanded to a 24-bit RGB888 + format by bit replication (most significant bits replicated in the + least significant bits), and are then used to create 2 more levels + of color in between the color0/2 and color1/3 values through linear + interpolation. A total of 4 colors are therefore available for 2-bit + index per texel selection. + + When alpha[0]=1, color0 and color2 are interpreted as 15-bit RGB555 + colors, and color 1 and color3 are interpreted as RGB565 colors. For + color0 and color2, the 15-bit RGB555 colors are expanded to 24-bit + RGB888 colors by bit replication. For color1 and color3, the LSB + (bit 0) of the green channel comes from the glsb bits + (color1.green[0] = bit 125, color3.green[0] = bit 126), and then bit + replication is used to convert from the 16-bit RGB565 format to a + 24-bit RGB888 format. A third color is created by linear + interpolation (interpolating between the converted 24-bit RGB888 + color0 and color1 for texels 15 to 0, and interpolating between the + converted 24-bit RGB888 color2 and color3 for texels 31 to 16). + Finally, a fourth color (texel index 0x3) is defined to be + transparent black (r,g,b=00h, alpha=00h). A total of 4 colors are + therefore available for 2-bit index per texel selection. The 32-bit + (ARGB8888) color value for all texels is obtained by performing + table lookup using each texel's 2-bit index. + + Creating the 24-bit (RGB888) base colors color3 and color2: + + Color3(red) = {[123:119], [123:121]} + Color3(green) = {[118:114], [126], [118:117]} + Color3(blue) = {[113:109], [113:111]} + Color2(red) = {[108:104], [108:106]} + Color2(green) = (alpha[0]=1) ? {[103:99],[103:101]} + : {[103:99],[33]^[126],[103:102]} + Color2(blue) = {[98:94], [98:96]} + + Creating the 24-bit (RGB888) base colors color1 and color0: + + Color1(red) = {[93:89], [93:91]} + Color1(green) = {[88:84], [125], [88:87]} + Color1(blue) = {[83:79], [83:81]} + Color0(red) = {[78:74], [78:76]} + Color0(green) = (alpha[0]=1) ? {[73:69, [73:71]} + : {[73:69], [1]^[125], [73:72]} + Color0(blue) = {[68:64], [68:66]} + + When alpha[0]=0, because one of the texel select bits is used to + determine a bit of color0 and color2, the software encoder must + perform some very tricky operations. The method below describes how + to generate color0 and color1 and the associated select bits (the + same method applies to determining the lsb of green for color2 and + color3): + + 1. Determine the 16-bit RGB565 color values for color0 & color1. + + 2. Determine the select bits for each pixel in the 4x4 sub-block. + + 3. If (pixel[0].select[1] != color0.green[0]^color1.green[0]) then + swap color0 &color1, and invert all the select bits. + + Below is a snippet of psuedo-C code to generate bits 0-31, bits + 64-93 & bit 125 based on the initial color0, color1 and pixel + indices: + + struct RGB565 {Byte red; Byte green; Byte blue}; + + struct CSels {Byte index[16]}; + + // cc_mixed_right_half derives bits[93:64] of the 128 bit data word of a + // CC_MIXED non-alpha compression block and returns them in 'bits_64_to_31'. + // Plus, as a bonus, you will receive bit 125, containing the lsb of + // the green channel of color1, and bits_0_to_31, containing all of the pixel indices. + void + cc_mixed_right_half( RGB565 color0, RGB565 color1, + CSels pix, + Dword &bits_0_to_31, + Dword &bits_64_to_93, + Bit &bit125) + { + RGB565 o_color0; + RGB565 o_color1; + + // Determine if we need to switch color0 & color1 + if (((pix.index[0] >> 1) & 1) != ((color0.green ^ color1.green) & 1)) { + o_color1 = color0; + o_color0 = color1; + + for (int i=0; i<16; i++) + pix.index[i] = ~pix.index[i] & 3; + } else { + o_color0 = color0; + o_color1 = color1; + } + + // Save lsb of color1.green in bit125 + bit125 = o_color1.green & 1; + + // Convert color0 & color1 to RGB555, and then munge into bits 64 to 93 + o_color0.green >>= 1; + o_color1.green >>= 1; + + bits_64_to_93 = ( (o_color1.red<<25) | (o_color1.green<<20) | (o_color1.blue<<15) + | (o_color0.red<<10) | (o_color0.green<<5) | (o_color0.blue) ); + + // Munge the pixel indices into bits 0 to 31 + bits_0_to_31 = 0; + + for (int i=0; i<16; i++) + bits_0_to_31 |= pix.index[i]<<(i*2); + } + + + Generating the 4-entry lookup table for texels 31 to 16: + + If alpha[0]=0, + Color[0] = color2[r,g,b] , alpha=ffh + Color[1] = (2 * color2[r,g,b] + color3[r,g,b] + 1) / 3, alpha=ffh + Color[2] = (color2[r,g,b] + 2 * color3[r,g,b] +1) / 3, alpha=ffh + Color[3] = color3[r,g,b], alpha=ffh + + If alpha[0]=1, + Color[0] = color2[r,g,b], alpha=ffh + Color[1] = (color2[r,g,b] + color3[r,g,b]) / 2, alpha=ffh + Color[2] = color3[r,g,b], alpha=ffh + Color[3] = [a,r,g,b] = 00h + + Generating the 4-entry lookup table for texels 15 to 0: + + If alpha[0]=0, + Color[0] = color0[r,g,b] , alpha=ffh + Color[1] = (2 * color0[r,g,b] + color1[r,g,b] + 1) / 3, alpha=ffh + Color[2] = (color0[r,g,b] + 2 * color1[r,g,b] + 1) / 3, alpha=ffh + Color[3] = color1[r,g,b], alpha=ffh + + If alpha[0]=1, + Color[0] = color0[r,g,b], alpha=ffh + Color[1] = (color0[r,g,b] + color1[r,g,b]) / 2, alpha=ffh + Color[2] = color1[r,g,b], alpha=ffh + Color[3] = [a,r,g,b] = 00h + + Table Lookup: + 2-bit index of Color for texel 31 to texel 0 + texel 31 to texel 0 ARGB8888 + + 0 color[0], {a[7:0], r[7:0], g[7:0], b[7:0]} + 1 color[1] + 2 color[2] + 3 color[3] + + + 4. FXT1 Compressed Texture format CC_ALPHA: + + (argb5555) (2-bit/texel) + mode[2:0] lerp alpha2 alpha1 alpha0 color2 color1 color0 texel 31 to 16 texel 15 to 0 + 3 1 5 5 5 15 15 15 32 32 + + [127:125] mode[2:0] + [124] lerp + [123:119] color2(a5) + [118:114] color1(a5) + [113:109] color0(a5) + [108:104] color2(r5) + [103:99] color2(g5) + [98:94] color2(b5) + [93:89] color1(r5) + [88:84] color1(g5) + [83:79] color1(b5) + [78:74] color0(r5) + [73:69] color0(g5) + [68:64] color0(b5) + [63:62] texel 31 + ... + [33:32] texel 16 + [31:30] texel 15 + ... + [1:0] texel 0 + + In CC_ALPHA format, mode[2:0]=011b, three 20-bit colors color2, + color1 and color0 (ARGB5555) are converted to a 32-bit (ARGB8888) + format by duplicating the upper 3-bits for the 3 LSBs (all the color + channels and the alpha channel are converted from 5-bit formats to + 8-bit formats using this bit duplication). + + Creating the 32-bit (RGB8888) base colors color2, color1, and color0: + + Color2(alpha) = {[123:119], [123:121]} + Color2(red) = {[108:104], [108:106]} + Color2(green) = {[103:99], [103:101]} + Color2(blue) = {[98:94], [98:96]} + Color1(alpha) = {[118:114], [118:116]} + Color1(red) = {[93:89], [93:91]} + Color1(green) = {[88:84], [88:86]} + Color1(blue) = {[83:79], [83:81]} + Color0(alpha) = {[113:109], [113:111]} + Color0(red) = {[78:74], [78:76]} + Color0(green) = {[73:69], [73:71]} + Color0(blue) = {[68:64], [68:66]} + + When lerp = 0 (bit 124 = 0), the converted 32-bit colors color2, + color1, and color0 are used directly as the first 3 entries in the + 4-entry lookup table. The last entry in the 4-entry lookup table, + accessed with index=3, is defined to be transparent black (rgb=00h, + alpha=00h). A total of 4 colors are therefore available for 2-bit + index per texel selection, and the 32-bit (ARGB8888) color value for + all texels is obtained by performing table lookup using each texel's + 2-bit index. + + Table Lookup (when lerp = 0): + + Index of texel 31 to 0 Color for texel 31 to texel 0 + (ARGB8888) + + 0 Color[0] = color0 alpha = alpha0 + 1 Color[1] = color1 alpha = alpha1 + 2 Color[2] = color2 alpha = alpha2 + 3 Color[3] = 000000h alpha = 00h + + When lerp = 1 (bit 124 = 1), the converted 32-bit colors color2 and + color1 are used as the 32-bit base colors for texels 31 to 16, and + the converted 32-bit colors color1 and color0 are used as the base + colors for texels 15 to 0. The 32-bit base colors are then used to + create 2 more levels of color through linear interpolation. A total + of 4 colors are therefore available for 2-bit index per texel + selection, and the 32-bit (ARGB8888) color value for all texels is + obtained by performing table lookup using each texel's 2-bit index. + + Creating the 4 colors used in the 4-entry lookup table from the + 32-bit base colors (when lerp = 1): + + For texel 31 to texel 16 + Color[0] = color2[a,r,g,b] + Color[1] = (2 * color2[a,r,g,b] + color1[a,r,g,b] + 1) / 3 + Color[2] = (color2[a,r,g,b] + 2 * color1[a,r,g,b] +1) / 3 + Color[3] = color1[a,r,g,b] + + For texel 15 to texel 0 + Color[0] = color0[a,r,g,b] + Color[1] = (2 * color0[a,r,g,b] + color1[a,r,g,b] +1) / 3 + Color[2] = (color0[a,r,g,b] + 2 * color1[a,r,g,b] +1) / 3 + Color[3] = color1[a,r,g,b] + + Table Lookup (when lerp = 1): + + Index of texel 31 to 0 Color for texel 31 to texel 0 + (ARGB8888) + + 0 color[0] + 1 color[1] + 2 color[2] + 3 color[3] + +Revision History + + 0.1, 01/12/00 dwm: Initial revision. + 0.2, 02/09/00 dwm: Respond to feedback from Intel. + 0.3, 02/23/00 dwm: Respond to feedback from Intel. + 0.4, 04/12/00 dwm: Updated to reflect final version of the + ARB_texture_compression extension. + + +Copyright 1999-2000, 3dfx Interactive, Inc. +All rights reserved. diff --git a/opengles/extensions/3DL/WGL_3DL_stereo_control.txt b/opengles/extensions/3DL/WGL_3DL_stereo_control.txt new file mode 100644 index 0000000000..6971ec5cb0 --- /dev/null +++ b/opengles/extensions/3DL/WGL_3DL_stereo_control.txt @@ -0,0 +1,148 @@ +Name + + WGL_3DL_stereo_control + +Name Strings + + WGL_3DL_stereo_control + +Contact + + Seth Williams, 3Dlabs (seth.williams 'at' 3dlabs.com) + Harald Smit, 3Dlabs (harald.smit 'at' 3dlabs.com) + +Status + + Complete + +Version + + Date: 10/05/2005 Revision 1.0 + +Number + + 313 + +Dependencies + + The extension is written against the OpenGL 2.0 Specification + although it should work on any previous OpenGL specification. + + The WGL_EXT_extensions_string extension is required. + +Overview + + The stereo extension provides an interface for manipulating the + emitter signal from the video adapter used to drive lcd shutter + glasses used for stereoscopic viewing. + +IP Status + + None + +Issues + + None + +New Procedures and Functions + + BOOL wglSetStereoEmitterState3DL(HDC hDC, UINT uState) + +New Tokens + + Accepted by the parameter: + + WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 + WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 + WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 + WGL_STEREO_POLARITY_INVERT_3DL 0x2058 + +Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation) + + None + +Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) + + None + +Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment +Operations and the Frame Buffer) + + None + +Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions) + + None + +Additions to Chapter 6 of the OpenGL 2.0 Specification (State and +State Requests) + + None + +Additions to Appendix A of the OpenGL 2.0 Specification (Invariance) + + None + +Additions to the WGL Specification + + The state of the stereo emitter for video adapters that support + stereoscopic headsets can be modified using the following function: + + BOOL wglSetStereoEmitterState3DL(HDC hDC, UINT uState) + + is a device context for the graphics adapter or a window + residing on a monitor whose graphics adapter supports the stereo + extension. + + is the new state requested and is one and only one of + the following values: + + WGL_STEREO_EMITTER_ENABLE_3DL + Turn the stereo emitter output from the video adapter ON. + + WGL_STEREO_EMITTER_DISABLE_3DL + Turn the stereo emitter output from the video adapter OFF. + + WGL_STEREO_POLARITY_NORMAL_3DL + Generate an emitter signal for the stereoscopic headset to show + the scene from the left eye's point of view while the right eye's + shutter is closed and vice versa. + + WGL_STEREO_POLARITY_INVERT_3DL + Generate an emitter signal for the stereoscopic headset to show + the scene from the left eye's point of view while the left eye's + shutter is closed and vice versa. + + A call to wglSetStereoEmitterState is necessary for each state transition + required. + +Dependencies on WGL_EXT_extensions_string + + Because there is no way to extend wgl, these calls are defined in + the ICD and can be called by obtaining the address with + wglGetProcAddress. Because this extension is a WGL extension, it + is not included in the GL_EXTENSIONS string. Its existence can be + determined with the WGL_EXT_extensions_string extension. + +Errors + + If the function succeeds, a value of TRUE is returned. If the + function fails, a value of FALSE is returned. To get extended + error information, call GetLastError. + + ERROR_DC_NOT_FOUND is invalid. + + ERROR_INVALID_DATA is invalid. + +New State + + None + +New Implementation Dependent State + + None + +Revision History + + 09/28/2005 0.1 First draft. + 10/05/2005 1.0 Initial public release. diff --git a/opengles/extensions/AMD/AMD_blend_minmax_factor.txt b/opengles/extensions/AMD/AMD_blend_minmax_factor.txt new file mode 100644 index 0000000000..6a7857e75d --- /dev/null +++ b/opengles/extensions/AMD/AMD_blend_minmax_factor.txt @@ -0,0 +1,153 @@ +Name + + AMD_blend_minmax_factor + + +Name Strings + + GL_AMD_blend_minmax_factor + + +Contributors + + Graham Sellers + Pierre Boudier + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + + +Status + + Shipping. + + +Version + + Last Modified Date: April 8, 2011 + Author Revision: 3 + + +Number + + 404 + +Dependencies + + The extension is written against the OpenGL 4.1 (Core) Specification. + + OpenGL 1.0 is required. + +Overview + + The EXT_blend_minmax extension extended the GL's blending functionality + to allow the blending equation to be specified by the application. That + extension introduced the MIN_EXT and MAX_EXT blend equations, which caused the + result of the blend equation to become the minimum or maximum of the source + color and destination color, respectively. + + The MIN_EXT and MAX_EXT blend equations, however, do not include the source + or destination blend factors in the arguments to the min and max functions. + This extension provides two new blend equations that produce the minimum + or maximum of the products of the source color and source factor, and the + destination color and destination factor. + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the parameter of BlendEquation and BlendEquationi, and by + the and parameters of BlendEquationSeparate and + BlendEquationSeparatei: + + FACTOR_MIN_AMD 0x901C + FACTOR_MAX_AMD 0x901D + +Additions to Chapter 2 of the OpenGL 4.1 (Core) Specification (OpenGL Operation) + + None. + +Additions to Chapter 3 of the OpenGL 4.1 (Core) Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 4.1 (Core) Specification (Per-Fragment +Operations and the Frame Buffer) + + Modify the list of accepted tokens for , and + in the description of BlendEquation{i} and BlendEquationSeparate{i}, p.262: + + "... , , must be one of FUNC_ADD, FUNC_SUBTRACT, + FUNC_REVERSE_SUBTRACT, MIN, MAX, FACTOR_MIN_AMD, or FACTOR_MAX_AMD. ..." + + Add to Table 4.1: RGB and Alpha Blend Equations + + +-----------------+---------------------------+-----------------------------+ + | Mode | RGB Components | Alpha Component | + +-----------------+---------------------------+-----------------------------+ + | FACTOR_MIN_AMD | R = min(Rs * Sr, Rd * Dr) | A = min(As * Sa, Ad * Da) | + | | G = min(Gs * Sg, Gd * Dg) | | + | | B = min(Bs * Sb, Bd * Db) | | + +-----------------+---------------------------+-----------------------------+ + | FACTOR_MAX_AMD | R = max(Rs * Sr, Rd * Dr) | A = max(As * Sa, Ad * Da) | + | | G = max(Gs * Sg, Gd * Dg) | | + | | B = max(Bs * Sb, Bd * Db) | | + +-----------------+---------------------------+-----------------------------+ + +Additions to Chapter 5 of the OpenGL 4.1 (Core) Specification (Special Functions) + + None. + +Additions to Chapter 6 of the OpenGL 4.1 (Core) Specification (State and +State Requests) + + None. + +Additions to Appendix A of the OpenGL 4.1 (Core) Specification (Invariance) + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +Errors + + None. + +New State + + Modify Table 6.21: Pixel Operations (cont.) p.343 + + Change entries for BLEND_EQUATION_ALPHA and BLEND_EQUATION_RGB to: + + +----------------------+---------+---------------+---------------+-------------------------+-------+ + | Get Value | Type | Get Command | Initial Value | Description | Sec. | + +----------------------+---------+---------------+---------------+-------------------------+-------+ + | BLEND_EQUATION_RGB | 8* x Z7 | GetIntegeri_v | FUNC_ADD | RGB Blending Equation | 4.1.7 | + | | | | | for Draw Buffer i | | + +----------------------+---------+---------------+---------------+-------------------------+-------+ + | BLEND_EQUATION_ALPHA | 8* x Z7 | GetIntegeri_v | FUNC_ADD | Alpha Blending Equation | 4.1.7 | + | | | | | for Draw Buffer i | | + +----------------------+---------+---------------+---------------+-------------------------+-------+ + + * Note that the only change change is that BLEND_EQUATION_RGB and + BLEND_EQUATION_ALPHA are now Z7 rather than Z5. + +Issues + + None, so far. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 3 04/08/2011 gsellers Fix typo bug in Table 4.1 (caught by Brian Paul) + 2 09/15/2010 gsellers Update to stand against OpenGL 4.1 + Add token values. + Rename to AMD_blend_minmax_factor. + 1 03/16/2010 gsellers Initial draft. diff --git a/opengles/extensions/AMD/AMD_compressed_3DC_texture.txt b/opengles/extensions/AMD/AMD_compressed_3DC_texture.txt new file mode 100644 index 0000000000..5f6210b088 --- /dev/null +++ b/opengles/extensions/AMD/AMD_compressed_3DC_texture.txt @@ -0,0 +1,165 @@ +Name + + AMD_compressed_3DC_texture + +Name Strings + + GL_AMD_compressed_3DC_texture + +Contributors + + Aaftab Munshi + +Contact + + Benj Lipchak, AMD (benj.lipchak 'at' amd.com) + +IP Status + + Please contact AMD regarding any intellectual property questions/issues + associated with this extension. + +Status + + Complete. + +Version + + Last Modified Date: February 26, 2008 + Revision: 6 + +Number + + OpenGL ES Extension #39 + +Dependencies + + Written based on the wording of the OpenGL ES 1.1 specification. + +Overview + + Two compression formats are introduced: + + - A compression format for two component textures. When used to store + normal vectors, the two components are commonly used with a fragment + shader that derives the third component. + + - A compression format for single component textures. The single component + may be used as a luminance or an alpha value. + + There are a large number of games that use luminance only and/or alpha only + textures. For example, monochrome light maps used in a few popular games + are 8-bit luminance textures. This extension describes a compression format + that provides a 2:1 compression ratio for 8-bit single channel textures. + + Normal maps are special textures that are used to add detail to 3D surfaces. + They are an extension of earlier "bump map" textures, which contained per- + pixel height values and were used to create the appearance of bumpiness on + otherwise smooth surfaces. Normal maps contain more detailed surface + information, allowing them to represent much more complex shapes. + + Normal mapping is one of the key features that makes the current generation + of games look so much better than earlier titles. A limitation to the + effectiveness of this technique is the size of the textures required. In an + ideal case where every surface has both a color texture map and a normal + texture map, the texture memory and bandwidth requirements would double + compared to using color maps alone. + + In fact, the problem is much worse because existing block based compression + methods such as DXTc, ETC, and S3TC are ineffective at compressing normal + maps. They tend to have trouble capturing the small edges and subtle + curvature that normal maps are designed to capture, and they also introduce + unsightly block artifacts. + + Because normal maps are used to capture light reflections and realistic + surface highlights, these problems are amplified relative to their impact on + color textures. The results are sufficiently poor that game artists and + developers would rather not use normal map compression at all on most + surfaces, and instead limit themselves to lower resolution maps on selected + parts of the rendered scene. + + 3DC provides an ideal solution to the normal map compression problem. It + provides up to 4:1 compression of normal maps, with image quality that is + virtually indistinguishable from the uncompressed version. The technique is + hardware accelerated, so the performance impact is minimal. Thus, + developers are freed to use higher resolution, more detailed normal maps, + and/or use them on all of the objects in a scene rather than just a select + few. + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the parameter of CompressedTexImage2D and + CompressedTexImage3DOES: + + 3DC_X_AMD 0x87F9 + 3DC_XY_AMD 0x87FA + +Additions to Chapter 3 of the OpenGL 1.3 Specification (Rasterization) + + Add to Table 3.17: Specific Compressed Internal Formats + + Compressed Internal Format Base Internal Format + ========================== ==================== + 3DC_X_AMD RGB + 3DC_XY_AMD RGB + + + Add to Section 3.8.3, Alternate Image Specification + + If is 3DC_X_AMD, the compressed texture is a + single channel compressed texture. If is 3DC_XY_AMD, + the compressed textures contains two channels. + + The details of these formats is not disclosed, so refer to AMD's + Compressonator tool in order to encode your textures offline: + http://ati.amd.com/developer/compressonator.html + + 3DC_X_AMD Format + ================ + + This format compresses a 128 bit block into 64 bits, representing a 2:1 + compression ratio. The texture lookup unit will return (x, 0, 0, 1): the + decoded X value in the red component, 0.0 in the green and blue components, + and 1.0 in the alpha component. + + 3DC_XY_AMD Format + ================= + + This format compresses a 512 bit block into 128 bits, representing a 4:1 + compression ratio. The texture lookup unit will return (x, y, 0, 1): the + decoded X value in the red component, the decoded Y value in the green + component, 0.0 in the blue component, and 1.0 in the alpha component. + + Using 3DC_XY_AMD to compress normal maps requires an additional step. This + is because each value in a normal map is actually a 3D vector, consisting of + 3 components (x, y, z). These values must be reduced to 2-component values + in order to work with 3DC_XY_AMD. Fortunately, this can be handled in a + simple way by assuming that all of the normal vectors have a length of 1. + Given the values of two components of a vector, the value of the third + component can be found using the following mathematical relationship: + z = sqrt(1 - (x*x + y*y)). This formula can be implemented using just a + couple of fragment shader instructions. + +Errors + + INVALID_OPERATION is generated by TexImage2D, TexSubImage2D, + CompressedTexSubImage2D, or CopyTexSubImage2D if or + is 3DC_X_AMD or 3DC_XY_AMD. + +New State + + The queries for NUM_COMPRESSED_TEXTURE_FORMATS and + COMPRESSED_TEXTURE_FORMATS include 3DC_X_AMD and 3DC_XY_AMD. + +Revision History + + 02/26/2008 Benj Lipchak Throw INVALID_OPERATION on subimage updates. + 09/24/2007 Jon Leech Assign extension number. + 09/05/2007 Benj Lipchak Cosmetic changes. + 08/01/2007 Benj Lipchak Publication readiness. + 06/02/2006 Aaftab Munshi Added IP status. + 05/12/2006 Aaftab Munshi First Draft. diff --git a/opengles/extensions/AMD/AMD_compressed_ATC_texture.txt b/opengles/extensions/AMD/AMD_compressed_ATC_texture.txt new file mode 100644 index 0000000000..2ffe45cd18 --- /dev/null +++ b/opengles/extensions/AMD/AMD_compressed_ATC_texture.txt @@ -0,0 +1,151 @@ +Name + + AMD_compressed_ATC_texture + +Name Strings + + GL_AMD_compressed_ATC_texture + +Contributors + + Aaftab Munshi + Benj Lipchak + +Contact + + Maurice Ribble, Qualcomm (mribble 'at' qualcomm.com) + +IP Status + + Please contact AMD regarding any intellectual property questions/issues + associated with this extension. + +Status + + Complete. + +Version + + Last Modified Date: February 26, 2008 + Revision: 7 + +Number + + OpenGL ES Extension #40 + +Dependencies + + Written based on the wording of the OpenGL ES 1.1 specification. + +Overview + + This extension enables support for ATC compressed texture formats. ATC is + AMD's proprietary compression algorithm for compressing textures for + handheld devices to save on power consumption, memory footprint and + bandwidth. + + Three compression formats are introduced: + + - A compression format for RGB textures. + - A compression format for RGBA textures using explicit alpha encoding. + - A compression format for RGBA textures using interpolated alpha encoding. + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the parameter of CompressedTexImage2D and + CompressedTexImage3DOES. + + ATC_RGB_AMD 0x8C92 + ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 + ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE + +Additions to Chapter 2 of the OpenGL 1.3 Specification (OpenGL Operation) + + None. + +Additions to Chapter 3 of the OpenGL 1.3 Specification (Rasterization) + + Add to Table 3.17: Specific Compressed Internal Formats + + Compressed Internal Format Base Internal Format + =============================== ==================== + ATC_RGB_AMD RGB + ATC_RGBA_EXPLICIT_ALPHA_AMD RGBA + ATC_RGBA_INTERPOLATED_ALPHA_AMD RGBA + + + Add to Section 3.8.3, Alternate Image Specification + + The details of these formats is not disclosed, so refer to AMD's + Compressonator tool in order to encode your textures offline: + http://ati.amd.com/developer/compressonator.html + + OpenGL ES requires that all mip-levels have to be specified when + CompressedTexImage2D is called to load a palettized texture. In this case + the "level" value is either 0 or a negative number to indicate the number of + mip-levels. This rule is not followed when loading an ATC texture. The + "level" number in this case represents the actual mip-level number, + so a negative number will raise an error. + + Compressed texture images stored using the ATC compressed image formats are + represented as a collection of 4x4 texel blocks. + + ATC_RGB_AMD Format + ================== + + This format compresses blocks of source texels down to 4 bits per texel. + Assuming 8-bit component source texels, this represents a 8:1 compression + ratio. This is the best format to use when no alpha channel is needed. + + ATC_RGBA_EXPLICIT_ALPHA_AMD Format + ================================== + + This format compresses blocks of source texels down to 8 bits per texel. + Assuming 8-bit component source texels, this represents a 4:1 compression + ratio. This is generally the best format to use when alpha transitions are + sharp. + + ATC_RGBA_INTERPOLATED_ALPHA_AMD Format + ====================================== + + This format compresses blocks of source texels down to 8 bits per texel. + Assuming 8-bit component source texels, this represents a 4:1 compression + ratio. This is generally the best format to use when alpha transitions are + gradient. + + The size in bytes of a compressed ATC_RGB_AMD image is: + + ((width_in_texels+3)/4) * ((height_in_texels+3)/4) * 8 + + The size in bytes of a compressed ATC_RGBA_EXPLICIT_ALPHA_AMD or + ATC_RGBA_INTERPOLATED_ALPHA_AMD image is: + + ((width_in_texels+3)/4) * ((height_in_texels+3)/4) * 16 + +Errors + + INVALID_OPERATION is generated by TexImage2D, TexSubImage2D, + CompressedTexSubImage2D, or CopyTexSubImage2D if or + is ATC_RGB_AMD, ATC_RGBA_EXPLICIT_ALPHA_AMD, or + ATC_RGBA_INTERPOLATED_ALPHA_AMD. + +New State + + The queries for NUM_COMPRESSED_TEXTURE_FORMATS and + COMPRESSED_TEXTURE_FORMATS include ATC_RGB_AMD, ATC_RGBA_EXPLICIT_ALPHA_AMD, + and ATC_RGBA_INTERPOLATED_ALPHA_AMD. + +Revision History + + 09/06/2012 Maurice Ribble Update contact and add block size data. + 02/26/2008 Benj Lipchak Throw INVALID_OPERATION on subimage updates. + 10/24/2007 Benj Lipchak Add interpolated alpha RGBA format. + 09/24/2007 Jon Leech Assign extension number. + 09/05/2007 Benj Lipchak Cosmetic changes. + 08/01/2007 Benj Lipchak Publication readiness. + 07/07/2005 Aaftab Munshi Fixed typos. + 09/15/2004 Aaftab Munshi Created the document. diff --git a/opengles/extensions/AMD/AMD_conservative_depth.txt b/opengles/extensions/AMD/AMD_conservative_depth.txt new file mode 100644 index 0000000000..518df0484b --- /dev/null +++ b/opengles/extensions/AMD/AMD_conservative_depth.txt @@ -0,0 +1,169 @@ +Name + + AMD_conservative_depth + +Name String + + GL_AMD_conservative_depth + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Contributors + + Pierre Boudier, AMD + Graham Sellers, AMD + +Status + + In Progress + +Version + + Last Modified Date: 10/25/2010 + Author Revision: 4 + +Number + + 385 + +Dependencies + + OpenGL 3.0 is required. + + This extension is written against the OpenGL Shading Language Version 4.00. + +Overview + + There is a common optimization for hardware accelerated implementation of + OpenGL which relies on an early depth test to be run before the fragment + shader so that the shader evaluation can be skipped if the fragment ends + up being discarded because it is occluded. + + This optimization does not affect the final rendering, and is typically + possible when the fragment does not change the depth programmatically. + (i.e.: it does not write to the built-in gl_FragDepth output). There are, + however a class of operations on the depth in the shader which could + still be performed while allowing the early depth test to operate. + + This extension allows the application to pass enough information to the + GL implementation to activate such optimizations safely. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +Modifications to the OpenGL Shading Language Specification version 1.50.9 + +Additions to Chapter 1 of the OpenGL Shading Language 4.00.08 Specification (Introduction) + + None. + +Additions to Chapter 2 of the OpenGL Shading Language 4.00.08 Specification (Overview of OpenGL Shading) + + None. + +Additions to Chapter 3 of the OpenGL Shading Language 4.00.08 Specification (Basics) + + Add a new Section 3.3.x, GL_AMD_conservative_depth Extension + + Including the following line in a shader can be used to control the language + features described in this extension: + + #extension GL_AMD_conservative_depth: + + where is as described in section 3.3. + + A new preprocessor #define is added to the OpenGL Shading Language: + + #define GL_AMD_conservative_depth 1 + +Additions to Chapter 4 of the OpenGL Shading Language 4.00.08 Specification (Variables and Types) + + Modify Section 4.3.8.2 (Output Layout Qualifiers) page 47 + + Modify the paragraph beginning: "Fragment shaders allow output layout + qualifiers only..." + + Fragment shaders allow output layout qualifiers only on the interface + out, or for the purposes of redeclaring the built-in variable + gl_FragDepth (see Section 7.1, Built-In Language Variables). + + Insert the following before the paragraph beginning: "Geometry shaders can + have three types of output layout qualifiers..." + + The built-in fragment shader variable gl_FragDepth may be redeclared + using one of the following layout qualifiers. + + layout-qualifier-id + depth_any + depth_greater + depth_less + depth_unchanged + + For example: + + layout (depth_greater) out float gl_FragDepth; + + The layout qualifier for gl_FragDepth controls how the GL will interpret + assignments to the gl_FragDepth out variable for the purpose of depth + testing. Any assignment to gl_FragDepth will be honored by the shader + and the updated value of gl_FragDepth will still be written to the + depth buffer if it is determined that the depth write should occur. + However, depending on the layout qualifier of gl_FragDepth and the + current state of depth testing, the GL may perform optimizations or + reordering of operations to depth test and writes to improve performance. + + By default, gl_FragDepth assumes the layout qualifier. When + the layout qualifier for gl_FragDepth is , the shader compiler + will note any assignment to gl_FragDepth modifying it in an unknown way, + and depth testing will always be performed after the shader has executed. + When the layout qualifier is , the GL will assume that + any modification of gl_FragDepth will only increase its value. When the + layout qualifier is , the GL will assume that any + modification of gl_FragDepth will only decrease its value. When the + layout qualifier is , the shader compiler will honor + any modification to gl_FragDepth, but the rest of the GL assume that + gl_FragDepth is not assigned a new value. + + If a shader redeclares gl_FragDepth using the , + or and then violates this contract, the + results of the depth test may be inaccurate and any resulting rendering + will produce undefined results. However, no error is generated. + + Redeclarations are performed as follows: + + out float gl_FragDepth; // Redeclaration that changes nothing is allowed + + layout (depth_any) out float gl_FragDepth; // Assume that gl_FragDepth may be modified in any way + layout (depth_greater) out float gl_FragDepth; // Assume that gl_FragDepth may be modified such that its value will only increase + layout (depth_less) out float gl_FragDepth; // Assume that gl_FragDepth may be modified such that its value will only decrease + layout (depth_unchanged) out float gl_FragDepth; // Assume that gl_FragDepth will not be modified + + If gl_FragDepth is redeclared in any fragment shader in a program, it must + be redeclared in all fragment shaders in that program that have static + assignments to gl_FragDepth. All redeclarations of gl_FragDepth in all + fragment shaders in a single program must have the same set of qualifiers. + Within any shader, the first redeclarations of gl_FragDepth must appear + before any use of gl_FragDepth. The built-in gl_FragDepth is only + predeclared in fragment shaders, so redeclaring it in any other shader + language will be illegal. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 4 25/10/2010 gsellers Apply patch from idr. + 3 04/01/2010 gsellers Minor cleanup. Update to GLSL 4.00. + 2 12/01/2009 gsellers Internal updates + 1 11/03/2009 pboudier Initial draft diff --git a/opengles/extensions/AMD/AMD_debug_output.txt b/opengles/extensions/AMD/AMD_debug_output.txt new file mode 100644 index 0000000000..8c990bdf50 --- /dev/null +++ b/opengles/extensions/AMD/AMD_debug_output.txt @@ -0,0 +1,577 @@ +Name + + AMD_debug_output + +Name Strings + + GL_AMD_debug_output + +Contact + + Jaakko Konttinen (jaakko.konttinen 'at' amd.com) + +Contributors + + Graham Sellers, AMD + Mark Young, AMD + Ahmet Oguz Akyuz, AMD + +Status + + Experimental + +Version + + Last Modified Date: May 7, 2010 + Author Revision: 9 + +Number + + 395 + +Dependencies + + OpenGL 1.1 is required. + + WGL_ARB_create_context or GLX_ARB_create_context is required. + + The extension is written against the OpenGL 3.0 specification. + + This extension trivially interacts with ARB_vertex_program and + ARB_fragment_program. + +Overview + + This extension allows the GL to notify applications when various + debug events occur in contexts that have been created with the debug + flag, as provided by WGL_ARB_create_context and GLX_ARB_create_context. + + These events are represented in the form of enumerable messages with an + included human-readable translation. Examples of debug events include + incorrect use of the GL, warnings of undefined behavior, and performance + warnings. + + A message is uniquely identified by a category and an implementation- + dependent ID within that category. Message categories are general and are + used to organize large groups of similar messages together. Examples of + categories include GL errors, performance warnings, and deprecated + functionality warnings. Each message is also assigned a severity level + that denotes roughly how "important" that message is in comparison to + other messages across all categories. For example, notification of a GL + error would have a higher severity than a performance warning due to + redundant state changes. + + Messages are communicated to the application through an application-defined + callback function that is called by the GL implementation on each debug + message. The motivation for the callback routine is to free application + developers from actively having to query whether any GL error or other + debuggable event has happened after each call to a GL function. With a + callback, developers can keep their code free of debug checks, and only have + to react to messages as they occur. In order to support indirect rendering, + a message log is also provided that stores copies of recent messages until + they are actively queried. + + To control the volume of debug output, messages can be disabled either + individually by ID, or entire groups of messages can be turned off based + on category or severity. + + The only requirement on the minimum quantity and type of messages that + implementations of this extension must support is that a message must be + sent notifying the application whenever any GL error occurs. Any further + messages are left to the implementation. Implementations do not have + to output messages from all categories listed by this extension + in order to support this extension, and new categories can be added by + other extensions. + + This extension places no restrictions or requirements on any additional + functionality provided by the debug context flag through other extensions. + +IP Status + + No known IP claims. + +New Procedures and Functions + + void DebugMessageEnableAMD(enum category, + enum severity, + sizei count, + const uint* ids, + boolean enabled); + + void DebugMessageInsertAMD(enum category, + enum severity, + uint id, + sizei length, + const char* buf); + + void DebugMessageCallbackAMD(DEBUGPROCAMD callback, + void* userParam); + + uint GetDebugMessageLogAMD(uint count, + sizei bufsize, + enum* categories, + uint* severities, + uint* ids, + sizei* lengths, + char* message); + +New Types + + The callback function that applications can define, and + is accepted by DebugMessageCallbackAMD, is defined as: + + typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id, + GLenum category, + GLenum severity, + GLsizei length, + const GLchar* message, + GLvoid* userParam); + + Note that this function pointer is defined as having the + same calling convention as the GL functions. + +New Tokens + + Tokens accepted by GetIntegerv: + + MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 + MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 + DEBUG_LOGGED_MESSAGES_AMD 0x9145 + + Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD, + DebugMessageInsertAMD, and DEBUGPROCAMD callback function + for : + + DEBUG_SEVERITY_HIGH_AMD 0x9146 + DEBUG_SEVERITY_MEDIUM_AMD 0x9147 + DEBUG_SEVERITY_LOW_AMD 0x9148 + + Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD, + and DEBUGPROCAMD callback function for : + + DEBUG_CATEGORY_API_ERROR_AMD 0x9149 + DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A + DEBUG_CATEGORY_DEPRECATION_AMD 0x914B + DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C + DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D + DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E + DEBUG_CATEGORY_APPLICATION_AMD 0x914F + DEBUG_CATEGORY_OTHER_AMD 0x9150 + +Additions to Chapter 2 of the OpenGL 3.0 Specification (OpenGL Operation) + + In section 2.5 - GL Errors: + Add to the end of the section (pg 19): "If an error is generated by a debug + GL context (Section 2.20), the context will send a message to the application + that a GL error has occurred. This message may contain more information + about the nature of the error." + + After section 2.19 - Primitive Clipping: + Add new section: 2.20 - Debug Contexts + + Application developers can obtain more information from the GL runtime using + a debug-enabled context. This information can include details about + GL errors, undefined behavior, implementation-dependent performance warnings, + or other useful hints. This information is communicated through the + generation of debug messages when GL commands are executed. The application + can choose to either actively query for these messages, or allow the GL to + call back to the application on each message via a function pointer. + + 2.20.1 - Debug Messages + + A debug message is uniquely identified by its category and an unsigned + integer message ID within that category. The category must be one of the + symbolic constants listed in Table 2.12. Although every distinct message + must have a unique number within a category, there is no enforcement by this + extension for how GL implementations assign numbers to specific messages. + + Each message also has a severity level that roughly describes its + significance across all categories. The severity level of a message is + one of the symbolic constants defined in Table 2.13. Because messages + can be disabled across all categories by severity level, this feature can + be used to quickly control the volume of debug output by the application. + + Category Token Informs about + -------------- ------------- + DEBUG_CATEGORY_API_ERROR_AMD GL errors caused by invalid API use + + DEBUG_CATEGORY_WINDOW_SYSTEM_AMD Errors and notices from the + windowing layer + + DEBUG_CATEGORY_DEPRECATION_AMD Use of functionality that is either + deprecated or marked for future + deprecation + + DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD Behavior undefined according to + specification + + DEBUG_CATEGORY_PERFORMANCE_AMD Implementation-dependent performance + warnings + + DEBUG_CATEGORY_SHADER_COMPILER_AMD Information from the GLSL or ARB + shader compiler and linker + + DEBUG_CATEGORY_APPLICATION_AMD Application-generated messages + + DEBUG_CATEGORY_OTHER_AMD Messages that do not fit in any of + the other categories + ---------------------------------------------------------------------------- + Table 2.12: Categories of debug messages. Each message is associated with + one of these categories. + + + Severity Level Token Suggested examples of messages + -------------------- ------------------------------ + + DEBUG_SEVERITY_HIGH_AMD Any GL error; any undefined behavior; + any GLSL or ARB shader compiler and + linker errors; + + DEBUG_SEVERITY_MEDIUM_AMD Severe performance warnings; GLSL + or ARB shader compiler and linker + warnings; use of currently deprecated + behavior + + DEBUG_SEVERITY_LOW_AMD Performance warnings from redundant + state changes + ---------------------------------------------------------------------------- + Table 2.13: Severity levels of messagse. Each debug message is associated + with one of these severity levels. + + + Every message also has a null-terminated string representation that is used + to describe the message. The contents of the string can change slightly + between different instances of the same message (e.g. which parameter value + caused a specific GL error to occur). The formatting of a message string is + left as implementation-dependent, although it should give a concise and + legible description of the message's purpose. Messages with different IDs + should also have sufficiently distinguishable string representations to + warrant their separation. + + 2.20.2 - Receiving Messages + + Applications can listen for messages by providing the GL with a callback + function pointer by calling: + + void DebugMessageCallbackAMD(DEBUGPROCAMD callback, + void* userParam); + + With storing the address of the callback function. This + function's signature must follow the type definition of DEBUGPROCAMD, and + its calling convention must be the same as the calling convention of GL + functions. Anything else will result in undefined behavior. Only one + debug callback can be specified for the current context, and further calls + overwrite the previous callback. Specifying zero as the value of + clears the current callback and disables message output through callbacks. + Applications can specify user-specified data through the pointer + . The context will store this pointer and will include it + as one of the parameters of each call to the callback function. The error + INVALID_OPERATION will be generated if this function is called for contexts + created without the debug flag. + + If the application has specified a callback function in a debug context, + the implementation will call that function whenever any unfiltered message + is generated. The ID, category, and severity of the message are specified + by the callback parameters , and , respectively. + The string representation of the message is stored in and its length + (excluding the null-terminator) is stored in . The parameter + is the user-specified value that was passed when calling + DebugMessageCallbackAMD. The memory for is allocated, owned and + released by the implementation, and should only be considered valid for + the duration of the callback function call. While it is allowed to + concurrently use multiple debug contexts with the same debug callback function, + note that it is the application's responsibility to ensure that any work that + occurs inside the debug callback function is thread-safe. Furthermore, + calling any GL or window layer function from within the callback function + results in undefined behavior. + + If no callback is set, then messages are instead stored in an internal + message log up to some maximum number of strings as defined by the + implementation-dependent constant MAX_DEBUG_LOGGED_MESSAGES_AMD. Each + context stores its own message log and will only store messages generated by + commands operating in that context. If the message log is full, then the + oldest messages will be removed from the log to make room for newer ones. + The application can query the number of messages currently in the log by + obtaining the value of DEBUG_LOGGED_MESSAGES_AMD, and can get the contents + of those messages using the command: + + uint GetDebugMessageLogAMD(uint count, + sizei logSize, + enum* categories, + enum* severities, + uint* ids, + sizei* lengths, + char* messageLog); + + This function will fetch as many messages as possible from the message + log up to in order from oldest to newest, and will return the + number of messages fetched. Those messages that were fetched will be + removed from the log. The value of must be greater than zero and + less than MAX_DEBUG_LOGGED_MESSAGES_AMD or otherwise the error + INVALID_VALUE will be generated. The value of can be larger than + the actual number of messages currently in the log. If is not + a null pointer, then the string representations of all fetched messages will + be stored in the buffer and will be separated by null- + terminators. The maximum size of the buffer (including all null- + terminators) is denoted by , and strings of messages within + that do not fit in the buffer will not be fetched. If is less + than zero, the error INVALID_VALUE will be generated. If + is a null pointer, then the value of is ignored. The + categories, severity levels, IDs, and string representation lengths of all + (up to ) removed messages will be stored in the arrays , + , , and , respectively. The counts stored in the + array include the null-terminator of each string. Any and all of + the output arrays, including , are optional, and no data is returned + for those arrays that are specified with a null pointer. To simply delete up + to messages from the message log and ignoring, the application can call + the function with null pointers for all output arrays. The error + INVALID_OPERATION will be generated by GetDebugMessageLogAMD if it is + called in a non-debug context. + + 2.20.3 - Controlling Debug Messages + + Applications can control which messages are generated by calling + + void DebugMessageEnableAMD(enum category, + enum severity, + sizei count, + const uint* ids, + boolean enabled); + + This command allows disabling or enabling generation of subsets of + messages. If is TRUE, the referenced subset of messages + is enabled. If FALSE, then those messages are disabled. This + command can reference different subsets of messages by + varying its parameter values in the following ways: + + 1. To reference all messages, let , , + and all be zero. The value of is ignored + in this case. + + 2. To reference all messages across all categories with + a specific severity level, let and + be zero and let identify the severity level. + The value of is ignored in this case. + + 3. To reference all messages within a single category, let + identify the referenced category and let + and be zero. The value of is + ignored in this case. + + 4. To reference all messages within a single category and + at a specific severity level, let identify the + category and identify the severity level, + and let be zero. The value of is ignored + in this case. + + 5. To reference specific messages by ID within a single + category, let identify the category, let + be zero, let be greater than zero + and let identify the IDs of messages within + the identified category. Operations on message IDs that + are not valid within the category are silently ignored. + + In all of the above cases, if is non-zero and specifies + an invalid category, the error INVALID_ENUM is generated. + Similarly if is non-zero and is an invalid severity level, + the error INVALID_ENUM is generated. If is less than + zero, the error INVALID_VALUE is generated. If the parameters do + not fall into one of the cases defined above, the error INVALID_VALUE + is generated. The error INVALID_OPERATION is generated if this + command is called in a non-debug context. + + Although messages are grouped into categories and severities, + and entire groups of messages can be turned off with a single + call, there is no explicit per-category or per-severity enabled state. + Instead the enabled state is stored individually for each message. + There is no difference between disabling a category of messages with a + single call, and enumerating all messages of that category and individually + disabling each of them by their ID. + + All messages of severity level DEBUG_SEVERITY_MEDIUM_AMD and + DEBUG_SEVERITY_HIGH_AMD in all categories are initially enabled, and + all messages at DEBUG_SEVERITY_LOW_AMD are initially disabled. + + 2.20.4 - Application Messages + + To easily support custom application timestamps, applications can inject + their own messages to the debug message stream through the command + + void DebugMessageInsertAMD(enum category, + enum severity, + uint id, + sizei length, + const char* buf); + + The value of specifies the ID for the message and indicates + its severity level as defined by the application. If is not a + valid severity level, the error INVALID_ENUM will be generated. The value + of must be DEBUG_CATEGORY_APPLICATION_AMD, or the error + INVALID_ENUM will be generated. The string contains the string + representation of the message. The parameter contains the size of + the message's string representation, excluding the null-terminator. If + is zero, then its value is derived from the string-length of + and must contain a null-terminated string. The error INVALID_VALUE + will be generated if is less than zero or its derived value is + larger than or equal to MAX_DEBUG_MESSAGE_LENGTH_AMD. The error + INVALID_OPERATION will be generated if this function is called in a + non-debug context. + +Additions to the OpenGL / GLX / GLX Protocol Specifications + + None. + +Additions to the WGL Specification + + None. + +Errors + + The error INVALID_OPERATION will be generated by DebugMessageCallbackAMD if + the function is called in a non-debug context. + + The error INVALID_ENUM will be generated by DebugMessageEnableAMD if + is non-zero and specifies an invalid category. + + The error INVALID_ENUM will be generated by DebugMessageEnableAMD if + is non-zero and an invalid severity level. + + The error INVALID_VALUE will be generated by DebugMessageEnableAMD if + if is less than zero. + + The error INVALID_VALUE will be generated by DebugMessageEnableAMD if + if the combination of values for , and do not + fall within one of the accepted combinations for referencing a subset of + messages. + + The error INVALID_OPERATION will be generated by GetDebugMessageLogAMD if + it is called in a non-debug context. + + The error INVALID_VALUE will be generated by GetDebugMessageLogAMD if the + value of is zero or greater than the value of + MAX_DEBUG_LOGGED_MESSAGES_AMD. + + The error INVALID_VALUE will be generated by GetDebugMessageLogAMD if + is less than zero. + + The error INVALID_ENUM will be generated by DebugMessageInsertAMD if + is not a valid debug severity level. + + The error INVALID_ENUM will be generated by DebugMessageInsertAMD if the + value of is not DEBUG_CATEGORY_APPLICATION_AMD. + + The error INVALID_VALUE will be generated by DebugMessageInsertAMD + if is less than zero. + + The error INVALID_VALUE will be generated by DebugMessageInsertAMD + if or its derived value is larger than + MAX_DEBUG_MESSAGE_LENGTH_AMD. + + The error INVALID_OPERATION will be generated by DebugMessageInsertAMD if + this function is called in a non-debug context. + +New State + Initial + Get Value Type Get Command Value Description Sec Attribute + -------------------------- ---- ----------- ----- ------------------------- ------ --------- + DEBUG_LOGGED_MESSAGES_AMD Z+ GetIntegerv 0 The number of messages 2.20.2 - + currently in the debug + message log + +New Implementation Dependent State + Minimum + Get Value Type Get Command Value Description Sec Attribute + -------------------------------- -- ----------- ----- ------------------------- ------ ---------- + MAX_DEBUG_MESSAGE_LENGTH_AMD Z+ GetIntegerv 80 The maximum length of a 2.20.2 - + debug message string + + MAX_DEBUG_LOGGED_MESSAGES_AMD Z+ GetIntegerv 1 The maximum number of 2.20.2 - + messages stored in the + debug message log + +Issues + + 01) Should we reserve tokens for arbitrary vendor-specific categories (e.g. + DEBUG_CATEGORY_VENDOR0)? + + RESOLVED: No. Since this is an AMD extension, there is no + reason to do this now in the current version. + + 02) Should we allow explicit controls for printing to stderr or through + OutputDebugString instead of the callback? + + RESOLVED: No. It is up to the application to setup this + behavior itself using the provided functionality. + + + 03) How do the different filtering rules interact? If a category is + filtered, but a message in that same category is set to be unfiltered by + ID or severity level, should that message still be filtered? If I + specifically filter a category and then unfilter all messages globally + with a later command, should that category still be filtered? + + RESOLVED: Message enable state is stored individually for each + message. There is no explicit group-wise enable state + or different ordered levels of "enabledness" in the + implied hierarchy of messages. Operations on groups + of messages affect all messages within + that group individually, and overwrite the previous + and individual state of those messages. + + 04) Should applications be allowed to insert their own messages through + a custom category? How would this be done? + + RESOLVED: Yes. A new category will be provided for application- + specific messages and an entry point will be provided to + write messages in that category. + + + +Revision History + + (v9, 2010-05-07, jkontti) + - Removed inconsistent language from New Tokens category for tokens + that are no longer accepted by DebugMessageEnableAMD since + revision v5. + - Cleaned up some language and formatting issues. + + (v8, 2010-04-09, jkontti) + - Renamed extension string from AMDX to AMD. + - Renamed new function, type and token suffixes from AMDX to AMD. + - No changes in functionality between AMDX and AMD versions. + + (v7, 2010-01-21, jkontti) + - Added user-specifiable parameter to debug message callback function + + (v6, 2010-01-15, jkontti) + - Updated contact section + - Updated contributor section + - Updated status section + - Updated enums + + (v5, 2009-09-17, jkontti) + - Message ID namespaces are now contained within categories instead of + being in a single global namespace + - Reworked DebugMessageEnable to allow disabling/enabling more + combinations of messages + - Resolved issue 01 + - Resolved issue 03 + + (v4, 2009-09-16, jkontti) + - Added category as a parameter to DebugMessageInsert for + future-proofing purposes + - Added missing errors to DebugMessageInsert and GetDebugMessageLog + - Added missing tokens to New Tokens + - Renamed DebugMessageFilter to DebugMessageEnable + + (v3, 2009-09-15, myoung) + - Cleaned up some language + - Added values using AMD reserved ranges. Values do not overlap so can + be re-used. + + (v2, 2009-09-15, jkontti) + - Application-generated messages + - More categories (window system, deprecation, profile, application) + + (v1, 2009-09-09, jkontti) + - Initial revision diff --git a/opengles/extensions/AMD/AMD_depth_clamp_separate.txt b/opengles/extensions/AMD/AMD_depth_clamp_separate.txt new file mode 100644 index 0000000000..132b9a2349 --- /dev/null +++ b/opengles/extensions/AMD/AMD_depth_clamp_separate.txt @@ -0,0 +1,159 @@ +Name + + AMD_depth_clamp_separate + +Name Strings + + GL_AMD_depth_clamp_separate + +Contact + + Pierre Boudier (pierre.boudier 'at' amd.com) + +Contributors + + Pierre Boudier, AMD + Graham Sellers, AMD + +Status + + In Progress + +Version + + Last Modified Date: 09/15/2010 + Author Revision: 2 + +Number + + 401 + +Dependencies + + The extension is written against the OpenGL 4.1 (Core) Specification. + +Overview + + The extension ARB_depth_clamp introduced the ability to control + the clamping of the depth value for both the near and far plane. + One limitation is that the control was for both planes at the + same time; some applications can benefit from having clamping + enabled for only one of the two planes, in order to save + fillrate for the other plane by clipping the geometry. + + This extension provides exactly such functionality. + +New Procedures and Functions + + None + +New Tokens + + Accepted by the parameter of Enable, Disable, and IsEnabled, + and by the parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev: + + DEPTH_CLAMP_NEAR_AMD 0x901E + DEPTH_CLAMP_FAR_AMD 0x901F + +Additions to Chapter 2 of the OpenGL 4.1 (Core) Specification (OpenGL Operation) + + Section 2.20 "Primitive Clipping" + + Add to the end of the 3rd paragraph: + + "Depth clamping is enabled with the generic Enable command and + disabled with the Disable command. The value of the argument to + either command may be DEPTH_CLAMP_NEAR_AMD or DEPTH_CLAMP_FAR_AMD to enable + or disable depth clamping at the near and far planes, respectively. If near + depth clamping is enabled, the "-w_c <= z_c" plane equation is ignored by + view volume clipping. Effectively, there is no near plane. Likewise, if far + clamping is enabled, the "z_c <= w_c" plane equation is ignored by view + volume clipping, effectively removing the near plane." + + "In addition to DEPTH_CLAMP_NEAR_AMD and DEPTH_CLAMP_FAR_AMD, the token + DEPTH_CLAMP may be used to simultaneously enable or disable depth clamping + at both the near and far planes." + +Additions to Chapter 3 of the OpenGL 4.1 (Core) Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 4.1 (Core) Specification (Per-Fragment +Operations and the Frame Buffer) + + -- Section 4.1.5 "Depth buffer test" + + Add to the end of the 2nd paragraph: + + "If depth clamping (see section 2.20) is enabled, before the incoming + fragment's z_w is compared z_w is clamped to the range [min(n,f),0] if + clamping at the near plane is enabled, [0, max(n,f)] if clamping at the + far plane is enabled, and [min(n,f), max(n,f)] if clamping is enabled at + both the near and far planes, where n and f are the current near and far + depth range values (see section 2.12.1)." + +Additions to Chapter 5 of the OpenGL 4.1 (Core) Specification (Special Functions) + + None. + +Additions to Chapter 6 of the OpenGL 4.1 (Core) Specification (State and +State Requests) + + None. + +Additions to Appendix A of the OpenGL 4.1 (Core) Specification (Invariance) + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +Errors + + None. + +New State + +Add to table 6.9, Transformation State - p.350 + + +----------------------+---------+---------------+---------------+-------------------------+-------+ + | Get Value | Type | Get Command | Initial Value | Description | Sec | + +----------------------+---------+---------------+---------------+-------------------------+-------+ + | DEPTH_CLAMP_NEAR_AMD | B | IsEnabled | FALSE | Depth clamping enabled | 2.20 | + | | | | | at the near plane | | + | DEPTH_CLAMP_FAR_AMD | B | IsEnabled | FALSE | Depth clamping enabled | 2.20 | + | | | | | at the far plane | | + +----------------------+---------+---------------+---------------+-------------------------+-------+ + + * Note that DEPTH_CLAMP still exists. However, enabling it enables depth clamping for both + the near and the far plane. Querying DEPTH_CLAMP will return TRUE if DEPTH_CLAMP_NEAR_AMD _or_ + DEPTH_CLAMP_FAR_AMD is enabled. + +New Implementation Dependent State + + None + +Issues + + 1) What should happen to GL_DEPTH_CLAMP? What happens if depth clamping is + enabled at one plane, but not the other - what does glIsEnabled(GL_DEPTH_CLAMP) + return? + + DISCUSSION: Right now, glIsEnabled(GL_DEPTH_CLAMP) returns GL_TRUE if clamping + is enabled at either plane. Other options are to return GL_TRUE only if clamping + is enabled at both planes, or to maintain traditional depth clamping as + separate state, and have yet another enable to control separate clamping. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 2 09/15/2010 gsellers Update to stand against OpenGL 4.1 + Add token values. + Minor cleanup. + Some clarifications. + Add issue 1. + 1 11/19/2009 pboudier Initial draft based on ARB_depth_clamp diff --git a/opengles/extensions/AMD/AMD_draw_buffers_blend.txt b/opengles/extensions/AMD/AMD_draw_buffers_blend.txt new file mode 100644 index 0000000000..f254bca4ab --- /dev/null +++ b/opengles/extensions/AMD/AMD_draw_buffers_blend.txt @@ -0,0 +1,290 @@ +Name + + AMD_draw_buffers_blend + +Name Strings + + GL_AMD_draw_buffers_blend + +Contributors + + Mark Young + Graham Sellers + Timothy Lamb + Pierre Boudier + Nick Haemel + +Contact + + Mark Young, AMD (mark.young 'at' amd.com) + +Status + + In progress + +Version + + Last Modified Date: July 10, 2009 + Author Revision: 3 + +Number + + 366 + +Dependencies + + The extension is written against the OpenGL 2.0 Specification. + + OpenGL 2.0 is required. + + EXT_draw_buffers2 is required. + +Overview + + This extension builds upon the ARB_draw_buffers and EXT_draw_buffers2 + extensions. In ARB_draw_buffers (part of OpenGL 2.0), separate values + could be written to each color buffer. This was further enhanced by + EXT_draw_buffers2 by adding in the ability to enable blending and to set + color write masks independently per color output. + + This extension provides the ability to set individual blend equations and + blend functions for each color output. + +New Procedures and Functions + + void BlendFuncIndexedAMD(uint buf, enum src, enum dst); + + void BlendFuncSeparateIndexedAMD(uint buf, enum srcRGB, enum dstRGB, + enum srcAlpha, enum dstAlpha); + + void BlendEquationIndexedAMD(uint buf, enum mode); + + void BlendEquationSeparateIndexedAMD(uint buf, enum modeRGB, + enum modeAlpha); + +New Tokens + + None. + +Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation) + + None. + +Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment +Operations and the Frame Buffer) + + Modify the first two paragraphs of section 4.1.8 (Blending - Blending + Equation), p206, to read as follows: + + "Blending is controlled by the blend equation. This equation can be + simultaneously set to the same value for all draw buffers using the + commands: + + void BlendEquation(enum mode); + + void BlendEquationSeparate(enum modeRGB, enum modeAlpha); + + or for an individual draw buffer using the indexed versions of the + same commands: + + void BlendEquationIndexedAMD(uint buf, enum mode); + + void BlendEquationSeparateIndexedAMD(uint buf + enum modeRGB, + enum modeAlpha); + + BlendEquationSeparate and BlendEquationSeparateIndexedAMD separate + out the blend equations into an RGB argument and an Alpha argument. + determine the RGB blend function while + determines the alpha equation. BlendEquation and + BlendEquationIndexedAMD control both the RGB and Alpha blend + equations with a single argument . and + must each be one of FUNC_ADD, FUNC_SUBTRACT, FUNC_REVERSE_SUBTRACT, + MIN_MAX, or LOGIC_OP. BlendEquationIndexedAMD and + BlendEquationSeparateIndexedAMD argument sets the blend + equations for an individual draw buffer. The blend equations for + DRAW_BUFFERi are modified by passing i as the parameter ." + + + Modify the first two paragraphs of section 4.1.8 (Blending - Blending + Functions), p207, to read as follows: + + "The weighting factors used by the blend equation are determined by + the blend functions. Blend functions are simultaneously specified for + all draw buffers using the commands: + + void BlendFunc(enum src, enum dst); + + void BlendFuncSeparate(enum srcRGB, enum dstRGB, + enum srcAlpha, enum dstAlpha); + + or for an individual draw buffer using the indexed versions of the + same commands: + + void BlendFuncIndexedAMD(uint buf, enum src, enum dst); + + void BlendFuncSeparateIndexedAMD(uint buf, enum srcRGB, + enum dstRGB, enum srcAlpha, + enum dstAlpha); + + BlendFuncSeparate and BlendFuncSeparateIndexedAMD arguments + and determine the source and destination RGB blend functions, + respectively, while and determine the source and + destination alpha blend functions. BlendFunc and BlendFuncIndexedAMD + arguments determines both RGB and alpha source functions, while + determines both RGB and alpha destination functions. + BlendFuncSeparateIndexedAMD and BlendFuncIndexedAMD argument + sets the blend functions for an indivual draw buffer. The blend + functions for DRAW_BUFFERi are modified by passing i as the parameter + ." + + + Modify the first paragraph of section 4.1.8 (Blending - Blending + State), p209, to read as follows: + + "For each of n draw buffers, the state required for blending is two + integers for the RGB and alpha blend equations, four integers + indicating the source and destination RGB and alpha blending functions, + four floating-point values to store the RGBA constant blend color, and + a bit indicating whether blending is enabled or disabled. For all draw + buffers, the initial blend equations for RGB and alpha are both + FUNC_ADD. The initial blending functions for all draw buffers are ONE + for the source RGB and alpha functions, and ZERO for the destination + RGB and alpha functions. For all draw buffers initial constant blend + color is (R, G, B, A) = (0, 0, 0, 0). Initially, blending is disabled + for all draw buffers." + +Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions) + + None. + +Additions to Chapter 6 of the OpenGL 2.0 Specification (State and +State Requests) + + None. + +Additions to Appendix A of the OpenGL 2.0 Specification (Invariance) + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +Errors + + The error INVALID_ENUM is generated if the parameter of + BlendFuncIndexedAMD, BlendFuncSeparateIndexedAMD, BlendEquationIndexedAMD, + or BlendEquatioSeparateIndexedAMD is outside the range + [0, MAX_DRAW_BUFFERS-1]. + + The error INVALID_ENUM is generated by BlendFuncIndexedAMD + if either , or is not an accepted value. + + The error INVALID_ENUM is generated by BlendFuncSeparateIndexedAMD + if either , , , or is not + an accepted value. + + The error INVALID_ENUM is generated if the parameter of + BlendEquationIndexedAMD is not one of FUNC_ADD, FUNC_SUBTRACT, + FUNC_REVERSE_SUBTRACT, MAX, or MIN. + + The error INVALID_ENUM is generated if either the or + parameter of BlendEquationSeparateIndexedAMD is not one of + FUNC_ADD, FUNC_SUBTRACT, FUNC_REVERSE_SUBTRACT, MAX, or MIN. + + The error INVALID_OPERATION is generated if any of these new entry-points + are executed between the execution of glBegin and the corresponding + execution of glEnd. + +New State + + Modify (table 6.20, p281), modifying the entries for BLEND_SRC_RGB, + BLEND_SRC_ALPHA, BLEND_DST_RGB, BLEND_DST_ALPHA, BLEND_EQUATION_RGB, + and BLEND_EQUATION_ALPHA and adding new indexed versions as well. + + + Get Target Type Get Command Initial Value Description Section Attribute + ---------- ---- --------------------- -------------- ----------------------------------------------- ------- ------------------- + BLEND_SRC_RGB Z15 GetIntegerv ONE Blending source RGB function for draw buffer 0 4.1.8 color-buffer + (v1.3:BLEND_SRC) + + BLEND_SRC_RGB Z15 GetIntegerIndexedvEXT ONE Blending source RGB function for draw buffer i 4.1.8 color-buffer + (v1.3:BLEND_SRC) where i is specified as + + BLEND_SRC_ALPHA Z15 GetIntegerv ONE Blending source A function for draw buffer 0 4.1.8 color-buffer + + BLEND_SRC_ALPHA Z15 GetIntegerIndexedvEXT ONE Blending source A function for draw buffer i 4.1.8 color-buffer + where i is specified as + + BLEND_DST_RGB Z14 GetIntegerv ZERO Blending dest. RGB function for draw buffer 0 4.1.8 color-buffer + (v1.3:BLEND DST) + + BLEND_DST_RGB Z14 GetIntegerIndexedvEXT ZERO Blending dest. RGB function for draw buffer i 4.1.8 color-buffer + (v1.3:BLEND DST) where i is specified as + + BLEND_DST_ALPHA Z14 GetIntegerv ZERO Blending dest. A function for draw buffer 0 4.1.8 color-buffer + + BLEND_DST_ALPHA Z14 GetIntegerIndexedvEXT ZERO Blending dest. A function for draw buffer i 4.1.8 color-buffer + where i is specified as + + BLEND_EQUATION_RGB Z5 GetIntegerv FUNC_ADD RGB blending equation for draw buffer 0 4.1.8 color-buffer + (v1.5: BLEND EQUATION) + + BLEND_EQUATION_RGB Z5 GetIntegerIndexedvEXT FUNC_ADD RGB blending equation for draw buffer i 4.1.8 color-buffer + (v1.5: BLEND EQUATION) where i is specified as + + BLEND_EQUATION_ALPHA Z5 GetIntegerv FUNC_ADD Alpha blending equation for draw buffer 0 4.1.8 color-buffer + + BLEND_EQUATION_ALPHA Z5 GetIntegerIndexedvEXT FUNC_ADD Alpha blending equation for draw buffer i 4.1.8 color-buffer + where i is specified as + +Issues + + 1. What should we call this? + + PROPOSED: Suggestions currently are + AMD_draw_buffers_blend + AMD_drawbuffers_blend + AMD_mrt_blend + + + 2. Should this be an AMDX extension or just AMD? + + PROPOSED: We propose AMD since the functionality currently exists in + DX 10.1 and is used by developers in that API. + + + 3. What effect does using the non-indexed versions of the blend function + or equation entry-points have upon the new indexed per draw buffer + versions? + + RESOLVED: Similar to the way EXT_draw_buffers2 handles the indexed + and non-indexed ColorMask interaction in issue 3. The non-indexed + versions of the functions will set all buffers to the passed in + parameters. + + For example, BlendFunc will set all color buffer blend functions to + the values passed in. + + 4. Should the new functions be ---Indexed (as in EXT_draw_buffers2) or + ---i (as in OpenGL 3.0 core)? + + RESOLVED: For consistency with EXT_draw_buffers2, leave them as + ---Indexed. If this functionality is promoted to core in a later + version of OpenGL, they can be changed to ---i. + +Revision History + + #3, July 10, 2009: Jon Leech + Assign extension number, minor formatting cleanup for registry. + + #2, March 26, 2009: myoung + Tightened up language. Resolved some issues. + + #1, March 25, 2009: myoung + Internal spec development. diff --git a/opengles/extensions/AMD/AMD_framebuffer_multisample_advanced.txt b/opengles/extensions/AMD/AMD_framebuffer_multisample_advanced.txt new file mode 100644 index 0000000000..6ecb7176b4 --- /dev/null +++ b/opengles/extensions/AMD/AMD_framebuffer_multisample_advanced.txt @@ -0,0 +1,444 @@ +Name + + AMD_framebuffer_multisample_advanced + +Name Strings + + GL_AMD_framebuffer_multisample_advanced + +Contact + + Marek Olsak, AMD (marek.olsak 'at' amd.com) + +Status + + Complete. + +Version + + Last Modified Date: June 28, 2018 + Revision #1 + +Number + + OpenGL Extension #523 + OpenGL ES Extension #303 + +Dependencies + + OpenGL dependencies: + + Requires GL_ARB_framebuffer_object. + + OpenGL ES dependencies: + + Requires OpenGL ES 3.0. + + This extension is written against the OpenGL 4.5 (Core Profile) + specification. + +Overview + + This extension extends ARB_framebuffer_object by allowing compromises + between image quality and memory footprint of multisample + antialiasing. + + ARB_framebuffer_object introduced RenderbufferStorageMultisample + as a method of defining the parameters for a multisample render + buffer. This function takes a parameter that has strict + requirements on behavior such that no compromises in the final image + quality are allowed. Additionally, ARB_framebuffer_object requires + that all framebuffer attachments have the same number of samples. + + This extension extends ARB_framebuffer_object by providing a new + function, RenderbufferStorageMultisampleAdvancedAMD, that + distinguishes between samples and storage samples for color + renderbuffers where the number of storage samples can be less than + the number of samples. This extension also allows non-matching sample + counts between color and depth/stencil renderbuffers. + + This extension does not require any specific combination of sample + counts to be supported. + +IP Status + + No known IP issues. + +New Procedures and Functions + + void RenderbufferStorageMultisampleAdvancedAMD( + enum target, sizei samples, sizei storageSamples, + enum internalformat, sizei width, sizei height ); + + void NamedRenderbufferStorageMultisampleAdvancedAMD( + uint renderbuffer, sizei samples, sizei storageSamples, + enum internalformat, sizei width, sizei height ); + +New Tokens + + Accepted by the parameter of GetRenderbufferParameteriv: + + RENDERBUFFER_STORAGE_SAMPLES_AMD 0x91B2 + + Accepted by the parameter of GetBooleanv, GetIntegerv, + GetInteger64v, GetFloatv, GetDoublev: + + MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD 0x91B3 + MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD 0x91B4 + MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD 0x91B5 + NUM_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B6 + SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B7 + +Additions to Chapter 9 of the OpenGL 4.5 (Core Profile) Specification +(Framebuffers and Framebuffer Objects) + + In section 9.2.3.1, "Multisample Queries", remove the last paragraph + beginning with "Otherwise" and add: + + Otherwise, the value of SAMPLES is equal to the value of + RENDERBUFFER_SAMPLES or TEXTURE_SAMPLES (depending on the type of + attachments) of color attachments if any is present. If there is no + color attachment, SAMPLES is equal to the same value from the depth or + stencil attachment, whichever is present. + + An implementation may only support a subset of the possible + combinations of sample counts of textures and renderbuffers attached + to a framebuffer object. The number of supported combinations is + NUM_SUPPORTED_MULTISAMPLE_MODES_AMD. SUPPORTED_MULTISAMPLE_MODES_AMD + is an array of NUM_SUPPORTED_MULTISAMPLE_MODES_AMD triples of integers + where each triple contains a valid combination of sample counts in + the form {color samples, color storage samples, depth and stencil + samples}. The first element in each triple is at least 2. The second + and third element in each triple are at least 1 and are not greater + than the first element. + + In section 9.2.4, "Renderbuffer Objects", replace the description of + (Named)RenderbufferStorageMultisample: + + The data storage, format, dimensions, number of samples, and number of + storage samples of a renderbuffer object’s image are established with + the commands + + void RenderbufferStorageMultisampleAdvancedAMD( enum target, + sizei samples, sizei storageSamples, enum internalformat, + sizei width, sizei height ); + + void NamedRenderbufferStorageMultisampleAdvancedAMD( + uint renderbuffer, sizei samples, sizei storageSamples, + enum internalformat, sizei width, sizei height ); + + For RenderbufferStorageMultisampleAdvancedAMD, the renderbuffer object + is that bound to , which must be RENDERBUFFER. + For NamedRenderbufferStorageMultisampleAdvancedAMD, is + the name of the renderbuffer object. + + must be color-renderable, depth-renderable, or + stencil-renderable (as defined in section 9.4). and + are the dimensions in pixels of the renderbuffer. + + Upon success, *RenderbufferStorageMultisampleAdvancedAMD deletes any + existing data store for the renderbuffer image, and the contents of + the data store are undefined. RENDERBUFFER_WIDTH is set to , + RENDERBUFFER_HEIGHT is set to , and RENDERBUFFER_INTERNAL_- + FORMAT is set to . + + If is zero, then must be zero, and + RENDERBUFFER_SAMPLES and RENDERBUFFER_STORAGE_SAMPLES_AMD are set to + zero. Otherwise represents a request for a desired minimum + number of samples and represents a request for + a desired minimum number of storage samples, where + must not be greater than . Since different implementations + may support different sample counts for multisampled rendering, + the actual number of samples and the actual number of storage samples + allocated for the renderbuffer image are implementation-dependent. + However, the resulting value for RENDERBUFFER_SAMPLES is guaranteed + to be greater than or equal to and no more than the next + larger sample count supported by the implementation, and the resulting + value for RENDERBUFFER_STORAGE_SAMPLES_AMD is guaranteed to be greater + than or equal to , no more than the next larger + storage sample count supported by the implementation, and no more than + RENDERBUFFER_SAMPLES. + + A GL implementation may vary its allocation of internal component + resolution based on any *RenderbufferStorageMultisampleAdvancedAMD + parameter (except and ), but the allocation and + chosen internal format must not be a function of any other state and + cannot be changed once they are established. + + Remove the first 4 errors and add these errors: + + An INVALID_ENUM error is generated by RenderbufferStorageMultisample- + AdvancedAMD if is not RENDERBUFFER. + + An INVALID_OPERATION error is generated by NamedRenderbufferStorage- + MultisampleAdvancedAMD if is not the name of + an existing renderbuffer object. + + An INVALID_VALUE error is generated if , , + , or is negative. + + An INVALID_OPERATION error is generated if is a color + format and is greater than the implementation-dependent + limit MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD. + + An INVALID_OPERATION error is generated if is a color + format and is greater than the implementation- + dependent limit MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD. + + An INVALID_OPERATION error is generated if is greater + than . + + An INVALID_OPERATION error is generated if is a depth + or stencil format and is greater than the maximum number of + samples supported for (see GetInternalformativ + in section 22.3). + + An INVALID_OPERATION error is generated if is a depth + or stencil format and is not equal to . + + Finish the section as follows: + + The commands + + void RenderbufferStorageMultisample( enum target, + sizei samples, enum internalformat, sizei width, + sizei height ); + void RenderbufferStorage( enum target, enum internalformat, + sizei width, sizei height ); + + are equivalent to + + RenderbufferStorageMultisampleAdvancedAMD(target, samples, + samples, internalformat, width, height); + + and + + RenderbufferStorageMultisampleAdvancedAMD(target, 0, 0, + internalformat, width, height); + + respectively. + + The commands + + void NamedRenderbufferStorageMultisample( uint renderbuffer, + sizei samples, enum internalformat, sizei width, + sizei height ); + void NamedRenderbufferStorage( uint renderbuffer, + enum internalformat, sizei width, sizei height ); + + are equivalent to + + NamedRenderbufferStorageMultisampleAdvancedAMD(renderbuffer, + samples, samples, internalformat, width, height); + + and + + NamedRenderbufferStorageMultisampleAdvancedAMD(renderbuffer, + 0, 0, internalformat, width, height); + + respectively. + + In section 9.2.5, "Required Renderbuffer Formats", replace the last + paragraph with: + + Implementations must support creation of renderbuffers in these + required formats with sample counts up to and including: + * MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD as color renderbuffer samples + * MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD as color renderbuffer + storage samples + * MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD as depth and stencil + samples + + with the exception that the signed and unsigned integer formats are + required only to support creation of renderbuffers with up to + the value of MAX_INTEGER_SAMPLES samples and storage samples, which + must be at least one. + + In section 9.2.6, "Renderbuffer Object Queries", replace the paragraph + mentioning RENDERBUFFER_SAMPLES with: + + If is RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT, + RENDERBUFFER_INTERNAL_FORMAT, RENDERBUFFER_SAMPLES, or + RENDERBUFFER_STORAGE_SAMPLES_AMD then will contain the width + in pixels, height in pixels, internal format, number of samples, or + number of storage samples, respectively, of the image of + the renderbuffer object. + + In section 9.4.1, "Framebuffer Attachment Completeness", remove + the bullet beginning with "If has multisample samples" and + replace the last 3 bullets about with: + + If is COLOR_ATTACHMENTi, then must have a color- + renderable internal format, the sample count must be less than or + equal to the value of the implementation-dependent limit + MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD, and the storage sample count must + be less than or equal to the value of the implementation-dependent + limit MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD. + + If is DEPTH_ATTACHMENT, then must have a depth- + renderable internal format, and its sample count must be less than or + equal to the value of the implementation-dependent limit + MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD. + + If is STENCIL_ATTACHMENT, then must have + a stencil-renderable internal format, and its sample count must be + less than or equal to the value of the implementation-dependent limit + MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD. + + In section 9.4.2, replace the bullet mentioning RENDERBUFFER_SAMPLES + with: + + * The value of RENDERBUFFER_SAMPLES of a color attachment defines its + ; the value of RENDERBUFFER_STORAGE_SAMPLES + of a color attachment defines its ; + the value of RENDERBUFFER_SAMPLES of a depth or stencil attachment + defines its for each separately; + the value of TEXTURE_SAMPLES of a color attachment defines both its + and its ; + the value of TEXTURE_SAMPLES of a depth or stencil attachment defines + its for each separately. If any of + the defined values is 0, it is treated as 1. Any undefined value is + treated as equal to any number. For all attachment values that are + defined, all values of must be equal, all + values of must be equal, all values + of must be equal, and the triple + {, , } must be in SUPPORTED_MULTISAMPLE_MODES_AMD + or must be equal to {1, 1, 1}. + + { FRAMEBUFFER_INCOMPLETE_MULTISAMPLE } + +Additions to Chapter 17 of the OpenGL 4.5 (Core Profile) Specification +(Writing Fragments and Samples to the Framebuffer) + + In section 17.3.10, "Additional Multisample Fragment Operations", add + this paragraph after the "If MULTISAMPLE is enabled" paragraph: + + If there are fewer color storage samples (see section 9.2.4) than + the value of SAMPLES, the number of color storage samples determines + the number of unique color values that can be stored per pixel. + The implementation must determine which samples within a pixel share + the same color value, write that value into 1 color storage sample, + and remember a mapping between color samples and color storage + samples to be able to map color storage samples back to color samples. + The color value equality determination is done in an implementation- + specific manner, but the implementation must at least recognize a set + of color samples coming from the same primitive as 1 storage sample if + sample shading (see section 14.3.1.1) is disabled. If there are not + enough color storage samples per pixel to store all incoming color + values, the excessive color values are not stored and the color samples + with unstored values are marked as having an unknown value. Color + samples with an unknown value will not contribute to the final color + value of the pixel when all color samples are resolved by + BlitFramebuffer (see section 18.3.1). + + If there are fewer depth and stencil samples than the value of SAMPLES + and implementation-specific optimizations are unable to represent more + depth and stencil samples within the given storage, the missing depth + and stencil values should be pulled from or derived from the nearest + existing depth and stencil samples within the same pixel. The mapping + from missing to existing depth and stencil samples is implementation- + specific, but the mapping must be at least: + * injective if missing samples < existing samples + * bijective if missing samples = existing samples + * surjective if missing samples > existing samples + Depth and stencil tests operate as if the number of depth and stencil + samples was equal to the value of SAMPLES. + +Errors + + An INVALID_ENUM error is generated by RenderbufferStorageMultisample- + AdvancedAMD if is not RENDERBUFFER. + + An INVALID_OPERATION error is generated by NamedRenderbufferStorage- + MultisampleAdvancedAMD if is not the name of + an existing renderbuffer object. + + An INVALID_VALUE error is generated if , , + , or is negative. + + An INVALID_OPERATION error is generated if is a color + format and is greater than the implementation-dependent + limit MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD. + + An INVALID_OPERATION error is generated if is a color + format and is greater than the implementation- + dependent limit MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD. + + An INVALID_OPERATION error is generated if is greater + than . + + An INVALID_OPERATION error is generated if is a depth + or stencil format and is greater than the maximum number of + samples supported for (see GetInternalformativ + in section 22.3). + + An INVALID_OPERATION error is generated if is a depth + or stencil format and is not equal to . + +New State + + Add to Table 23.27, "Renderbuffer (state per renderbuffer object)" + Initial + Get Value Type Get Command Value Description Section + -------------------------------- ---- -------------------------- ------- ---------------------- ------- + RENDERBUFFER_STORAGE_SAMPLES_AMD Z+ GetRenderbufferParameteriv 0 No. of storage samples 9.2.4 + +New Implementation Dependent Values + Minimum + Get Value Type Get Command Value Description Section + ---------------------------------------- ---------- ----------- ------- --------------------------------------- ------- + MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD Z+ GetIntegerv 4 Max. no. of color samples supported by 9.2.4 + framebuffer objects. + MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD Z+ GetIntegerv 4 Max. no. of color storage samples 9.2.4 + supported by framebuffer objects. + MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD Z+ GetIntegerv 4 Max. no. of depth and stencil samples 9.2.4 + supported by framebuffer objects. + NUM_SUPPORTED_MULTISAMPLE_MODES_AMD Z+ GetIntegerv 1 No. of supported combinations of color 9.2.4 + samples, color storage samples, and + depth-stencil samples by framebuffer + objects. + SUPPORTED_MULTISAMPLE_MODES_AMD n * 3 x Z+ GetIntegerv - NUM_SUPPORTED_MULTISAMPLE_MODES_AMD (n) 9.2.4 + triples of integers. Each triple is + a unique combination of color samples, + color storage samples, and depth-stencil + samples supported by framebuffer objects. + +AMD Implementation Details + + The following multisample modes are supported by AMD's open source + OpenGL driver: + + Color Depth & + Color storage stencil + samples samples samples + ======= ======= ======= + 16 8 8 + 16 4 8 + 16 2 8 + 16 4 4 + 16 2 4 + 16 2 2 + ------- ------- ------- + 8 8 8 + 8 4 8 + 8 2 8 + 8 4 4 + 8 2 4 + 8 2 2 + ------- ------- ------- + 4 4 4 + 4 2 4 + 4 2 2 + ------- ------- ------- + 2 2 2 + +Issues + + None. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- -------------------------------------------- + 1 06/28/18 mareko Initial version diff --git a/opengles/extensions/AMD/AMD_framebuffer_sample_positions.txt b/opengles/extensions/AMD/AMD_framebuffer_sample_positions.txt new file mode 100644 index 0000000000..db2eaf363d --- /dev/null +++ b/opengles/extensions/AMD/AMD_framebuffer_sample_positions.txt @@ -0,0 +1,378 @@ +Name + + AMD_framebuffer_sample_positions + +Name Strings + + GL_AMD_framebuffer_sample_positions + +Contact + + Mais Alnasser, AMD (mais.alnasser 'at' amd.com) + +Contributors + + Mais Alnasser, AMD + Graham Sellers, AMD + +Status + + Shipping + +Version + + Last Modified Date: 11/10/16 + Revision: 4 + +Number + + OpenGL Extension #454 + +Dependencies + + OpenGL 3.2 is required. + + This specification interacts with EXT_direct_state_access. + + This extension is written against the OpenGL 4.4 (Core) specification. + +Overview + + In unextended GL, the sub-pixel loations of multisampled textures and + renderbuffers are generally determined in an implementation dependent + manner. Some algorithms -- in particular custom antialiasing functions -- + depend on the knowledge of, or even require control over the positions of + samples within each pixel. + + The AMD_sample_positions extension added some control over the positions + of samples within a single framebuffer. However, it forced all pixels + within a framebuffer to have the set of sample positions. + + This extension provides a mechanism to explicitly set sample positions for + a framebuffer object with multi-sampled attachments in a repeating pattern, + allowing different pixels to use different sub-pixel locations for their + samples. The sample locations used by the FBO can be fixed for all pixels + in the FBO’s attachments or they can be fixed for a sampling pattern + comprised of multiple pixels, where the sampling pattern is repeated over + all pixels. The rate of repeat of this sampling pattern size itself is + fixed and is implementation-dependent. + +New Tokens + + Accepted by the parameter of GetFloatv: + + SUBSAMPLE_DISTANCE_AMD 0x883F + + Accepted by the parameter of GetIntegerv: + + PIXELS_PER_SAMPLE_PATTERN_X_AMD 0x91AE + PIXELS_PER_SAMPLE_PATTERN_Y_AMD 0x91AF + + Accepted by the parameter of FramebufferSamplePositionsfvAMD, + NamedFramebufferSamplePositionsfvAMD, GetFramebufferParameterfvAMD + and GetNamedFramebufferParameterfvAMD: + + ALL_PIXELS_AMD 0xFFFFFFFF + + +New Procedures and Functions + + void FramebufferSamplePositionsfvAMD(enum target, uint numsamples, + uint pixelindex, const float *values) + + void NamedFramebufferSamplePositionsfvAMD(uint framebuffer, + uint numsamples, uint pixelindex, const float *values) + + void GetFramebufferParameterfvAMD(enum target, enum pname, + uint numsamples, uint pixelindex, sizei size, float *values) + + void GetNamedFramebufferParameterfvAMD(uint framebuffer, + enum pname, uint numsamples, uint pixelindex, sizei size, + float *values) + + +Additions to Chapter 9 of the OpenGL 4.4 (Core) Specification +(Framebuffers and Framebuffer Objects) + + Add section 9.2.9, Framebuffer Sample Positions, p. 287 + + Sample locations can be modified for all pixels in a multi-sampled + framebuffer using the following command: + + void FramebufferSamplePositionsfvAMD(enum target, + uint numsamples, + uint pixelindex, + const float *values); + + must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER. + is the number of samples to set and must be greater + than 0 and less than or equal to the value of SAMPLES. The error + INVALID_VALUE is generated if is outside this range. + is the index of the pixel to set the samples for and + must be greater than or equal to 0 and less than the result of querying + PIXELS_PER_SAMPLE_PATTERN_X_AMD multiplied by the result of + querying PIXELS_PER_SAMPLE_PATTERN_Y_AMD. The pixels are ordered left to + right, top to bottom, where the origin is the upper left corner. + may also specify ALL_PIXELS_AMD, which sets samples of all + pixels to the same set of locations. The error INVALID_VALUE is generated + if is less than zero or is greater than or equal to the + result of querying PIXELS_PER_SAMPLE_PATTERN_X_AMD multiplied by the + result of querying PIXELS_PER_SAMPLE_PATTERN_Y_AMD and is not equal to + ALL_PIXELS_AMD. The sample locations are set by passing floating point + values of x and y in and respectively, + all in the range [0.0, 1.0), corresponding to the and locations in + pixel space of that sample, respectively. (0.5, 0.5) thus corresponds to + the pixel center. The range [0.0, 0.1) implies that sample locations cannot + overlap at pixel boundaries. + + FramebufferSamplePositionsfvAMD generates an INVALID_OPERATION error if the + currently bound framebuffer is incomplete or is the default framebuffer. + + If is NULL, is ignored and all sample positions for + are returned to their default values. Passing ALL_PIXELS_AMD + therefore resets the sample positions for all pixels in the sampling + pattern. + + The subpixel range [0,1) is discretized based on the implementation- + dependent value of SUBSAMPLE_DISTANCE_AMD. GetFloatv can be used with + SUBSAMPLE_DISTANCE_AMD as the pname parameter to query the subpixel + precision, which is the same for both the vertical and horizontal + directions. Given two sample positions (x0, y0) and (x1, y1), one can make + sure they don't fall in the same subpixel if + + abs(x0 - x1) >= ssd and abs(y0 - y1) >= ssd, + + where ssd is the float value returned when querying SUBSAMPLE_DISTANCE_AMD. + + The quantized sample positions can be retrieved via the new entry point: + + void GetFramebufferParameterfvAMD(enum target, + enum pname, + uint numsamples, + uint pixelindex, + sizei size, + float *values); + + must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER. + FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. must be + SAMPLE_POSITIONS. is the number of samples to get and must + be greater than 0 and less than or equal to the value of SAMPLES. The + error INVALID_VALUE is generated if is outside this range. + is the index of the pixel to set the samples for and must be + less than the result of querying PIXELS_PER_SAMPLE_PATTERN_X_AMD + multiplied by the result of querying PIXELS_PER_SAMPLE_PATTERN_Y_AMD. + Calling GetFramebufferParameterfvAMD with within this + range retrieves the set of sample positions for the pixel matching + . can also be equal to ALL_PIXELS_AMD, which + would cause the function to return an array of the requested + per each pixel in the sampling pattern. + + The error INVALID_VALUE is generated if is less than + zero or is greater than or equal to the result of querying + PIXELS_PER_SAMPLE_PATTERN_X_AMD multiplied by the result of querying + PIXELS_PER_SAMPLE_PATTERN_Y_AMD and is not equal to ALL_SAMPLES. The + samples returned are ordered per pixel, and the order of the pixels would + be left to right, then top to bottom, where the sampling pattern origin is + the upper left corner. is the requested size of the retrieved sample + locations in bytes. will contain the returned and + coordinates of the requested samples in pixel space. The sample locations + returned are all in the range [0, 1), corresponding to the and + locations in pixel space of that sample, respectively. (0.5, 0.5) thus + corresponds to the pixel center. + + The commands: + + void NamedFramebufferSamplePositionsfvAMD(uint framebuffer, + uint numsamples, + uint pixelindex, + const float *values); + + void GetNamedFramebufferParameterfvAMD(uint framebuffer, + enum pname, + uint numsamples, + uint pixelindex, + sizei size, + float *value); + + behave identically to FramebufferSamplePositionsfvAMD and + GetFramebufferSampleParameterfvAMD, except that the target of the + operation is the framebuffer object named rather than + the object bound to a specified target. If is not the name + of an existing framebuffer object an INVALID_OPERATION error is generated. + +Additions to Chapter 14 of the OpenGL 4.4 (Core) Specification (Fixed-Function +Primitive Assembly and Rasterization) + + (Modify Section 14.3, Antialiasing, p. 412) + + Add after the segment: "If the multisample mode does not have fixed sample + locations, the returned values may only reflect the locations of samples + within some pixels.", append: + + If GetMultisamplefv is used to query the result of using + FramebufferSamplePositionsfvAMD or NamedFramebufferSamplePositionsfvAMD + with ALL_PIXELS_AMD, the returned sample position matches that of + equal to zero. + +Errors + + INVALID_VALUE is generated by FramebufferSamplePositionsfvAMD, + NamedFramebufferSamplePositionsfvAMD, GetFramebufferParameterfvAMD + and GetNamedFramebufferParameterfvAMD if numsamples is greater than + the value of SAMPLES. + + INVALID_VALUE is generated by FramebufferSamplePositionsfvAMD if + pixelindex is greater than or equal to the value of + NUM_PIXELS_PER_SAMPLE_PATTERN_X_AMD * NUM_PIXELS_PER_SAMPLE_PATTERN_Y_AMD + and is not equal to ALL_SAMPLES_AMD. + + INVALID_OPERATION is generated by FramebufferSamplePositionsfvAMD + if the currently bound framebuffer is the default framebuffer. + + INVALID_OPERATION is generated by NamedFramebufferSamplePositionsfvAMD + if the is not the name of an existing framebufer object. + + INVALID_OPERATION is generated by FramebufferSamplePositionsfvAMD + if the currently bound framebuffer is incomplete. + + INVALID_OPERATION is generated by NamedFramebufferSamplePositionsfvAMD + if the is incomplete. + +New State + + Add to Table 23.24, Framebuffer (state per framebuffer object), p. 545: + + Get Value Type Get Command Value Description Sec. + --------- ---- ----------- ----- ------------------------------ ----- + SAMPLE_POSITIONS 2xR+ GetFramebufferParameterfvAMD The (x, y) sample locations in 9.2.9 + the range [0, 1) + +New Implementation Dependent State + + Add to Table 23.11, Multisampling, p. 532: + + Get Value Type Get Command Value Description Sec. + --------- ------- ----------- ------- ------------------------ ----- + SUBSAMPLE_DISTANCE_AMD R+ GetFloatv precision step between 9.2.9 + subsamples + PIXELS_PER_SAMPLE_PATTERN_X_AMD Z+ GetIntegerv number of pixels in the 9.2.9 + X direction + PIXELS_PER_SAMPLE_PATTERN_Y_AMD Z+ GetIntegerv number of pixels in the 9.2.9 + Y direction + +Interaction with ARB_texture_multisample + + If ARB_texture_multisample is not supported, remove all references to + GetMultisamplefv. + + +Dependencies on EXT_direct_state_access + + If EXT_direct_state_access is not supported, remove references to the + Named* commands added by this extension. + + +Issues + + (1) What happens if an app just sets one sample position? + + RESOLVED: Any attachment to the bound FBO will have the index 0 + position updated. All the rest of the positions will keep their + original values. Any other FBOs will not be affected by this change. + + + (2) Should we also expose the precision? Can an app use it in setting + sample positions? + + RESOLVED: SUBSAMPLE_DISTANCE_AMD is added as a new token. It can be + used by GetFloatv to query the precision step, which will be the same + for both the vertical and horizontal directions. The subpixel range + [0,1) is discretized based on the value of SUBSAMPLE_DISTANCE_AMD. + Let ssd be the float value returned when SUBSAMPLE_DISTANCE_AMD is + queried, then one can infer the subpixilization to be 1/ssd+1. For + example, if ssd = 0.06667 then the pixel is subdivided into + 1/0.0667+1 = 16 subpixels in each dimension. + + One can also avoid using sample positions that would map to the same + subpixel. A coordinate c will map to the greatest multiple of ssd that + is less or equal to c. For example, given two sample positions, + (x0, y0) and (x1, y1), if abs(x1-x0) < ssd and abs(y1-y0) < ssd, then + both points will map to the same subpixel, which means the application + might want to substitute one of these positions with another that is + not redundant. + + Using numerical values as an example, let a = (0.201, 0.0) and + b = (0.25, 0.5) be sample positions and ssd = 0.06667. Both the + x-coordinate values 0.201 and 0.25 fall between 0.06667*3=0.2 and + 0.06667*4 = 0.26667 and would therefore map to the same value of 0.2. + The y-coordinates also map to the same value of 0 because they both + belong in the range [0, 0.06667). This means the two points are + redundant. Therefore, the application should choose a different point + c = (0.3, 0.45) for example. c would be a good choice because the + distance between its x-coordinate and a's x-coordinate is greater than + ssd, that is 0.3-0.201 > 0.06667. + + (3) What would be the expected results for the following scenarios: + + Scenario 1 + The current number of samples in the framebuffer is 8. + The application requests 5 sample positions and GL_ALL_PIXELS. + The application passes 22*2*sizeof(GLuint) as the size in bytes + (more than needed). + + RESOLVED: The returned array would have a capped size of + 20*2*sizeof(GLuint) and will contain the first 5 samples of pixel + (x0, y0), then the first 5 samples of pixel (x1, y0), then the first + 5 samples of pixel (x0, y1) and finally the first 5 samples of pixel + (x1, y1). + + Scenario 2 + The current number of samples in the framebuffer is 8. + The application requests 5 sample positions and GL_ALL_PIXELS. + The application passes 18*2*sizeof(GLuint) as the size in bytes + (less than needed). + + RESOLVED: The returned array would have a size of 18*2*sizeof(GLuint) + and will contain the first 5 samples of pixel (x0, y0), then the first + 5 samples of pixel (x1, y0), then the first 5 samples of pixel + (x0, y1) and finally the first 3 samples of pixel (x1, y1). + + Scenario 3 + The current number of samples in the framebuffer is 8. + The application requests 5 sample positions and GL_ALL_PIXELS. + The application passes 12*2*sizeof(GLuint) as the size in bytes + (less than needed). + + RESOLVED: The returned array would have a size of 12*2*sizeof(GLuint) + and will contain the first 5 samples of pixel (x0, y0), then the first + 5 samples of pixel (x1, y0), and the first 2 samples of pixel + (x0, y1). + + (4) What is the expected behavior of a multisampled texture is attached + with equal to TRUE and then the application + attempts to set different samples per pixels in a sampling pattern? + + RESOLVED: If is set to TRUE, the sample + positions in equaling zero get replicated to all other + pixels in the sampling pattern. + + (5) What is the result of rendering to a framebuffer, changing its sample + locations and then rendering again into that framebuffer without + clearing it first? + + RESOLVED: The result is effectively undefined. The result of rendering + will not be consistent between the two passes. No ill effect should + come of this, but the framebuffer content may appear corrupted. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + 4 11/10/16 malnasse Modify the 'framebuffer' parameter in + GetNamedFramebufferParameterfvAMD from + GLenum to GLuint to match the DSA style. + 3 11/09/16 malnasse Update PIXELS_PER_SAMPLE_PATTERN_X_AMD and + PIXELS_PER_SAMPLE_PATTERN_Y_AMD token values. + 2 04/18/14 gsellers Ready for posting. + 1 10/14/13 malnasse First revision. + diff --git a/opengles/extensions/AMD/AMD_gcn_shader.txt b/opengles/extensions/AMD/AMD_gcn_shader.txt new file mode 100644 index 0000000000..25489d87c0 --- /dev/null +++ b/opengles/extensions/AMD/AMD_gcn_shader.txt @@ -0,0 +1,156 @@ +Name + + AMD_gcn_shader + +Name Strings + + GL_AMD_gcn_shader + +Contact + + Graham Sellers (graham.sellers 'at' amd.com) + +Contributors + + Graham Sellers, AMD + Daniel Rakos, AMD + +Status + + Shipping + +Version + + Last Modified Date: 06/24/2019 + Revision: 4 + +Number + + OpenGL Extension #453 + +Dependencies + + This extension is written against Revision 8 of the version 4.40 of the + OpenGL Shading Language Specification, dated January 22, 2014. + + This extension builds upon features introduced by the + GL_ARB_shader_group_vote extension. + + AMD_gpu_shader_int64 or NV_gpu_shader5 is required. + +Overview + + This extension exposes miscellaneous features of the AMD "Graphics Core + Next" shader architecture that do not cleanly fit into other extensions + and are not significant enough alone to warrant their own extensions. + This includes cross-SIMD lane ballots, cube map query functions and + a functionality to query the elapsed shader core time. + +New Procedures and Functions + + None. + +New Tokens + + None. + +IP Status + + None. + +Additions to Chapter 7 of the OpenGL Shading Language Specification +(Built-In Language Variables) + + Modify Section 7.1, Built-In Language Variables + + (add to the list of built-in constants for each shader stage listed in + the chapter) + + in int gl_SIMDGroupSizeAMD; + +Additions to Chapter 8 of the OpenGL Shading Language Specification +(Built-in Functions) + + Add New Section 8.9.5, Texture Cube Map Addressing Functions + + Syntax: + + float cubeFaceIndexAMD(vec3 P) + + The function cubeFaceIndexAMD returns a single floating point value + that represents the index of the cube map face that would be accessed + by texture lookup functions for the cube map texture coordinates given + as parameter. The returned value correspond to cube map faces as follows: + + * 0.0 for the cube map face facing the positive X direction + * 1.0 for the cube map face facing the negative X direction + * 2.0 for the cube map face facing the positive Y direction + * 3.0 for the cube map face facing the negative Y direction + * 4.0 for the cube map face facing the positive Z direction + * 5.0 for the cube map face facing the negative Z direction + + Syntax: + + vec2 cubeFaceCoordAMD(vec3 P) + + The function cubeFaceCoordAMD returns a two-component floating point + vector that represents the 2D texture coordinates that would be used for + accessing the selected cube map face for the given cube map texture + coordinates given as parameter P. + + Modify Section 8.18, Shader Invocation Group Functions + + (add to the end of the section) + + Syntax: + + uint64_t ballotAMD(bool value); + + The function ballotAMD returns a bitfield containing the result of + evaluating the expression in all active invocations in the group. + SIMD groups of up to 64 invocations may be represented by the return value + of ballotAMD(). Invocations populate the result starting from the least + significant bit. If evaluates to true for an active invocation + then the corresponding bit is set in the result, otherwise it is not set. + Bits corresponding to invocations that are not active or that do not + exist in the SIMD group (because, for example, they are at bit positions + beyond the SIMD group size) are set to zero. The following trivial + assumptions can be made: + + * ballotAMD(true) returns bitfield where the corresponding bits are + set for all active invocations in the SIMD group. + * ballotAMD(false) returns 0ul. + + + Add New Section 8.19, "Timing Functions" + + Syntax: + + uint64_t timeAMD(void); + + The timeAMD function returns a 64-bit value representing the current + execution clock as seen by the shader processor. Time monotonically + increments as the processor executes instructions. The returned time will + wrap after it exceeds the maximum value representable in 64 bits. The + units of time are not defined and need not be constant. Time is not + dynamically uniform. That is, shader invocations executing as part of a + single draw or dispatch will not necessarily see the same value of time. + Time is also not guaranteed to be consistent across shader stages. For + example, there is no requirement that time sampled inside a fragment + shader invocation will be greater than the time sampled in the vertex + that lead to its execution. + +Dependencies on GL_ARB_shader_group_vote: + + This extension adds to sections introduced by GL_ARB_shader_group_vote. + If GL_ARB_shader_group_vote is not supported, introduce the referenced + sections, but do not introduce the functionality from that extension. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- --------------------------------------------- + 4 06/24/2019 dwitczak gl_SIMDGroupSizeAMD is no longer a built-in constant. + 3 03/17/2013 drakos Internal updates + ready to post + 2 10/08/2013 gsellers Internal updates + 1 09/20/2013 gsellers Initial revision diff --git a/opengles/extensions/AMD/AMD_gpu_shader_half_float.txt b/opengles/extensions/AMD/AMD_gpu_shader_half_float.txt new file mode 100644 index 0000000000..3cd05a384e --- /dev/null +++ b/opengles/extensions/AMD/AMD_gpu_shader_half_float.txt @@ -0,0 +1,1093 @@ +Name + + AMD_gpu_shader_half_float + +Name Strings + + GL_AMD_gpu_shader_half_float + +Contact + + Qun Lin, AMD (quentin.lin 'at' amd.com) + +Contributors + + Qun Lin, AMD + Daniel Rakos, AMD + Donglin Wei, AMD + Graham Sellers, AMD + Rex Xu, AMD + Dominik Witczak, AMD + +Status + + Shipping. + +Version + + Last Modified Date: 09/21/2016 + Author Revision: 5 + +Number + + OpenGL Extension #496 + +Dependencies + + This extension is written against the OpenGL 4.5 (Core Profile) + Specification. + + This extension is written against version 4.50 of the OpenGL Shading + Language Specification. + + OpenGL 4.0 and GLSL 4.00 are required. + + This extension interacts with ARB_gpu_shader_int64. + + This extension interacts with AMD_shader_trinary_minmax. + + This extension interacts with AMD_shader_explicit_vertex_parameter. + +Overview + + This extension was developed based on the NV_gpu_shader5 extension to + allow implementations supporting half float in shader and expose the + feature without the additional requirements that are present in + NV_gpu_shader5. + + The extension introduces the following features for all shader types: + + * support for half float scalar, vector and matrix data types in shader; + + * new built-in functions to pack and unpack half float types into a + 32-bit integer vector; + + * half float support for all existing single float built-in functions, + including angle functions, exponential functions, common functions, + geometric functions, matrix functions and etc.; + + This extension is designed to be a functional superset of the half-precision + floating-point support from NV_gpu_shader5 and to keep source code compatible + with that, thus the new procedures, functions, and tokens are identical to + those found in that extension. + + +New Procedures and Functions + + None. + +New Tokens + + Returned by the parameter of GetActiveAttrib, GetActiveUniform, and + GetTransformFeedbackVarying: + + (The tokens are identical to those defined in NV_gpu_shader5.) + + FLOAT16_NV 0x8FF8 + FLOAT16_VEC2_NV 0x8FF9 + FLOAT16_VEC3_NV 0x8FFA + FLOAT16_VEC4_NV 0x8FFB + + (New tokens) + FLOAT16_MAT2_AMD 0x91C5 + FLOAT16_MAT3_AMD 0x91C6 + FLOAT16_MAT4_AMD 0x91C7 + FLOAT16_MAT2x3_AMD 0x91C8 + FLOAT16_MAT2x4_AMD 0x91C9 + FLOAT16_MAT3x2_AMD 0x91CA + FLOAT16_MAT3x4_AMD 0x91CB + FLOAT16_MAT4x2_AMD 0x91CC + FLOAT16_MAT4x3_AMD 0x91CD + + +Additions to Chapter 7 of the OpenGL 4.5 (Core Profile) Specification +(Program Objects) + + Modify Section 7.3.1, Program Interfaces + + (add to Table 7.3, OpenGL Shading Language type tokens, p. 108) + + +----------------------------+----------------+------+------+------+ + | Type Name Token | Keyword |Attrib| Xfb |Buffer| + +----------------------------+----------------+------+------+------+ + | FLOAT16_NV | float16_t | * | * | * | + | FLOAT16_VEC2_NV | f16vec2 | * | * | * | + | FLOAT16_VEC3_NV | f16vec3 | * | * | * | + | FLOAT16_VEC4_NV | f16vec4 | * | * | * | + | FLOAT16_MAT2_AMD | f16mat2 | * | * | * | + | FLOAT16_MAT3_AMD | f16mat3 | * | * | * | + | FLOAT16_MAT4_AMD | f16mat4 | * | * | * | + | FLOAT16_MAT2x3_AMD | f16mat2x3 | * | * | * | + | FLOAT16_MAT2x4_AMD | f16mat2x4 | * | * | * | + | FLOAT16_MAT3x2_AMD | f16mat3x2 | * | * | * | + | FLOAT16_MAT3x4_AMD | f16mat3x4 | * | * | * | + | FLOAT16_MAT4x2_AMD | f16mat4x2 | * | * | * | + | FLOAT16_MAT4x3_AMD | f16mat4x3 | * | * | * | + +----------------------------+----------------+------+------+------+ + + + Modify Section 7.6.1, Loading Uniform Variables + + (modify the last paragraph on p. 132) + + The Uniform*f{v} commands will load count sets of one to four floating- + point values into a uniform defined as a float, a half float, a floating- + point vector, a half-precision floating-point vector or an array of either + of these types. Floating-point values are converted to half float by the GL + for uniforms defined as a half float, a half float vector or an array of + those. + + + Modify Section 7.6.2.1, Uniform Buffer Object Storage + + (modify the first two bullets of the first paragraph on p. 136) + + * Members of type bool, int, uint, float, float16_t and double are respectively + extracted from a buffer object by reading a single uint, int, uint, float, + half float or double value at the specified offset. + + * Vectors with N elements with basic data types of bool, int, uint, float, + float16_t or double are extracted as N values in consecutive memory locations + beginning at the specified offset, with components stored in order with the + first (X) component at the lowest offset. The GL data type used for component + extraction is derived according to the rules for scalar members above. + + +Additions to Chapter 11 of the OpenGL 4.5 (Core Profile) Specification +(Programmable Vertex Processing) + + Modify Section 11.1.1, Vertex Attributes + + (modify Table 11.2, Generic attributes and vector types used by column vectors of + matrix variables bound to generic attribute index i. p. 366) + + +------------------------------+-------------------------+-----------------------+ + | Data type |Column vector type layout| Generic | + | |qualifier attributes used| | + +------------------------------+-------------------------+-----------------------+ + | mat2, dmat2, f16mat2 | two-component vector | i, i + 1 | + | mat2x3, dmat2x3, f16mat2x3 | three-component vector | i, i + 1 | + | mat2x4, dmat2x4, f16mat2x4 | four-component vector | i, i + 1 | + | mat3x2, dmat3x2, f16mat3x2 | two-component vector | i, i + 1, i + 2 | + | mat3, dmat3, f16mat3 | three-component vector | i, i + 1, i + 2 | + | mat3x4, dmat3x4, f16mat3x4 | four-component vector | i, i + 1, i + 2 | + | mat4x2, dmat4x2, f16mat4x2 | two-component vector | i, i + 1, i + 2, i + 3| + | mat4x3, dmat4x3, f16mat4x3 | three-component vector | i, i + 1, i + 2, i + 3| + | mat4, dmat4, f16mat4 | four-component vector | i, i + 1, i + 2, i + 3| + +------------------------------+-------------------------+-----------------------+ + + (modify Table 11.3: Scalar and vector vertex attribute types and VertexAttrib* + commands used to set the values of the corresponding generic attributes. p. 366) + + +-------------------+--------------------------+ + | Data type | Command | + +-------------------+--------------------------+ + | float, float16_t | VertexAttrib1* | + | vec2, f16vec2 | VertexAttrib2* | + | vec3, f16vec3 | VertexAttrib3* | + | vec4, f16vec4 | VertexAttrib4* | + +-------------------+--------------------------+ + + + Modify Section 11.1.2.1, Output Variables + + (modify the last paragraph on p. 374) + + ..., each component of outputs declared as half-precision floating-point + scalars, vectors, or matrices is considered to consume two basic machine + units, and each component of any other type ... + + +Modifications to the OpenGL Shading Language Specification, Version 4.50 + + Including the following line in a shader can be used to control the + language features described in this extension: + + #extension GL_AMD_gpu_shader_half_float : + + where is as specified in section 3.3. + + New preprocessor #defines are added to the OpenGL Shading Language: + + #define GL_AMD_gpu_shader_half_float 1 + + +Additions to Chapter 3 of the OpenGL Shading Language Specification (Basics) + + + Modify Section 3.6, Keywords + + (add the following to the list of reserved keywords at p. 18) + + float16_t f16vec2 f16vec3 f16vec4 + f16mat2 f16mat3 f16mat4 + f16mat2x2 fl6mat2x3 f16mat2x4 + f16mat3x2 f16mat3x3 f16mat3x4 + f16mat4x2 f16mat4x3 f16mat4x4 + + +Additions to Chapter 4 of the OpenGL Shading Language Specification +(Variables and Types) + + + Modify Section 4.1, Basic Types + + (add to the basic "Transparent Types" table, p. 23) + + +-----------+------------------------------------------------------------+ + | Type | Meaning | + +-----------+------------------------------------------------------------+ + | float16_t | a half-precision floating-point scalar | + | f16vec2 | a two-component half-precision floating-point vector | + | f16vec3 | a three-component half-precision floating-point vector | + | f16vec4 | a four-component half-precision floating-point vector | + | f16mat2 | a 2x2 half-precision floating-point matrix | + | f16mat3 | a 3x3 half-precision floating-point matrix | + | f16mat4 | a 4x4 half-precision floating-point matrix | + | f16mat2x2 | same as a f16mat2 | + | f16mat2x3 | a half-precision floating-point matrix with 2 columns and | + | | 3 rows | + | f16mat2x4 | a half-precision floating-point matrix with 2 columns and | + | | 4 rows | + | f16mat3x2 | a half-precision floating-point matrix with 3 columns and | + | | 2 rows | + | f16mat3x3 | same as a f16mat3 | + | f16mat3x4 | a half-precision floating-point matrix with 3 columns and | + | | 4 rows | + | f16mat4x2 | a half-precision floating-point matrix with 4 columns and | + | | 2 rows | + | f16mat4x3 | a half-precision floating-point matrix with 4 columns and | + | | 3 rows | + | f16mat4x4 | same as a f16mat4 | + +-----------+------------------------------------------------------------+ + + + Modify Section 4.1.4, Floating-Point Variables + + (replace first paragraph of the section, p. 29) + + Single-precision, double-precision and half-precision floating point variables + are available for use in a variety of scalar calculations. Generally, the term + floating-point will refer to all single-, double- and half-precision floating + point. Floating-point variables are defined as in the following examples: + + float a, b = 1.5; // single-precision floating-point + double c, d = 2.0LF; // double-precision floating-point + float16_t e, f = 3.0HF; // half-precision floating-point + + As an input value to one of the processing units, a single-precision, double- + precision or half-precison floating-point variable is expected to match the + corresponding IEEE 754 floating-point definition in terms of precision and + dynamic range. + + (modify grammar rule for "floating-suffix", p. 30) + + floating-suffix: one of + f F lf LF hf HF + + (modify the fourth sentence of second paragraph on p. 30) + + When the suffix "lf" or "LF" is present, the literal has type double. When the + suffix "hf" or "HF" is present, the literal has type float16_t. Otherwise, the + literal has type float. + + + Modify Section 4.1.6, Matrices + + (modify the second sentence in the section, p. 30) + + Matrix types beginning with "mat" have single-precision components, matrix + types beginning with "dmat" have double-precision components and matrix types + beginning with "f16mat" have half-precision components. + + + Modify Section 4.1.10, Implicit Conversions + + (modify the implicit conversion table on p. 37) + + +-----------------------+-------------------------------------------------+ + | Type of expression | Can be implicitly converted to | + +-----------------------+-------------------------------------------------+ + | int, uint, float16_t | float | + | ivec2, uvec2, f16vec2 | vec2 | + | ivec3, uvec3, f16vec3 | vec3 | + | ivec4, uvec4, f16vec4 | vec4 | + | f16mat2 | mat2 | + | f16mat3 | mat3 | + | f16mat4 | mat4 | + | f16mat2x3 | mat2x3 | + | f16mat2x4 | mat2x4 | + | f16mat3x2 | mat3x2 | + | f16mat3x4 | mat3x4 | + | f16mat4x2 | mat4x2 | + | f16mat4x3 | mat4x3 | + | int, uint, | double | + | float, float16_t | | + | ivec2, uvec2, | dvec2 | + | vec2, f16vec2 | | + | ivec3, uvec3, | dvec3 | + | vec3, f16vec3 | | + | ivec4, uvec4, | dvec4 | + | vec4, f16vec4 | | + | mat2, f16mat2, | dmat2 | + | mat3, f16mat3 | dmat3 | + | mat4, f16mat4 | dmat4 | + | mat2x3, f16mat2x3 | dmat2x3 | + | mat2x4, f16mat2x4 | dmat2x4 | + | mat3x2, f16mat3x2 | dmat3x2 | + | mat3x4, f16mat3x4 | dmat3x4 | + | mat4x2, f16mat4x2 | dmat4x2 | + | mat4x3, f16mat4x3 | dmat4x3 | + +-----------------------+-------------------------------------------------+ + + + Modify Section 4.4.2.1 Transform Feedback Layout Qualifiers + + (insert after the fourth paragraph in the section on p. 70) + + ... will be a multiple of 8; if applied to an aggregrate containing a + float16_t, the offset must also be a multiple of 2, and the space taken in + the buffer will be a multiple of 2. + + + Modify Section 4.7.1 Range and Precision + + (insert after the first paragraph in the section on p. 85) + + ... and positive and negative zeros. The precision of stored half- + precision floating-point variables is described in section 2.3.3.2 "16-Bit + Floating-Point Numbers" of OpenGL Specification. + + The following rules apply to all floating operations, including single-, + double- and half-precision operations:... + + +Additions to Chapter 5 of the OpenGL Shading Language Specification +(Operators and Expressions) + + + Modify Section 5.4.1, Conversion and Scalar Constructors + + (add after the first list of constructor examples on p. 97) + + int(float16_t) // convert a float16_t value to a signed integer + uint(float16_t) // convert a float16_t value to an unsigned integer + bool(float16_t) // convert a float16_t value to a Boolean + float(float16_t) // convert a float16_t value to a float value + double(float16_t) // convert a float16_t value to a double value + float16_t(bool) // convert a Boolean to a float16_t value + float16_t(int) // convert a signed integer to a float16_t value + float16_t(uint) // convert an unsigned integer to a float16_t value + float16_t(float) // convert a float value to a float16_t value + float16_t(double) // convert a double value to a float16_t value + + (modify the first sentence of last paragraph on p. 98) + + ... other arguments. + If the basic type (bool, int, float, double, or float16_t) of a parameter to + a constructor does not match the basic type of the object being constructed, + the scalar construction rules (above) are used to convert the parameters. + + +Additions to Chapter 6 of the OpenGL Shading Language Specification +(Statements and Structure) + + + Modify Section 6.1, Function Defintions + + (replace the second rule in third paragraph on p. 113) + + 2. A match involving a conversion from a signed integer, unsigned + integer, or floating-point type to a similar type having a larger + number of bits is better than a match involving any other implicit + conversion. + +Additions to Chapter 8 of the OpenGL Shading Language Specification +(Built-in Functions) + + (insert after the sixth sentence of last paragraph on p. 140) + + ... genDType is used as the argument. Where the input arguments (and + corresponding output) can be float16_t, f16vec2, f16vec3, f16vec4, + genF16Type is used as the argument. + + + Modify Section 8.1, Angle and Trigonometry Functions + + (add to the table of Angle and Trigonometry Functions on p. 141) + + +------------------------------------------------+----------------------------------------------------+ + | Syntax | Desciption | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type radians (genF16Type degrees) | Converts degrees to radians, i.e., 180/PI * | + | | degrees. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type degrees (genF16Type radians) | Converts radians to degrees, i.e., 180/PI * | + | | radians. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type sin (genF16Type angle) | The standard trigonometric sine function. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type cos (genF16Type angle) | The standard trigonometric cosine function | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type tan (genF16Type angle) | The standard trigonometric tangent. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type asin (genF16Type x) | Arc sine. Returns an angle whose sine is x. The | + | | range of values returned by this function is [-PI/2| + | | , PI/2] Results are undefined if |x| > 1. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type acos (genF16Type x) | Arc cosine. Returns an angle whose cosine is x. The| + | | range of values returned by this function is [0, p]| + | | Results are undefined if |x| > 1. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type atan (genF16Type y, genF16Type x) | Arc tangent. Returns an angle whose tangent is y/x.| + | | The signs of x and y are used to determine what | + | | quadrant the angle is in. The range of values | + | | returned by this function is [-PI,PI]. Results are | + | | undefined if x and y are both 0. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type atan (genF16Type y_over_x) | Arc tangent. Returns an angle whose tangent is | + | | y_over_x. The range of values returned by this | + | | function is [-PI/2, PI/2]. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type sinh (genF16Type x) | Returns the hyperbolic sine function | + | | (e^x - e^-x) / 2. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type cosh (genF16Type x) | Returns the hyperbolic cosine function | + | | (e^x + e^-x) / 2. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type tanh (genF16Type x) | Returns the hyperbolic tangent function | + | | sinh(x) / cosh(x). | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type asinh (genF16Type x) | Arc hyperbolic sine; returns the inverse of sinh. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type acosh (genF16Type x) | Arc hyperbolic cosine; returns the non-negative | + | | inverse of cosh. Results are undefined if x < 1. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type atanh (genF16Type x) | Arc hyperbolic tangent; returns the inverse of | + | | tanh. Results are undefined if |x| >= 1. | + +------------------------------------------------+----------------------------------------------------+ + + + Modify Section 8.2, Exponential Functions + + (add to the table of Exponential Functions on p. 143) + + +------------------------------------------------+----------------------------------------------------+ + | Syntax | Desciption | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type pow (genF16Type x, genF16Type y) | Returns x raised to the y power, i.e., x^y | + | | Results are undefined if x < 0. | + | | Results are undefined if x = 0 and y <= 0. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type exp (genF16Type x) | Returns the natural exponentiation of x, i.e., e^x.| + +------------------------------------------------+----------------------------------------------------+ + | genF16Type log (genF16Type x) | Returns the natural logarithm of x, i.e., returns | + | | the value y which satisfies the equation x = e^y. | + | | Results are undefined if x <= 0. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type exp2 (genF16Type x) | Returns 2 raised to the x power, i.e., 2^x. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type log2 (genF16Type x) | Returns the base 2 logarithm of x, i.e., returns | + | | the value y which satisfies the equation x = 2^y | + | | Results are undefined if x <= 0. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type sqrt (genF16Type x) | Returns sqrt(x) .Results are undefined if x < 0. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type inversesqrt (genF16Type x) | Returns 1 / sqrt(x). Results are undefined if | + | | x <= 0. | + +------------------------------------------------+----------------------------------------------------+ + + + Modify Section 8.3, Common Functions + + (add to the table of common functions on p. 144) + + +------------------------------------------------+----------------------------------------------------+ + | Syntax | Desciption | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type abs(genF16Type x) | Returns x if x >= 0; otherwise it returns -x. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type sign(genF16Type x) | Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < | + | | 0. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type floor (genF16Type x) | Returns a value equal to the nearest integer that | + | | is less than or equal to x. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type trunc (genF16Type x) | Returns a value equal to the nearest integer to x | + | | whose absolute value is not larger than the | + | | absolute value of x. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type round (genF16Type x) | Returns a value equal to the nearest integer to x. | + | | The fraction 0.5 will round in a direction chosen | + | | by the implementation, presumably the direction | + | | that is fastest. This includes the possibility | + | | that round(x) returns the same value as | + | | roundEven(x) for all values of x. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type roundEven (genF16Type x) | Returns a value equal to the nearest integer to x. | + | | A fractional part of 0.5 will round toward the | + | | nearest even integer. (Both 3.5 and 4.5 for x will | + | | return 4.0.) | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type ceil (genF16Type x) | Returns a value equal to the nearest integer that | + | | is greater than or equal to x. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type fract (genF16Type x) | Returns x - floor(x). | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type mod (genF16Type x, float16_t y) | Modulus. Returns x - y * floor(x/y). | + | genF16Type mod (genF16Type x, genF16Type y) | | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type modf(genF16Type x, out genF16Type i)| Returns the fractional part of x and sets i to the | + | | integer part (as a whole number floating-point | + | | value). Both the return value and the output | + | | parameter will have the same sign as x. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type min(genF16Type x, | Returns y if y < x; otherwise it returns x. | + | genF16Type y) | | + | genF16Type min(genF16Type x, | | + | float16_t y) | | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type max(genF16Type x, | Returns y if x < y; otherwise it returns x. | + | genF16Type y) | | + | genF16Type max(genF16Type x, | | + | float16_t y) | | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type clamp(genF16Type x, | Returns min(max(x, minVal), maxVal). | + | genF16Type minVal, | | + | genF16Type maxVal) | Results are undefined if minVal > maxVal. | + | genF16Type clamp(genF16Type x, | | + | float16_t minVal, | | + | float16_t maxVal) | | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type mix(genF16Type x, | Selects which vector each returned component comes | + | genF16Type y, | from. For a component of a that is false, the | + | genF16Type a) | corresponding component of x is returned. For a | + | genF16Type mix(genF16Type x, | component of a that is true, the corresponding | + | genF16Type y, | component of y is returned. | + | float16_t a) | | + | genF16Type mix(genF16Type x, | | + | genF16Type y, | | + | genBType a) | | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type step (genF16Type edge, genF16Type x)| Returns 0.0 if x < edge; otherwise it returns 1.0. | + | genF16Type step (float16_t edge, genF16Type x) | | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type smoothstep (genF16Type edge0, | Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 | + | genF16Type edge1, | and performs smooth Hermite interpolation between 0| + | genF16Type x) | and 1 when edge0 < x < edge1. This is useful in | + | genF16Type smoothstep (float16_t edge0, | cases where you would want a threshold function | + | float16_t edge1 | with a smooth,transition. This is equivalent to: | + | genF16Type x) | genF16Type t; | + | | t = clamp((x - edge0) / (edge1 - edge0), 0, 1); | + | | return t * t * (3 - 2 * t); | + | | Results are undefined if edge0 >= edge1. | + +------------------------------------------------+----------------------------------------------------+ + | genBType isnan (genF16Type x) | Returns true if x holds a NaN. Returns false | + | | otherwise. Always returns false if NaNs are not | + | | implemented. | + +------------------------------------------------+----------------------------------------------------+ + | genBType isinf (genF16Type x) | Returns true if x holds a positive infinity or | + | | negative infinity. Returns false otherwise. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type fma (genF16Type a, genF16Type b, | Computes and returns a * b + c. | + | genF16Type c) | | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type frexp (genF16Type x, | Splits x into a floating-point significand in the | + | out genIType exp) | range [0.5, 1.0) and an integral exponent of two, | + | | such that: | + | | x = significand * 2^exp | + | | The significand is returned by the function and the| + | | exponent is returned in the parameter exp. For a | + | | floating-point value of zero, the significand and | + | | exponent are both zero. For a floating-point value | + | | that is an infinity or is not a number, the results| + | | are undefined. | + +------------------------------------------------+----------------------------------------------------+ + | genF16Type ldexp (genF16Type x, | Builds a floating-point number from x and the | + | in genIType exp) | corresponding integral exponent of two in exp, | + | | returning: | + | | x* 2^exp | + | | If this product is too large to be represented in | + | | the floating-point type, the result is undefined. | + +------------------------------------------------+----------------------------------------------------+ + + + Modify Section 8.4, Floating-Point Pack and Unpack Functions + + (add to the table of pack and unpack functions on p. 149) + + +-----------------------------------+------------------------------------------------------+ + | Syntax | Desciption | + +-----------------------------------+------------------------------------------------------+ + | uint packFloat2x16(f16vec2 v) | Returns an unsigned 32-bit integer obtained by | + | | packing the components of a two-component half- | + | | precision floating-point vector, respectively. The | + | | first vector component specifies the 16 least | + | | significant bits; the second component specifies the | + | | 16 most significant bits. | + +-----------------------------------+------------------------------------------------------+ + | f16vec2 unpackFloat2x16(uint v) | Returns a two-component half-precision floating-point| + | | vector built from a 32-bit unsigned integer scalar, | + | | respectively. The first component of the vector | + | | contains the 16 least significant bits of the input; | + | | the second component contains the 16 most | + | | significant bits. | + +-----------------------------------+------------------------------------------------------+ + + + Modify Section 8.5 Geometric Functions + + (add to table of geometric functions on p.152) + + +-------------------------------------------+-----------------------------------------------+ + | Syntax | Desciption | + +-------------------------------------------+-----------------------------------------------+ + | float16_t length (genF16Type x) | Returns the length of vector x, i.e., | + | | sqrt(x[0]*x[0] + x[1]*x[1] + ...) | + +-------------------------------------------+-----------------------------------------------+ + | float16_t distance (genF16Type p0, | Returns the distance between p0 and p1, i.e., | + | genF16Type p1) | length (p0 - p1) | + +-------------------------------------------+-----------------------------------------------+ + | float16_t dot (genF16Type x, genF16Type y)| Returns the dot product of x and y, i.e., | + | | x[0]*y[0] + x[1]*y [1] + ... | + +-------------------------------------------+-----------------------------------------------+ + | f16vec3 cross (f16vec3 x, f16vec3 y) | Returns the cross product of x and y, i.e., | + | | |x[1] * y[2] - y[1] * x[2]| | + | | |x[2] * y[0] - y[2] * x[0]| | + | | |x[0] * y[1] - y[0] * x[1]| | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type normalize (genF16Type x) | Returns a vector in the same direction as x | + | | but with a length of 1. | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type faceforward (genF16Type N, | If dot(Nref, I) < 0 return N, otherwise return| + | genF16Type I, | -N. | + | genF16Type Nref), | | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type reflect (genF16Type I, | For the incident vector I and surface | + | genF16Type N) | orientation N, returns the reflection | + | | direction: | + | | I - 2 * dot(N, I) * N | + | | N must already be normalized in order to | + | | achieve the desired result. | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type refract (genF16Type I, | For the incident vector I and surface normal | + | genF16Type N, | N, and the ratio of indices of refraction eta,| + | float16_t eta) | return the refraction vector. The result is | + | | computed by | + | | k = 1.0 - eta * eta * (1.0 - dot(N, I) * | + | | dot(N, I)) | + | | if (k < 0.0) | + | | return genF16Type(0.0) | + | | else | + | | return eta * I - (eta * dot(N, I) | + | | + sqrt(k)) * N | + | | The input parameters for the incident vector | + | | I and the surface normal N must already be | + | | normalized to get the desired results. | + +-------------------------------------------+-----------------------------------------------+ + + + Modify Section, 8.6 Matrix Functions + + (modify the first paragraph of the section on p. 154) + + ..., there is both a single-precision floating-point version, where all + arguments and return values are single precision, a double-precision + floating-point version, where all arguments and return values are double + precision, and a half-precision floating-point version, where all + arguments and return values are half precision. + + + Modify Section, 8.7, Vector Relational Functions + + (add to the table of placeholders at the top of p. 156) + + +-------------+-----------------------------+ + | Placeholder | Specific Types Allowed | + +-------------+-----------------------------+ + | f16vec | f16vec2, f16vec3, f16vec4 | + +-------------+-----------------------------+ + + (add to the table of vector relational functions at the bottom of p. 156) + + +-------------------------------------------+-----------------------------------------------+ + | Syntax | Desciption | + +-------------------------------------------+-----------------------------------------------+ + | bvec lessThan(f16vec x, f16vec y) | Returns the component-wise compare of x < y. | + +-------------------------------------------+-----------------------------------------------+ + | bvec lessThanEqual(f16vec x, f16vec y) | Returns the component-wise compare of x <= y. | + +-------------------------------------------+-----------------------------------------------+ + | bvec greaterThan(f16vec x, f16vec y) | Returns the component-wise compare of x > y. | + +-------------------------------------------+-----------------------------------------------+ + | bvec greaterThanEqual(f16vec x, f16vec y) | Returns the component-wise compare of x >= y. | + +-------------------------------------------+-----------------------------------------------+ + | bvec equal(f16vec x, f16vec y) | Returns the component-wise compare of x == y. | + +-------------------------------------------+-----------------------------------------------+ + | bvec notEqual(f16vec x, f16vec y) | Returns the component-wise compare of x != y. | + +-------------------------------------------+-----------------------------------------------+ + + + Modify Section 8.13.1 Derivative Functions + + (add to table of derivative functions on p. 181) + + +-------------------------------------------+-----------------------------------------------+ + | Syntax | Description | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type dFdx (genF16Type p) | Returns either dFdxFine(p) or dFdxCoarse(p), | + | | based on implementation choice, presumably | + | | whichever is the faster, or by whichever is | + | | selected in the API through | + | | quality-versus-speed hints. | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type dFdy (genF16Type p) | Returns either dFdyFine(p) or dFdyCoarse(p), | + | | based on implementation choice, presumably | + | | whichever is the faster, or by whichever is | + | | selected in the API through | + | | quality-versus-speed hints. | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type dFdxFine (genF16Type p) | Returns the partial derivative of p with | + | | respect to the window x coordinate. Will use | + | | local differencing based on the value of p | + | | for the current fragment and its immediate | + | | neighbor(s). | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type dFdyFine (genF16Type p) | Returns the partial derivative of p with | + | | respect to the window y coordinate. Will use | + | | local differencing based on the value of p | + | | for the current fragment and its immediate | + | | neighbor(s). | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type dFdxCoarse (genF16Type p) | Returns the partial derivative of p with | + | | respect to the window x coordinate. Will use | + | | local differencing based on the value of p | + | | for the current fragment's neighbors, and | + | | will possibly, but not necessarily, include | + | | the value of p for the current fragment. That | + | | is, over a given area, the implementation can | + | | x compute derivatives in fewer unique | + | | locations than would be allowed for | + | | dFdxFine(p). | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type dFdyCoarse (genF16Type p) | Returns the partial derivative of p with | + | | respect to the window y coordinate. Will use | + | | local differencing based on the value of p | + | | for the current fragment's neighbors, and | + | | will possibly, but not necessarily, include | + | | the value of p for the current fragment. That | + | | is, over a given area, the implementation can | + | | compute y derivatives in fewer unique | + | | locations than would be allowed for | + | | dFdyFine(p). | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type fwidth (genF16Type p) | Returns abs(dFdx(p)) + abs(dFdy(p)). | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type fwidthFine (genF16Type p) | Returns abs(dFdxFine(p)) + abs(dFdyFine(p)). | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type fwidthCoarse (genF16Type p) | Returns abs(dFdxCoarse(p)) + | + | | abs(dFdyCoarse(p)). | + +-------------------------------------------+-----------------------------------------------+ + + + Modify Section 8.13.2 Interpolation Functions + + (add to table of interpolation functions on p. 180) + + +-------------------------------------------+-----------------------------------------------+ + | Syntax | Description | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type interpolateAtCentroid ( | Returns the value of the input interpolant | + | genF16Type interpolant) | sampled at a location inside both the pixel | + | | and the primitive being processed. The value | + | | obtained would be the same value assigned to | + | | the input variable if declared with the | + | | centroid qualifier | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type interpolateAtSample ( | Returns the value of the input interpolant | + | genF16Type interpolant, | variable at the location of sample number | + | int sample) | sample. If multisample buffers are not | + | | available, the input variable will be | + | | evaluated at the center of the pixel. If | + | | sample sample does not exist, the position | + | | used to interpolate the input variable is | + | | undefined. | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type interpolateAtOffset ( | Returns the value of the input interpolant | + | genF16Type interpolant, | variable sampled at an offset from the center | + | f16vec2 offset) | of the pixel specified by offset. The two | + | | floating-point components of offset, give the | + | | offset in pixels in the x and y directions, | + | | respectively. An offset of (0, 0) identifies | + | | the center of the pixel. The range and | + | | granularity of offsets supported by this | + | | function isimplementation-dependent. | + +-------------------------------------------+-----------------------------------------------+ + + + Modify Section 9, Shading Language Grammar for Core Profile + + (add to the list of tokens on p. 187) + + ... + FLOAT16 F16VEC2 F16VEC3 F16VEC4 + F16MAT2 F16MAT3 F16MAT4 + F16MAT2X2 FL6MAT2X3 F16MAT2X4 + F16MAT3X2 F16MAT3X3 F16MAT3X4 + F16MAT4X2 F16MAT4X3 F16MAT4X4 + ... + FLOAT16CONSTANT + + (add to the rule of "primary_expression" on p. 188) + + primary_expression: + ... + FLOAT16CONSTANT + ... + + (add to the rule of "type_specifier_nonarray" on p. 195) + + type_specifier_nonarray: + ... + FLOAT16 + F16VEC2 + F16VEC3 + F16VEC4 + F16MAT2 + F16MAT3 + F16MAT4 + F16MAT2X2 + FL6MAT2X3 + F16MAT2X4 + F16MAT3X2 + F16MAT3X3 + F16MAT3X4 + F16MAT4X2 + F16MAT4X3 + F16MAT4X4 + ... + + +Dependencies on ARB_gpu_shader_int64 + + If the shader enables ARB_gpu_shader_int64, this extension allows + additional explicit conversions between half-precision floating-point + types and 64-bit integer types. + + Modify Section 5.4.1, Conversion and Scalar Constructors + + (add after the first list of constructor examples on p. 95) + + int64_t(float16_t) // convert a float16_t value to a signed 64-bit integer + uint64_t(float16_t) // convert a float16_t value to an unsigned 64-bit integer + float16_t(int64_t) // convert a signed 64-bit integer to a float16_t value + float16_t(uint64_t) // convert an unsigned 64-bit integer to a float16_t value + + +Dependencies on AMD_shader_trinary_minmax + + If the shader enables AMD_shader_trinary_minmax, this extension adds + additional common functions. + + Modify Section 8.3, Common Functions + + (add to the table of common functions on p. 144) + + +-------------------------------------------+-----------------------------------------------+ + | Syntax | Description | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type min3(genF16Type x, | Returns the per-component minimum value of x, | + | genF16Type y, | y, and z. | + | genF16Type z) | | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type max3(genF16Type x, | Returns the per-component maximum value of x, | + | genF16Type y, | y, and z. | + | genF16Type z) | | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type mid3(genF16Type x, | Returns the per-component median value of x, | + | genF16Type y, | y, and z. | + | genF16Type z) | | + +-------------------------------------------+-----------------------------------------------+ + + +Dependencies on AMD_shader_explicit_vertex_parameter + + If the shader enables AMD_shader_explicit_vertex_parameter, this extension + adds additional interpolation functions. + + Modify Section 8.13.2 Interpolation Functions + + (add to table of interpolation functions on p. 180) + + +-------------------------------------------+-----------------------------------------------+ + | Syntax | Description | + +-------------------------------------------+-----------------------------------------------+ + | genF16Type interpolateAtVertexAMD ( | Returns the value of the input | + | genF16Type interpolant, | without any interpolation. i.e. the raw | + | uint vertexIdx) | output value of previous shader stage. | + | | selects for which vertex of the | + | | primitive the value of is | + | | returned. | + | | | + | | This return value is equivalent with | + | | interpolating the input using | + | | the following set of barycentric coordinates, | + | | depending on the value of : | + | | | + | | vertexIdx Barycentric coordinates | + | | 0 I=0, J=0, K=1 | + | | 1 I=1, J=0, K=0 | + | | 2 I=0, J=1, K=0 | + | | | + | | However this order has no association with | + | | the vertex order specified by the application | + | | in the originating draw. | + | | | + | | The value of must be constant | + | | integer expression with a value in the range | + | | [0, 2]. | + +-------------------------------------------+-----------------------------------------------+ + + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + (1) How the functionality in this extension different than the half_precision + floating-point types introduced by NV_gpu_shader5? + + RESOLVED: This extension is designed to be source code compatible with + the half-precison floating-point support in NV_gpu_shader5. However, it + is a functional superset of that, as it adds the following additional + features: + + * support for implicit conversions from int, uint and float to float16_t. + + * support for overloaded versions of the functions, such as abs, sign, min, + max, clamp, and etc., that accept float16_t type or half-precision + floating-point type as parameters. + + (2) What should be done to distinguish half-precison floating-point constants? + + RESOLVED: We will use "HF" and "hf" to identify half-precision + floating-point constants. + + (3) Should we import new uniform API to setup the float16_t type uniform in + default uniform block? + + RESOLVED: No. float16_t isn't a IEEE standard format, CPU doesn't support + it directly. So most data on CPU side is stored in the form of single- or + double-precision floating-point precision floating-point. Uniform*f{v}'s + functionality is extended to support uniforms with float16_t type in this + extension. + + (4) Should we support float16_t types as members of uniform blocks, + shader storage buffer blocks, or as transform feedback varyings? + + RESOLVED: Yes, support all of them. float16_t types will consume two + basic machine units. Some examples: + + struct S { + + float16_t x; // rule 1: align = 2, takes offsets 0-1 + f16vec2 y; // rule 2: align = 4, takes offsets 4-7 + f16vec3 z; // rule 3: align = 8, takes offsets 8-13 + }; + + layout(column_major, std140) uniform B1 { + + float16_t a; // rule 1: align = 2, takes offsets 0-1 + f16vec2 b; // rule 2: align = 4, takes offsets 4-7 + f16vec3 c; // rule 3: align = 8, takes offsets 8-13 + float16_t d[2]; // rule 4: align = 16, array stride = 16, + // takes offsets 16-47 + f16mat2x3 e; // rule 5: align = 16, matrix stride = 16, + // takes offsets 48-79 + f16mat2x3 f[2]; // rule 6: align = 16, matrix stride = 16, + // array stride = 32, f[0] takes + // offsets 80-111, f[1] takes offsets + // 112-143 + S g; // rule 9: align = 16, g.x takes offsets + // 144-145, g.y takes offsets 148-151, + // g.z takes offsets 152-159 + S h[2]; // rule 10: align = 16, array stride = 16, h[0] + // takes offsets 160-175, h[1] takes + // offsets 176-191 + }; + + layout(row_major, std430) buffer B2 { + + float16_t o; // rule 1: align = 2, takes offsets 0-1 + f16vec2 p; // rule 2: align = 4, takes offsets 4-7 + f16vec3 q; // rule 3: align = 8, takes offsets 8-13 + float16_t r[2]; // rule 4: align = 2, array stride = 2, takes + // offsets 14-17 + f16mat2x3 s; // rule 7: align = 4, matrix stride = 4, takes + // offsets 20-31 + f16mat2x3 t[2]; // rule 8: align = 4, matrix stride = 4, array + // stride = 12, t[0] takes offsets + // 32-43, t[1] takes offsets 44-55 + S u; // rule 9: align = 8, u.x takes offsets + // 56-57, u.y takes offsets 60-63, u.z + // takes offsets 64-69 + S v[2]; // rule 10: align = 8, array stride = 16, v[0] + // takes offsets 72-87, v[1] takes + // offsets 88-103 + }; + + (5) In OpenGL ES Shading Language, the format of floating-point in UBO and + SSBO is always single-precision floating-point regardless of the precision + qualifier in shader. which format should be used for this extension? + + RESOLVED: the format should be equal with the type declaried in shader. + i.e. if the block member's type is float16_t, the format in buffer is + half-precision floating-point. and if the block member's type is float, + the format is single-precision floating-point. we will provide another + extension to keep compatible with ES driver's behavior. + + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + 5 09/21/16 dwitczak Fixed minor character encoding issues. + + 4 08/01/16 rexu Correct the example of offset calculation for + block members. Add limitation of xfb_offset when + this qualifier is applied to block members that + have float16_t types. + + 3 07/11/16 rexu Clarify that each component of float16_t types + consume two basic machine units. Remove the + interaction with NV_gpu_shader5 in that implicit + conversion from int, uint and float types to + float16_t types are disallowed now. Add new + derivative functions: dFdxFine, dFdyFine, + dFdxCoarse, dFdyCoarse, fwidthFine, fwidthCoarse. + Add the interaction with AMD_shader_trinary_minmax + and AMD_shader_explicit_vertex_parameter. Remove + two listed issues that are no longer valid for + the updated version of this extension. Remove + floatBitsToInt and decide to add it when + 16-bit integer data type is supported. + + 2 07/06/16 rexu Remove sections that involve half-precision + floating-point opaque types. Modify allowed rules + of implicit conversion relevant to float16_t + types. Add the interaction with ARB_gpu_shader_ + int64. Remove the modification of the first rule + of std140 layout. Provide some examples to + demostrate memory storage layout of uniform + blocks and shader storage blocks when they have + members of float16_t types. + + 1 11/14/13 qlin Initial revision. diff --git a/opengles/extensions/AMD/AMD_gpu_shader_half_float_fetch.txt b/opengles/extensions/AMD/AMD_gpu_shader_half_float_fetch.txt new file mode 100644 index 0000000000..2a1d98c7e5 --- /dev/null +++ b/opengles/extensions/AMD/AMD_gpu_shader_half_float_fetch.txt @@ -0,0 +1,2058 @@ +Name + + AMD_gpu_shader_half_float_fetch + +Name Strings + + GL_AMD_gpu_shader_half_float_fetch + +Contact + + Rex Xu, AMD (rex.xu 'at' amd.com) + +Contributors + + Rex Xu, AMD + Qun Lin, AMD + Daniel Rakos, AMD + Graham Sellers, AMD + Dominik Witczak, AMD + +Status + + Shipping + +Version + + Last Modified Date: 9/20/2017 + Author Revision: 5 + +Number + + 519 + +Dependencies + + This extension is written against the OpenGL 4.5 (Core Profile) Specification. + + This extension is written against version 4.50 of the OpenGL Shading Language Specification. + + OpenGL 4.0 and GLSL 4.00 are required. + + This extension requires AMD_gpu_shader_half_float. + + This extension interacts with ARB_sparse_texture2. + + This extension interacts with ARB_sparse_texture_clamp. + + This extension interacts with KHR_vulkan_glsl. + + This extension interacts with AMD_texture_gather_bias_lod. + +Overview + + This extension was developed based on the AMD_gpu_shader_half_float extension to allow + implementations supporting half-precision floating-point both in shader texture functions and + in shader image memory functions. + +New Procedures and Functions + + None. + +New Tokens + + Returned by the parameter of GetActiveUniform and GetProgramResourceiv: + + (New tokens) + + FLOAT16_SAMPLER_1D_AMD 0x91CE + FLOAT16_SAMPLER_2D_AMD 0x91CF + FLOAT16_SAMPLER_3D_AMD 0x91D0 + FLOAT16_SAMPLER_CUBE_AMD 0x91D1 + FLOAT16_SAMPLER_2D_RECT_AMD 0x91D2 + FLOAT16_SAMPLER_1D_ARRAY_AMD 0x91D3 + FLOAT16_SAMPLER_2D_ARRAY_AMD 0x91D4 + FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD 0x91D5 + FLOAT16_SAMPLER_BUFFER_AMD 0x91D6 + FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD 0x91D7 + FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD 0x91D8 + + FLOAT16_SAMPLER_1D_SHADOW_AMD 0x91D9 + FLOAT16_SAMPLER_2D_SHADOW_AMD 0x91DA + FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD 0x91DB + FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD 0x91DC + FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD 0x91DD + FLOAT16_SAMPLER_CUBE_SHADOW_AMD 0x91DE + FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD 0x91DF + + FLOAT16_IMAGE_1D_AMD 0x91E0 + FLOAT16_IMAGE_2D_AMD 0x91E1 + FLOAT16_IMAGE_3D_AMD 0x91E2 + FLOAT16_IMAGE_2D_RECT_AMD 0x91E3 + FLOAT16_IMAGE_CUBE_AMD 0x91E4 + FLOAT16_IMAGE_1D_ARRAY_AMD 0x91E5 + FLOAT16_IMAGE_2D_ARRAY_AMD 0x91E6 + FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD 0x91E7 + FLOAT16_IMAGE_BUFFER_AMD 0x91E8 + FLOAT16_IMAGE_2D_MULTISAMPLE_AMD 0x91E9 + FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD 0x91EA + +Additions to Chapter 7 of the OpenGL 4.5 (Core Profile) Specification (Program Objects) + + Modify Section 7.3.1, Program Interfaces + + (add to Table 7.3, OpenGL Shading Language type tokens, p. 107) + + +-------------------------------------------+---------------------------+------+------+------+ + | Type Name Token | Keyword |Attrib| Xfb |Buffer| + +-------------------------------------------+---------------------------+------+------+------+ + | FLOAT16_SAMPLER_1D_AMD | f16sampler1D | | | | + | FLOAT16_SAMPLER_2D_AMD | f16sampler2D | | | | + | FLOAT16_SAMPLER_3D_AMD | f16sampler3D | | | | + | FLOAT16_SAMPLER_CUBE_AMD | f16samplerCube | | | | + | FLOAT16_SAMPLER_2D_RECT_AMD | f16sampler2DRect | | | | + | FLOAT16_SAMPLER_1D_ARRAY_AMD | f16sampler1DArray | | | | + | FLOAT16_SAMPLER_2D_ARRAY_AMD | f16sampler2DArray | | | | + | FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD | f16sampler1DArray | | | | + | FLOAT16_SAMPLER_BUFFER_AMD | f16samplerBuffer | | | | + | FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD | f16sampler2DMS | | | | + | FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD | f16sampler2DMSArray | | | | + | FLOAT16_SAMPLER_1D_SHADOW_AMD | f16sampler1DShadow | | | | + | FLOAT16_SAMPLER_2D_SHADOW_AMD | f16sampler2DShadow | | | | + | FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD | f16sampler2DRectShadow | | | | + | FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD | f16sampler1DArrayShaow | | | | + | FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD | f16sampler2DArrayShadow | | | | + | FLOAT16_SAMPLER_CUBE_SHADOW_AMD | f16samplerCubeShadow | | | | + | FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD | f16samplerCubeArrayShadow | | | | + | FLOAT16_IMAGE_1D_AMD | f16image1D | | | | + | FLOAT16_IMAGE_2D_AMD | f16image2D | | | | + | FLOAT16_IMAGE_3D_AMD | f16image3D | | | | + | FLOAT16_IMAGE_2D_RECT_AMD | f16image2DRect | | | | + | FLOAT16_IMAGE_CUBE_AMD | f16imageCube | | | | + | FLOAT16_IMAGE_1D_ARRAY_AMD | f16image1DArray | | | | + | FLOAT16_IMAGE_2D_ARRAY_AMD | f16image2DArray | | | | + | FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD | f16imageCubeArray | | | | + | FLOAT16_IMAGE_BUFFER_AMD | f16imageBuffer | | | | + | FLOAT16_IMAGE_2D_MULTISAMPLE_AMD | f16image2DMS | | | | + | FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD | f16image2DMSArray | | | | + +-------------------------------------------+---------------------------+------+------+------+ + +Modifications to the OpenGL Shading Language Specification, Version 4.50 + + Including the following line in a shader can be used to control the language features described + in this extension: + + #extension GL_AMD_gpu_shader_half_float_fetch : + + where is as specified in section 3.3. + + New preprocessor #defines are added to the OpenGL Shading Language: + + #define GL_AMD_gpu_shader_half_float_fetch 1 + +Additions to Chapter 3 of the OpenGL Shading Language Specification (Basics) + + Modify Section 3.6, Keywords + + (add the following to the list of reserved keywords at p. 18) + + f16sampler1D f16sampler2D f16sampler3D f16sampler2DRect f16samplerCube + f16sampler1DArray f16sampler2DArray f16samplerCubeArray + f16samplerBuffer f16sampler2DMS f16sampler2DMSArray + f16sampler1DShadow f16sampler2DShadow f16sampler1DArrayShadow f16sampler2DArrayShadow + f16sampler2DRectShadow f16samplerCubeShadow f16samplerCubeArrayShadow + f16image1D f16image2D f16image3D f16image2DRect + f16imageCube f16image1DArray f16image2DArray f16imageCubeArray + f16imageBuffer f16image2DMS f16image2DMSArray + +Additions to Chapter 4 of the OpenGL Shading Language Specification (Variables and Types) + + Modify Section 4.1, Basic Types + + (insert new types, interleaved with the existing types, to the "Type" table cell of the table + "Floating-Point Opaque Types", p. 23) + + +---------------------------+-----------------------------------------------------------------+ + | Type | Meaning | + +---------------------------+-----------------------------------------------------------------+ + | f16sampler1D | a handle for accessing a 1D texture (the result is half- | + | f16image1D | precision if it is floating-point typed) | + | f16sampler2D | a handle for accessing a 2D texture (the result is half- | + | f16image2D | precision if it is floating-point typed) | + | f16sampler3D | a handle for accessing a 3D texture (the result is half- | + | f16image3D | precision if it is floating-point typed) | + | f16samplerCube | a handle for accessing a cube mapped texture (the result is | + | f16imageCube | half-precision if it is floating-point typed) | + | f16sampler2DRect | a handle for accessing a rectangle texture (the result is half- | + | f16image2DRect | precision if it is floating-point typed) | + | f16sampler1DArray | a handle for accessing a 1D array texture (the result is half- | + | f16image1DArray | precision if it is floating-point typed) | + | f16sampler2DArray | a handle for accessing a 2D array texture (the result is half- | + | f16image2DArray | precision if it is floating-point typed) | + | f16samplerBuffer | a handle for accessing a buffer texture (the result is half- | + | f16imageBuffer | precision if it is floating-point typed) | + | f16sampler2DMS | a handle for accessing a 2D multi-sample texture (the result is | + | f16image2DMS | half-precision if it is floating-point typed) | + | f16sampler2DMSArray | a handle for accessing a 2D multi-sample array texture (the | + | f16image2DMSArray | result is half-precision if it is floating-point typed) | + | f16samplerCubeArray | a handle for accessing a cube map array texture (the result is | + | f16imageCubeArray | half-precision if it is floating-point typed) | + | f16sampler1DShadow | a handle for accessing a 1D depth texture with comparison (the | + | | result is half-precision if it is floating-point typed) | + | f16sampler2DShadow | a handle for accessing a 2D depth texture with comparison (the | + | | result is half-precision if it is floating-point typed) | + | f16sampler2DRectShadow | a handle for accessing a rectangle texture with comparison (the | + | | result is half-precision if it is floating-point typed) | + | f16sampler1DArrayShadow | a handle for accessing a 1D array depth texture with comparison | + | | (the result is half-precision if it is floating-point typed) | + | f16sampler2DArrayShadow | a handle for accessing a 2D array depth texture with comparison | + | | (the result is half-precision if it is floating-point typed) | + | f16samplerCubeShadow | a handle for accessing a cube map depth texture with comparison | + | | (the result is half-precision if it is floating-point typed) | + | f16samplerCubeArrayShadow | a handle for accessing a cube map array depth texture with | + | | comparison (the result is half-precision if it is floating-point| + | | typed) | + +---------------------------+-----------------------------------------------------------------+ + + Modify Section 4.4.6.2 Format Layout Qualifiers + + (modify the third sentence of the first paragraph on p. 83) + + ... any image variable declaration. For image variables with floating-point component types + (keywords starting with "image" or "f16image"), signed integer component types (keywords + starting with "iimage"), or unsigned integer component types (keywords starting with "uimage"), + the format qualifier used must match the float-image-format-qualifier, int-image-format- + qualifier, or uint-image-format-qualifier grammar rules, respectively. + +Additions to Chapter 8 of the OpenGL Shading Language Specification (Built-in Functions) + + Modify Section 8.9 Texture Functions + + (modify the second paragraph on p. 160) + + Texture data can be stored by the GL as floating point, unsigned normalized integer, unsigned + integer or signed integer data. This is determined by the type of the internal format of the + texture. Texture lookups on unsigned normalized integer and floating-point data return single- + precision or half-precision floating-point values in the range [0, 1]. + + (modify table head on p. 160) + + +------------------+-------------------------------------+----------------+------------------+ + | Internal Texture | Single-Precision or Half-Precision | Signed Integer | Unsigned Integer | + | Format | Floating Point Sampler Types | Sampler Types | Sampler Types | + +------------------+-------------------------------------+----------------+------------------+ + + (modify the third sentence of the fourth paragraph on p. 160) + + ... a uvec4. If a single-precision floating-point sampler type is used, the result of a texture + lookup is a vec4. If a half-precision floating-point sampler type is used, the result of a + texture lookup is a f16vec4. + + In the prototypes below, the "g" in the return type "gvec4" is used as a placeholder for + nothing, "f16", "i", or "u" making a return type of vec4, f16vec4, ivec4, uvec4. In these + cases, the sampler argument type also starts with "g", indicating the same substitution done on + the return type; it is either a single-precision floating point, half-precision floating point, + signed integer, or unsigned integer sampler, matching the basic type of the return type, as + described above. + + Modify Section 8.9.1 Texture Query Functions + + (insert new functions, whose prototypes are different from those existing ones, to the "Syntax" + table cell of each query function group on p. 162-163) + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | int textureSize(f16sampler1DShadow sampler, int lod) | Returns the dimensions of | + | ivec2 textureSize(f16sampler2DShadow sampler, int lod) | level (if present) for | + | ivec2 textureSize(f16samplerCubeShadow sampler, int lod) | the texture bound to sampler,| + | ivec3 textureSize(f16samplerCubeArrayShadow sampler, int lod)| ... | + | ivec2 textureSize(f16sampler2DRectShadow sampler) | | + | ivec2 textureSize(f16sampler1DArrayShadow sampler, int lod) | | + | ivec3 textureSize(f16sampler2DArrayShadow sampler, int lod) | | + +--------------------------------------------------------------+------------------------------+ + | vec2 textureQueryLod(f16sampler1D sampler, float16_t P) | Returns the mipmap array(s) | + | vec2 textureQueryLod(f16sampler2D sampler, f16vec2 P) | that would be accessed in the| + | vec2 textureQueryLod(f16sampler3D sampler, f16vec3 P) | x component of the return | + | vec2 textureQueryLod(f16samplerCube sampler, f16vec3 P) | value. | + | vec2 textureQueryLod(f16sampler1DArray sampler, | ... | + | float16_t P) | | + | vec2 textureQueryLod(f16sampler2DArray sampler, f16vec2 P) | | + | vec2 textureQueryLod(f16samplerCubeArray sampler, | | + | f16vec3 P) | | + | vec2 textureQueryLod(f16sampler1DShadow sampler, | | + | float16_t P) | | + | vec2 textureQueryLod(f16sampler2DShadow sampler, | | + | f16vec2 P) | | + | vec2 textureQueryLod(f16samplerCubeShadow sampler, | | + | f16vec3 P) | | + | vec2 textureQueryLod(f16sampler1DArrayShadow sampler, | | + | float16_t P) | | + | vec2 textureQueryLod(f16sampler2DArrayShadow sampler, | | + | f16vec2 P) | | + | vec2 textureQueryLod(f16samplerCubeArrayShadow sampler, | | + | f16vec3 P) | | + +--------------------------------------------------------------+------------------------------+ + | int textureQueryLevels(f16sampler1DShadow sampler) | Returns the number of mipmap | + | int textureQueryLevels(f16sampler2DShadow sampler) | levels accessible in the | + | int textureQueryLevels(f16samplerCubeShadow sampler) | texture associated with | + | int textureQueryLevels(f16sampler1DArrayShadow sampler) | sampler, ... | + | int textureQueryLevels(f16sampler2DArrayShadow sampler) | | + | int textureQueryLevels(f16samplerCubeArrayShadow sampler) | | + +--------------------------------------------------------------+------------------------------+ + + Modify Section 8.9.2 Texel Lookup Functions + + (insert new functions, whose prototypes are different from those existing ones, to the "Syntax" + table cell of each lookup function group, and modify certain descriptions in the "Description" + table cells of texture() and textureProj() on p. 164-170) + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 texture(f16sampler1D sampler, float16_t P | Use the texture coordinate P | + | [, float16_t bias]) | to do a texture lookup in the| + | f16vec4 texture(f16sampler2D sampler, f16vec2 P | texture currently bound to | + | [, float16_t bias]) | . | + | f16vec4 texture(f16sampler3D sampler, f16vec3 P | | + | [, float16_t bias]) | For shadow forms: When | + | f16vec4 texture(f16samplerCube sampler, f16vec3 P | is present, it is | + | [, float16_t bias]) | used as , and the array| + | float16_t texture(f16sampler1DShadow sampler, vec3 P | layer comes from the last | + | [, float bias]) | component of

. When | + | float16_t texture(f16sampler1DShadow sampler, f16vec2 P, | is not present, the| + | float compare [, float16_t bias]) | last component of

is used| + | float16_t texture(f16sampler2DShadow sampler, vec3 P | as and the array layer| + | [, float bias]) | comes from the second to last| + | float16_t texture(f16sampler2DShadow sampler, f16vec2 P, | component of

. | + | float compare [, float16_t bias]) | | + | float16_t texture(f16samplerCubeShadow sampler, vec4 P | ... | + | [, float bias]) | | + | float16_t texture(f16samplerCubeShadow sampler, f16vec3 P, | | + | float compare [, float16_t bias]) | | + | f16vec4 texture(f16sampler1DArray sampler, f16vec2 P | | + | [, float16_t bias]) | | + | f16vec4 texture(f16sampler2DArray sampler, f16vec3 P | | + | [, float16_t bias]) | | + | f16vec4 texture(f16samplerCubeArray sampler, f16vec4 P | | + | [, float16_t bias]) | | + | float16_t texture(f16sampler1DArrayShadow sampler, vec3 P | | + | [, float bias]) | | + | float16_t texture(f16sampler1DArrayShadow sampler, f16vec2 P,| | + | float compare [, float16_t bias]) | | + | float16_t texture(f16sampler2DArrayShadow sampler, vec4 P) | | + | float16_t texture(f16sampler2DArrayShadow sampler, f16vec3 P,| | + | float compare) | | + | f16vec4 texture(f16sampler2DRect sampler, f16vec2 P) | | + | float16_t texture(f16sampler2DRectShadow sampler, vec3 P) | | + | float16_t texture(f16sampler2DRectShadow sampler, f16vec2 P, | | + | float compare) | | + | float16_t texture(f16samplerCubeArrayShadow sampler, vec4 P, | | + | float compare) | | + | float16_t texture(f16samplerCubeArrayShadow sampler, | | + | f16vec4 P, float compare) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureProj(f16sampler1D sampler, f16vec2 P | Do a texture lookup with | + | [, float16_t bias]) | projection. The texture | + | f16vec4 textureProj(f16sampler1D sampler, f16vec4 P | coordinates consumed from | + | [, float16_t bias]) |

, not including the last | + | f16vec4 textureProj(f16sampler2D sampler, f16vec3 P | component of

, and | + | [, float16_t bias]) | , if present in the | + | f16vec4 textureProj(f16sampler2D sampler, f16vec4 P | shadow forms, are divided by | + | [, float16_t bias]) | the last component of

. | + | f16vec4 textureProj(f16sampler3D sampler, f16vec4 P | When present in the shadow | + | [, float16_t bias]) | forms, the resulting | + | float16_t textureProj(f16sampler1DShadow sampler, vec4 P | is used as Dref. | + | [, float bias]) | When is not | + | float16_t textureProj(f16sampler1DShadow sampler, f16vec3 P | present, the resulting 3rd | + | float compare [, float16_t bias]) | component of

in the | + | float16_t textureProj(f16sampler2DShadow sampler, vec4 P | shadow forms is used as | + | [, float bias]) | . After these values | + | float16_t textureProj(f16sampler2DShadow sampler, f16vec3 P | are computed, texture lookup | + | float compare [, float16_t bias]) | proceeds as in texture(). | + | f16vec4 textureProj(f16sampler2DRect sampler, f16vec3 P) | | + | f16vec4 textureProj(f16sampler2DRect sampler, f16vec4 P) | | + | float16_t textureProj(f16sampler2DRectShadow sampler, vec4 P)| | + | float16_t textureProj(f16sampler2DRectShadow sampler, | | + | f16vec3 P, float compare) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureLod(f16sampler1D sampler, float16_t P, | Do a texture lookup as in | + | float16_t lod) | texture() but with explicit | + | f16vec4 textureLod(f16sampler2D sampler, f16vec2 P, | LOD; ... | + | float16_t lod) | | + | f16vec4 textureLod(f16sampler3D sampler, f16vec3 P, | | + | float16_t lod) | | + | f16vec4 textureLod(f16samplerCube sampler, f16vec3 P, | | + | float16_t lod) | | + | float16_t textureLod(f16sampler1DShadow sampler, vec3 P, | | + | float lod) | | + | float16_t textureLod(f16sampler1DShadow sampler, f16vec2 P, | | + | float compare, float16_t lod) | | + | float16_t textureLod(f16sampler2DShadow sampler, vec3 P, | | + | float lod) | | + | float16_t textureLod(f16sampler2DShadow sampler, f16vec2 P, | | + | float compare, float16_t lod) | | + | f16vec4 textureLod(f16sampler1DArray sampler, f16vec2 P, | | + | float16_t lod) | | + | f16vec4 textureLod(f16sampler2DArray sampler, f16vec3 P, | | + | float16_t lod) | | + | float16_t textureLod(f16sampler1DArrayShadow sampler, vec3 P,| | + | float lod) | | + | float16_t textureLod(f16sampler1DArrayShadow sampler, | | + | f16vec2 P, float compare, float16_t lod)| | + | f16vec4 textureLod(f16samplerCubeArray sampler, f16vec4 P, | | + | float16_t lod) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureOffset(f16sampler1D sampler, float16_t P, | Do a texture lookup as in | + | int offset [, float16_t bias]) | texture() but with | + | f16vec4 textureOffset(f16sampler2D sampler, f16vec2 P, | added to the (u,v,w) texel | + | ivec2 offset [, float16_t bias]) | coordinates before looking up| + | f16vec4 textureOffset(f16sampler3D sampler, f16vec3 P, | each texel. ... | + | ivec3 offset [, float16_t bias]) | | + | f16vec4 textureOffset(f16sampler2DRect sampler, f16vec2 P, | | + | ivec2 offset) | | + | float16_t textureOffset(f16sampler2DRectShadow sampler, | | + | vec3 P, ivec2 offset) | | + | float16_t textureOffset(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float compare, | | + | ivec2 offset) | | + | float16_t textureOffset(f16sampler1DShadow sampler, vec3 P, | | + | int offset [, float bias]) | | + | float16_t textureOffset(f16sampler1DShadow sampler, | | + | f16vec2 P, float compare, int offset | | + | [, float16_t bias]) | | + | float16_t textureOffset(f16sampler2DShadow sampler, vec3 P, | | + | ivec2 offset [, float bias]) | | + | float16_t textureOffset(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | ivec2 offset [, float16_t bias]) | | + | f16vec4 textureOffset(f16sampler1DArray sampler, f16vec2 P,| | + | int offset [, float16_t bias]) | | + | f16vec4 textureOffset(f16sampler2DArray sampler, f16vec3 P,| | + | ivec2 offset [, float16_t bias]) | | + | float16_t textureOffset(f16sampler1DArrayShadow sampler, | | + | vec3 P, int offset [, float bias]) | | + | float16_t textureOffset(f16sampler1DArrayShadow sampler, | | + | f16vec2 P, float compare, int offset | | + | [, float16_t bias]) | | + | float16_t textureOffset(f16sampler2DArrayShadow sampler, | | + | vec4 P, ivec2 offset) | | + | float16_t textureOffset(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float compare, | | + | ivec2 offset) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureProjOffset(f16sampler1D sampler, f16vec2 P, | Do a projective texture | + | int offset [, float16_t bias]) | lookup as described in | + | f16vec4 textureProjOffset(f16sampler1D sampler, f16vec4 P, | textureProj() offset by | + | int offset [, float16_t bias]) | as described in | + | f16vec4 textureProjOffset(f16sampler2D sampler, f16vec3 P, | textureOffset(). | + | ivec2 offset [, float16_t bias]) | | + | f16vec4 textureProjOffset(f16sampler2D sampler, f16vec4 P, | | + | ivec2 offset [, float16_t bias]) | | + | f16vec4 textureProjOffset(f16sampler3D sampler, f16vec4 P, | | + | ivec3 offset [, float16_t bias]) | | + | f16vec4 textureProjOffset(f16sampler2DRect sampler, | | + | f16vec3 P, ivec2 offset) | | + | f16vec4 textureProjOffset(f16sampler2DRect sampler, | | + | f16vec4 P, ivec2 offset) | | + | float16_t textureProjOffset(f16sampler2DRectShadow sampler, | | + | vec4 P, ivec2 offset) | | + | float16_t textureProjOffset(f16sampler2DRectShadow sampler, | | + | f16vec3 P, float compare, | | + | ivec2 offset) | | + | float16_t textureProjOffset(f16sampler1DShadow sampler, | | + | vec4 P, int offset | | + | [, float bias]) | | + | float16_t textureProjOffset(f16sampler1DShadow sampler, | | + | f16vec3 P, float compare, | | + | int offset [, float16_t bias]) | | + | float16_t textureProjOffset(f16sampler2DShadow sampler, | | + | vec4 P, ivec2 offset | | + | [, float bias]) | | + | float16_t textureProjOffset(f16sampler2DShadow sampler, | | + | f16vec3 P, float compare, | | + | ivec2 offset [, float16_t bias]) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureLodOffset(f16sampler1D sampler, float16_t P,| Do an offset texture lookup | + | float16_t lod, int offset) | with explicit LOD. ... | + | f16vec4 textureLodOffset(f16sampler2D sampler, f16vec2 P, | | + | float16_t lod, ivec2 offset) | | + | f16vec4 textureLodOffset(f16sampler3D sampler, f16vec3 P, | | + | float16_t lod, ivec3 offset) | | + | float16_t textureLodOffset(f16sampler1DShadow sampler, | | + | vec3 P, float lod, int offset) | | + | float16_t textureLodOffset(f16sampler1DShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t lod, int offset) | | + | float16_t textureLodOffset(f16sampler2DShadow sampler, | | + | vec3 P, float lod, ivec2 offset) | | + | float16_t textureLodOffset(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t lod, ivec2 offset) | | + | f16vec4 textureLodOffset(f16sampler1DArray sampler, | | + | f16vec2 P, float16_t lod, | | + | int offset) | | + | f16vec4 textureLodOffset(f16sampler2DArray sampler, | | + | f16vec3 P, float16_t lod, | | + | ivec2 offset) | | + | float16_t textureLodOffset(f16sampler1DArrayShadow sampler, | | + | vec3 P, float lod, int offset) | | + | float16_t textureLodOffset(f16sampler1DArrayShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t lod, int offset) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureProjLod(f16sampler1D sampler, f16vec2 P, | Do a projective texture | + | float16_t lod) | lookup with explicit LOD. ...| + | f16vec4 textureProjLod(f16sampler1D sampler, f16vec4 P, | | + | float16_t lod) | | + | f16vec4 textureProjLod(f16sampler2D sampler, f16vec3 P, | | + | float16_t lod) | | + | f16vec4 textureProjLod(f16sampler2D sampler, f16vec4 P, | | + | float16_t lod) | | + | f16vec4 textureProjLod(f16sampler3D sampler, f16vec4 P, | | + | float16_t lod) | | + | float16_t textureProjLod(f16sampler1DShadow sampler, vec4 P, | | + | float lod) | | + | float16_t textureProjLod(f16sampler1DShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t lod) | | + | float16_t textureProjLod(f16sampler2DShadow sampler, vec4 P, | | + | float lod) | | + | float16_t textureProjLod(f16sampler2DShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t lod) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureProjLodOffset(f16sampler1D sampler, | Do a offset projective | + | f16vec2 P, float16_t lod, | texture lookup with explicit | + | int offset) | LOD. ... | + | f16vec4 textureProjLodOffset(f16sampler1D sampler, | | + | f16vec4 P, float16_t lod, | | + | int offset) | | + | f16vec4 textureProjLodOffset(f16sampler2D sampler, | | + | f16vec3 P, float16_t lod, | | + | ivec2 offset) | | + | f16vec4 textureProjLodOffset(f16sampler2D sampler, | | + | f16vec4 P, float16_t lod, | | + | ivec2 offset) | | + | f16vec4 textureProjLodOffset(f16sampler3D sampler, | | + | f16vec4 P, float16_t lod, | | + | ivec3 offset) | | + | float16_t textureProjLodOffset(f16sampler1DShadow sampler, | | + | vec4 P, float lod, int offset)| | + | float16_t textureProjLodOffset(f16sampler1DShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t lod, int offset) | | + | float16_t textureProjLodOffset(f16sampler2DShadow sampler, | | + | vec4 P, float lod, | | + | ivec2 offset) | | + | float16_t textureProjLodOffset(f16sampler2DShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t lod, ivec2 offset) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGrad(f16sampler1D sampler, float16_t P, | Do a texture lookup as in | + | float16_t dPdx, float16_t dPdy) | texture() but with explicit | + | f16vec4 textureGrad(f16sampler2D sampler, f16vec2 P, | gradients. ... | + | f16vec2 dPdx, f16vec2 dPdy) | | + | f16vec4 textureGrad(f16sampler3D sampler, f16vec3 P, | | + | f16vec3 dPdx, f16vec3 dPdy) | | + | f16vec4 textureGrad(f16samplerCube sampler, f16vec3 P, | | + | f16vec3 dPdx, f16vec3 dPdy) | | + | f16vec4 textureGrad(f16sampler2DRect sampler, f16vec2 P, | | + | f16vec2 dPdx, f16vec2 dPdy) | | + | float16_t textureGrad(f16sampler2DRectShadow sampler, vec3 P,| | + | vec2 dPdx, vec2 dPdy) | | + | float16_t textureGrad(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float compare, f16vec2 dPdx,| | + | f16vec2 dPdy) | | + | float16_t textureGrad(f16sampler1DShadow sampler, vec3 P, | | + | float dPdx, float dPdy) | | + | float16_t textureGrad(f16sampler1DShadow sampler, f16vec2 P, | | + | float compare, float16_t dPdx, | | + | float16_t dPdy) | | + | float16_t textureGrad(f16sampler2DShadow sampler, vec3 P, | | + | vec2 dPdx, vec2 dPdy) | | + | float16_t textureGrad(f16sampler2DShadow sampler, f16vec2 P, | | + | float compare, f16vec2 dPdx, | | + | f16vec2 dPdy) | | + | float16_t textureGrad(f16samplerCubeShadow sampler, vec4 P, | | + | vec3 dPdx, vec3 dPdy) | | + | float16_t textureGrad(f16samplerCubeShadow sampler, | | + | f16vec3 P, float compare, f16vec3 dPdx,| | + | f16vec3 dPdy) | | + | f16vec4 textureGrad(f16sampler1DArray sampler, f16vec2 P, | | + | float16_t dPdx, float16_t dPdy) | | + | f16vec4 textureGrad(f16sampler2DArray sampler, f16vec3 P, | | + | f16vec2 dPdx, f16vec2 dPdy) | | + | float16_t textureGrad(f16sampler1DArrayShadow sampler, | | + | vec3 P, float dPdx, float dPdy) | | + | float16_t textureGrad(f16sampler1DArrayShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t dPdx, float16_t dPdy) | | + | float16_t textureGrad(f16sampler2DArrayShadow sampler, | | + | vec4 P, vec2 dPdx, vec2 dPdy) | | + | float16_t textureGrad(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float compare, f16vec2 dPdx,| | + | f16vec2 dPdy) | | + | f16vec4 textureGrad(f16samplerCubeArray sampler, | | + | f16vec4 P, f16vec3 dPdx, f16vec3 dPdy) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGradOffset(f16sampler1D sampler, | Do a texture lookup with both| + | float16_t P, float16_t dPdx, | explicit gradient and offset,| + | float16_t dPdy, int offset) | as described in textureGrad()| + | f16vec4 textureGradOffset(f16sampler2D sampler, f16vec2 P, | and textureOffset(). | + | f16vec2 dPdx, f16vec2 dPdy, | | + | ivec2 offset) | | + | f16vec4 textureGradOffset(f16sampler3D sampler, f16vec3 P, | | + | f16vec3 dPdx, f16vec3 dPdy, | | + | ivec3 offset) | | + | f16vec4 textureGradOffset(f16sampler2DRect sampler, | | + | f16vec2 P, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset) | | + | float16_t textureGradOffset(f16sampler2DRectShadow sampler, | | + | vec3 P, vec2 dPdx, vec2 dPdy, | | + | ivec2 offset) | | + | float16_t textureGradOffset(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | ivec2 offset) | | + | float16_t textureGradOffset(f16sampler1DShadow sampler, | | + | vec3 P, float dPdx, float dPdy, | | + | int offset) | | + | float16_t textureGradOffset(f16sampler1DShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t dPdx, float16_t dPdy, | | + | int offset) | | + | float16_t textureGradOffset(f16sampler2DShadow sampler, | | + | vec3 P, vec2 dPdx, vec2 dPdy, | | + | ivec2 offset) | | + | float16_t textureGradOffset(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | ivec2 offset) | | + | f16vec4 textureGradOffset(f16sampler1DArray sampler, | | + | f16vec2 P, float16_t dPdx, | | + | float16_t dPdy, int offset) | | + | f16vec4 textureGradOffset(f16sampler2DArray sampler, | | + | f16vec3 P, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset) | | + | float16_t textureGradOffset(f16sampler1DArrayShadow sampler, | | + | vec3 P, float dPdx, float dPdy, | | + | int offset) | | + | float16_t textureGradOffset(f16sampler1DArrayShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t dPdx, float16_t dPdy, | | + | int offset) | | + | float16_t textureGradOffset(f16sampler2DArrayShadow sampler, | | + | vec4 P, vec2 dPdx, vec2 dPdy, | | + | ivec2 offset) | | + | float16_t textureGradOffset(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | ivec2 offset) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureProjGrad(f16sampler1D sampler, f16vec2 P, | Do a texture lookup both | + | float16_t dPdx, float16_t dPdy) | projectively, as described in| + | f16vec4 textureProjGrad(f16sampler1D sampler, f16vec4 P, | textureProj(), and with | + | float16_t dPdx, float16_t dPdy) | explicit gradient as | + | f16vec4 textureProjGrad(f16sampler2D sampler, f16vec3 P, | described in textureGrad(). | + | f16vec2 dPdx, f16vec2 dPdy) | ... | + | f16vec4 textureProjGrad(f16sampler2D sampler, f16vec4 P, | | + | f16vec2 dPdx, f16vec2 dPdy) | | + | f16vec4 textureProjGrad(f16sampler3D sampler, f16vec4 P, | | + | f16vec3 dPdx, f16vec3 dPdy) | | + | f16vec4 textureProjGrad(f16sampler2DRect sampler, | | + | f16vec3 P, f16vec2 dPdx, | | + | f16vec2 dPdy) | | + | f16vec4 textureProjGrad(f16sampler2DRect sampler, | | + | f16vec4 P, f16vec2 dPdx, | | + | f16vec2 dPdy) | | + | float16_t textureProjGrad(f16sampler2DRectShadow sampler, | | + | vec4 P, vec2 dPdx, vec2 dPdy) | | + | float16_t textureProjGrad(f16sampler2DRectShadow sampler, | | + | f16vec3 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy) | | + | float16_t textureProjGrad(f16sampler1DShadow sampler, vec4 P,| | + | float dPdx, float dPdy) | | + | float16_t textureProjGrad(f16sampler1DShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t dPdx, float16_t dPdy) | | + | float16_t textureProjGrad(f16sampler2DShadow sampler, vec4 P,| | + | vec2 dPdx, vec2 dPdy) | | + | float16_t textureProjGrad(f16sampler2DShadow sampler, | | + | f16vec3 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureProjGradOffset(f16sampler1D sampler, | Do a texture lookup | + | f16vec2 P, float16_t dPdx, | projectively and with | + | float16_t dPdy, int offset) | explicit gradient as | + | f16vec4 textureProjGradOffset(f16sampler1D sampler, | described in | + | f16vec4 P, float16_t dPdx, | textureProjGrad(), as well as| + | float16_t dPdy, int offset) | with offset, as described in | + | f16vec4 textureProjGradOffset(f16sampler2D sampler, | textureOffset(). | + | f16vec3 P, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset) | | + | f16vec4 textureProjGradOffset(f16sampler2D sampler, | | + | f16vec4 P, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset) | | + | f16vec4 textureProjGradOffset(f16sampler2DRect sampler, | | + | f16vec3 P, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset) | | + | f16vec4 textureProjGradOffset(f16sampler2DRect sampler, | | + | f16vec4 P, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset) | | + | float16_t textureProjGradOffset(f16sampler2DRectShadow | | + | sampler, vec4 P, vec2 dPdx, | | + | vec2 dPdy, ivec2 offset) | | + | float16_t textureProjGradOffset(f16sampler2DRectShadow | | + | sampler, f16vec3 P, | | + | float compare, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset) | | + | f16vec4 textureProjGradOffset(f16sampler3D sampler, | | + | f16vec4 P, f16vec3 dPdx, | | + | f16vec3 dPdy, ivec3 offset) | | + | float16_t textureProjGradOffset(f16sampler1DShadow sampler, | | + | vec4 P, float dPdx, | | + | float dPdy, int offset) | | + | float16_t textureProjGradOffset(f16sampler1DShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t dPdx, | | + | float16_t dPdy, int offset) | | + | float16_t textureProjGradOffset(f16sampler2DShadow sampler, | | + | vec4 P, vec2 dPdx, vec2 dPdy,| | + | ivec2 offset) | | + | float16_t textureProjGradOffset(f16sampler2DShadow sampler, | | + | f16vec3 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | ivec2 offset) | | + +--------------------------------------------------------------+------------------------------+ + + Modify Section 8.9.3 Texture Gather Functions + + (modify the first sentence of the first paragraph on p. 170) + + The texture gather functions take components of a single or half floating-point vector operand + as a texture coordinate, determine a set of four texels to sample from the base level of detail + of the specified texture image, and return one component from each texel in a four-component + result vector. + + (insert new functions, whose prototypes are different from those existing ones, to the "Syntax" + table cell of each gather function group on p. 171-172) + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGather(f16sampler2D sampler, f16vec2 P | Returns the value | + | [, int comp]) | | + | f16vec4 textureGather(f16sampler2DArray sampler, f16vec3 P | gvec4( | + | [, int comp]) | Sample_i0_j1(P, base).comp,| + | f16vec4 textureGather(f16samplerCube sampler, f16vec3 P | Sample_i1_j1(P, base).comp,| + | [, int comp]) | Sample_i1_j0(P, base).comp,| + | f16vec4 textureGather(f16samplerCubeArray sampler, f16vec4 P | Sample_i0_j0(P, base).comp)| + | [, int comp]) | ... | + | f16vec4 textureGather(f16sampler2DRect sampler, f16vec2 P | | + | [, int comp]) | | + | f16vec4 textureGather(f16sampler2DShadow sampler, vec2 P, | | + | float refZ) | | + | f16vec4 textureGather(f16sampler2DShadow sampler, f16vec2 P, | | + | float refZ) | | + | f16vec4 textureGather(f16sampler2DArrayShadow sampler, | | + | vec3 P, float refZ) | | + | f16vec4 textureGather(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float refZ) | | + | f16vec4 textureGather(f16samplerCubeShadow sampler, vec3 P, | | + | float refZ) | | + | f16vec4 textureGather(f16samplerCubeShadow sampler, | | + | f16vec3 P, float refZ) | | + | f16vec4 textureGather(f16samplerCubeArrayShadow sampler, | | + | vec4 P, float refZ) | | + | f16vec4 textureGather(f16samplerCubeArrayShadow sampler, | | + | f16vec4 P, float refZ) | | + | f16vec4 textureGather(f16sampler2DRectShadow sampler, vec2 P,| | + | float refZ) | | + | f16vec4 textureGather(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float refZ) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGatherOffset(f16sampler2D sampler, f16vec2 P, | Perform a texture gather | + | ivec2 offset [, int comp]) | operation as in | + | f16vec4 textureGatherOffset(f16sampler2DArray sampler, | textureGather() by | + | f16vec3 P, ivec2 offset | as described in | + | [, int comp]) | textureOffset() except that | + | f16vec4 textureGatherOffset(f16sampler2DRect sampler, | the can be variable | + | f16vec2 P, ivec2 offset | (non constant) and ... | + | [, int comp]) | | + | f16vec4 textureGatherOffset(f16sampler2DShadow sampler, | | + | vec2 P, float refZ, ivec2 offset)| | + | f16vec4 textureGatherOffset(f16sampler2DShadow sampler, | | + | f16vec2 P, float refZ, | | + | ivec2 offset) | | + | f16vec4 textureGatherOffset(f16sampler2DArrayShadow sampler, | | + | vec3 P, float refZ, ivec2 offset)| | + | f16vec4 textureGatherOffset(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float refZ, | | + | ivec2 offset) | | + | f16vec4 textureGatherOffset(f16sampler2DRectShadow sampler, | | + | vec2 P, float refZ, ivec2 offset)| | + | f16vec4 textureGatherOffset(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float refZ, | | + | ivec2 offset) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGatherOffsets(f16sampler2D sampler, f16vec2 P,| Operate identically to | + | ivec2 offsets[4] [, int comp]) | textureGatherOffset() except | + | f16vec4 textureGatherOffsets(f16sampler2DArray sampler, | that is used to | + | f16vec3 P, ivec2 offsets[4] | determine the location of the| + | [, int comp]) | four texels to sample. ... | + | f16vec4 textureGatherOffsets(f16sampler2DRect sampler, | | + | f16vec2 P, ivec2 offsets[4] | | + | [, int comp]) | | + | f16vec4 textureGatherOffsets(f16sampler2DShadow sampler, | | + | vec2 P, float refZ, ivec2 | | + | offsets[4]) | | + | f16vec4 textureGatherOffsets(f16sampler2DShadow sampler, | | + | f16vec2 P, float refZ, ivec2 | | + | offsets[4]) | | + | f16vec4 textureGatherOffsets(f16sampler2DArrayShadow sampler,| | + | vec3 P, float refZ, ivec2 | | + | offsets[4]) | | + | f16vec4 textureGatherOffsets(f16sampler2DArrayShadow sampler,| | + | f16vec3 P, float refZ, ivec2 | | + | offsets[4]) | | + | f16vec4 textureGatherOffsets(f16sampler2DRectShadow sampler, | | + | vec2 P, float refZ, ivec2 | | + | offsets[4]) | | + | f16vec4 textureGatherOffsets(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float refZ, ivec2 | | + | offsets[4]) | | + +--------------------------------------------------------------+------------------------------+ + + Modify Section 8.12 Image Functions + + (modify the second paragraph on p. 177) + + Loads and stores support single-precision float, half-precision float, integer, and unsigned + integer types. The data types below starting "gimage" serve as placeholders meaning types + starting either "image", "f16image", "iimage", or "uimage" in the same way as gvec or gsampler + in earlier sections. + + The IMAGE_PARAMS in the prototypes below is a placeholder representing 44 separate functions, + each for a different type of image variable. + + (modify the first sentence of the fourth paragraph on p. 177) + + where each of the lines represents one of four different image variable types, and image, P, + and sample specify the individual texel to operate on. + + Modify Section 9, Shading Language Grammar for Core Profile + + (add to the list of tokens on p. 189) + + ... + F16SAMPLER1D F16SAMPLER2D F16SAMPLER3D F16SAMPLER2DRECT F16SAMPLERCUBE + F16SAMPLER1DARRAY F16SAMPLER2DARRAY F16SAMPLERCUBEARRAY + F16SAMPLERBUFFER F16SAMPLER2DMS F16SAMPLER2DMSARRAY + F16SAMPLER1DSHADOW F16SAMPLER2DSHADOW F16SAMPLER1DARRAYSHADOW F16SAMPLER2DARRAYSHADOW + F16SAMPLER2DRECTSHADOW F16SAMPLERCUBESHADOW F16SAMPLERCUBEARRAYSHADOW + + F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT + F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY + F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY + ... + + (add to the rule of "type_specifier_nonarray" on p. 197) + + type_specifier_nonarray: + ... + F16SAMPLER1D + F16SAMPLER2D + F16SAMPLER3D + F16SAMPLER2DRECT + F16SAMPLERCUBE + F16SAMPLER1DARRAY + F16SAMPLER2DARRAY + F16SAMPLERCUBEARRAY + F16SAMPLERBUFFER + F16SAMPLER2DMS + F16SAMPLER2DMSARRAY + F16SAMPLER1DSHADOW + F16SAMPLER2DSHADOW + F16SAMPLER1DARRAYSHADOW + F16SAMPLER2DRECTSHADOW + F16SAMPLERCUBESHADOW + F16SAMPLERCUBEARRAYSHADOW + F16IMAGE1D + F16IMAGE2D + F16IMAGE3D + F16IMAGE2DRECT + F16IMAGECUBE + F16IMAGE1DARRAY + F16IMAGE2DARRAY + F16IMAGECUBEARRAY + F16IMAGEBUFFER + F16IMAGE2DMS + F16IMAGE2DMSARRAY + ... + +Dependencies on AMD_gpu_shader_half_float + + If the shader do not enable AMD_gpu_shader_half_float, half-precision floating-point opaque + types added by this extension, together with those new built-in texture and image memory + functions, are unable to be used. + +Dependencies on ARB_sparse_texture2 + + If the shader enables ARB_sparse_texture2, this extension adds additional texture lookup + functions, whose prototypes are different from those existing ones. + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | + | out f16vec4 texel [, float16_t bias]) | as in texture(), but return | + | int sparseTextureARB(f16sampler3D sampler, f16vec3 P, | texture access residency | + | out f16vec4 texel [, float16_t bias]) | information from the function| + | int sparseTextureARB(f16samplerCube sampler, f16vec3 P, | and the filtered lookup | + | out f16vec4 texel [, float16_t bias]) | result in the out parameter | + | int sparseTextureARB(f16sampler2DShadow sampler, vec3 P, | . | + | out float16_t texel [, float bias]) | | + | int sparseTextureARB(f16sampler2DShadow sampler, f16vec2 P, | | + | float compare, out float16_t texel | | + | [, float16_t bias]) | | + | int sparseTextureARB(f16samplerCubeShadow sampler, vec4 P, | | + | out float16_t texel [, float bias]) | | + | int sparseTextureARB(f16samplerCubeShadow sampler, f16vec3 P,| | + | float compare, out float16_t texel | | + | [, float16_t bias]) | | + | int sparseTextureARB(f16sampler2DArray sampler, f16vec3 P, | | + | out f16vec4 texel [, float16_t bias]) | | + | int sparseTextureARB(f16samplerCubeArray sampler, f16vec4 P, | | + | out f16vec4 texel [, float16_t bias]) | | + | int sparseTextureARB(f16sampler2DArrayShadow sampler, vec4 P,| | + | out float16_t texel) | | + | int sparseTextureARB(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float compare, | | + | out float16_t texel) | | + | int sparseTextureARB(f16sampler2DRect sampler, f16vec2 P, | | + | out f16vec4 texel) | | + | int sparseTextureARB(f16sampler2DRectShadow sampler, vec3 P, | | + | out float16_t texel) | | + | int sparseTextureARB(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float compare, | | + | out float16_t texel) | | + | int sparseTextureARB(f16samplerCubeArrayShadow sampler, | | + | vec4 P, float compare, | | + | out float16_t texel) | | + | int sparseTextureARB(f16samplerCubeArrayShadow sampler, | | + | f16vec4 P, float compare, | | + | out float16_t texel) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureLodARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | + | float16_t lod, out f16vec4 texel) | as in textureLod(), but | + | int sparseTextureLodARB(f16sampler3D sampler, f16vec3 P, | return texture access | + | float16_t lod, out f16vec4 texel) | residency information from | + | int sparseTextureLodARB(f16samplerCube sampler, f16vec3 P, | the function and the filtered| + | float16_t lod, out f16vec4 texel) | lookup result in the out | + | int sparseTextureLodARB(f16sampler2DShadow sampler, vec3 P, | parameter . | + | float lod, out float16_t texel) | | + | int sparseTextureLodARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t lod, out float16_t texel) | | + | int sparseTextureLodARB(f16sampler2DArray sampler, f16vec3 P,| | + | float16_t lod, out f16vec4 texel) | | + | int sparseTextureLodARB(f16samplerCubeArray sampler, | | + | f16vec4 P, float16_t lod, | | + | out f16vec4 texel) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureOffsetARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | + | ivec2 offset, out f16vec4 texel | as in textureOffset(), but | + | [, float16_t bias]) | return texture access | + | int sparseTextureOffsetARB(f16sampler3D sampler, f16vec3 P, | residency information from | + | ivec3 offset, out f16vec4 texel | the function and the filtered| + | [, float16_t bias]) | lookup result in the out | + | int sparseTextureOffsetARB(f16sampler2DRect sampler, | parameter . | + | f16vec2 P, ivec2 offset, | | + | out f16vec4 texel) | | + | int sparseTextureOffsetARB(f16sampler2DRectShadow sampler, | | + | vec3 P, ivec2 offset, | | + | out float16_t texel) | | + | int sparseTextureOffsetARB(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float compare, | | + | ivec2 offset, out float16_t texel)| | + | int sparseTextureOffsetARB(f16sampler2DShadow sampler, | | + | vec3 P, ivec2 offset, | | + | out float16_t texel | | + | [, float bias]) | | + | int sparseTextureOffsetARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | ivec2 offset, out float16_t texel | | + | [, float16_t bias]) | | + | int sparseTextureOffsetARB(f16sampler2DArray sampler, | | + | f16vec3 P, ivec2 offset, | | + | out f16vec4 texel | | + | [, float16_t bias]) | | + | int sparseTextureOffsetARB(f16sampler2DArrayShadow sampler, | | + | vec4 P, ivec2 offset, | | + | out float16_t texel) | | + | int sparseTextureOffsetARB(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float compare, | | + | ivec2 offset, out float16_t texel)| | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureLodOffsetARB(f16sampler2D sampler, | Do a filtered texture lookup | + | f16vec2 P, float16_t lod, | as in textureLodOffset(), | + | ivec2 offset, | but return texture access | + | out f16vec4 texel) | residency information from | + | int sparseTextureLodOffsetARB(f16sampler3D sampler, | the function and the filtered| + | f16vec3 P, float16_t lod, | lookup result in the out | + | ivec3 offset, | parameter . | + | out f16vec4 texel) | | + | int sparseTextureLodOffsetARB(f16sampler2DShadow sampler, | | + | vec3 P, float lod, | | + | ivec2 offset, | | + | out float16_t texel) | | + | int sparseTextureLodOffsetARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t lod, ivec2 offset, | | + | out float16_t texel) | | + | int sparseTextureLodOffsetARB(f16sampler2DArray sampler, | | + | f16vec3 P, float16_t lod, | | + | ivec2 offset, | | + | out f16vec4 texel) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGradARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | + | f16vec2 dPdx, f16vec2 dPdy, | as in textureGrad(), but | + | out f16vec4 texel) | return texture access | + | int sparseTextureGradARB(f16sampler3D sampler, f16vec3 P, | residency information from | + | f16vec3 dPdx, f16vec3 dPdy, | the function and the filtered| + | out f16vec4 texel) | lookup result in the out | + | int sparseTextureGradARB(f16samplerCube sampler, f16vec3 P, | parameter . | + | f16vec3 dPdx, f16vec3 dPdy, | | + | out f16vec4 texel) | | + | int sparseTextureGradARB(f16sampler2DRect sampler, f16vec2 P,| | + | f16vec2 dPdx, f16vec2 dPdy, | | + | out f16vec4 texel) | | + | int sparseTextureGradARB(f16sampler2DRectShadow sampler, | | + | vec3 P, vec2 dPdx, vec2 dPdy, | | + | out float16_t texel) | | + | int sparseTextureGradARB(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | out float16_t texel) | | + | int sparseTextureGradARB(f16sampler2DShadow sampler, vec3 P, | | + | vec2 dPdx, vec2 dPdy, | | + | out float16_t texel) | | + | int sparseTextureGradARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | out float16_t texel) | | + | int sparseTextureGradARB(f16samplerCubeShadow sampler, | | + | vec4 P, vec3 dPdx, vec3 dPdy, | | + | out float16_t texel) | | + | int sparseTextureGradARB(f16samplerCubeShadow sampler, | | + | f16vec3 P, float compare, | | + | f16vec3 dPdx, f16vec3 dPdy, | | + | out float16_t texel) | | + | int sparseTextureGradARB(f16sampler2DArray sampler, | | + | f16vec3 P, f16vec2 dPdx, | | + | f16vec2 dPdy, out f16vec4 texel) | | + | int sparseTextureGradARB(f16sampler2DArrayShadow sampler, | | + | vec4 P, vec2 dPdx, vec2 dPdy, | | + | out float16_t texel) | | + | int sparseTextureGradARB(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | out float16_t texel) | | + | int sparseTextureGradARB(f16samplerCubeArray sampler, | | + | f16vec4 P, f16vec3 dPdx, | | + | f16vec3 dPdy, out f16vec4 texel) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGradOffsetARB(f16sampler2D sampler, | Do a filtered texture lookup | + | f16vec2 P, f16vec2 dPdx, | as in textureGradOffset(), | + | f16vec2 dPdy, ivec2 offset, | but return texture access | + | out f16vec4 texel) | residency information from | + | int sparseTextureGradOffsetARB(f16sampler3D sampler, | the function and the filtered| + | f16vec3 P, f16vec3 dPdx, | lookup result in the out | + | f16vec3 dPdy, ivec3 offset, | parameter . | + | out f16vec4 texel) | | + | int sparseTextureGradOffsetARB(f16sampler2DRect sampler, | | + | f16vec2 P, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset, | | + | out f16vec4 texel) | | + | int sparseTextureGradOffsetARB(f16sampler2DRectShadow | | + | sampler, vec3 P, vec2 dPdx, | | + | vec2 dPdy, ivec2 offset, | | + | out float16_t texel) | | + | int sparseTextureGradOffsetARB(f16sampler2DRectShadow | | + | sampler, f16vec2 P, | | + | float compare, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset, | | + | out float16_t texel) | | + | int sparseTextureGradOffsetARB(f16sampler2DShadow sampler, | | + | vec3 P, vec2 dPdx, vec2 dPdy, | | + | ivec2 offset, | | + | out float16_t texel) | | + | int sparseTextureGradOffsetARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | ivec2 offset, | | + | out float16_t texel) | | + | int sparseTextureGradOffsetARB(f16sampler2DArray sampler, | | + | f16vec3 P, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset, | | + | out f16vec4 texel) | | + | int sparseTextureGradOffsetARB(f16sampler2DArrayShadow | | + | sampler, vec4 P, | | + | vec2 dPdx, vec2 dPdy, | | + | ivec2 offset, | | + | out float16_t texel) | | + | int sparseTextureGradOffsetARB(f16sampler2DArrayShadow | | + | sampler, f16vec3 P, | | + | float compare, f16vec2 dPdx, | | + | f16vec2 dPdy, ivec2 offset, | | + | out float16_t texel) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherARB(f16sampler2D sampler, f16vec2 P, | Do a texture gather operation| + | out f16vec4 texel [, int comp]) | as in textureGather(), but | + | int sparseTextureGatherARB(f16sampler2DArray sampler, vec3 P,| return texture access | + | out f16vec4 texel [, int comp]) | residency information from | + | int sparseTextureGatherARB(f16samplerCube sampler, f16vec3 P,| the function and the filtered| + | out f16vec4 texel [, int comp]) | lookup result in the out | + | int sparseTextureGatherARB(f16samplerCubeArray sampler, | parameter . | + | f16vec4 P, out f16vec4 texel | | + | [, int comp]) | | + | int sparseTextureGatherARB(f16sampler2DRect sampler, | | + | f16vec2 P, out f16vec4 texel | | + | [, int comp]) | | + | int sparseTextureGatherARB(f16sampler2DShadow sampler, | | + | vec2 P, float refZ, | | + | out f16vec4 texel) | | + | int sparseTextureGatherARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float refZ, | | + | out f16vec4 texel) | | + | int sparseTextureGatherARB(f16sampler2DArrayShadow sampler, | | + | vec3 P, float refZ, | | + | out f16vec4 texel) | | + | int sparseTextureGatherARB(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float refZ, | | + | out f16vec4 texel) | | + | int sparseTextureGatherARB(f16samplerCubeShadow sampler, | | + | vec3 P, float refZ, | | + | out f16vec4 texel) | | + | int sparseTextureGatherARB(f16samplerCubeShadow sampler, | | + | f16vec3 P, float refZ, | | + | out f16vec4 texel) | | + | int sparseTextureGatherARB(f16samplerCubeArrayShadow sampler,| | + | vec4 P, float refZ, | | + | out f16vec4 texel) | | + | int sparseTextureGatherARB(f16samplerCubeArrayShadow sampler,| | + | f16vec4 P, float refZ, | | + | out f16vec4 texel) | | + | int sparseTextureGatherARB(f16sampler2DRectShadow sampler, | | + | vec2 P, float refZ, | | + | out f16vec4 texel) | | + | int sparseTextureGatherARB(f16sampler2DRectShadow sampler, | | + | f16vec2 P, float refZ, | | + | out f16vec4 texel) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherOffsetARB(f16sampler2D sampler, | Do a texture gather operation| + | f16vec2 P, ivec2 offset, | as in textureGatherOffset(), | + | out f16vec4 texel | but return texture access | + | [, int comp]) | residency information from | + | int sparseTextureGatherOffsetARB(f16sampler2DArray sampler, | the function and the filtered| + | f16vec3 P, ivec2 offset, | lookup result in the out | + | out f16vec4 texel | parameter . | + | [, int comp]) | | + | int sparseTextureGatherOffsetARB(f16sampler2DRect sampler, | | + | f16vec2 P, ivec2 offset, | | + | out f16vec4 texel | | + | [, int comp]) | | + | int sparseTextureGatherOffsetARB(f16sampler2DShadow sampler, | | + | vec2 P, float refZ, | | + | ivec2 offset, | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float refZ, | | + | ivec2 offset, | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetARB(f16sampler2DArrayShadow | | + | sampler, vec3 P, float refZ,| | + | ivec2 offset, | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetARB(f16sampler2DArrayShadow | | + | sampler, f16vec3 P, | | + | float refZ, ivec2 offset, | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetARB(f16sampler2DRectShadow | | + | sampler, vec2 P, float refZ,| | + | ivec2 offset, | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetARB(f16sampler2DRectShadow | | + | sampler, f16vec2 P, | | + | float refZ, ivec2 offset, | | + | out f16vec4 texel) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherOffsetsARB(f16sampler2D sampler, | Do a texture gather operation| + | f16vec2 P, | as in textureGatherOffsets(),| + | ivec2 offsets[4], | but return texture access | + | out f16vec4 texel | residency information from | + | [, int comp]) | the function and the filtered| + | int sparseTextureGatherOffsetsARB(f16sampler2DArray sampler, | lookup result in the out | + | f16vec3 P, | parameter . | + | ivec2 offsets[4], | | + | out f16vec4 texel | | + | [, int comp]) | | + | int sparseTextureGatherOffsetsARB(f16sampler2DRect sampler, | | + | f16vec2 P, | | + | ivec2 offsets[4], | | + | out f16vec4 texel | | + | [, int comp]) | | + | int sparseTextureGatherOffsetsARB(f16sampler2DShadow sampler,| | + | vec2 P, float refZ, | | + | ivec2 offsets[4], | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetsARB(f16sampler2DShadow sampler,| | + | f16vec2 P, float refZ, | | + | ivec2 offsets[4], | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetsARB(f16sampler2DArrayShadow | | + | sampler, vec3 P, | | + | float refZ, | | + | ivec2 offsets[4], | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetsARB(f16sampler2DArrayShadow | | + | sampler, f16vec3 P, | | + | float refZ, | | + | ivec2 offsets[4], | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetsARB(f16sampler2DRectShadow | | + | sampler, vec2 P, | | + | float refZ, | | + | ivec2 offsets[4], | | + | out f16vec4 texel) | | + | int sparseTextureGatherOffsetsARB(f16sampler2DRectShadow | | + | sampler, f16vec2 P, | | + | float refZ, | | + | ivec2 offsets[4], | | + | out f16vec4 texel) | | + +--------------------------------------------------------------+------------------------------+ + +Dependencies on ARB_sparse_texture_clamp + + If the shader enables ARB_sparse_texture_clamp, this extension adds additional texture lookup + functions, whose prototypes are different from those existing ones. + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureClampARB(f16sampler2D sampler, f16vec2 P, | Do a filtered texture lookup | + | float16_t lodClamp, | as in texture(), but return | + | out f16vec4 texel | texture access residency | + | [, float16_t bias]) | information from the function| + | int sparseTextureClampARB(f16sampler3D sampler, f16vec3 P, | and the filtered lookup | + | float16_t lodClamp, | result in the out parameter | + | out f16vec4 texel | . Additionally, | + | [, float16_t bias]) | clamp the automatically | + | int sparseTextureClampARB(f16samplerCube sampler, f16vec3 P, | computed level of detail to | + | float16_t lodClamp, | be greater than or equal to | + | out f16vec4 texel | . | + | [, float16_t bias]) | | + | int sparseTextureClampARB(f16sampler2DShadow sampler, vec3 P,| | + | float lodClamp, out float16_t texel| | + | [, float bias]) | | + | int sparseTextureClampARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t lodClamp, | | + | out float16_t texel | | + | [, float16_t bias]) | | + | int sparseTextureClampARB(f16samplerCubeShadow sampler, | | + | vec4 P, float lodClamp, | | + | out float16_t texel | | + | [, float bias]) | | + | int sparseTextureClampARB(f16samplerCubeShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t lodClamp, | | + | out float16_t texel | | + | [, float16_t bias]) | | + | int sparseTextureClampARB(f16sampler2DArray sampler, | | + | f16vec3 P, float16_t lodClamp, | | + | out f16vec4 texel | | + | [, float16_t bias]) | | + | int sparseTextureClampARB(f16samplerCubeArray sampler, | | + | f16vec4 P, float16_t lodClamp, | | + | out f16vec4 texel | | + | [, float16_t bias]) | | + | int sparseTextureClampARB(f16sampler2DArrayShadow sampler, | | + | vec4 P, float lodClamp, | | + | out float16_t texel) | | + | int sparseTextureClampARB(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t lodClamp, | | + | out float16_t texel) | | + | int sparseTextureClampARB(f16samplerCubeArrayShadow sampler, | | + | vec4 P, float compare, | | + | float lodClamp, | | + | out float16_t texel) | | + | int sparseTextureClampARB(f16samplerCubeArrayShadow sampler, | | + | f16vec4 P, float compare, | | + | float16_t lodClamp, | | + | out float16_t texel) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureClampARB(f16sampler1D sampler, float16_t P, | Do a filtered texture lookup | + | float lodClamp [, float16_t bias]) | as in texture(), but clamp | + | f16vec4 textureClampARB(f16sampler2D sampler, vec2 P, | the automatically computed | + | float lodClamp [, float16_t bias]) | level of detail to be greater| + | f16vec4 textureClampARB(f16sampler3D sampler, vec3 P, | than or equal to . | + | float lodClamp [, float16_t bias]) | | + | f16vec4 textureClampARB(f16samplerCube sampler, vec3 P, | | + | float lodClamp [, float16_t bias]) | | + | float16_t textureClampARB(f16sampler1DShadow sampler, vec3 P,| | + | float lodClamp [, float bias]) | | + | float16_t textureClampARB(f16sampler1DShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | float16_t textureClampARB(f16sampler2DShadow sampler, vec3 P,| | + | float lodClamp [, float bias]) | | + | float16_t textureClampARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | float16_t textureClampARB(f16samplerCubeShadow sampler, | | + | vec4 P, float lodClamp | | + | [, float bias]) | | + | float16_t textureClampARB(f16samplerCubeShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | f16vec4 textureClampARB(f16sampler1DArray sampler, | | + | f16vec2 P, float16_t lodClamp | | + | [, float16_t bias]) | | + | f16vec4 textureClampARB(f16sampler2DArray sampler, | | + | f16vec3 P, float16_t lodClamp | | + | [, float16_t bias]) | | + | f16vec4 textureClampARB(f16samplerCubeArray sampler, | | + | f16vec4 P, float16_t lodClamp | | + | [, float16_t bias]) | | + | float16_t textureClampARB(f16sampler1DArrayShadow sampler, | | + | vec3 P, float lodClamp | | + | [, float bias]) | | + | float16_t textureClampARB(f16sampler1DArrayShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | float16_t textureClampARB(f16sampler2DArrayShadow sampler, | | + | vec4 P, float lodClamp) | | + | float16_t textureClampARB(f16sampler2DArrayShadow sampler, | | + | f16vec3 P, float compare, | | + | float16_t lodClamp) | | + | float16_t textureClampARB(f16samplerCubeArrayShadow sampler, | | + | vec4 P, float compare, | | + | float lodClamp) | | + | float16_t textureClampARB(f16samplerCubeArrayShadow sampler, | | + | f16vec4 P, float compare, | | + | float16_t lodClamp) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureOffsetClampARB(f16sampler2D sampler, | Do a filtered texture lookup | + | f16vec2 P, ivec2 offset, | as in textureOffset(), but | + | float16_t lodClamp, | return texture access | + | out f16vec4 texel | residency information from | + | [, float16_t bias]) | the function and the filtered| + | int sparseTextureOffsetClampARB(f16sampler3D sampler, | lookup result in the out | + | f16vec3 P, ivec3 offset, | parameter . | + | float16_t lodClamp, | Additionally, clamp the | + | out f16vec4 texel | automatically computed level | + | [, float16_t bias]) | of detail to be greater than | + | int sparseTextureOffsetClampARB(f16sampler2DShadow sampler, | or equal to . | + | vec3 P, ivec2 offset, | | + | float lodClamp, | | + | out float16_t texel | | + | [, float bias]) | | + | int sparseTextureOffsetClampARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | ivec2 offset, | | + | float16_t lodClamp, | | + | out float16_t texel | | + | [, float16_t bias]) | | + | int sparseTextureOffsetClampARB(f16sampler2DArray sampler, | | + | f16vec3 P, ivec2 offset, | | + | float16_t lodClamp, | | + | out f16vec4 texel | | + | [, float16_t bias]) | | + | int sparseTextureOffsetClampARB(f16sampler2DArrayShadow | | + | sampler, vec4 P, | | + | ivec2 offset, float lodClamp,| | + | out float16_t texel) | | + | int sparseTextureOffsetClampARB(f16sampler2DArrayShadow | | + | sampler, f16vec3 P, | | + | float compare, ivec2 offset, | | + | float16_t lodClamp, | | + | out float16_t texel) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureOffsetClampARB(f16sampler1D sampler, | Do a filtered texture lookup | + | float16_t P, int offset, | as in textureOffset(), but | + | float16_t lodClamp | clamp the automatically | + | [, float16_t bias]) | computed level of detail to | + | f16vec4 textureOffsetClampARB(f16sampler2D sampler, | be greater than or equal to | + | f16vec2 P, ivec2 offset, | . | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | f16vec4 textureOffsetClampARB(f16sampler3D sampler, | | + | f16vec3 P, ivec3 offset, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | float16_t textureOffsetClampARB(f16sampler1DShadow sampler, | | + | vec3 P, int offset, | | + | float lodClamp | | + | [, float bias]) | | + | float16_t textureOffsetClampARB(f16sampler1DShadow sampler, | | + | f16vec2 P, float compare, | | + | int offset, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | float16_t textureOffsetClampARB(f16sampler2DShadow sampler, | | + | vec3 P, ivec2 offset, | | + | float lodClamp | | + | [, float bias]) | | + | float16_t textureOffsetClampARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | ivec2 offset, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | f16vec4 textureOffsetClampARB(f16sampler1DArray sampler, | | + | f16vec2 P, int offset, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | f16vec4 textureOffsetClampARB(f16sampler2DArray sampler, | | + | f16vec3 P, ivec2 offset, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | float16_t textureOffsetClampARB(f16sampler1DArrayShadow | | + | sampler, vec3 P, int offset, | | + | float lodClamp | | + | [, float bias]) | | + | float16_t textureOffsetClampARB(f16sampler1DArrayShadow | | + | sampler, f16vec2 P, | | + | float compare, int offset, | | + | float16_t lodClamp | | + | [, float16_t bias]) | | + | float16_t textureOffsetClampARB(f16sampler2DArrayShadow | | + | sampler, vec4 P, | | + | ivec2 offset, | | + | float lodClamp) | | + | float16_t textureOffsetClampARB(f16sampler2DArrayShadow | | + | sampler, f16vec3 P, | | + | float compare, ivec2 offset, | | + | float16_t lodClamp) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGradClampARB(f16sampler2D sampler, | Do a filtered texture lookup | + | f16vec2 P, f16vec2 dPdx, | as in textureGrad(), but | + | f16vec2 dPdy, | return texture access | + | float16_t lodClamp, | residency information from | + | out f16vec4 texel) | the function and the filtered| + | int sparseTextureGradClampARB(f16sampler3D sampler, | lookup result in the out | + | f16vec3 P, f16vec3 dPdx, | parameter . | + | f16vec3 dPdy, | Additionally, clamp the | + | float16_t lodClamp, | automatically computed level | + | out f16vec4 texel) | of detail to be greater than | + | int sparseTextureGradClampARB(f16samplerCube sampler, | or equal to . | + | f16vec3 P, f16vec3 dPdx, | | + | f16vec3 dPdy, | | + | float16_t lodClamp, | | + | out f16vec4 texel) | | + | int sparseTextureGradClampARB(f16sampler2DShadow sampler, | | + | vec3 P, vec2 dPdx, vec2 dPdy, | | + | float lodClamp, | | + | out float16_t texel) | | + | int sparseTextureGradClampARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | float16_t lodClamp, | | + | out float16_t texel) | | + | int sparseTextureGradClampARB(f16samplerCubeShadow sampler, | | + | vec4 P, vec3 dPdx, vec3 dPdy, | | + | float lodClamp, | | + | out float16_t texel) | | + | int sparseTextureGradClampARB(f16samplerCubeShadow sampler, | | + | f16vec3 P, float compare, | | + | f16vec3 dPdx, f16vec3 dPdy, | | + | float16_t lodClamp, | | + | out float16_t texel) | | + | int sparseTextureGradClampARB(f16sampler2DArray sampler, | | + | f16vec3 P, f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | float16_t lodClamp, | | + | out f16vec4 texel) | | + | int sparseTextureGradClampARB(f16sampler2DArrayShadow | | + | sampler, vec4 P, vec2 dPdx, | | + | vec2 dPdy, float lodClamp, | | + | out float16_t texel) | | + | int sparseTextureGradClampARB(f16sampler2DArrayShadow | | + | sampler, f16vec3 P, | | + | float compare, f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | float16_t lodClamp, | | + | out float16_t texel) | | + | int sparseTextureGradClampARB(f16samplerCubeArray sampler, | | + | f16vec4 P, f16vec3 dPdx, | | + | f16vec3 dPdy, | | + | float16_t lodClamp, | | + | out f16vec4 texel) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGradClampARB(f16sampler1D sampler, | Do a filtered texture lookup | + | float16_t P, float16_t dPdx, | as in textureGrad(), but | + | float16_t dPdy, | clamp the automatically | + | float16_t lodClamp) | computed level of detail to | + | f16vec4 textureGradClampARB(f16sampler2D sampler, | be greater than or equal to | + | f16vec2 P, f16vec2 dPdx, | . | + | f16vec2 dPdy, | | + | float16_t lodClamp) | | + | f16vec4 textureGradClampARB(f16sampler3D sampler, | | + | f16vec3 P, f16vec3 dPdx, | | + | f16vec3 dPdy, | | + | float16_t lodClamp) | | + | f16vec4 textureGradClampARB(f16samplerCube sampler, | | + | f16vec3 P, f16vec3 dPdx, | | + | f16vec3 dPdy, | | + | float16_t lodClamp) | | + | float16_t textureGradClampARB(f16sampler1DShadow sampler, | | + | vec3 P, float dPdx, float dPdy,| | + | float lodClamp) | | + | float16_t textureGradClampARB(f16sampler1DShadow sampler, | | + | f16vec2 P, float compare, | | + | float16_t dPdx, float16_t dPdy,| | + | float16_t lodClamp) | | + | float16_t textureGradClampARB(f16sampler2DShadow sampler, | | + | vec3 P, vec2 dPdx, vec2 dPdy, | | + | float lodClamp) | | + | float16_t textureGradClampARB(f16sampler2DShadow sampler, | | + | f16vec2 P, float compare, | | + | f16vec2 dPdx, f16vec2 dPdy, | | + | float16_t lodClamp) | | + | float16_t textureGradClampARB(f16samplerCubeShadow sampler, | | + | vec4 P, vec3 dPdx, vec3 dPdy, | | + | float lodClamp) | | + | float16_t textureGradClampARB(f16samplerCubeShadow sampler, | | + | f16vec3 P, float compare, | | + | f16vec3 dPdx, f16vec3 dPdy, | | + | float16_t lodClamp) | | + | f16vec4 textureGradClampARB(f16sampler1DArray sampler, | | + | f16vec2 P, float16_t dPdx, | | + | float16_t dPdy, | | + | float16_t lodClamp) | | + | f16vec4 textureGradClampARB(f16sampler2DArray sampler, | | + | f16vec3 P, f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | float16_t lodClamp) | | + | float16_t textureGradClampARB(f16sampler1DArrayShadow | | + | sampler, vec3 P, float dPdx, | | + | float dPdy, float lodClamp) | | + | float16_t textureGradClampARB(f16sampler1DArrayShadow | | + | sampler, f16vec2 P, | | + | float compare, float16_t dPdx, | | + | float16_t dPdy, | | + | float16_t lodClamp) | | + | float16_t textureGradClampARB(f16sampler2DArrayShadow | | + | sampler, vec4 P, vec2 dPdx, | | + | vec2 dPdy, float lodClamp) | | + | float16_t textureGradClampARB(f16sampler2DArrayShadow | | + | sampler, f16vec3 P, | | + | float compare, f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | float16_t lodClamp) | | + | f16vec4 textureGradClampARB(f16samplerCubeArray sampler, | | + | f16vec4 P, f16vec3 dPdx, | | + | f16vec3 dPdy, | | + | float16_t lodClamp) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGradOffsetClampARB(f16sampler2D sampler, | Do a filtered texture lookup | + | f16vec2 P, f16vec2 dPdx, | as in textureGradOffset(), | + | f16vec2 dPdy, | but return texture access | + | ivec2 offset, | residency information from | + | float16_t lodClamp, | the function and the filtered| + | out f16vec4 texel) | lookup result in the out | + | int sparseTextureGradOffsetClampARB(f16sampler3D sampler, | parameter . | + | f16vec3 P, f16vec3 dPdx, | Additionally, clamp the | + | f16vec3 dPdy, | automatically computed level | + | ivec3 offset, | of detail to be greater than | + | float16_t lodClamp, | or equal to . | + | out f16vec4 texel) | | + | int sparseTextureGradOffsetClampARB(f16sampler2DShadow | | + | sampler, vec3 P, | | + | vec2 dPdx, vec2 dPdy, | | + | ivec2 offset, | | + | float lodClamp, | | + | out float16_t texel) | | + | int sparseTextureGradOffsetClampARB(f16sampler2DShadow | | + | sampler, f16vec2 P, | | + | float compare, | | + | f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | ivec2 offset, | | + | float16_t lodClamp, | | + | out float16_t texel) | | + | int sparseTextureGradOffsetClampARB(f16sampler2DArray | | + | sampler, f16vec3 P, | | + | f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | ivec2 offset, | | + | float16_t lodClamp, | | + | out f16vec4 texel) | | + | int sparseTextureGradOffsetClampARB(f16sampler2DArrayShadow | | + | sampler, vec4 P, | | + | vec2 dPdx, vec2 dPdy, | | + | ivec2 offset, | | + | float lodClamp, | | + | out float16_t texel) | | + | int sparseTextureGradOffsetClampARB(f16sampler2DArrayShadow | | + | sampler, f16vec3 P, | | + | float compare, | | + | f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | ivec2 offset, | | + | float16_t lodClamp, | | + | out float16_t texel) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGradOffsetClampARB(f16sampler1D sampler, | Do a filtered texture lookup | + | float16_t P, | as in textureGradOffset(), | + | float16_t dPdx, | but clamp the automatically | + | float16_t dPdy, | computed level of detail to | + | int offset, | be greater than or equal to | + | float16_t lodClamp) | . | + | f16vec4 textureGradOffsetClampARB(f16sampler2D sampler, | | + | f16vec2 P, f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | ivec2 offset, | | + | float16_t lodClamp) | | + | f16vec4 textureGradOffsetClampARB(f16sampler3D sampler, | | + | f16vec3 P, f16vec3 dPdx, | | + | f16vec3 dPdy, | | + | ivec3 offset, | | + | float16_t lodClamp) | | + | float16_t textureGradOffsetClampARB(f16sampler1DShadow | | + | sampler, vec3 P, | | + | float dPdx, float dPdy, | | + | int offset, | | + | float lodClamp) | | + | float16_t textureGradOffsetClampARB(f16sampler1DShadow | | + | sampler, f16vec2 P, | | + | float compare, | | + | float16_t dPdx, | | + | float16_t dPdy, | | + | int offset, | | + | float16_t lodClamp) | | + | float16_t textureGradOffsetClampARB(f16sampler2DShadow | | + | sampler, vec3 P, | | + | vec2 dPdx, vec2 dPdy, | | + | ivec2 offset, | | + | float lodClamp) | | + | float16_t textureGradOffsetClampARB(f16sampler2DShadow | | + | sampler, f16vec2 P, | | + | float compare, | | + | f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | ivec2 offset, | | + | float16_t lodClamp) | | + | f16vec4 textureGradOffsetClampARB(f16sampler1DArray | | + | sampler, f16vec2 P, | | + | float16_t dPdx, | | + | float16_t dPdy, | | + | int offset, | | + | float16_t lodClamp) | | + | f16vec4 textureGradOffsetClampARB(f16sampler2DArray | | + | sampler, f16vec3 P, | | + | f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | ivec2 offset, | | + | float16_t lodClamp) | | + | float16_t textureGradOffsetClampARB(f16sampler1DArrayShadow | | + | sampler, vec3 P, | | + | float dPdx, float dPdy, | | + | int offset, | | + | float lodClamp) | | + | float16_t textureGradOffsetClampARB(f16sampler1DArrayShadow | | + | sampler, f16vec2 P, | | + | float compare, | | + | float16_t dPdx, | | + | float16_t dPdy, | | + | int offset, | | + | float16_t lodClamp) | | + | float16_t textureGradOffsetClampARB(f16sampler2DArrayShadow | | + | sampler, vec4 P, | | + | vec2 dPdx, vec2 dPdy, | | + | ivec2 offset, | | + | float lodClamp) | | + | float16_t textureGradOffsetClampARB(f16sampler2DArrayShadow | | + | sampler, f16vec3 P, | | + | float compare, | | + | f16vec2 dPdx, | | + | f16vec2 dPdy, | | + | ivec2 offset, | | + | float16_t lodClamp) | | + +--------------------------------------------------------------+------------------------------+ + +Dependencies on KHR_vulkan_glsl + + Modify Section, Overview - Subpass Inputs + + (add new types prefixed by "f16" to the list of the second paragraph) + + Subpasses are read through a new set of types, available only to fragment shaders: + + subpassInput + subpassInputMS + f16subpassInput + f16subpassInputMS + ... + + Modify Section, Changes to Chapter 3 of the OpenGL Shading Language Specification + + (add new keyword prefixed by "f16" to the list of the second paragraph) + + Add the following keywords to section 3.6 Keywords: + + texture1D texture2D texture3D + textureCube texture2DRect texture1DArray + texture2DArray textureBuffer texture2DMS + texture2DMSArray textureCubeArray + + f16texture1D f16texture2D f16texture3D + f16textureCube f16texture2DRect f16texture1DArray + f16texture2DArray f16textureBuffer f16texture2DMS + f16texture2DMSArray f16textureCubeArray + + ... + + subpassInput f16subpassInput isubpassInput usubpassInput + subpassInputMS f16subpassInputMS isubpassInputMS usubpassInputMS + + Modify Section, Changes to Chapter 4 of the OpenGL Shading Language Specification + + (add new types to the list of "Floating-Point Opaque Types", interleaved with the existing + types) + + Floating-Point Opaque Types + + f16texture1D + f16texture2D + f16texture3D + f16textureCube + f16texture2DRect + f16texture1DArray + f16texture2DArray + f16textureBuffer + f16texture2DMS + f16texture2DMSArray + f16textureCubeArray + f16subpassInput + f16subpassInputMS + +Dependencies on AMD_texture_gather_bias_lod + + If the shader enables AMD_texture_gather_bias_lod, this extension adds additional texture + gather functions, whose prototypes are different from those existing ones. + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGather(f16sampler2D sampler, vec2 P | Returns the value | + | [, int comp [, float bias]]) | | + | f16vec4 textureGather(f16sampler2D sampler, f16vec2 P | gvec4( | + | [, int comp [, float16_t bias]]) | Sample_i0_j1( | + | f16vec4 textureGather(f16sampler2DArray sampler, vec3 P | P, base, bias).comp, | + | [, int comp [, float bias]]) | Sample_i1_j1( | + | f16vec4 textureGather(f16sampler2DArray sampler, f16vec3 P | P, base, bias).comp, | + | [, int comp [, float16_t bias]]) | Sample_i1_j0( | + | f16vec4 textureGather(f16samplerCube sampler, vec3 P | P, base, bias).comp, | + | [, int comp [, float bias]]) | Sample_i0_j0( | + | f16vec4 textureGather(f16samplerCube sampler, f16vec3 P | P, base, bias).comp, | + | [, int comp [, float16_t bias]]) | ... | + | f16vec4 textureGather(f16samplerCubeArray sampler, vec4 P | | + | [, int comp [, float bias]]) | | + | f16vec4 textureGather(f16samplerCubeArray sampler, f16vec4 P | | + | [, int comp [, float16_t bias]]) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGatherOffset(f16sampler2D sampler, vec2 P, | Perform a texture gather | + | ivec2 offset [, int comp | operation as in | + | [, float bias]]) | textureGather() by | + | f16vec4 textureGatherOffset(f16sampler2D sampler, f16vec2 P, | as described in | + | ivec2 offset [, int comp | textureOffset() except that | + | [, float16_t bias]]) | the can be variable | + | f16vec4 textureGatherOffset(f16sampler2DArray sampler, | (non constant) and ... | + | vec3 P, ivec2 offset | | + | [, int comp [, float bias]]) | | + | f16vec4 textureGatherOffset(f16sampler2DArray sampler, | | + | f16vec3 P, ivec2 offset | | + | [, int comp [, float16_t bias]]) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGatherOffsets(f16sampler2D sampler, vec2 P, | Operate identically to | + | ivec2 offsets[4] [, int comp | textureGatherOffset() except | + | [, float bias]]) | that is used to | + | f16vec4 textureGatherOffsets(f16sampler2D sampler, f16vec2 P,| determine the location of the| + | ivec2 offsets[4] [, int comp | four texels to sample. ... | + | [, float16_t bias]]) | | + | f16vec4 textureGatherOffsets(f16sampler2DArray sampler, | | + | vec3 P, ivec2 offsets[4] | | + | [, int comp [, float bias]]) | | + | f16vec4 textureGatherOffsets(f16sampler2DArray sampler, | | + | f16vec3 P, ivec2 offsets[4] | | + | [, int comp [, float16_t bias]])| | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGatherLodAMD(f16sampler2D sampler, vec2 P, | Perform a texture gather | + | float lod [, int comp]) | operation as in | + | f16vec4 textureGatherLodAMD(f16sampler2D sampler, f16vec2 P, | textureGather() with explicit| + | float16_t lod [, int comp]) | LOD, but the four-texel | + | f16vec4 textureGatherLodAMD(f16sampler2DArray sampler, | sampling is modified as | + | vec3 P, float lod [, int comp]) | follow: | + | f16vec4 textureGatherLodAMD(f16sampler2DArray sampler, | | + | f16vec3 P, float16_t lod | gvec4( | + | [, int comp]) | Sample_i0_j1(P, lod).comp, | + | f16vec4 textureGatherLodAMD(f16samplerCube sampler, | Sample_i1_j1(P, lod).comp, | + | vec3 P, float lod [, int comp]) | Sample_i1_j0(P, lod).comp, | + | f16vec4 textureGatherLodAMD(f16samplerCube sampler, | Sample_i0_j0(P, lod).comp) | + | f16vec3 P, float16_t lod | | + | [, int comp]) | | + | f16vec4 textureGatherLodAMD(f16samplerCubeArray sampler, | | + | vec4 P, float lod [, int comp]) | | + | f16vec4 textureGatherLodAMD(f16samplerCubeArray sampler, | | + | f16vec4 P, float16_t lod | | + | [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGatherLodOffsetAMD(f16sampler2D sampler, | Perform a texture gather | + | vec2 P, float lod, | operation as in | + | ivec2 offset [, int comp]) | textureGatherOffset() but | + | f16vec4 textureGatherLodOffsetAMD(f16sampler2D sampler, | with explicit LOD. | + | f16vec2 P, float16_t lod, | | + | ivec2 offset [, int comp]) | | + | f16vec4 textureGatherLodOffsetAMD(f16sampler2DArray sampler, | | + | vec3 P, float lod, | | + | ivec2 offset [, int comp]) | | + | f16vec4 textureGatherLodOffsetAMD(f16sampler2DArray sampler, | | + | f16vec3 P, float16_t lod, | | + | ivec2 offset [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + | f16vec4 textureGatherLodOffsetsAMD(f16sampler2D sampler, | Perform a texture gather | + | vec2 P, float lod, | operation as in | + | ivec2 offsets[4] | textureGatherOffsets() but | + | [, int comp]) | with explicit LOD. | + | f16vec4 textureGatherLodOffsetsAMD(f16sampler2D sampler, | | + | f16vec2 P, float16_t lod, | | + | ivec2 offsets[4] | | + | [, int comp]) | | + | f16vec4 textureGatherLodOffsetsAMD(f16sampler2DArray sampler,| | + | vec3 P, float lod, | | + | ivec2 offsets[4] | | + | [, int comp]) | | + | f16vec4 textureGatherLodOffsetsAMD(f16sampler2DArray sampler,| | + | f16vec3 P, float16_t lod, | | + | ivec2 offsets[4] | | + | [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + + If the shader enables both AMD_texture_gather_bias_lod and ARB_sparse_texture2, this extension + adds additional sparse texture gather functions, whose prototypes are different from those + existing ones. + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherARB(f16sampler2D sampler, vec2 P, | Do a texture gather operation| + | out f16vec4 texel [, int comp | as in textureGather(), but | + | [, float bias]]) | return texture access | + | int sparseTextureGatherARB(f16sampler2D sampler, f16vec2 P, | residency information from | + | out f16vec4 texel [, int comp | the function and the filtered| + | [, float16_t bias]]) | lookup result in the out | + | int sparseTextureGatherARB(f16sampler2DArray sampler, | parameter . | + | vec3 P, out f16vec4 texel | | + | [, int comp [, float bias]]) | | + | int sparseTextureGatherARB(f16sampler2DArray sampler, | | + | f16vec3 P, out f16vec4 texel | | + | [, int comp [, float16_t bias]]) | | + | int sparseTextureGatherARB(f16samplerCube sampler, vec3 P, | | + | out f16vec4 texel [, int comp | | + | [, float bias]]) | | + | int sparseTextureGatherARB(f16samplerCube sampler, f16vec3 P,| | + | out f16vec4 texel [, int comp | | + | [, float16_t bias]]) | | + | int sparseTextureGatherARB(f16samplerCubeArray sampler, | | + | vec4 P, out f16vec4 texel | | + | [, int comp [, float bias]]) | | + | int sparseTextureGatherARB(f16samplerCubeArray sampler, | | + | f16vec4 P, out f16vec4 texel | | + | [, int comp [, float16_t bias]]) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherOffsetARB(f16sampler2D sampler, | Do a texture gather operation| + | vec2 P, ivec2 offset, | as in textureGatherOffset(), | + | out f16vec4 texel | but return texture access | + | [, int comp [, float bias]])| residency information from | + | int sparseTextureGatherOffsetARB(f16sampler2D sampler, | the function and the filtered| + | f16vec2 P, ivec2 offset, | lookup result in the out | + | out f16vec4 texel | parameter . | + | [, int comp | | + | [, float16_t bias]]) | | + | int sparseTextureGatherOffsetARB(f16sampler2DArray sampler, | | + | vec3 P, ivec2 offset, | | + | out f16vec4 texel | | + | [, int comp [, float bias]])| | + | int sparseTextureGatherOffsetARB(f16sampler2DArray sampler, | | + | f16vec3 P, ivec2 offset, | | + | out f16vec4 texel | | + | [, int comp | | + | [, float16_t bias]]) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherOffsetsARB(f16sampler2D sampler, | Do a texture gather operation| + | vec2 P, ivec2 offsets[4], | as in textureGatherOffsets(),| + | out f16vec4 texel | but return texture access | + | [, int comp | residency information from | + | [, float bias]]) | the function and the filtered| + | int sparseTextureGatherOffsetsARB(f16sampler2D sampler, | lookup result in the out | + | f16vec2 P, | parameter . | + | ivec2 offsets[4], | | + | out f16vec4 texel | | + | [, int comp | | + | [, float16_t bias]]) | | + | int sparseTextureGatherOffsetsARB(f16sampler2DArray sampler, | | + | vec3 P, ivec2 offsets[4], | | + | out f16vec4 texel | | + | [, int comp | | + | [, float bias]]) | | + | int sparseTextureGatherOffsetsARB(f16sampler2DArray sampler, | | + | f16vec3 P, | | + | ivec2 offsets[4], | | + | out f16vec4 texel | | + | [, int comp | | + | [, float16_t bias]]) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherLodAMD(f16sampler2D sampler, | Do a texture gather operation| + | vec2 P, float lod, | as in textureGather() with, | + | out f16vec4 texel [, int comp])| explicit LOD, but return | + | int sparseTextureGatherLodAMD(f16sampler2D sampler, | texture access residency | + | f16vec2 P, float16_t lod, | information from the function| + | out f16vec4 texel [, int comp])| and the filtered lookup | + | int sparseTextureGatherLodAMD(f16sampler2DArray sampler, | result in the out parameter | + | vec3 P, float lod, | . | + | out f16vec4 texel [, int comp])| | + | int sparseTextureGatherLodAMD(f16sampler2DArray sampler, | | + | f16vec3 P, float16_t lod, | | + | out f16vec4 texel [, int comp])| | + | int sparseTextureGatherLodAMD(f16samplerCube sampler, | | + | vec3 P, float lod, | | + | out f16vec4 texel [, int comp])| | + | int sparseTextureGatherLodAMD(f16samplerCube sampler, | | + | f16vec3 P, float16_t lod, | | + | out f16vec4 texel [, int comp])| | + | int sparseTextureGatherLodAMD(f16samplerCubeArray sampler, | | + | vec4 P, float lod, | | + | out f16vec4 texel [, int comp])| | + | int sparseTextureGatherLodAMD(f16samplerCubeArray sampler, | | + | f16vec4 P, float16_t lod, | | + | out f16vec4 texel [, int comp])| | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherLodOffsetAMD(f16sampler2D sampler, | Do a texture gather operation| + | vec2 P, float lod, | as in textureGatherOffset() | + | ivec2 offset, | with explicit LOD, but return| + | out f16vec4 texel | texture access residency | + | [, int comp]) | information from the function| + | int sparseTextureGatherLodOffsetAMD(f16sampler2D sampler, | and the filtered lookup | + | f16vec2 P, float16_t lod,| result in the out parameter | + | ivec2 offset, | . | + | out f16vec4 texel | | + | [, int comp]) | | + | int sparseTextureGatherLodOffsetAMD(f16sampler2DArray | | + | sampler, vec3 P, | | + | float lod, | | + | ivec2 offset, | | + | out f16vec4 texel | | + | [, int comp]) | | + | int sparseTextureGatherLodOffsetAMD(f16sampler2DArray | | + | sampler, f16vec3 P, | | + | float16_t lod, | | + | ivec2 offset, | | + | out f16vec4 texel | | + | [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherLodOffsetsAMD(f16sampler2D sampler, | Do a texture gather operation| + | vec2 P, float lod, | as in textureGatherOffsets() | + | ivec2 offsets[4], | with explicit LOD, but return| + | out f16vec4 texel | texture access residency | + | [, int comp]) | information from the function| + | int sparseTextureGatherLodOffsetsAMD(f16sampler2D sampler, | and the filtered lookup | + | f16vec2 P, | result in the out parameter | + | float16_t lod, | . | + | ivec2 offsets[4], | | + | out f16vec4 texel | | + | [, int comp]) | | + | int sparseTextureGatherLodOffsetsAMD(f16sampler2DArray | | + | sampler, vec3 P, | | + | float lod, | | + | ivec2 offsets[4], | | + | out f16vec4 texel | | + | [, int comp]) | | + | int sparseTextureGatherLodOffsetsAMD(f16sampler2DArray | | + | sampler, f16vec3 P, | | + | float16_t lod, | | + | ivec2 offsets[4], | | + | out f16vec4 texel | | + | [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + (1) What is the intention of this extension? + + RESOLVED: This extension is designed to support half-precision floating-point fetch + operations in shader texture functions and shader image memory functions. We define new + opaque types and built-in functions to achieve this goal and minimize type conversion between + single-precision and half-precision floating-point. Data types, other than opaque sampler and + image types, that could be half float include: texture lookup result, float texture + coordinates, explicit float LOD, LOD bias, minimum LOD clamp, input data for image store, + output data from image load. + + (2) I see there are two half-precision floating-point forms for the same texture lookup + function, why? + + RESOLVED: The difference between these two forms are: in the one form, only texture lookup + result and opaque sampler types are half-precision floating-point while in the other form, + other arguments become half-precision floating-point as well, such as texture coordinates, + explicit LOD, LOD bias, and minimum LOD clamp. The motive is to provide flexibility for the + shader and to minimize type conversion that might be involved. + + Still, you have to pay special attention to the depth reference value (denoted as + or in the function syntax). They are always single float typed. We do not want to + introduce unexpected incorrectness of depth comparison because of insufficient precision of + the depth reference value. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- --------------------------------------------------------------------- + 6 3/9/18 rexu Add some missing function prototypes when this extension interacts + with AMD_texture_gather_bias_lod. + + 5 9/20/17 dwitczak Fix incorrect definitions of some of the textureClampARB(), + textureGradClampARB(), textureLod() and textureProjLodOffset() + function prototypes. Remove duplicate function prototype definitions. + + 4 11/24/16 rexu Clarify that when is present in shadow forms of + textureProj*(), the resulting , by divding its initial value + with the last component of

, is used as . + + 3 11/21/16 rexu Add the interaction with AMD_texture_gather_bias_lod. + + 2 11/14/16 rexu Rename this extension from AMD_gpu_shader_half_float_texture to + AMD_gpu_shader_half_float_fetch. The former name is somewhat + confusing, which could also refer to F16 texture internal format used + in OpenGL APIs. Clarify that when half-precision floating-point + opaque types are used in shader texture functions and shader image + memory functions, the results are half-precision if they are + floating-point typed. + + 1 11/03/16 rexu Initial draft. diff --git a/opengles/extensions/AMD/AMD_gpu_shader_int16.txt b/opengles/extensions/AMD/AMD_gpu_shader_int16.txt new file mode 100644 index 0000000000..cb41eab651 --- /dev/null +++ b/opengles/extensions/AMD/AMD_gpu_shader_int16.txt @@ -0,0 +1,700 @@ +Name + + AMD_gpu_shader_int16 + +Name Strings + + GL_AMD_gpu_shader_int16 + +Contact + + Dominik Witczak, AMD (dominik.witczak 'at' amd.com) + +Contributors + + Daniel Rakos, AMD + Matthaeus G. Chajdas, AMD + Quentin Lin, AMD + Rex Xu, AMD + Timothy Lottes, AMD + Zhi Cai, AMD + +Status + + Shipping. + +Version + + Last Modified Date: 03/28/2018 + Author Revision: #2 + +Number + + OpenGL Extension #507 + +Dependencies + + This extension is written against version 4.50 of the OpenGL Shading + Language Specification. + + GLSL 4.00 is required. + + This extension interacts with AMD_gpu_shader_half_float. + This extension interacts with ARB_gpu_shader_int64. + This extension interacts with KHR_vulkan_glsl. + +Overview + + This extension was developed to allow implementations supporting 16-bit + integers to expose the feature in GLSL. + + The extension introduces the following features for all shader types: + + * new built-in functions to pack and unpack 32-bit integer types into a + two-component 16-bit integer vector; + + * new built-in functions to convert half-precision floating-point + values to or from their 16-bit integer bit encodings; + + * vector relational functions supporting comparisons of vectors of + 16-bit integer types; and + + * common functions abs, frexp, ldexp, sign, min, max, clamp, and mix + supporting arguments of 16-bit integer types. + + +New Procedures and Functions + + NONE + + +New Tokens + + NONE + + +Modifications to the OpenGL Shading Language Specification, Version 4.50 + + Including the following line in a shader can be used to control the + language features described in this extension: + + #extension GL_AMD_gpu_shader_int16 : + + where is as specified in section 3.3. + + New preprocessor #defines are added to the OpenGL Shading Language: + + #define GL_AMD_gpu_shader_int16 1 + + +Additions to Chapter 3 of the OpenGL Shading Language Specification (Basics) + + Modify Section 3.6, Keywords + + (add the following to the list of reserved keywords at p. 18) + + int16_t i16vec2 i16vec3 i16vec4 uint16_t u16vec2 u16vec3 u16vec4 + + +Additions to Chapter 4 of the OpenGL Shading Language Specification +(Variables and Types) + + Modify Section 4.1, Basic Types + + (add to the basic "Transparent Types" table, p. 19) + + +-----------+------------------------------------------------------------+ + | Type | Meaning | + +-----------+------------------------------------------------------------+ + | int16_t | a 16-bit signed integer | + | uint16_t | a 16-bit unsigned integer | + | i16vec2 | a two-component 16-bit signed integer vector | + | i16vec3 | a three-component 16-bit signed integer vector | + | i16vec4 | a four-component 16-bit signed integer vector | + | u16vec2 | a two-component 16-bit unsigned integer vector | + | u16vec3 | a three-component 16-bit unsigned integer vector | + | u16vec4 | a four-component 16-bit unsigned integer vector | + +-----------+------------------------------------------------------------+ + + + Modify Section 4.1.3, Integers + + (replace first paragraph of the section, p. 26) + + Signed and unsigned integer variables are fully supported. In this + document, the term integer is meant to generally include both signed and + unsigned integers, including both 16-bit and 32-bit integers. Unsigned + integers of type uint16_t, u16vec2, u16vec3, and u16vec4 have exactly 16 bits + of precision, while unsigned integers of type uint, uvec2, uvec3, and + uvec4 have exactly 32 bits of precision. Signed integers of type int16_t, + i16vec2, i16vec3, and i16vec4 have exactly 16 bits of precision, while signed + integers of type int, ivec2, ivec3, and ivec4 have exactly 32 bits of precision. + Addition, subtraction, and shift operations resulting in overflow or underflow + will not cause any exceptions, nor will they saturate, rather they will "wrap" + to yield the low-order bits of the result. Divison and multiplication operations + resulting in overflow or underflow will not cause any exception but will result in + an undefined value. + + Change "integer-suffix" definition: + + "integer-suffix: + unsigned-suffix short-suffixopt + short-suffix + + unsigned-suffix: one of + u U + short-suffix: one of + s S + + Modify the next paragraph to say: + "No white space is allowed between the digits of an integer constant, + including after the leading 0 or after the leading 0x or 0X of a constant, + or before the integer-suffix. When tokenizing, the maximal token matching + the above will be recognized before a new token is started. + When the suffix is present, the literal type is determined as follows: + ------------------------------------- + | suffix | type | + ------------------------------------- + | no suffix | int | + | u or U | uint | + | s or S | int16_t | + | both u/U and s/S | uint16_t | + ------------------------------------- + A leading unary minus sign (-) is interpreted as an arithmetic + unary negation, not as part of the constant. Hence, literals themselves + are always expressed with non-negative syntax, though they could result + in a negative value." + + Modify subsection 4.1.10 Implicit Conversions to say: + "In some situations, an expression and its type will be implicitly + converted to a different type. Such conversion are classified into the + following types: integral promotions, floating-point promotions, + integral conversions, floating-point conversions, and + floating-integral conversions. + + The following table shows allowed integral promotions: + -------------------------------------------------------- + | Type of | Can be implicitly promoted to | + | expression | | + -------------------------------------------------------- + | int16_t | int, int64_t, uint16_t | + | uint16_t | uint, uint64_t | + -------------------------------------------------------- + | i16vec2 | ivec2, i64vec2, u64vec2 | + | u16vec2 | uvec2, u64vec2 | + -------------------------------------------------------- + | i16vec3 | ivec3, i64vec3, u64vec3 | + | u16vec3 | uvec3, u64vec3 | + -------------------------------------------------------- + | i16vec4 | ivec4, i64vec4, u64vec4 | + | u16vec4 | uvec4, u64vec4 | + -------------------------------------------------------- + + The following table shows allowed integral conversions: + ------------------------------------------------------------------------- + | Type of | Can be implicitly converted to | + | expression | | + ------------------------------------------------------------------------- + | int16_t | uint16_t, uint, uint64_t | + | i16vec2 | u16vec2, uvec2, u64vec2 | + | i16vec3 | u16vec3, uvec3, u64vec3 | + | i16vec4 | u16vec4, uvec4, u64vec4 | + | uint16_t | uint, uint64_t | + | u16vec2 | uvec2, u64vec2 | + | u16vec3 | uvec3, u64vec3 | + | u16vec4 | uvec4, u64vec4 | + | int | uint, uint64_t | + ------------------------------------------------------------------------- + + The following table shows allowed floating-integral conversions: + -------------------------------------------------------- + | Type of | Can be implicitly converted to | + | expression | | + -------------------------------------------------------- + | int16_t | double, float16_t, float | + | i16vec2 | dvec2, f16vec2, vec2 | + | i16vec3 | dvec3, f16vec3, vec3 | + | i16vec4 | dvec4, f16vec4, vec4 | + | uint16_t | double, float16_t, float | + | u16vec2 | dvec2, f16vec2, vec2 | + | u16vec3 | dvec3, f16vec3, vec3 | + | u16vec4 | dvec4, f16vec4, vec4 | + | int | float | + | ivec2 | vec2 | + | ivec3 | vec3 | + | ivec4 | vec4 | + | uint | float | + | uvec2 | vec2 | + | uvec3 | vec3 | + | uvec4 | vec4 | + -------------------------------------------------------- + + When performing implicit conversion for binary operators, there may be + multiple data types to which the two operands can be converted. For + example, when adding an int32_t value to a uint32_t value, both values + can be implicitly converted to uint32_t, float32_t, and double. In such + cases conversion happens as defined as follows: + (Note: In this paragraph vector and matrix types are referred to as + types derived from scalar types with the same bit width and bit + interpretation) + - If either operand has type double or derived from double, + the other shall be converted to double or derived type. + - Otherwise, if either operand has type float32_t or derived from + float32_t, the other shall be converted to float32_t or derived type. + - Otherwise, if either operand has type float16_t or derived from + float16_t, the other shall be converted to float16_t or derived type. + - Otherwise, the integral promotions shall be performed on both + operands. Then the following rules shall be applied to the promoted + operands: + - If both operands have the same type, no further conversion + is needed. + - Otherwise, if both operands have signed integer types or both + have unsigned integer types, the operand with the type of lesser + integer conversion rank shall be converted to the type of the + operand with greater rank. + - Otherwise, if the operand that has unsigned integer type has rank + greater than or equal to the rank of the type of the other + operand, the operand with signed integer type shall be converted + to the type of the operand with unsigned integer type. + - Otherwise, if the type of the operand with signed integer type can + represent all of the values of the type of the operand with + unsigned integer type, the operand with unsigned integer type + shall be converted to the type of the operand with signed + integer type. + - Otherwise, both operands shall be converted to the unsigned + integer type corresponding to the type of the operand with signed + integer type. + + The conversions listed in the following subsections are done only as + indicated by other sections of this specification. + + Every integer type has an integer conversion rank defined as follows: + - No two signed integer types have the same rank. + - The rank of a scalar signed integer type shall be greater than the rank + of any scalar signed integer type with a smaller size. + - The rank of any vector signed integer type is equal to the rank of the + base scalar signed integer type. + - The rank of int64_t shall be greater than the rank of int32_t, which + shall be greater than the rank of int16_t. + - The rank of any scalar unsigned integer type shall equal the rank of + the corresponding scalar signed integer type. + - The rank of any vector unsigned integer type is equal to the rank of + the respective scalar unsigned integer type. + +Additions to Chapter 5 of the OpenGL Shading Language Specification +(Operators and Expressions) + + Modify Section 5.4.1, Conversion and Scalar Constructors + + (add after first list of constructor examples on p. 97) + + bool(int16_t) // converts a 16-bit signed integer value to a Boolean + // value. + bool(uint16_t) // converts a 16-bit unsigned integer value to a Boolean + // value. + double(int16_t) // converts a 16-bit signed integer value to a double + // value. + double(uint16_t) // converts a 16-bit unsigned integer value to a double + // value. + float(int16_t) // converts a 16-bit signed integer value to a float + // value. + float(uint16_t) // converts a 16-bit unsigned integer value to a float + // value. + float16_t(int16_t) // converts a 16-bit signed integer value to a 16-bit + // float value. + float16_t(uint16_t) // converts a 16-bit unsigned integer value to a 16-bit + // float value. + int16_t(bool) // converts a Boolean value to a 16-bit signed integer + // value. + int16_t(double) // converts a double value to a 16-bit signed integer + // value. + int16_t(float) // converts a float value to a 16-bit signed integer + // value. + int16_t(float16_t) // converts a 16-bit float value to a 16-bit signed + // integer value. + int16_t(int64_t) // converts a 64-bit signed integer value to a 16-bit + // signed integer value. + int16_t(int) // converts a signed integer value to a 16-bit signed + // integer value. + int16_t(uint) // converts an unsigned integer value to a 16-bit signed + // integer value. + int16_t(uint16_t) // converts a 16-bit unsigned integer value to a 16-bit + // signed integer value. + int16_t(uint64_t) // converts a 64-bit unsigned integer value to a 16-bit + // signed integer value. + int(int16_t) // converts a 16-bit signed integer value to a signed + // integer value. + int(uint16_t) // converts a 16-bit unsigned integer value to a signed + // integer value. + int64_t(int16_t) // converts a 16-bit signed integer value to a 64-bit + // signed integer value. + int64_t(uint16_t) // converts a 16-bit unsigned integer value to a 64-bit + // signed integer value. + uint16_t(bool) // converts a Boolean value to a 16-bit unsigned integer + // value. + uint16_t(double) // converts a double value to a 16-bit unsigned integer + // value. + uint16_t(float) // converts a float value to a 16-bit unsigned integer + // value. + uint16_t(float16_t) // converts a 16-bit float value to a 16-bit unsigned + // integer value. + uint16_t(int) // converts a signed integer value to a 16-bit unsigned + // integer value. + uint16_t(int16_t) // converts a 16-bit signed integer value to a 16-bit + // unsigned integer value. + uint16_t(uint) // converts an unsigned integer value to a 16-bit unsigned + // integer value. + uint16_t(int64_t) // converts a 64-bit signed integer value to a 16-bit + // unsigned integer value. + uint16_t(uint64_t) // converts a 64-bit unsigned integer value to a 16-bit + // unsigned integer value. + uint(int16_t) // converts a 16-bit signed integer value to an unsigned + // integer value. + uint(uint16_t) // converts a 16-bit unsigned integer value to an unsigned + // integer value. + uint64_t(int16_t) // converts a 16-bit signed integer value to a 64-bit + // unsigned integer value. + uint64_t(uint16_t) // converts a 16-bit unsigned integer value to a 64-bit + // unsigned integer value. + + (modify second sentence of first paragraph on p. 98) + + ... is dropped. It is undefined to convert a negative floating-point value + to an uint or uint16_t. + + (replace third paragraph on p. 98) + + The constructors int(uint) and int16_t(uint16_t) preserve the bit pattern + in the argument, which will change the argument's value if its sign bit is + set. The constructor uint(int) and uint16_t(int16_t) preserve the bit + pattern in the argument, which will change its value if it is negative. + + +Additions to Chapter 6 of the OpenGL Shading Language Specification +(Statements and Structure) + + Modify Section 6.1, Function Defintions + + (replace second rule in third paragraph on p. 113) + + 2. A match involving a conversion from a signed integer, unsigned + integer, or floating-point type to a similar type having a larger + number of bits is better than a match involving any other implicit + conversion. + + +Additions to Chapter 8 of the OpenGL Shading Language Specification +(Built-in Functions) + + (insert after third sentence of last paragraph on p. 132) + + ... genUType is used as the argument. Where the input arguments (and + corresponding output) can be int16_t, i16vec2, i16vec3, i16vec4, + genI16Type is used as the argument. Where the input arguments (and + corresponding output) can be uint16_t, u16vec2, u16vec3, u16vec4, + genU16Type is used as the argument. + + + Modify Section 8.3, Common Functions + + (add to the table of common functions on p. 136) + + +-------------------------------------------------+----------------------------------------------------+ + | Syntax | Desciption | + +-------------------------------------------------+----------------------------------------------------+ + | genI16Type abs(genI16Type x) | Returns x if x >= 0; otherwise it returns -x. | + +-------------------------------------------------+----------------------------------------------------+ + | genI16Type sign(genI16Type x) | Returns 1 if x > 0, 0 if x = 0, or -1 if x < 0. | + +-------------------------------------------------+----------------------------------------------------+ + | genI16Type min(genI16Type x, | Returns y if y < x; otherwise it returns x. | + | genI16Type y) | | + | genI16Type min(genI16Type x, | | + | int16_t y) | | + | genU16Type min(genU16Type x, | | + | genU16Type y) | | + | genU16Type min(genU16Type x, | | + | uint16_t y) | | + +-------------------------------------------------+----------------------------------------------------+ + | genI16Type max(genI16Type x, | Returns y if x < y; otherwise it returns x. | + | genI16Type y) | | + | genI16Type max(genI16Type x, | | + | int16_t y) | | + | genU16Type max(genU16Type x, | | + | genU16Type y) | | + | genU16Type max(genU16Type x, | | + | uint16_t y) | | + +-------------------------------------------------+----------------------------------------------------+ + | genI16Type clamp(genI16Type x, | Returns min(max(x, minVal), maxVal). | + | genI16Type minVal, | | + | genI16Type maxVal) | Results are undefined if minVal > maxVal. | + | genI16Type clamp(genI16Type x, | | + | int16_t minVal, | | + | int16_t maxVal) | | + | genU16Type clamp(genU16Type x, | | + | genU16Type minVal, | | + | genU16Type maxVal) | | + | genU16Type clamp(genU16Type x, | | + | uint16_t minVal, | | + | uint16_t maxVal) | | + +-------------------------------------------------+----------------------------------------------------+ + | genI16Type mix(genI16Type x, | Selects which vector each returned component comes | + | genI16Type y, | from. For a component of a that is false, the | + | genBType a) | corresponding component of x is returned. For a | + | genU16Type mix(genU16Type x, | component of a that is true, the corresponding | + | genU16Type y, | component of y is returned. | + | genBType a) | | + +-------------------------------------------------+----------------------------------------------------+ + | genI16Type float16BitsToInt16(genF16Type value) | Returns a signed or unsigned 16-bit integer value | + | genU16Type float16BitsToUint16(genF16Type value)| representing the encoding of a 16-bit float. The | + | | half floating-point value's bit-level | + | | representation is preserved | + +-------------------------------------------------+----------------------------------------------------+ + | genF16Type int16BitsToFloat16(genI16Type value) | Returns a half-floating point value corresponding | + | genF16Type uint16BitsToFloat16(genU16Type value)| to a signed or unsigned 16-bit integer encoding of | + | | a 16-bit float. If a NaN is passed in, it will not | + | | signal, and the resulting value is unspecified. If | + | | an Inf is passed in, the resulting value is the | + | | corresponding Inf. | + +-------------------------------------------------+----------------------------------------------------+ + | genF16Type frexp(genF16Type x, | Splits x into a floating-point significand in the | + | out genI16Type exp) | range [0.5, 1.0) and an integral exponent of two, | + | | such that: | + | | | + | | x = significand * 2 ** exponent | + | | | + | | The significand is returned by the function and | + | | the exponent is returned in the parameter exp. For | + | | a floating-point value of zero, the significand | + | | and exponent are both zero. For a floating-point | + | | value that is an infinity or is not a number, the | + | | results are undefined. | + | | | + | | If an implementation supports negative 0, | + | | frexp(-0) should return -0; otherwise it will | + | | return 0. | + +-------------------------------------------------+----------------------------------------------------+ + | genF16Type ldexp(genF16Type x, | Returns x * (2 ** exp). | + | genI16Type exp) | | + +-------------------------------------------------+----------------------------------------------------+ + + + Modify Section 8.4, Floating-Point and Integer Pack and Unpack Functions + + (add to the table of pack and unpack functions on p. 149 + + +-----------------------------------+------------------------------------------------------+ + | Syntax | Desciption | + +-----------------------------------+------------------------------------------------------+ + | | Returns an unsigned 32- or 64-bit integer obtained | + | int packInt2x16 (i16vec2 v) | by packing the components of a two- or | + | int64_t packInt4x16 (i16vec4 v) | four-component 16-bit signed or unsigned integer | + | uint packUint2x16(u16vec2 v) | vector, respectively. The first vector component | + | uint64_t packUint4x16(u16vec4 v) | specifies the 16 least significant bits; the | + | | last component specifies the 16 most significant | + | | bits. | + +-----------------------------------+------------------------------------------------------+ + | | Returns a signed or unsigned integer vector built | + | i16vec2 unpackInt2x16 (int v)| from a 32- or 64-bit signed or unsigned integer | + | i16vec4 unpackInt4x16 (int64_t v)| scalar, respectively. The first component of the | + | u16vec2 unpackUint2x16(uint v)| vector contains the 16 least significant bits of the | + | u16vec4 unpackUint4x16(uint64_t v)| input; the last component specifies the 16 most | + | | significant bits. | + | | | + +-----------------------------------+------------------------------------------------------+ + + + Modify Section, 8.7, Vector Relational Functions + + Modify the first table to state: + + +-------------+-----------------------------+ + | Placeholder | Specific Types Allowed | + +-------------+-----------------------------+ + | i16vec | i16vec2, i16vec3, i16vec4 | + | u16vec | u16vec2, u16vec3, u16vec4 | + +-------------+-----------------------------+ + + (add to the table of vector relational functions at the bottom of p. 147) + + +-------------------------------------------+-----------------------------------------------+ + | Syntax | Desciption | + +-------------------------------------------+-----------------------------------------------+ + | bvec lessThan(i16vec x, i16vec y) | Returns the component-wise compare of x < y. | + | bvec lessThan(u16vec x, u16vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec lessThanEqual(i16vec x, i16vec y) | Returns the component-wise compare of x <= y. | + | bvec lessThanEqual(u16vec x, u16vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec greaterThan(i16vec x, i16vec y) | Returns the component-wise compare of x > y. | + | bvec greaterThan(u16vec x, u16vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec greaterThanEqual(i16vec x, i16vec y) | Returns the component-wise compare of x >= y. | + | bvec greaterThanEqual(u16vec x, u16vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec equal(i16vec x, i16vec y) | Returns the component-wise compare of x == y. | + | bvec equal(u16vec x, u16vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec notEqual(i16vec x, i16vec y) | Returns the component-wise compare of x != y. | + | bvec notEqual(u16vec x, u16vec y) | | + +-------------------------------------------+-----------------------------------------------+ + + + Modify language in the Overview section of GL_KHR_vulkan_glsl + + Replace the following sentence: + + The constant_id can only be applied to a scalar *int*, a scalar *float* + or a scalar *bool*. + + with: + + The constant_id can only be applied to a scalar *int* (incl. 16-bit signed + and unsigned integers), a scalar *float* or a scalar *bool*. + + +Dependencies on AMD_gpu_shader_half_float + + If the shader enables only AMD_gpu_shader_int16, but not AMD_gpu_shader_half_float + then: + + * the table describing floating-integral conversions is discarded. + * the float16BitsTo{Int, Uint}16(), {int, uint}16BitsToFloat16(), frexp() + and ldexp() functions are unavailable. + + +Dependencies on ARB_gpu_shader_int64: + + If the shader enables only AMD_gpu_shader_int16, but not ARB_gpu_shader_int64 + then: + + * all references to int64_t and uint64_t should be ignored. + +Dependencies on KHR_vulkan_glsl: + + If the shader only enables AMD_gpu_shader_int16, but not KHR_vulkan_glsl, + then any changes to the language of the latter specification should be discarded. + +Dependencies on AMD_shader_trinary_minmax + + If the shader enables AMD_shader_trinary_minmax, this extension adds + additional common functions. + + Modify Section 8.3, Common Functions + + (add to the table of common functions on p. 144) + + +-------------------------------------------+-----------------------------------------------+ + | Syntax | Description | + +-------------------------------------------+-----------------------------------------------+ + | genI16Type min3(genI16Type x, | Returns the per-component minimum value of x, | + | genI16Type y, | y, and z. | + | genI16Type z) | | + | genU16Type min3(genU16Type x, | | + | genU16Type y, | | + | genU16Type z) | | + +-------------------------------------------+-----------------------------------------------+ + | genI16Type max3(genI16Type x, | Returns the per-component maximum value of x, | + | genI16Type y, | y, and z. | + | genI16Type z) | | + | genU16Type max3(genU16Type x, | | + | genU16Type y, | | + | genU16Type z) | | + +-------------------------------------------+-----------------------------------------------+ + | genI16Type mid3(genI16Type x, | Returns the per-component median value of x, | + | genI16Type y, | y, and z. | + | genI16Type z) | | + | genU16Type mid3(genU16Type x, | | + | genU16Type y, | | + | genU16Type z) | | + +-------------------------------------------+-----------------------------------------------+ + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + (1) Should the new int16_t and uint16_t types support types as members of + uniform blocks and shader storage buffer blocks? + + RESOLVED: Yes, both types can be used in both SSBOs and UBOs, each consuming + 2 basic machine units. + + + (2) Should we support int16_t and uint16_t types as members of uniform blocks, + shader storage buffer blocks, or as transform feedback varyings? + + RESOLVED: Yes, support all of them. both types consume two basic machine + units. Some examples: + + struct S { + + uint16_t x; // rule 1: align = 2, takes offsets 0-1 + u16vec2 y; // rule 2: align = 4, takes offsets 4-7 + u16vec3 z; // rule 3: align = 8, takes offsets 8-13 + }; + + layout(std140) uniform B1 { + + uint16_t a; // rule 1: align = 2, takes offsets 0-1 + u16vec2 b; // rule 2: align = 4, takes offsets 4-7 + u16vec3 c; // rule 3: align = 8, takes offsets 8-13 + uint16_t d[2]; // rule 4: align = 16, array stride = 16, + // takes offsets 16-47 + S g; // rule 9: align = 16, g.x takes offsets + // 48-49, g.y takes offsets 52-55, + // g.z takes offsets 56-63 + S h[2]; // rule 10: align = 16, array stride = 16, h[0] + // takes offsets 64-77, h[1] takes + // offsets 78-93 + }; + + layout(std430) buffer B2 { + + uint16_t o; // rule 1: align = 2, takes offsets 0-1 + u16vec2 p; // rule 2: align = 4, takes offsets 4-7 + u16vec3 q; // rule 3: align = 8, takes offsets 8-13 + uint16_t r[2]; // rule 4: align = 2, array stride = 2, takes + // offsets 14-17 + S u; // rule 9: align = 8, u.x takes offsets + // 24-25, u.y takes offsets 28-31, u.z + // takes offsets 32-37 + S v[2]; // rule 10: align = 8, array stride = 16, v[0] + // takes offsets 40-55, v[1] takes + // offsets 56-71 + }; + + (3) Are interactions with GL_AMD_shader_ballot supported? + (4) Are interactions with GL_AMD_shader_explicit_vertex_parameter supported? + (5) Are interactions with GL_AMD_shader_trinary_minmax supported? + + RESOLVED: Not yet. These will be resolved at a later time. + + (6) Does this extension provide a new subpassLoad() function prototype which + returns a(n) {u}int16 vector value? + + RESOLVED: No. This functionality may be added at a later time in a separate + extension. + + (7) Can the new int16 and uint16 types be used as array indexes? + + RESOLVED: No. + + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + 2 03/28/2018 rexu Add interactions with AMD_shader_trinary_minmax. + New common functions are added to support + 16-bit integer type in these trinary operations. + + 1 06/08/2017 dwitczak First release. \ No newline at end of file diff --git a/opengles/extensions/AMD/AMD_gpu_shader_int64.txt b/opengles/extensions/AMD/AMD_gpu_shader_int64.txt new file mode 100644 index 0000000000..ed344852bc --- /dev/null +++ b/opengles/extensions/AMD/AMD_gpu_shader_int64.txt @@ -0,0 +1,796 @@ +Name + + AMD_gpu_shader_int64 + +Name Strings + + GL_AMD_gpu_shader_int64 + +Contact + + Daniel Rakos, AMD (daniel.rakos 'at' amd.com) + +Contributors + + Daniel Rakos, AMD + Graham Sellers, AMD + +Status + + Shipping + +Version + + Last Modified Date: 07/07/2014 + Author Revision: 3 + +Number + + OpenGL Extension #451 + +Dependencies + + This extension is written against the OpenGL 4.4 (Core Profile) + Specification. + + This extension is written against version 4.40 of the OpenGL Shading + Language Specification. + + OpenGL 4.0 and GLSL 4.00 are required. + + This extension interacts with NV_gpu_shader5. + + This extension interacts with NV_shader_buffer_load. + + This extension interacts with EXT_direct_state_access. + + This extension interacts with NV_vertex_attrib_integer_64bit. + + This extension interacts with EXT_shader_integer_mix. + +Overview + + This extension was developed based on the NV_gpu_shader5 extension to + allow implementations supporting 64-bit integers to expose the feature + without the additional requirements that are present in NV_gpu_shader5. + + The extension introduces the following features for all shader types: + + * support for 64-bit scalar and vector integer data types, including + uniform API, uniform buffer object, transform feedback, and shader + input and output support; + + * new built-in functions to pack and unpack 64-bit integer types into a + two-component 32-bit integer vector; + + * new built-in functions to convert double-precision floating-point + values to or from their 64-bit integer bit encodings; + + * vector relational functions supporting comparisons of vectors of + 64-bit integer types; and + + * common functions abs, sign, min, max, clamp, and mix supporting + arguments of 64-bit integer types. + + This extension is designed to be a functional superset of the 64-bit + integer support introduced by NV_gpu_shader5 and to be source code + compatible with that, thus the new procedures, functions, and tokens + are identical to those found in that extension. + + +New Procedures and Functions + + (The functions are identical to those defined in NV_gpu_shader5.) + + void Uniform1i64NV(int location, int64EXT x); + void Uniform2i64NV(int location, int64EXT x, int64EXT y); + void Uniform3i64NV(int location, int64EXT x, int64EXT y, int64EXT z); + void Uniform4i64NV(int location, int64EXT x, int64EXT y, int64EXT z, + int64EXT w); + void Uniform1i64vNV(int location, sizei count, const int64EXT *value); + void Uniform2i64vNV(int location, sizei count, const int64EXT *value); + void Uniform3i64vNV(int location, sizei count, const int64EXT *value); + void Uniform4i64vNV(int location, sizei count, const int64EXT *value); + + void Uniform1ui64NV(int location, uint64EXT x); + void Uniform2ui64NV(int location, uint64EXT x, uint64EXT y); + void Uniform3ui64NV(int location, uint64EXT x, uint64EXT y, uint64EXT z); + void Uniform4ui64NV(int location, uint64EXT x, uint64EXT y, uint64EXT z, + uint64EXT w); + void Uniform1ui64vNV(int location, sizei count, const uint64EXT *value); + void Uniform2ui64vNV(int location, sizei count, const uint64EXT *value); + void Uniform3ui64vNV(int location, sizei count, const uint64EXT *value); + void Uniform4ui64vNV(int location, sizei count, const uint64EXT *value); + + void GetUniformi64vNV(uint program, int location, int64EXT *params); + + + (The following function is also provided by NV_shader_buffer_load.) + + void GetUniformui64vNV(uint program, int location, uint64EXT *params); + + + (All of the following ProgramUniform* functions are supported if and only + if EXT_direct_state_access is supported.) + + void ProgramUniform1i64NV(uint program, int location, int64EXT x); + void ProgramUniform2i64NV(uint program, int location, int64EXT x, + int64EXT y); + void ProgramUniform3i64NV(uint program, int location, int64EXT x, + int64EXT y, int64EXT z); + void ProgramUniform4i64NV(uint program, int location, int64EXT x, + int64EXT y, int64EXT z, int64EXT w); + void ProgramUniform1i64vNV(uint program, int location, sizei count, + const int64EXT *value); + void ProgramUniform2i64vNV(uint program, int location, sizei count, + const int64EXT *value); + void ProgramUniform3i64vNV(uint program, int location, sizei count, + const int64EXT *value); + void ProgramUniform4i64vNV(uint program, int location, sizei count, + const int64EXT *value); + + void ProgramUniform1ui64NV(uint program, int location, uint64EXT x); + void ProgramUniform2ui64NV(uint program, int location, uint64EXT x, + uint64EXT y); + void ProgramUniform3ui64NV(uint program, int location, uint64EXT x, + uint64EXT y, uint64EXT z); + void ProgramUniform4ui64NV(uint program, int location, uint64EXT x, + uint64EXT y, uint64EXT z, uint64EXT w); + void ProgramUniform1ui64vNV(uint program, int location, sizei count, + const uint64EXT *value); + void ProgramUniform2ui64vNV(uint program, int location, sizei count, + const uint64EXT *value); + void ProgramUniform3ui64vNV(uint program, int location, sizei count, + const uint64EXT *value); + void ProgramUniform4ui64vNV(uint program, int location, sizei count, + const uint64EXT *value); + + +New Tokens + + Returned by the parameter of GetActiveAttrib, GetActiveUniform, and + GetTransformFeedbackVarying: + + (The tokens are identical to those defined in NV_gpu_shader5.) + + INT64_NV 0x140E + UNSIGNED_INT64_NV 0x140F + + INT8_NV 0x8FE0 + INT8_VEC2_NV 0x8FE1 + INT8_VEC3_NV 0x8FE2 + INT8_VEC4_NV 0x8FE3 + INT16_NV 0x8FE4 + INT16_VEC2_NV 0x8FE5 + INT16_VEC3_NV 0x8FE6 + INT16_VEC4_NV 0x8FE7 + INT64_VEC2_NV 0x8FE9 + INT64_VEC3_NV 0x8FEA + INT64_VEC4_NV 0x8FEB + UNSIGNED_INT8_NV 0x8FEC + UNSIGNED_INT8_VEC2_NV 0x8FED + UNSIGNED_INT8_VEC3_NV 0x8FEE + UNSIGNED_INT8_VEC4_NV 0x8FEF + UNSIGNED_INT16_NV 0x8FF0 + UNSIGNED_INT16_VEC2_NV 0x8FF1 + UNSIGNED_INT16_VEC3_NV 0x8FF2 + UNSIGNED_INT16_VEC4_NV 0x8FF3 + UNSIGNED_INT64_VEC2_NV 0x8FF5 + UNSIGNED_INT64_VEC3_NV 0x8FF6 + UNSIGNED_INT64_VEC4_NV 0x8FF7 + FLOAT16_NV 0x8FF8 + FLOAT16_VEC2_NV 0x8FF9 + FLOAT16_VEC3_NV 0x8FFA + FLOAT16_VEC4_NV 0x8FFB + + +Additions to Chapter 7 of the OpenGL 4.4 (Core Profile) Specification +(Program Objects) + + Modify Section 7.3.1, Program Interfaces + + (add to Table 7.3, OpenGL Shading Language type tokens, p. 107) + + +----------------------------+--------------+--------+--------+--------+ + | Type Name Token | Keyword | Attrib | Xfb | Buffer | + +----------------------------+--------------+--------+--------+--------+ + | INT64_NV | int64_t | * | * | * | + | INT64_VEC2_NV | i64vec2 | * | * | * | + | INT64_VEC3_NV | i64vec3 | * | * | * | + | INT64_VEC4_NV | i64vec4 | * | * | * | + | UNSIGNED_INT64_NV | uint64_t | * | * | * | + | UNSIGNED_INT64_VEC2_NV | u64vec2 | * | * | * | + | UNSIGNED_INT64_VEC3_NV | u64vec3 | * | * | * | + | UNSIGNED_INT64_VEC4_NV | u64vec4 | * | * | * | + +----------------------------+--------------+--------+--------+--------+ + + Modify Section 7.6, Uniform Variables + + (modify second paragraph on p. 120) + + Scalar, vector, and matrix uniforms with double-precision components, + and scalar and vector uniforms with 64-bit integer components will consume + no more than twice the number of components of equivalent uniforms with + single-precision components. + + + Modify Section 7.6.1, Loading Uniform Variables + + (add to the list of commands in first paragraph on p. 125) + + void Uniform{1,2,3,4}{i64,ui64}NV(int location, T value); + void Uniform{1,2,3,4}{i64,ui64}vNV(int location, T value); + + (insert after third paragraph on p. 127) + + The Uniform*i64{v}NV and Uniform*ui{v}NV commands will load count sets + of one to four 64-bit signed or unsigned integer values into a uniform + location defined as a 64-bit signed or unsigned integer scalar or vector + types. + + + Modify Section 7.6.2.1, Uniform Buffer Object Storage + + (modify the first two bullets of the first paragraph on p. 130) + + * Members of type bool int, uint, float, double, int64_t, and uint64_t + are respectively extracted from a buffer object by reading a single + uint, int, uint, float, double, int64_t, or uint64_t value at the + specified offset. + + * Vectors with N elements with basic data types of bool, int, uint, + float, double, int64_t, or uint64_t are extracted as N values in + consecutive memory locations beginning at the specified offset, with + components stored in order with the first (X) component at the + lowest offset. The GL data type used for component extraction is + derived according to the rules for scalar members above. + + + Modify Section 7.13, Shader, Program, and Program Pipeline Queries + + (add to the list of commands in last paragraph on p. 155) + + void GetUniformi64vNV(uint program, int location, int64* params) + void GetUniformui64vNV(uint program, int location, uint64* params) + + +Additions to Chapter 11 of the OpenGL 4.4 (Core Profile) Specification +(Programmable Vertex Processing) + + Modify Section 11.1.1, Vertex Attributes + + (modify third sentence of second paragraph on p. 344) + + ... hardware resources. For the purposes of this test, attribute variables + of the type dvec3, dvec4, dmat2x3, dmat2x3, dmat3, dmat3x4, dmat4x3, + dmat4, i64vec3, i64vec4, u64vec3, and u64vec4 may count as consuming twice + as many attributes as equivalent single-precision types. While these types + use the same number of generic attributes as their single-precision + vectors of internal storage for each three- or four-component + double-precision or 64-bit integer vector. + + + Modify Section 11.1.2.1, Output Variables + + (modify last sentence of fourth paragraph on p. 345) + + ... multiple components. Each component of variables declared as double- + precision floating point scalars, vectors, or matrices, or declared as + 64-bit integer scalars or vectors may be counted as consuming two + components. + + (modify third bullet of the first paragraph on p. 349) + + * any variable containing double-precision floating-point or 64-bit + integer components + + - has an xfb_offset layout qualifier that is not a multiple of eight; + or + - is associated with a binding point with an xfb_stride layout + qualifier that is not a multiple of eight; + + (modify second paragraph on p. 349) + + For transform feedback purposes, each component of outputs declared as + double-precision floating-point scalars, vectors, or matrices, or 64-bit + integer scalars or vectors are considered to consume eight basic machine + units, and each component of any other type is considered to consume four + basic machine units. + + +Modifications to the OpenGL Shading Language Specification, Version 4.40 + + Including the following line in a shader can be used to control the + language features described in this extension: + + #extension GL_AMD_gpu_shader_int64 : + + where is as specified in section 3.3. + + New preprocessor #defines are added to the OpenGL Shading Language: + + #define GL_AMD_gpu_shader_int64 1 + + +Additions to Chapter 3 of the OpenGL Shading Language Specification (Basics) + + Modify Section 3.6, Keywords + + (add the following to the list of reserved keywords at p. 15) + + int64_t i64vec2 i64vec3 i64vec4 uint64_t u64vec2 u64vec3 u64vec4 + + +Additions to Chapter 4 of the OpenGL Shading Language Specification +(Variables and Types) + + Modify Section 4.1, Basic Types + + (add to the basic "Transparent Types" table, p. 19) + + +-----------+------------------------------------------------------------+ + | Type | Meaning | + +-----------+------------------------------------------------------------+ + | int64_t | a 64-bit signed integer | + | uint64_t | a 64-bit unsigned integer | + | i64vec2 | a two-component 64-bit signed integer vector | + | i64vec3 | a three-component 64-bit signed integer vector | + | i64vec4 | a four-component 64-bit signed integer vector | + | u64vec2 | a two-component 64-bit unsigned integer vector | + | u64vec3 | a three-component 64-bit unsigned integer vector | + | u64vec4 | a four-component 64-bit unsigned integer vector | + +-----------+------------------------------------------------------------+ + + + Modify Section 4.1.3, Integers + + (replace first paragraph of the section, p. 23) + + Signed and unsigned integer variables are fully supported. In this + document, the term integer is meant to generally include both signed and + unsigned integers, including both 32-bit and 64-bit integers. Unsigned + integers of type uint, uvec2, uvec3, and uvec4 have exactly 32 bits of + precision, while unsigned integers of type uint64_t, u64vec2, u64vec3, and + u64vec4 have exactly 64 bits of precision. Signed integers of type int, + ivec2, ivec3, and ivec4 have exactly 32 bits of precision, while signed + integers of type int64_t, i64vec2, i64vec3, and i64vec4 have exactly + 64 bits of precision. Addition, subtraction, and shift operations + resulting in overflow or underflow will not cause any exceptions, nor + will they saturate, rather they will "wrap" to yield the low-order bits + of the result. Divison and multiplication operations resulting in overflow + or underflow will not cause any exception but will result in an undefined + value. + + (add after the first paragraph of the section, p. 23) + + Variables with the types "int64_t" and "uint64_t" represent signed and + unsigned integer values, respectively, with exactly 64 bits of precision. + + (modify grammar rule for "integer-suffix", p. 24) + + integer-suffix: one of + u U l L ul UL + + (modify first sentence of second paragraph on p. 24) + + No white space is allowed between the digits of an integer constant, + including after the leading 0 or after the leading 0x or 0X of a constant, + or before the suffix u, U, l, L, ul, or UL. + + (modify third sentence of second paragraph on p. 24) + + When the suffix u or U is present, the literal has type uint. When the + suffix l or L is present, the literal has type int64_t. When the suffix + ul or UL is present, the literal has type uint64_t. Otherwise, the type is + int. + + + Modify Section 4.1.10, Implicit Conversions + + (modify table of implicit conversions on p. 33) + + +----------------------+-------------------------------------------------+ + | Type of expression | Can be implicitly converted to | + +----------------------+-------------------------------------------------+ + | int | uint, int64_t, uint64_t, float, double | + | uint | uint64_t, float, double | + | int64_t | uint64_t, double | + | uint64_t | double | + | ivec2 | uvec2, i64vec2, u64vec2, vec2, dvec2 | + | ivec3 | uvec3, i64vec3, u64vec3, vec3, dvec3 | + | ivec4 | uvec4, i64vec4, u64vec4, vec4, dvec4 | + | uvec2 | u64vec2, vec2, dvec2 | + | uvec3 | u64vec3, vec3, dvec3 | + | uvec4 | u64vec4, vec4, dvec4 | + | i64vec2 | u64vec2, dvec2 | + | i64vec3 | u64vec3, dvec3 | + | i64vec4 | u64vec4, dvec4 | + | u64vec2 | dvec2 | + | u64vec3 | dvec3 | + | u64vec4 | dvec4 | + +----------------------+-------------------------------------------------+ + + + Modify Section 4.3.6, Output Variables + + (modify third and fourth sentence of second paragraph on p. 46) + + ... in a fragment shader. Fragment outputs can only be float, single- + precision floating-point vectors, signed or unsigned 32-bit integer + vectors, or arrays of any these. It is a compile-time error to declare any + double-precision type, 64-bit integer type, matrix, or structure as an + output. + + +Additions to Chapter 5 of the OpenGL Shading Language Specification +(Operators and Expressions) + + Modify Section 5.4.1, Conversion and Scalar Constructors + + (add after first list of constructor examples on p. 91) + + int64_t(double) // converts a double value to a 64-bit signed integer + uint64_t(bool) // converts a Boolean value to a 64-bit unsigned integer + + (modify second sentence of first paragraph on p. 92) + + ... is dropped. It is undefined to convert a negative floating-point value + to an uint or uint64_t. + + (replace third paragraph on p. 92) + + The constructors int(uint) and int64_t(uint64_t) preserve the bit pattern + in the argument, which will change the argument's value if its sign bit is + set. The constructor uint(int) and uint64_t(int64_t) preserve the bit + pattern in the argument, which will change its value if it is negative. + + +Additions to Chapter 6 of the OpenGL Shading Language Specification +(Statements and Structure) + + Modify Section 6.1, Function Defintions + + (replace second rule in third paragraph on p. 106) + + 2. A match involving a conversion from a signed integer, unsigned + integer, or floating-point type to a similar type having a larger + number of bits is better than a match involving any other implicit + conversion. + + +Additions to Chapter 8 of the OpenGL Shading Language Specification +(Built-in Functions) + + (insert after third sentence of last paragraph on p. 132) + + ... genUType is used as the argument. Where the input arguments (and + corresponding output) can be int64_t, i64vec2, i64vec3, i64vec4, + genI64Type is used as the argument. Where the input arguments (and + corresponding output) can be uint64_t, u64vec2, u64vec3, u64vec4, + genU64Type is used as the argument. + + + Modify Section 8.3, Common Functions + + (add to the table of common functions on p. 136) + + +------------------------------------------------+----------------------------------------------------+ + | Syntax | Desciption | + +------------------------------------------------+----------------------------------------------------+ + | genI64Type abs(genI64Type x) | Returns x if x >= 0; otherwise it returns -x. | + +------------------------------------------------+----------------------------------------------------+ + | genI64Type sign(genI64Type x) | Returns 1 if x > 0, 0 if x = 0, or -1 if x < 0. | + +------------------------------------------------+----------------------------------------------------+ + | genI64Type min(genI64Type x, | Returns y if y < x; otherwise it returns x. | + | genI64Type y) | | + | genI64Type min(genI64Type x, | | + | int64_t y) | | + | genU64Type min(genU64Type x, | | + | genU64Type y) | | + | genU64Type min(genU64Type x, | | + | uint64_t y) | | + +------------------------------------------------+----------------------------------------------------+ + | genI64Type max(genI64Type x, | Returns y if x < y; otherwise it returns x. | + | genI64Type y) | | + | genI64Type max(genI64Type x, | | + | int64_t y) | | + | genU64Type max(genU64Type x, | | + | genU64Type y) | | + | genU64Type max(genU64Type x, | | + | uint64_t y) | | + +------------------------------------------------+----------------------------------------------------+ + | genI64Type clamp(genI64Type x, | Returns min(max(x, minVal), maxVal). | + | genI64Type minVal, | | + | genI64Type maxVal) | Results are undefined if minVal > maxVal. | + | genI64Type clamp(genI64Type x, | | + | int64_t minVal, | | + | int64_t maxVal) | | + | genU64Type clamp(genU64Type x, | | + | genU64Type minVal, | | + | genU64Type maxVal) | | + | genU64Type clamp(genU64Type x, | | + | uint64_t minVal, | | + | uint64_t maxVal) | | + +------------------------------------------------+----------------------------------------------------+ + | genI64Type mix(genI64Type x, | Selects which vector each returned component comes | + | genI64Type y, | from. For a component of a that is false, the | + | genBType a) | corresponding component of x is returned. For a | + | genU64Type mix(genU64Type x, | component of a that is true, the corresponding | + | genU64Type y, | component of y is returned. | + | genBType a) | | + +------------------------------------------------+----------------------------------------------------+ + | genI64Type doubleBitsToInt64(genDType value) | Returns a signed or unsigned 64-bit integer value | + | genU64Type doubleBitsToUint64(genDType value) | representing the encoding of a double. The double | + | | value's bit-level representation is preserved | + +------------------------------------------------+----------------------------------------------------+ + | genDType int64BitsToDouble(genI64Type value) | Returns a double value corresponding to a signed | + | genDType uint64BitsToDouble(genU64Type value) | or unsigned integer encoding of a double. If a NaN | + | | is passed in, it will not signal, and the | + | | resulting value is unspecified. If an Inf is | + | | passed in, the resulting value is the | + | | corresponding Inf. | + +------------------------------------------------+----------------------------------------------------+ + + + Rename Section 8.4, Floating-Point Pack and Unpack Functions to + 8.4, Floating-Point and Integer Pack and Unpack Functions + + + Modify Section 8.4, Floating-Point and Integer Pack and Unpack Functions + + (add to the table of pack and unpack functions on p. 141) + + +-----------------------------------+------------------------------------------------------+ + | Syntax | Desciption | + +-----------------------------------+------------------------------------------------------+ + | int64_t packInt2x32(ivec2 v) | Returns a signed or unsigned 64-bit integer obtained | + | uint64_t packUint2x32(uvec2 v) | by packing the components of a two-component signed | + | | or unsigned integer vector, respectively. The first | + | | vector component specifies the 32 least significant | + | | bits; the second component specifies the 32 most | + | | significant bits. | + +-----------------------------------+------------------------------------------------------+ + | ivec2 unpackInt2x32(int64_t v) | Returns a signed or unsigned integer vector built | + | uvec2 unpackUint2x32(uint64_t v) | from a 64-bit signed or unsigned integer scalar, | + | | respectively. The first component of the vector | + | | contains the 32 least significant bits of the input; | + | | the second component contains the 32 most | + | | significant bits. | + +-----------------------------------+------------------------------------------------------+ + + + Modify Section, 8.7, Vector Relational Functions + + (add to the table of placeholders at the top of p. 147) + + +-------------+-----------------------------+ + | Placeholder | Specific Types Allowed | + +-------------+-----------------------------+ + | i64vec | i64vec2, i64vec3, i64vec4 | + | u64vec | u64vec2, u64vec3, u64vec4 | + +-------------+-----------------------------+ + + (add to the table of vector relational functions at the bottom of p. 147) + + +-------------------------------------------+-----------------------------------------------+ + | Syntax | Desciption | + +-------------------------------------------+-----------------------------------------------+ + | bvec lessThan(i64vec x, i64vec y) | Returns the component-wise compare of x < y. | + | bvec lessThan(u64vec x, u64vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec lessThanEqual(i64vec x, i64vec y) | Returns the component-wise compare of x <= y. | + | bvec lessThanEqual(u64vec x, u64vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec greaterThan(i64vec x, i64vec y) | Returns the component-wise compare of x > y. | + | bvec greaterThan(u64vec x, u64vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec greaterThanEqual(i64vec x, i64vec y) | Returns the component-wise compare of x >= y. | + | bvec greaterThanEqual(u64vec x, u64vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec equal(i64vec x, i64vec y) | Returns the component-wise compare of x == y. | + | bvec equal(u64vec x, u64vec y) | | + +-------------------------------------------+-----------------------------------------------+ + | bvec notEqual(i64vec x, i64vec y) | Returns the component-wise compare of x != y. | + | bvec notEqual(u64vec x, u64vec y) | | + +-------------------------------------------+-----------------------------------------------+ + + + Modify Section 9, Shading Language Grammar for Core Profile + + (add to the list of tokens on p. 180) + + ... + INT64 UINT64 I64VEC2 I64VEC3 I64VEC4 U64VEC2 U64VEC3 U64VEC4 + ... + INT64CONSTANT UINT64CONSTANT + + (add to the rule of "primary_expression" on p. 181) + + primary_expression: + ... + INT64CONSTANT + UINT64CONSTANT + ... + + (add to the rule of "type_specifier_nonarray" on p. 188) + + type_specifier_nonarray: + ... + INT64 + UINT64 + ... + I64VEC2 + I64VEC3 + I64VEC4 + U64VEC2 + U64VEC3 + U64VEC4 + ... + + +Dependencies on NV_gpu_shader5 + + If the shader enables only NV_gpu_shader5, but not AMD_gpu_shader_int64 + then implicit conversions from int and uint types to int64_t and uint64_t + types are not allowed. Also, the overloaded built-in functions abs, + sign, min, max, clamp, and mix are not available. + + +Dependencies on NV_shader_buffer_load + + If NV_shader_buffer_load is supported, that specification should be edited + as follows, to allow pointers to dereference the new data types added by + this extension. + + Modify "Section 2.20.X, Shader Memory Access" from NV_shader_buffer_load. + + (add rules for loads of variables having the new data types from this + extension to the list of bullets following "When a shader dereferences a + pointer variable") + + - Data of type int64_t and uint64_t are read from or written to memory as + a signel 64-bit signed and unsigned integer value, respectively, at the + specified GPU address. + + +Dependencies on EXT_direct_state_access + + If EXT_direct_state_access is supported, that specification should be + edited as follows to include new ProgramUniform* functions. + + (add to the list of ProgramUniform* commands) + + void ProgramUniform{1,2,3,4}{i64,ui64}NV + (uint program int location, T value); + void ProgramUniform{1,2,3,4}{i64,ui64}vNV + (uint program, int location, const T *value); + +Dependencies on NV_vertex_attrib_integer_64bit + + This extension only provides the ability to specify 64-bit integer input + variables in a GLSL vertex shader, but does not provide a way to specify + the values of the corresponding vertex attributes via the OpenGL API. + The NV_vertex_attrib_integer_64bit extension exactly provides that + functionality. + + +Dependencies on EXT_shader_integer_mix + + If EXT_shader_integer_mix is not supported remove all references to the + new overloaded built-in functions of mix. + + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + (1) How the functionality in this extension different than the 64-bit + integer support introduced by NV_gpu_shader5? + + RESOLVED: This extension is designed to be source code compatible with + the 64-bit integer support in NV_gpu_shader5. However, it is a + functional superset of that, as it adds the following additional + features: + + * support for overloaded versions of the functions abs, sign, min, + max, clamp, and mix that accept 64-bit integers as parameters. + + (2) How do the implicit conversions impact binary operators? + + RESOLVED: For binary operators, we prefer converting to a common type + that is as close as possible in size and type to the original + expression. + + (3) How do the implicit conversions impact function overloading rules? + + RESOLVED: We extend the preference rules in core OpenGL to account + for the new data types, adding a rule to favor conversion from 32-bit + integers to 64-bit integers over coversions to floating-point values. + + (4) What should be done to distinguish between 32- and 64-bit integer + constants? + + RESOLVED: We will use "L" and "UL" to identify signed and unsigned + 64-bit integer constants; the use of "L" matches a similar ("long") + suffix in the C programming language. C leaves the size of integer + types implementation-dependent, and many implementations require an "LL" + suffix to declare 64-bit integer constants. With our size definitions, + "L" will be considered sufficient to make an integer constant 64-bit. + + (5) Should provide support for vertex attributes with 64-bit components, + and if so, how should the support be provided in the OpenGL API? + + RESOLVED: Yes, but in order to specify 64-bit vertex attribute values + in the OpenGL API support for NV_vertex_attrib_integer_64bit or a + similar extension is also required. + + (6) Should we support 64-bit integer uniforms in the default uniform + block? + + DISCUSSION: There isn't much value in extending the standalone uniform + API, as uniform buffers provide a way more efficient way to feed + uniforms to the shaders, but in order to achieve feature parity with + the 64-bit integer support in NV_gpu_shader5 it might be favorable to + add support for it. + + RESOLVED: Yes, for compatibility with NV_gpu_shader5. + + (7) Should we support 64-bit integer types as members of uniform blocks, + shader storage buffer blocks, or as transform feedback varyings? + + RESOLVED: Yes, support all of them. 64-bit integers will consume eight + basic machine units just like double-precision floating-point variables. + + (8) How do the uniform loading commands introduced by this extension + interact similar commands added by NV_shader_buffer_load? + + RESOLVED: NV_shader_buffer_load provided the command Uniformui64NV to + load pointer uniforms with a single 64-bit unsigned integer. This + extension provides vectors of 64-bit unsigned integers, so we needed + Uniform{2,3,4}ui64NV commands. We chose to provide a Uniform1ui64NV + command, which will be functionally equivalent to Uniformui64NV. + + (9) Should we provide distinct sized types for 32-bit integers, floats, + and doubles? + + RESOLVED: No. While NV_gpu_shader5 does add such types, it seems there + isn't much value in adding those in this extension, especially because + this extension strictly focuses on supporting 64-bit integers. + + (10) Can the 64-bit uniform APIs be used to load values for uniforms of + type "bool", "bvec2", "bvec3", or "bvec4"? + + RESOLVED: No. OpenGL 2.0 and beyond did allow "bool" variable to be + set with Uniform*i* and Uniform*f APIs, and OpenGL 3.0 extended that + support to Uniform*ui* for orthogonality. But it seems pointless to + extended this capability forward to 64-bit Uniform APIs as well. + + (11) There exists both an UNSIGNED_INT64_AMD and UNSIGNED_INT64_NV token + with different values (the former existed earlier) so which one + this extension should use? + + DISCUSSION: No functions in this extension accept these values as + inputs, they only should return one of these in various scenarios. + + RESOLVED: This extension will return the value of UNSIGNED_INT64_NV to + stay source code compatible with NV_gpu_shader5. However, future + extensions that should accept any of these tokens as inputs should + accept both of them. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ------------------------------------------------- + 3 07/07/14 drakos Fixed inconsistency in implicit conversion rules. + 2 31/04/14 gsellers Ready to post. + 1 10/09/13 drakos Initial revision. diff --git a/opengles/extensions/AMD/AMD_interleaved_elements.txt b/opengles/extensions/AMD/AMD_interleaved_elements.txt new file mode 100644 index 0000000000..a461b8253c --- /dev/null +++ b/opengles/extensions/AMD/AMD_interleaved_elements.txt @@ -0,0 +1,347 @@ +Name + + AMD_interleaved_elements + +Name Strings + + GL_AMD_interleaved_elements + +Contact + + Graham Sellers (graham.sellers 'at' amd.com) + +Contributors + + Sergey Leontyev, AMD + +Status + + Shipping + +Version + + Last Modified Date: 2 May 2013 + Revision: 3 + +Number + + 431 + +Dependencies + + This extension is written against version 4.3 of the Core Profile OpenGL + Specification, dated August 6, 2012. + +Overview + + The glDrawElements function and its variants (instanced and indirect, + for example) allow OpenGL to draw indexed arrays of vertices. Since its + inception, OpenGL has supported unsigned bytes, unsigned shorts and + unsigned integers as index types. However, all enabled vertex arrays may + be represented by at most one shared index. + + A common scenario in graphics rendering is that several faces share + a vertex where, for each face some properties of a vertex (position and + texture coordinates, for example) should be common but others must be + unique (colors, normals, and so on). Consider a mesh of a cube with + per-face normals, for example. There are 8 vertices and 6 normals, and 12 + triangles (where each face of the cube is represented as two triangles). + To render this cube, we must compute the 24 unique permutations of + position and normal and build a new element list to index into it. In + fact, any advantage of indexed draw is lost here as the number of required + permutations is equal to the final vertex count required to draw the + object. + + This extension allows OpenGL to process multi-component packed element + data. The maximum size of a vertex's index data is not increased, but the + facility to store 2 16-bit or 2 or 4 8-bit indices per vertex is introduced. + Each vertex attribute is given a swizzle property to allow its index to + be sourced from one of up to 4 channels of index data. This effectively + allows an application to supply multiple interleaved streams of index data + to OpenGL. Each vertex attribute is given a 'channel selector' to select + one of the up to 4 channels of vertex index information presented to + OpenGL. This enables the use-case described above and many more. + The swizzle parameter is also applied to vertex indices passed to shaders, + and updates to the definition of base vertex parameters and primitive + restart are applied. + +New Procedures and Functions + + void VertexAttribParameteriAMD(uint index, enum pname, int param); + +New Tokens + + Accepted by the parameter of VertexAttribParameteriAMD and + GetVertexAttrib{iv|dv|fv|Iiv|Iuiv|Ldv}: + + VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4 + + Selected by the parameter of ProgramParameteri and GetProgramiv: + + VERTEX_ID_SWIZZLE_AMD 0x91A5 + + Accepted by the parameter of VertexAttribParameteriAMD: + + RED 0x1903 + GREEN 0x1904 + BLUE 0x1905 + ALPHA 0x1906 + + Accepted by the parameter of DrawElements, DrawElementsInstanced, + DrawElementsInstancedBaseInstance and DrawElementsIndirect: + + RG8UI 0x8238 + RG16UI 0x823A + RGBA8UI 0x8D7C + +IP Status + + None. + +Additions to Chapter 7 of the OpenGL Core Profile Specification, Version 4.3, +"Programs and Shaders" + + Add to the parameters accepted by ProgramParameteri, p.82: + + If is VERTEX_ID_SWIZZLE_AMD, should be set to + RED, GREEN, BLUE or ALPHA to indicate that the first, second, third + or fourth component of the vertex element vector be propagated to the + gl_VertexID vertex shader input as described in subsection 11.1.3.9. + The initial value of VERTEX_ID_SWIZZLE_AMD is RED. + +Additions to Chapter 10 of the OpenGL Core Profile Specification, Version 4.3, +"Vertex Specification and Drawing Commands" + + Insert Subsection 10.3.2, "Vertex Attribute Parameters", renumber + subsequent sections: + + Each vertex attribute possesses a set of parameters that control + its behavior. Parameters for a vertex attribute may be set by calling: + + void VertexAttribParameteriAMD(uint index, + enum pname, + int param); + + where identifies the generic vertex attribute array whose parameter + to modify. If is VERTEX_ELEMENT_SWIZZLE_AMD, then + specifies the component of the vertex element that is to be used to + source the vertex indices for the selected vertex attribute. Its value + may be RED, GREEN, BLUE or ALPHA to select the first, second, third or + fourth component of the vertex element. + + In section 10.3.2, "Primitive Restart", modify the language describing + how the restart index is compared to the vertex element index, p.302 + as follows: + + When one of the Draw* commands transfers a set of generic attribute + array elements to the GL, if all present index channels in the passed + element index are equal to the primitive restart index, then the GL + does not process those elements as a vertex. Instead ... *include + remainder of section verbatim.* + + In the description of DrawElementsOneInstance (p. 311), replace the + sentence beginning "The ith element transferred by..." with: + + For each enabled vertex attribute, the ith element transferred by + DrawElementsOneInstance will be taken from that attribute's selected + channel of the element whose values are stored currently bound element + array buffer at offset indices + i. + + Replace the paragraph explaining the parameter to + DrawElementsOneIntance (p. 311): + + may be UNSIGNED_BYTE, UNSIGNED_SHORT or UNSIGNED_INT, + indicating that the index values are of GL type ubyte, ushort or uint, + respectively, RG8UI or RG16UI, indicating that the index values are pairs + of GL type ubyte or ushort, respectively, or RGBA8UI, indicating that + index values are quadruplets of GL type ubyte. ... + + Modify the language describing the DrawElements*BaseVertex* functions + on p.314 as follows: + + ... are equivalent to the commands with the same base name (without + the BaseVertex suffix), except that the ith element transferred by + the corresponding draw call will be taken from the selected channel + of the element vector indices[i] + . That is, the value of + is added to the vertex index after channel selection. + ... *include remainder of description verbatim.* + + Add to the list of accepted values for the parameter to + GetVertexAttrib* in Section 10.6, "Vertex Array and Vertex Array Object + Queries", p. 317: + + ... VERTEX_ELEMENT_SWIZZLE_AMD. + +Additions to Chapter 11 of the OpenGL Core Profile Specification, Version 4.3, +"Programmable Vertex Processing" + + In Subsection 11.1.3.9, "Shader Inputs", p.338, modify the description + of gl_VertexID as follows: + + gl_VertexID holds the integer index i stored in the selected component + of the element implicitly passed by DrawArrays or one of the other drawing + commands defined in section 10.5. The component of the element data + stored in gl_VertexID may be specified by calling ProgramParameteri with + set to VERTEX_ID_SWIZZLE_AMD as specified in section 7.3. + +New State + + Append to Table 23.4, "Vertex Array Object State (cont.)": + + +------------------------------+----------+---------------------+----------------+---------------------------------------------+----------+ + | Get Value | Type | Get Command | Initial Value | Description | Sec | + +------------------------------+----------+---------------------+----------------+---------------------------------------------+----------+ + | VERTEX_ELEMENT_SWIZZLE_AMD | 16 * x E | GetVertexAttribiv | RED | Channel selector for vertex attribute index | 10.3.2 | + +------------------------------+----------+---------------------+----------------+---------------------------------------------+----------+ + + Append to Table 23.39, "Program Object State (cont.)": + + +------------------------+-------+---------------+----------------+------------------------------------+----------+ + | Get Value | Type | Get Command | Initial Value | Description | Sec | + +------------------------+-------+---------------+----------------+------------------------------------+----------+ + | VERTEX_ID_SWIZZLE_AMD | E | GetProgramiv | RED | Channel selector for gl_VertexID | 11.1.3.9 | + +------------------------+-------+---------------+----------------+------------------------------------+----------+ + +New Implementation Dependent State + + None. + +Errors + + INVALID_ENUM is generated by VertexAttribParameteri if is not an + accepted token. + + INVALID_VALUE is generated by VertexAttribParameteri if is not an + acceptable value for the specified value of . + +Examples + + // Basic per-face normals + + // Normal data + static const float normals[] = + { + 0.0f, 0.0f, 1.0f, // Positive Z + 0.0f, 0.0f, -1.0f, // Negative Z + 0.0f, 1.0f, 0.0f, // Positive Y + 0.0f, -1.0f, 0.0f, // Negative Y + 1.0f, 0.0f, 0.0f, // Positive X + -1.0f, 0.0f, 0.0f, // Negative X + }; + + // Position data + static const float positions[] = + { + -1.0f, -1.0f, -1.0f, + // + 1.0f, 1.0f, 1.0f + }; + + // Put the above data into a buffer and bind them as separate vertex + // attributes. + GLuint vertex_buffer; + glGenBuffers(1, &vertex_buffer); + glBindBuffer(GL_ARRAY_BUFFER, sizeof(positions) + sizeof(normals), + NULL, GL_STATIC_DRAW); + glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(positions), positions); + glBufferSubData(GL_ARRAY_BUFFER, sizeof(positions), + sizeof(normals), normals); + // ... etc. Set up vertex attributes. + + // Index data + static const unsigned short indices[] = + { + 0, 0, // vertex 0: position index, normal index + 1, 0, // vertex 1: position index, normal index + 2, 0, // vertex 2: position index, normal index + 1, 0, // vertex 3: position index, normal index + 2, 0, // ... six vertices, forming + 3, 0, // ... two complete triangles, all using normals[0] + 0, 1, + 2, 1, + 3, 1, + 3, 1, + 4, 1, // ... six more vertices, forming + 2, 1, // ... two more triangles, all using normals[1] + // etc... + }; + + GLuint index_buffer; + glGenBuffers(1, &index_buffer); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), + indices, GL_STATIC_DRAW); + + // Okay... here's the new code. Set up vertex attribute 0 (position) to + // consume the RED channel of the vertex index and attribute 1 (normal) + // to consume the GREEN (second) channel of the vertex index. Then + // draw with GL_RG16UI (two channel, 16-bit unsigned int) as the index + // type. + glVertexAttribParameteriAMD(0, GL_VERTEX_ELEMENT_SWIZZLE_AMD, GL_RED); + glVertexAttribParameteriAMD(1, GL_VERTEX_ELEMENT_SWIZZLE_AMD, GL_GREEN); + + glDrawElements(GL_TRIANGLES, + sizeof(indices) / (2 * sizeof(unsigned short)), + GL_RG16UI, + NULL); + +Issues + + 1) What is the effect of multi-channel vertex indices on gl_VertexID? + + RESOLVED: The VERTEX_ID_SWIZZLE_AMD program parameter selects the + channel of vector element types to be passed to gl_VertexID. By + default, this is RED, which is backwards compatible with single-channel + types. + + 2) How does this interact with primitive-restart indices? + + RESOLVED: If all present channels of the vertex index vector match the + restart index, then the element index is considered to match. + + 3) How does baseVertex affect this? + + RESOLVED: The same base vertex value is added to each each vertex + element component after channel selection for each of the enabled + vertex attributes. This choice is primarily motivated by the behavior + of base vertex elements encoded in indirect draw commands. + + 4) Does this feature disable potential optimizations such as vertex + reuse? + + RESOVLED: No, vertex reuse should continue to function correctly. + Each unique vector of indices should produce a unique set of vertex + shader outputs (modulo side effects) and will hit a naive vertex + reuse cache. Nothing precludes more advanced optimization strategies + from being implemented, however. + + 5) Is it possible to get at all two or four channels of the vertex index + using a built-in input to the vertex shader? + + RESOLVED: No. A single channel selection is provided. Providing more + data could be implemented by introducing a new built-in integer vector + input to the shader, but we have chosen not to do at this time. + + 6) What is the value of missing channels? For example, if we render with + GL_RG16UI indices but set certain attributes to GL_BLUE or GL_ALPHA + swizzle, what index value is used for those channels? + + RESOLVED: Zero. + + 7) Are the traditional GL_RED, GL_GREEN, GL_BLUE, and GL_ALPHA terms + appropriate for this use? + + RESOLVED: Not really, but are they appropriate for normals? g-buffers? + Any other arbitrary data that might be in a buffer or texture? + It's not worth introducing new enumerants just for this - we'll use + R, G, B, A. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 3 05/02/2013 gsellers Shipping. Finalize spec ready for posting. + 2 01/25/2013 gsellers Resolve issues 1, 2, 3. Polish spec. + 1 01/17/2013 gsellers Initial draft + diff --git a/opengles/extensions/AMD/AMD_multi_draw_indirect.txt b/opengles/extensions/AMD/AMD_multi_draw_indirect.txt new file mode 100644 index 0000000000..ad0fec03aa --- /dev/null +++ b/opengles/extensions/AMD/AMD_multi_draw_indirect.txt @@ -0,0 +1,212 @@ +Name + + AMD_multi_draw_indirect + +Name Strings + + GL_AMD_multi_draw_indirect + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Contributors + + Graham Sellers + +Status + + Complete, shipping. + +Version + + Last Modified Date: Febuary 14, 2011 + Revision: 2 + +Number + + 408 + +Dependencies + + OpenGL 4.0 or ARB_draw_indirect is required. + + The extension is written against the OpenGL 4.1 Specification, Core Profile, + July 25, 2010 + +Overview + + The ARB_draw_indirect extension (included in OpenGL 4.0) introduced + mechanisms whereby the parameters for a draw function may be provided in + a structure contained in a buffer object rather than as parameters to the + drawing procedure. This is known as an indirect draw and is exposed as two + new functions, glDrawArraysIndirect and glDrawElementsIndirect. Each of + these functions generates a single batch of primitives. + + This extension builds on this functionality by providing procedures to + invoke multiple draws from a single procedure call. This allows large + batches of drawing commands to be assembled in server memory (via a buffer + object) which may then be dispatched through a single function call. + +New Procedures and Functions + + void MultiDrawArraysIndirectAMD(enum mode, + const void *indirect, + sizei primcount, + sizei stride); + + void MultiDrawElementsIndirectAMD(enum mode, + enum type, + const void *indirect, + sizei primcount, + sizei stride); + +New Tokens + + None. + +Additions to Chapter 2 of the OpenGL 4.1 (Core) Specification (OpenGL Operation) + + Additions to Section 2.8.3, "Drawing Commands" + + After the description of MultiDrawArrays and before the introduction of + DrawElementsInstanced, insert the following on p.36: + + The command + + void MultiDrawArraysIndirectAMD(enum mode, + const void *indirect, + sizei primcount, + sizei stride); + + behaves identically to DrawArraysIndirect, except that is + treated as an array of DrawArraysIndirectCommand structures. + contains the offset of the first element of the array within the + buffer currently bound to the DRAW_INDIRECT buffer binding. + specifies the distance, in basic machine units, between the elements of the + array. If is zero, the array elements are treated as tightly + packed. must be a multiple of four, otherwise an INVALID_VALUE + error is generated. + + It has the same effect as: + + if ( is invalid) + generate appropriate error + else { + const ubyte * ptr = (const ubyte *)indirect; + for (i = 0; i < primcount; i++) { + DrawArraysIndirect(mode, + (DrawArraysIndirectCommand*)ptr); + if (stride == 0) + { + ptr += sizeof(DrawArraysIndirectCommand); + } else + { + ptr += stride; + } + } + } + + must be positive, otherwise an INVALID_VALUE error will be + generated. + + After the description of DrawElementsIndirect and before the introduction + of MultiDrawElementsBaseVertex, insert the following on p.39: + + The command + + void MultiDrawElementsIndirectAMD(enum mode, + enum type, + const void *indirect, + sizei primcount, + sizei stride); + + behaves identically to DrawElementsIndirect, except that is + treated as an array of DrawElementsIndirectCommand structures. + contains the offset of the first element of the array within the + buffer currently bound to the DRAW_INDIRECT buffer binding. + specifies the distance, in basic machine units, between the elements of the + array. If is zero, the array elements are treated as tightly + packed. must be a multiple of four, otherwise an INVALID_VALUE + error is generated. + + It has the same effect as: + + if ( or is invalid) + generate appropriate error + else { + const ubyte * ptr = (const ubyte *)indirect; + for (i = 0; i < primcount; i++) { + DrawElementsIndirect(mode, + type, + (DrawElementsIndirectCommand*)ptr); + if (stride == 0) + { + ptr += sizeof(DrawElementsIndirectCommand); + } else + { + ptr += stride; + } + } + } + + Modifications to Section 2.9.8 "Indirect Commands in Buffer Objects" + + Modify both instances of "DrawArraysIndirect and DrawElementsIndirect" on + p.51 to read "DrawArraysIndirect, DrawElementsIndirect, + MultiDrawArraysIndirect and MultiDrawElementsIndirect". + +Additions to Chapter 3 of the OpenGL 4.1 (Core) Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 4.1 (Core) Specification (Per-Fragment Operations +and the Framebuffer) + + None. + +Additions to Chapter 5 of the OpenGL 4.1 (Core) Specification (Special +Functions) + + None. + +Additions to Chapter 6 of the OpenGL 4.1 (Core) Specification (State and +State Requests) + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + INVALID_VALUE is generated by MultiDrawArraysIndirect or + MultiDrawElementsIndirect if is negative. + + INVALID_VALUE is generated by MultiDrawArraysIndirect or + MultiDrawElementsIndirect if is not a multipe of four. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + None, so far. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 2 02/14/2011 gsellers Add stride parameters + 1 01/06/2011 gsellers Initial draft diff --git a/opengles/extensions/AMD/AMD_name_gen_delete.txt b/opengles/extensions/AMD/AMD_name_gen_delete.txt new file mode 100644 index 0000000000..f8db6aaf03 --- /dev/null +++ b/opengles/extensions/AMD/AMD_name_gen_delete.txt @@ -0,0 +1,751 @@ +Name + + AMD_name_gen_delete + + +Name Strings + + GL_AMD_name_gen_delete + + +Contributors + + Balaji Calidas + Mark Young + Murat Balci + Benedikt Kessler + +Contact + + Mark Young (mark.young 'at' amd.com) + + +Status + + In Progress. + + +Version + + Last Modified Date: February 10, 2010 + Author Revision: 1 + + +Number + + 394 + + +Dependencies + + OpenGL 2.1 is required. + + ARB_framebuffer_object affects this spec. + + ARB_vertex_array_object affects this spec. + + EXT_transform_feedback affects this spec. + + EXT_transform_feedback2 affects this spec. + + AMD_performance_monitor affects this spec + + ARB_sampler_objects affects this spec + + +Overview + + This extension simply creates 2 new entry-points that name generic + creation and deletion of names. The intent is to go away from API + functionality that provides a create/delete function for each specific + object. + + For example: + glGenTextures/glDeleteTextures/glIsTexture + glGenBuffers/glDeleteBuffers/IsBuffer + glGenFramebuffers/glDeleteFramebuffers/IsFramebuffer + + Instead, everything is created using one entry-point GenNamesAMD and + everything is now deleted with another entry-point DeleteNamesAMD with + the appropriate identifier set. In addition, everything can now be + queried with IsNameAMD. + + This alleviates the problem we may eventually encounter where we have + many Gen/Delete/Is functions where 3 might suffice. All that is needed + in the new case is to add a valid identifier to the accepted parameters + list. + + +IP Status + + No known IP claims. + + +New Procedures and Functions + + void GenNamesAMD(enum identifier, uint num, uint *names); + + void DeleteNamesAMD(enum identifier, uint num, const uint *names); + + boolean IsNameAMD(enum identifier, uint name); + +New Types + + None. + + +New Tokens + + Accepted as the parameter of GenNamesAMD and DeleteNamesAMD: + + DATA_BUFFER_AMD 0x9151 + PERFORMANCE_MONITOR_AMD 0x9152 + QUERY_OBJECT_AMD 0x9153 + VERTEX_ARRAY_OBJECT_AMD 0x9154 + SAMPLER_OBJECT_AMD 0x9155 + + +Additions to Chapter 2 of the OpenGL 2.1 Specification (OpenGL Operation) + + Insert a new section before section 2.9 "Buffer Objects" titled + "Object Name Handling" + ---------------------------------------------------------------- + + 2.x Object Name Handling + + 2.x.1 Name Generation + + Objects in OpenGL are created, modified, and deleted using names. These + names are unique per object type, but can be common across multiple types. + For example, a texture and a query object may both be named 127, but two + query different query objects cannot have the name 127 in the same context. + These names are generated using each types own specific GenXXX command, but + can also be created using the more generic command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + where indicates the type of object that is to be created, + is used to indicate how many objects to create, and is a previously + allocated array that the new generated names will be supplied in. These + names for marked as used for the purposes of the type of object specified by + (and their own individual GenXXX command), but they do not + typically acquire any state until they are first bound, just as if they were + unused. + + Valid values for currently are: + - DATA_BUFFER_AMD (For ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, + PIXEL_PACK_BUFFER, and PIXEL_UNPACK_BUFFER) + - FRAMEBUFFER + - RENDERBUFFER + - TEXTURE + - TRANSFORM_FEEDBACK_EXT + - VERTEX_ARRAY_OBJECT_AMD (For VAOs instead of VERTEX_ARRAY_BINDING) + - QUERY_OBJECT_AMD (For query objects) + - PERFORMANCE_MONITOR_AMD (For a performance monitor object) + - SAMPLER_OBJECT_AMD (For a sampler object) + + If is not one of these valid values, the error INVALID_ENUM + will be triggered. If is a number zero or is NULL, the error + INVALID_VALUE is triggered. + + + 2.x.2 Name Deletion + + Object names can be deleted when they are no longer needed using the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + where indicates one of the above valid types, and indicates + how many object names are provided in the array. Similar to + GenNamesAMD, each object type also has its own DeleteXXX command. + DeleteNamesAMD with a given object type behaves in the same way that the + object types specific DeleteXXX command does. + + If is not one of these valid values, the error INVALID_ENUM + will be triggered. If is a number zero or is NULL, the error + INVALID_VALUE is triggered. + + + 2.x.3 Name Querying + + Object names can be queried to make sure that an object of the given type + exists using the command + + boolean IsNameAMD( enum identifier, uint name ); + + where indicates one of the above valid types, and + is the name that is being identified as a valid name for that object + type. Similar to GenNamesAMD and DeleteNamesAMD, each object type also + has its own IsXXX command. IsNameAMD with a given object type behaves in + the same way that the object types specific IsXXX command does. + + If is not one of these valid values, the error INVALID_ENUM + will be triggered. + + + 2.x.4 Name Binding + + Objects are typically enabled for usage through a Bind call or something + similar. The process for binding objects for usage is handled differently + per object type. For further information on how to use each object, refer + to its section later in this spec. + + + + Modify section 2.9 "Buffer Objects", page 33. + ---------------------------------------------------------------- + + + After the paragraphs talking about 'DeleteBuffers' insert: + ---------------------------------------------------------------- + + Calling the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + with set to DATA_BUFFER_AMD behaves the same as using the + DeleteBuffers command. + + + Modify the paragraphs talking about 'GenBuffers': + ---------------------------------------------------------------- + + The commands + + void GenBuffers( sizei n, uint *buffers ); + + returns previously unused buffer object names in . These names + are marked as used, for the purposes of GenBuffers and GenNamesAMD when used + with set to DATA_BUFFER_AMD only, but they acquire buffer state + only when they are first bound, just as if they were unused. + + Calling the command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + with set to DATA_BUFFER_AMD behaves the same as using the + GenBuffers command. + + While a buffer object is bound, any GL operations on that object affect any + other bindings of that object. If a buffer object is deleted while it is + bound, all bindings to that object in the current context (i.e. in the + thread that called DeleteBuffers or DeleteNamesAMD with set to + DATA_BUFFER_AMD) are reset to zero. Bindings to that buffer in other + contexts and other threads are not affected, but attempting to use a deleted + buffer in another thread... + + + + Modify the new section 2.y "Vertex Array Objects". + Added by ARB_vertex_array_object + ---------------------------------------------------------------- + + Modify the paragraphs talking about 'GenVertexArrays': + ---------------------------------------------------------------- + + The commands + + void GenVertexArrays( sizei n, uint *arrays ); + + returns previous unused vertex array object names in . These + names are marked as used, for the purposes of GenVertexArrays and + GenNamesAMD (when is set to VERTEX_ARRAY_OBJECT_AMD) only, + and are initialized with the state listed in tables 6.6 (except for + the CLIENT_ACTIVE_TEXTURE selector state), 6.7 and 6.8. + + Calling the command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + with set to VERTEX_ARRAY_OBJECT_AMD behaves the same as using + the GenVertexArrays command. + + + After the paragraphs talking about 'DeleteVertexArrays' insert: + ---------------------------------------------------------------- + + Calling the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + with set to VERTEX_ARRAY_OBJECT_AMD behaves the same as using + the DeleteVertexArrays command. + + + Modify the paragraph that starts with + 'BindVertexArray fails and an INVALID_OPERATION error'... to: + ---------------------------------------------------------------- + BindVertexArray fails and an INVALID_OPERATION error is generated if + array is not a name returned from a previous call to + GenVertexArrays (or GenNamesAMD with set to + VERTEX_ARRAY_OBJECT), or if such a name has since been deleted with + either DeleteVertexArrays or DeleteNamesAMD (with set to + VERTEX_ARRAY_OBJECT). An INVALID_OPERATION error is generated + if VertexAttribPointer or VertexAttribIPointer is called while a + non-zero vertex array object is bound and zero is bound to the + ARRAY_BUFFER buffer object binding point[fn]. + + + + Modify the new section 2.z.1 "Transform Feedback Objects" + Added by EXT_transform_feedback2 + ---------------------------------------------------------------- + + Add after the paragraphs talking about 'DeleteTransformFeedbacksEXT': + ---------------------------------------------------------------- + + Calling the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + with set to TRANSFORM_FEEDBACK_EXT behaves the same as using + the DeleteTransformFeedbacksEXT command. + + + Modify the paragraphs talking about 'GenTransformFeedbacksEXT': + ---------------------------------------------------------------- + + The command + + void GenTransformFeedbacksEXT(sizei n, uint *ids) + + returns previously unused transform feedback object names in . + These names are marked as used, for the purposes of + GenTransformFeedbacksEXT and GenNamesAMD (when is set to + TRANSFORM_FEEDBACK_EXT) only, but they acquire transform feedback state + only when they are first bound, just as if they were unused. + + Calling the command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + with set to TRANSFORM_FEEDBACK_EXT behaves the same as using + the GenTransformFeedbacksEXT command. + + + Modify the paragraph that starts with + 'BindVertexArray fails and an INVALID_OPERATION error'... to: + ---------------------------------------------------------------- + BindVertexArray fails and an INVALID_OPERATION error is generated if + array is not a name returned from a previous call to + GenVertexArrays (or GenNamesAMD with set to + VERTEX_ARRAY_OBJECT), or if such a name has since been deleted with + either DeleteVertexArrays or DeleteNamesAMD (with set to + VERTEX_ARRAY_OBJECT). An INVALID_OPERATION error is generated + if VertexAttribPointer or VertexAttribIPointer is called while a + non-zero vertex array object is bound and zero is bound to the + ARRAY_BUFFER buffer object binding point[fn]. + + + +Additions to Chapter 3 of the OpenGL 2.1 Specification (Rasterization) + + Modify section 3.8.12 "Texture Objects", page 182. + ---------------------------------------------------------------- + + After the paragraphs talking about 'DeleteTextures' insert: + ---------------------------------------------------------------- + + Calling the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + with set to TEXTURE behaves the same as using the + DeleteTextures command. + + + Modify the paragraphs talking about 'GenTextures': + ---------------------------------------------------------------- + + The commands + + void GenTextures( sizei n, uint *textures ); + + returns previously unused texture object names in . These names + are marked as used, for the purposes of GenTextures and GenNamesAMD when used + with set to TEXTURE only, but they acquire texture state and + dimensionality only when they are first bound, just as if they were unused. + + Calling the command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + with set to TEXTURE behaves the same as using the + GenBuffers command. + + + + Modify section 3.9.2 "Sampler Objects". + ---------------------------------------------------------------- + + After the paragraphs talking about 'GenSamplers' insert: + ---------------------------------------------------------------- + + Calling the command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + with set to SAMPLER_OBJECT_AMD behaves the same as using the + GenSamplers command. + + After the paragraphs talking about 'DeleteSamplers' insert: + ---------------------------------------------------------------- + + Calling the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + with set to SAMPLER_OBJECT_AMD behaves the same as using the + DeleteSamplers command. + + + +Additions to Chapter 4 of the OpenGL 2.1 Specification (Per-Fragment Operations +and the Framebuffer) + + Modify section 4.1.7 "Occlusion Queries", page 207. + ---------------------------------------------------------------- + + Insert after the paragraph talking about 'GenQueries': + ---------------------------------------------------------------- + + Calling the command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + with set to QUERY_OBJECT_AMD behaves the same as using the + GenQueries command. + + + After the paragraphs talking about 'DeleteQueries' insert: + ---------------------------------------------------------------- + + Calling the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + with set to QUERY_OBJECT_AMD behaves the same as using the + DeleteTextures command. + + + Modify the paragraph that talks about GenQueries and DeleteQueries errors + after that: + ---------------------------------------------------------------- + + Calling either GenQueries, DeleteQueries, GenNamesAMD(QUERY_OBJECT_AMD), + or DeleteNamesAMD(QUERY_OBJECT_AMD), while any query of any target is + active causes an INVALID OPERATION error to be generated. + + + Modify section 4.4.1 "Binding and Managing Framebuffer Objects" + ---------------------------------------------------------------- + + + Modify the 2nd paragraph to read: + ---------------------------------------------------------------- + + A framebuffer object is created by binding a name returned by + GenFramebuffers or GenNamesAMD (see below) to DRAW_FRAMEBUFFER or + READ_FRAMEBUFFER. The binding is effected by calling + + + Modify the 5th paragraph to read: + ---------------------------------------------------------------- + + BindFramebuffer fails and an INVALID_OPERATION error is generated if + is not zero or a name returned from a previous call to + GenFramebuffers or GenNamesAMD, or if such a name has since been + deleted with DeleteFramebuffers or DeleteNamesAMD. + + + After the paragraphs talking about 'DeleteFramebuffers' insert: + ---------------------------------------------------------------- + + Calling the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + with set to FRAMEBUFFER behaves the same as using the + DeleteFramebuffers command. + + + After the paragraphs talking about 'GenFramebuffers' insert: + ---------------------------------------------------------------- + + Calling the command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + with set to FRAMEBUFFER behaves the same as using the + GenFramebuffers command. + + + Modify section 4.4.2.1 "Renderbuffer Objects" + ---------------------------------------------------------------- + + Modify the 2nd paragraph to read: + ---------------------------------------------------------------- + + The name space for renderbuffer objects is the unsigned integers, + with zero reserved for the GL. A renderbuffer object is created by + binding a name returned by GenRenderbuffers or GenNamesAMD (see below) + to RENDERBUFFER. The binding is effected by calling + + Modify the 9th paragraph to read: + ---------------------------------------------------------------- + + BindRenderbuffer fails and an INVALID_OPERATION error is generated + if is not a name returned from a previous call to + GenRenderbuffers or GenNamesAMD, or if such a name has since been + deleted with DeleteRenderbuffers or DeleteNamesAMD. + + + After the paragraphs talking about 'DeleteRenderbuffers' insert: + ---------------------------------------------------------------- + + Calling the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + with set to RENDERBUFFER behaves the same as using the + DeleteFramebuffers command. + + + After the paragraphs talking about 'GenRenderbuffers' insert: + ---------------------------------------------------------------- + + Calling the command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + with set to RENDERBUFFER behaves the same as using the + GenFramebuffers command. + + +Additions to Chapter 5 of the OpenGL 2.1 Specification (Special +Functions) + + Modify section 5.4 "Display Lists", page 240. + ---------------------------------------------------------------- + + Add the following to the list of things not allowed inside of a + display list: + ---------------------------------------------------------------- + + Name generation: GenNamesAMD and DeleteNamesAMD + + +Additions to Chapter 6 of the OpenGL 2.1 Specification (State and +State Requests) + + Modify section 6.1.4 "Texture Queries" + ---------------------------------------------------------------- + + After the paragraphs talking about 'IsTexture' insert: + ---------------------------------------------------------------- + + Calling the command + + void IsNameAMD( enum identifier, uint name ); + + with set to TEXTURE behaves the same as using the + IsTexture command. + + + Modify section 6.1.12 "Occlusion Queries" + ---------------------------------------------------------------- + + After the paragraphs talking about 'IsQuery' insert: + ---------------------------------------------------------------- + + Calling the command + + void IsNameAMD( enum identifier, uint name ); + + with set to QUERY_OBJECT_AMD behaves differently from + calling IsQuery. IsQuery only returns if an object is a + query once it has been used. However, IsName returns TRUE if + a QUERY_OBJECT_AMD object had been created either through + GenQueries or GenNamesAMD. + + + Modify section 6.1.13 "Buffer Object Queries" + ---------------------------------------------------------------- + + After the paragraphs talking about 'IsBuffer' insert: + ---------------------------------------------------------------- + + Calling the command + + void IsNameAMD( enum identifier, uint name ); + + with set to DATA_BUFFER_AMD behaves the same as using the + IsBuffer command. + + +Additions to new section for Performance Monitoring (added by + AMD_performance_monitor) + + + After the paragraphs talking about 'GenPerfMonitorsAMD' insert: + ---------------------------------------------------------------- + + Calling the command + + void GenNamesAMD( enum identifier, sizei n, uint *names ); + + with set to PERFORMANCE_MONITOR_AMD behaves the same as + using the GenPerfMonitorsAMD command. + + + Modify the paragraphs talking about 'DeletePerfMonitorsAMD' to: + ---------------------------------------------------------------- + + The command + + void DeletePerfMonitorsAMD(sizei n, uint *monitors) + + is used to delete the list of monitors created by a previous call to + GenPerfMonitors or GenNamesAMD (with set to + PERFORMANCE_MONITOR_AMD). If a monitor ID in the list does not + reference a previously generated performance monitor, an INVALID_VALUE + error is generated. + + Calling the command + + void DeleteNamesAMD( enum identifier, sizei n, const uint *names ); + + with set to PERFORMANCE_MONITOR_AMD behaves the same as using + the DeletePerfMonitors command. + + + Modify the paragraph after the protoype for SelectPerfMonitorCountersAMD + to read: + ---------------------------------------------------------------- + + is used to enable or disable a list of counters from a group to be monitored + as identified by . The argument determines whether the + counters should be enabled or disabled. specifies the group + ID under which counters will be enabled or disabled. The + argument gives the number of counters to be selected from the list + . If is not a valid monitor created by either + GenPerfMonitorsAMD or GneNamesAMD (with set to + PERFORMANCE_MONITOR_AMD), then INVALID_VALUE error will be generated. If + is not a valid group, the INVALID_VALUE error will be generated. If + is less than 0, an INVALID_VALUE error will be generated. + + +Additions to the OpenGL / GLX / GLX Protocol Specifications + + None. + + +Additions to the WGL Specification + + None. + + +Errors + + The error INVALID_ENUM is generated by GenNamesAMD, DeleteNamesAMD, or + IsNameAMD if is not one of: + - DATA_BUFFER_AMD (For ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, + PIXEL_PACK_BUFFER, and PIXEL_UNPACK_BUFFER) + - FRAMEBUFFER + - RENDERBUFFER + - TEXTURE + - TRANSFORM_FEEDBACK_EXT + - VERTEX_ARRAY_OBJECT_AMD (For VAOs instead of VERTEX_ARRAY_BINDING) + - QUERY_OBJECT_AMD (For query objects) + - PERFORMANCE_MONITOR_AMD (For a performance monitor object) + - SAMPLER_OBJECT_AMD (For a sampler object) + + The error INVALID_VALUE is generated by GenNamesAMD or DeleteNamesAMD + if is 0. + + The error INVALID_VALUE is generated by GenNamesAMD or DeleteNamesAMD + if is NULL. + + +New State + + None + + +New Implementation Dependent State + + If ARB_vertex_array_object is not present, remove any reference to + VERTEX_ARRAY or VERTEX_ARRAY_BINDING and VAOs. + + +Sample Code + + glGenTextures/glDeleteTextures + + Before: + + GLuint texID[12]; + glGenTextures(12, &texID[0]); + ... + // Use textures + ... + glDeleteTextures(12, &texID[0]); + + After: + + GLuint texID[12]; + glGenNames(GL_TEXTURE, 12, &texID[0]); + ... + // Use textures + ... + glDeleteNames(GL_TEXTURE, 12, &texID[0]); + + +Issues + + 01) What is the main benefit of these new entry-points? + + To reduce the requirement of new entry-points for generating and + deleting names. + + + 02) Do we want to use VERTEX_ARRAY_BINDING for a vertex array object? + + RECOMMENDATION - I suggest using a new variable called + VERTEX_ARRAY_OBJECT_AMD. This makes it clear + what's being generated. + + + 03) What do we want the generic buffer object name to be called + + RESOLVED - Use DATA_BUFFER_AMD. + + + 04) Do we want to include display list generation? + + RECOMMENDATION - No. There is additional restrictions on display list + name generation specifically items being + consecutively generated. + + + 05) Should DeleteNamesAMD verify that the names exist and throw an error + if not? + + RECOMMENDATION - I think not since it might cause issues with multi- + context multi-thread cases where sharing is enabled + and one context deletes them follwed by another + context deleting items. + + + +Revision History + + 1) September 11, 2009: myoung + - Initial revision of AMDX extension + + 2) February 10, 2010: myoung + - Change from AMDX to AMD extension + + 2) February 12, 2010: myoung + - Add in IsNameAMD functionality requested by Benedikt + diff --git a/opengles/extensions/AMD/AMD_occlusion_query_event.txt b/opengles/extensions/AMD/AMD_occlusion_query_event.txt new file mode 100644 index 0000000000..94964b0fc7 --- /dev/null +++ b/opengles/extensions/AMD/AMD_occlusion_query_event.txt @@ -0,0 +1,296 @@ +Name + + AMD_occlusion_query_event + +Name Strings + + GL_AMD_occlusion_query_event + +Contact + + Graham Sellers (graham.sellers 'at' amd.com) + +Contributors + + Graham Sellers, AMD + Daniel Rakos, AMD + +Status + + SHIPPING + +Version + + Last Modified Date: 11/20/2013 + Author Revision: 3 + +Number + + OpenGL Extension #442 + +Dependencies + + OpenGL 1.5 is required. + + This extension is written against the OpenGL 4.4 (core) specification. + + This extension depends on the definition of OpenGL 3.3 and + GL_ARB_occlusion_query2. + + This extension depends on the definition of OpenGL 4.3 and + GL_ARB_ES3_compatibility. + + This extension depends on the definition of GL_EXT_depth_bounds_test. + +Overview + + Occlusion queries provide a means to count the number of fragments that + pass the depth and stencil tests and that may contribute to a rendered + image. In unextended OpenGL, an occlusion query increments its + samples-passed count whenever a sample passes both the stencil test and + the depth test (if enabled). However, there is no way to count fragments + that fail the stencil test, or pass the stencil test and then subsequently + fail the depth test. + + This extension introduces the concept of occlusion query events and changes + the concept of an occlusion query from counting passed fragments to counting + fragments that generate any of a user-selectable set of events. Provided + events include passing the depth test, and passing or failing the stencil + test. For a given occlusion query object, counting of these events may be + enabled or disabled, allowing any combination to be counted. + +New Procedures and Functions + + void QueryObjectParameteruiAMD(enum target, + uint id, + enum pname, + uint param); + +New Tokens + + Accepted by the argument to QueryObejctParameteruiAMD, + GetQueryObjectiv, GetQueryObjectuiv, GetQueryObjecti64v, and + GetQueryObjectui64v: + + OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F + + Accepted by the argument to QueryObjectParameteruiAMD: + + QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 + QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 + QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 + QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 + QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF + +Additions to Chapter 4 of the OpenGL 4.4 (core) Specification (Event Model) + + Insert Section 4.2.1, "Query Object Parameters", p.42. Renumber subsequent + sections. + + Query object parameters control the behavior of the query object. Changing + the value of a query object parameter is done by calling + + void QueryObjectParameteruiAMD(enum target, + uint id, + enum pname, + uint param); + + with set to a valid query target, set to a value returned + from a previous call to GenQueries. specifies the parameter to + modify and contains its new value. If is an unused query object + name then the name is marked as used and associated with a new query object + of the type specified by . Otherwise, must be the name of an + existing query object of that type. + +Additions to Chapter 17 of the OpenGL 4.3 (core) Specification (Writing Fragments +and Samples to the Framebuffer) + + Modify the first paragraph of Subection 17.3.7, "Occlusion Queries" as + follows: + + Occlusion queries use query objects to track fragments as they pass through + the depth bounds test, stencil test and depth test, in that order. Each + stage may generate an event. An event is generated if a fragment fails + the depth bounds test. If a fragment passes the depth bounds test, it then + undergoes the stencil test and generates an event should it fail that. + Should it pass the stencil test, it undergoes the depth test, upon which + it will generate an event indicating whether it passed or failed the depth + test. An occlusion query can be started and finished by calling BeginQuery + and EndQuery, respectively, with a of SAMPLES_PASSED, + ANY_SAMPLES_PASSED, or ANY_SAMPLES_PASSED_CONSERVATIVE. + + In the remainder of the Subsection, replace any occurrence of "passes the + depth test" with "generates an enabled event". Add the following to the end + of the subsection: + + Counting of occlusion query events are enabled and disabled for a query + object by calling QueryObjectParameteruiAMD with set to + SAMPLES_PASSED, ANY_SAMPLES_PASSED or ANY_SAMPLES_PASSED_CONSERVATIVE, with + set to the name of an existing query object of the appropriate type, or + to a name returned from a call to GenQueries but not yet associated with a + query object, with set to OCCLUSION_QUERY_EVENT_MASK_AMD and with + set to the bitwise or of the set of the following flags: + + +---------------------------------------+---------------------------------------------------------+ + | QUERY_DEPTH_PASS_EVENT_BIT_AMD | Indicates that the fragment passed all tests. | + | QUERY_DEPTH_FAIL_EVENT_BIT_AMD | Indicates that the fragment passed the depth bounds and | + | | stencil tests, but failed the depth test. | + | QUERY_STENCIL_FAIL_EVENT_BIT_AMD | Indicates that the fragment passed the depth bounds | + | | test but failed the stencil test. | + | QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD | Indicates that the fragment failed the depth bounds | + | | test. | + | QUERY_ALL_EVENT_BITS_AMD | Indicates that any event generated by the fragment | + | | should be counted. | + +---------------------------------------+---------------------------------------------------------+ + + By default, the value of OCCLUSION_QUERY_EVENT_MASK_AMD for a newly created + occlusion query object is QUERY_DEPTH_PASS_EVENT_BIT_AMD. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + INVALID_OPERATION is generated by GetQueryObjectiv, GetQueryObjectuiv, + GetQueryObjecti64v, and GetQueryObjectui64v if is + OCCLUSION_QUERY_EVENT_MASK_AMD and the target of the query object + specified by is not SAMPLES_PASSED, ANY_SAMPLES_PASSED, or + ANY_SAMPLES_PASSED_CONSERVATIVE. + + INVALID_ENUM is generated by QueryObjectParameteruiAMD if is not + an accepted query target. + + INVALID_ENUM is generated by QueryObjectParameteruiAMD if is not + OCCLUSION_QUERY_EVENT_MASK_AMD. + + INVALID_VALUE is generated by QueryObjectParameteruiAMD if is not a + name returned from a previous call to GenQueries, or if such a name has + since been deleted with DeleteQueries. + + INVALID_OPERATION is generated by QueryObjectParameteruiAMD if is the + name of an existing query object whose target does not match , or + an active query object name for . + + INVALID_OPERATION is generated by QueryObjectParameteruiAMD if is + OCCLUSION_QUERY_EVENT_MASK_AMD and is not SAMPLES_PASSED, + ANY_SAMPLES_PASSED, or ANY_SAMPLES_PASSED_CONSERVATIVE. + + INVALID_VALUE is generated by QueryObjectParameteruiAMD if is + OCCLUSION_QUERY_EVENT_MASK_AMD and contains any unsupported bits, + except in the case when is equal to the special value, + QUERY_ALL_EVENT_BITS_AMD. + +New State + + Append to Table 23.44, "Query Object State" + + +-----------------------------------+-------+--------------------+--------------------------------+------------------------------------+--------+ + | Get Value | Type | Get Command | Initial Value | Description | Sec. | + +-----------------------------------+-------+--------------------+--------------------------------+------------------------------------+--------+ + | OCCLUSION_QUERY_EVENT_MASK_AMD | Z+ | GetQueryObjectuiv | QUERY_DEPTH_PASS_EVENT_BIT_AMD | Bitmask of events to count in an | 17.3.7 | + | | | | | occlusion query | | + +-----------------------------------+-------+--------------------+--------------------------------+------------------------------------+--------+ + +New Implementation Dependent State + + None. + +Usage Examples + + TBD + +Dependencies on GL_EXT_depth_bounds_test + + If GL_EXT_depth_bounds_test is not supported, remove any reference to + the depth bounds test and the QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD token. + The value of the QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD remains reserved, however. + This extension shall behave as if all fragments pass the depth bounds + test. + +Dependencies on OpenGL 3.3 and GL_ARB_occlusion_query2 + + If GL_ARB_occlusion_query2 is not present, and the GL version is less than + 3.3, then remove any reference to the ANY_SAMPLES_PASSED target. + +Dependencies on OpenGL 4.3 and GL_ARB_ES3_compatibility + + If GL_ARB_ES3_compatility is not present, and the GL version is less than + 4.3, then remove any reference to the ANY_SAMPLES_PASSED_CONSERVATIVE + target. + +Issues + + 1) Why is there no QUERY_STENCIL_PASS_BIT_AMD or + QUERY_DEPTH_BOUNDS_PASS_BIT_AMD? + + Fragments that pass the depth bounds test proceed to the stencil test + and subsequently to the depth test. The sum of depth pass, depth fail + and stencil fail is, by definition, the number of fragments that pass + the depth bounds test. Likewise, the sum of depth pass and depth fail + is the number of fragments that pass the stencil test. Thus, setting + the event mask to (QUERY_DEPTH_PASS_EVENT_BIT_AMD | + QUERY_DEPTH_FAIL_EVENT_BIT_AMD | QUERY_STENCIL_FAIL_EVENT_BIT_AMD) + allows counting of fragments that pass the depth bounds test. Similarly, + setting the event mask to (QUERY_DEPTH_PASS_EVENT_BIT_AMD | + QUERY_DEPTH_FAIL_EVENT_BIT_AMD) provides the count of fragments that pass + the stencil test. + + 2) Will fragments that fail the stencil test generate a depth pass or fail + event as if they were depth tested? Will fragments that fail the depth + bounds test generate stencil fail events? + + RESOLVED: No. Once a fragment fails testing at a particular stage, it + is discarded and cannot generate any more events. + + 3) What happens if the implementation doesn't support EXT_depth_bounds. + + RESOLVED: It is as if all fragments pass the depth bounds test. No + depth bounds failed events are generated. + + 4) What is the purpose of QUERY_ALL_EVENT_BITS_AMD? + + RESOLVED: It allows the counting of all fragments that are subjected to + any test regardless of the outcome of those tests. + + 5) What should the new query state setter function be called? + + DISCUSSION: Unfortunately, the query object API doesn't really follow + the naming conventions of object state getters already, as + GetQueryObject should have been rather called GetQueryParameter. + We considered the following options: + + (a) QueryObjectuiAMD + (b) QueryParameteruiAMD + (c) QueryObjectParameteruiAMD + + Option (a) follows the existing naming convention of the query object + API, but is too general. + Option (b) follows the naming convention of other object types, but + because the getter of existing query states is called GetQueryObject, + while there is also a GetQuery getter that returns context state, + not per-query object state. + Option (c) doesn't follow either the naming convention of the query + object API or any other object type's, but rather a mixture of the two, + however, it makes explicit both the fact that the setter operates + on a query object and that it modifies its parameter. + + RESOLVED: QueryObjectParameteruiAMD, because the function modifies + a state/parameter of a query object. + + 6) Should there be also a GetQueryObjectParameteruiAMD? + + RESOLVED: No. GetQueryObject is already defined to query the state of + a query object (see also issue #5). + +Revision History + + Rev. Date Author Changes + ---- -------- -------- --------------------------------------------- + 3 11/20/2013 gsellers Make ready for posting + 2 08/20/2013 drakos Internal revision + 1 10/08/2012 gsellers Initial revision diff --git a/opengles/extensions/AMD/AMD_performance_monitor.txt b/opengles/extensions/AMD/AMD_performance_monitor.txt new file mode 100644 index 0000000000..35efea5207 --- /dev/null +++ b/opengles/extensions/AMD/AMD_performance_monitor.txt @@ -0,0 +1,586 @@ +Name + + AMD_performance_monitor + +Name Strings + + GL_AMD_performance_monitor + +Contributors + + Dan Ginsburg + Aaftab Munshi + Dave Oldcorn + Maurice Ribble + Jonathan Zarge + +Contact + + Dan Ginsburg (dan.ginsburg 'at' amd.com) + +Status + + ??? + +Version + + Last Modified Date: 11/29/2007 + +Number + + OpenGL Extension #360 + OpenGL ES Extension #50 + +Dependencies + + None + +Overview + + This extension enables the capture and reporting of performance monitors. + Performance monitors contain groups of counters which hold arbitrary counted + data. Typically, the counters hold information on performance-related + counters in the underlying hardware. The extension is general enough to + allow the implementation to choose which counters to expose and pick the + data type and range of the counters. The extension also allows counting to + start and end on arbitrary boundaries during rendering. + +Issues + + 1. Should this be an EGL or OpenGL/OpenGL ES extension? + + Decision - Make this an OpenGL/OpenGL ES extension + + Reason - We would like to expose this extension in both OpenGL and + OpenGL ES which makes EGL an unsuitable choice. Further, support for + EGL is not a requirement and there are platforms that support OpenGL ES + but not EGL, making it difficult to make this an EGL extension. + + 2. Should the API support multipassing? + + Decision - No. + + Reason - Multipassing should really be left to the application to do. + This makes the API unnecessarily complicated. A major issue is that + depending on which counters are to be sampled, the # of passes and which + counters get selected in each pass can be difficult to determine. It is + much easier to give a list of counters categorized by groups with + specific information on the number of counters that can be selected from + each group. + + 3. Should we define a 64-bit data type for UNSIGNED_INT64_AMD? + + Decision - No. + + Reason - While counters can be returned as 64-bit unsigned integers, the + data is passed back to the application inside of a void*. Therefore, + there is no need in this extension to define a 64-bit data type (e.g., + GLuint64). It will be up the application to declare a native 64-bit + unsigned integer and cast the returned data to that type. + + +New Procedures and Functions + + void GetPerfMonitorGroupsAMD(int *numGroups, sizei groupsSize, + uint *groups) + + void GetPerfMonitorCountersAMD(uint group, int *numCounters, + int *maxActiveCounters, sizei countersSize, + uint *counters) + + void GetPerfMonitorGroupStringAMD(uint group, sizei bufSize, sizei *length, + char *groupString) + + void GetPerfMonitorCounterStringAMD(uint group, uint counter, sizei bufSize, + sizei *length, char *counterString) + + void GetPerfMonitorCounterInfoAMD(uint group, uint counter, + enum pname, void *data) + + void GenPerfMonitorsAMD(sizei n, uint *monitors) + + void DeletePerfMonitorsAMD(sizei n, uint *monitors) + + void SelectPerfMonitorCountersAMD(uint monitor, boolean enable, + uint group, int numCounters, + uint *counterList) + + void BeginPerfMonitorAMD(uint monitor) + + void EndPerfMonitorAMD(uint monitor) + + void GetPerfMonitorCounterDataAMD(uint monitor, enum pname, sizei dataSize, + uint *data, int *bytesWritten) + + +New Tokens + + Accepted by the parameter of GetPerfMonitorCounterInfoAMD + + COUNTER_TYPE_AMD 0x8BC0 + COUNTER_RANGE_AMD 0x8BC1 + + Returned as a valid value in parameter of + GetPerfMonitorCounterInfoAMD if = COUNTER_TYPE_AMD + + UNSIGNED_INT 0x1405 + FLOAT 0x1406 + UNSIGNED_INT64_AMD 0x8BC2 + PERCENTAGE_AMD 0x8BC3 + + Accepted by the parameter of GetPerfMonitorCounterDataAMD + + PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 + PERFMON_RESULT_SIZE_AMD 0x8BC5 + PERFMON_RESULT_AMD 0x8BC6 + +Addition to the GL specification + + Add a new section called Performance Monitoring + + A performance monitor consists of a number of hardware and software counters + that can be sampled by the GPU and reported back to the application. + Performance counters are organized as a single hierarchy where counters are + categorized into groups. Each group has a list of counters that belong to + the counter and can be sampled, and a maximum number of counters that can be + sampled. + + The command + + void GetPerfMonitorGroupsAMD(int *numGroups, sizei groupsSize, + uint *groups); + + returns the number of available groups in , if is + not NULL. If is not 0 and is not NULL, then the list + of available groups is returned. The number of entries that will be + returned in is determined by . If is 0, + no information is copied. Each group is identified by a unique unsigned int + identifier. + + The command + + void GetPerfMonitorCountersAMD(uint group, int *numCounters, + int *maxActiveCounters, + sizei countersSize, + uint *counters); + + returns the following information. For each group, it returns the number of + available counters in , the max number of counters that can be + active at any time in , and the list of counters in + . The number of entries that can be returned in is + determined by . If is 0, no information is + copied. Each counter in a group is identified by a unique unsigned int + identifier. If does not reference a valid group ID, an + INVALID_VALUE error is generated. + + + The command + + void GetPerfMonitorGroupStringAMD(uint group, sizei bufSize, + sizei *length, char *groupString) + + + returns the string that describes the group name identified by in + . The actual number of characters written to , + excluding the null terminator, is returned in . If is + NULL, then no length is returned. The maximum number of characters that + may be written into , including the null terminator, is + specified by . If is 0 and is NULL, the + number of characters that would be required to hold the group string, + excluding the null terminator, is returned in . If + does not reference a valid group ID, an INVALID_VALUE error is generated. + + + The command + + void GetPerfMonitorCounterStringAMD(uint group, uint counter, + sizei bufSize, sizei *length, + char *counterString); + + + returns the string that describes the counter name identified by + and in . The actual number of characters written + to , excluding the null terminator, is returned in . + If is NULL, then no length is returned. The maximum number of + characters that may be written into , including the null + terminator, is specified by . If is 0 and + is NULL, the number of characters that would be required to + hold the counter string, excluding the null terminator, is returned in + . If does not reference a valid group ID, or + does not reference a valid counter within the group ID, an INVALID_VALUE + error is generated. + + The command + + void GetPerfMonitorCounterInfoAMD(uint group, uint counter, + enum pname, void *data); + + returns the following information about a counter. For a + belonging to , we can query the counter type and counter range. If + is COUNTER_TYPE_AMD, then returns the type. Valid type + values returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT. + If type value returned is PERCENTAGE_AMD, then this describes a float + value that is in the range [0.0 .. 100.0]. If is COUNTER_RANGE_AMD, + returns two values representing a minimum and a maximum. The + counter's type is used to determine the format in which the range values + are returned. If does not reference a valid group ID, or + does not reference a valid counter within the group ID, an INVALID_VALUE + error is generated. + + + The command + + void GenPerfMonitorsAMD(sizei n, uint *monitors) + + returns a list of monitors. These monitors can then be used to select + groups/counters to be sampled, to start multiple monitoring sessions and to + return counter information sampled by the GPU. At creation time, the + performance monitor object has all counters disabled. The value of the + PERFMON_RESULT_AVAILABLE_AMD, PERFMON_RESULT_AMD, and + PERFMON_RESULT_SIZE_AMD queries will all initially be 0. + + The command + + void DeletePerfMonitorsAMD(sizei n, uint *monitors) + + is used to delete the list of monitors created by a previous call to + GenPerfMonitors. If a monitor ID in the list does not + reference a previously generated performance monitor, an INVALID_VALUE + error is generated. + + The command + + void SelectPerfMonitorCountersAMD(uint monitor, boolean enable, + uint group, int numCounters, + uint *counterList); + + is used to enable or disable a list of counters from a group to be monitored + as identified by . The argument determines whether the + counters should be enabled or disabled. specifies the group + ID under which counters will be enabled or disabled. The + argument gives the number of counters to be selected from the list + . If is not a valid monitor created by + GenPerfMonitorsAMD, then INVALID_VALUE error will be generated. If + is not a valid group, the INVALID_VALUE error will be generated. If + is less than 0, an INVALID_VALUE error will be generated. + + When SelectPerfMonitorCountersAMD is called on a monitor, any outstanding + results for that monitor become invalidated and the result queries + PERFMON_RESULT_SIZE_AMD and PERFMON_RESULT_AVAILABLE_AMD are reset to 0. + + The command + + void BeginPerfMonitorAMD(uint monitor); + + is used to start a monitor session. Note that BeginPerfMonitor calls cannot + be nested. In addition, it is quite possible that given the list of groups + and counters/group enabled for a monitor, it may not be able to sample the + necessary counters and so the monitor session will fail. In such a case, + an INVALID_OPERATION error will be generated. + + While BeginPerfMonitorAMD does mark the beginning of performance counter + collection, the counters do not begin collecting immediately. Rather, the + counters begin collection when BeginPerfMonitorAMD is processed by + the hardware. That is, the API is asynchronous, and performance counter + collection does not begin until the graphics hardware processes the + BeginPerfMonitorAMD command. + + The command + + void EndPerfMonitorAMD(uint monitor); + + ends a monitor session started by BeginPerfMonitorAMD. If a performance + monitor is not currently started, an INVALID_OPERATION error will be + generated. + + Note that there is an implied overhead to collecting performance counters + that may or may not distort performance depending on the implementation. + For example, some counters may require a pipeline flush thereby causing a + change in the performance of the application. Further, the frequency at + which an application samples may distort the accuracy of counters which are + variant (e.g., non-deterministic based on the input). While the effects + of sampling frequency are implementation dependent, general guidance can + be given that sampling at a high frequency may distort both performance + of the application and the accuracy of variant counters. + + The command + + void GetPerfMonitorCounterDataAMD(uint monitor, enum pname, + sizei dataSize, + uint *data, sizei *bytesWritten); + + is used to return counter values that have been sampled for a monitor + session. If is PERFMON_RESULT_AVAILABLE_AMD, then will + indicate whether the result is available or not. If is + PERFMON_RESULT_SIZE_AMD, will contain actual size of all counter + results being sampled. If is PERFMON_RESULT_AMD, will + contain results. For each counter of a group that was selected to be + sampled, the information is returned as group ID, followed by counter ID, + followed by counter value. The size of counter value returned will depend + on the counter value type. The argument specifies the number of + bytes available in the buffer for writing. If is not + NULL, it gives the number of bytes written into the buffer. It is an + INVALID_OPERATION error for to be NULL. If is + PERFMON_RESULT_AMD and is less than the number of bytes required + to store the results as reported by a PERFMON_RESULT_SIZE_AMD query, then + results will be written only up to the number of bytes specified by + . + + If no BeginPerfMonitorAMD/EndPerfMonitorAMD has been issued for a monitor, + then the result of querying for PERFMON_RESULT_AVAILABLE and + PERFMON_RESULT_SIZE will be 0. When SelectPerfMonitorCountersAMD is called + on a monitor, the results stored for the monitor become invalidated and + the value of PERFMON_RESULT_AVAILABLE and PERFMON_RESULT_SIZE queries should + behave as if no BeginPerfMonitorAMD/EndPerfMonitorAMD has been issued for + the monitor. + +Errors + + INVALID_OPERATION error will be generated if BeginPerfMonitorAMD is unable + to begin monitoring with the currently selected counters. + + INVALID_OPERATION error will be generated if BeginPerfMonitorAMD is called + when a performance monitor is already active. + + INVALID_OPERATION error will be generated if EndPerfMonitorAMD is called + when a performance monitor is not currently started. + + INVALID_VALUE error will be generated if the parameter to + GetPerfMonitorCountersAMD, GetPerfMonitorCounterStringAMD, + GetPerfMonitorCounterStringAMD, GetPerfMonitorCounterInfoAMD, or + SelectPerfMonitorCountersAMD does not reference a valid group ID. + + INVALID_VALUE error will be generated if the parameter to + GetPerfMonitorCounterInfoAMD does not reference a valid counter ID + in the group specified by . + + INVALID_VALUE error will be generated if any of the monitor IDs + in the parameter to DeletePerfMonitorsAMD do not reference + a valid generated monitor ID. + + INVALID_VALUE error will be generated if the parameter to + SelectPerfMonitorCountersAMD does not reference a monitor created by + GenPerfMonitorsAMD. + + INVALID_VALUE error will be generated if the parameter to + SelectPerfMonitorCountersAMD is less than 0. + + + +New State + +Sample Usage + + typedef struct + { + GLuint *counterList; + int numCounters; + int maxActiveCounters; + } CounterInfo; + + void + getGroupAndCounterList(GLuint **groupsList, int *numGroups, + CounterInfo **counterInfo) + { + GLint n; + GLuint *groups; + CounterInfo *counters; + + glGetPerfMonitorGroupsAMD(&n, 0, NULL); + groups = (GLuint*) malloc(n * sizeof(GLuint)); + glGetPerfMonitorGroupsAMD(NULL, n, groups); + *numGroups = n; + + *groupsList = groups; + counters = (CounterInfo*) malloc(sizeof(CounterInfo) * n); + for (int i = 0 ; i < n; i++ ) + { + glGetPerfMonitorCountersAMD(groups[i], &counters[i].numCounters, + &counters[i].maxActiveCounters, 0, NULL); + + counters[i].counterList = (GLuint*)malloc(counters[i].numCounters * + sizeof(int)); + + glGetPerfMonitorCountersAMD(groups[i], NULL, NULL, + counters[i].numCounters, + counters[i].counterList); + } + + *counterInfo = counters; + } + + static int countersInitialized = 0; + + int + getCounterByName(char *groupName, char *counterName, GLuint *groupID, + GLuint *counterID) + { + int numGroups; + GLuint *groups; + CounterInfo *counters; + int i = 0; + + if (!countersInitialized) + { + getGroupAndCounterList(&groups, &numGroups, &counters); + countersInitialized = 1; + } + + for ( i = 0; i < numGroups; i++ ) + { + char curGroupName[256]; + glGetPerfMonitorGroupStringAMD(groups[i], 256, NULL, curGroupName); + if (strcmp(groupName, curGroupName) == 0) + { + *groupID = groups[i]; + break; + } + } + + if ( i == numGroups ) + return -1; // error - could not find the group name + + for ( int j = 0; j < counters[i].numCounters; j++ ) + { + char curCounterName[256]; + + glGetPerfMonitorCounterStringAMD(groups[i], + counters[i].counterList[j], + 256, NULL, curCounterName); + if (strcmp(counterName, curCounterName) == 0) + { + *counterID = counters[i].counterList[j]; + return 0; + } + } + + return -1; // error - could not find the counter name + } + + void + drawFrameWithCounters(void) + { + GLuint group[2]; + GLuint counter[2]; + GLuint monitor; + GLuint *counterData; + + // Get group/counter IDs by name. Note that normally the + // counter and group names need to be queried for because + // each implementation of this extension on different hardware + // could define different names and groups. This is just provided + // to demonstrate the API. + getCounterByName("HW", "Hardware Busy", &group[0], + &counter[0]); + getCounterByName("API", "Draw Calls", &group[1], + &counter[1]); + + // create perf monitor ID + glGenPerfMonitorsAMD(1, &monitor); + + // enable the counters + glSelectPerfMonitorCountersAMD(monitor, GL_TRUE, group[0], 1, + &counter[0]); + glSelectPerfMonitorCountersAMD(monitor, GL_TRUE, group[1], 1, + &counter[1]); + + glBeginPerfMonitorAMD(monitor); + + // RENDER FRAME HERE + // ... + + glEndPerfMonitorAMD(monitor); + + // read the counters + GLint resultSize; + glGetPerfMonitorCounterDataAMD(monitor, GL_PERFMON_RESULT_SIZE_AMD, + sizeof(GLint), &resultSize, NULL); + + counterData = (GLuint*) malloc(resultSize); + + GLsizei bytesWritten; + glGetPerfMonitorCounterDataAMD(monitor, GL_PERFMON_RESULT_AMD, + resultSize, counterData, &bytesWritten); + + // display or log counter info + GLsizei wordCount = 0; + + while ( (4 * wordCount) < bytesWritten ) + { + GLuint groupId = counterData[wordCount]; + GLuint counterId = counterData[wordCount + 1]; + + // Determine the counter type + GLuint counterType; + glGetPerfMonitorCounterInfoAMD(groupId, counterId, + GL_COUNTER_TYPE_AMD, &counterType); + + if ( counterType == GL_UNSIGNED_INT64_AMD ) + { + unsigned __int64 counterResult = + *(unsigned __int64*)(&counterData[wordCount + 2]); + + // Print counter result + + wordCount += 4; + } + else if ( counterType == GL_FLOAT ) + { + float counterResult = *(float*)(&counterData[wordCount + 2]); + + // Print counter result + + wordCount += 3; + } + // else if ( ... ) check for other counter types + // (GL_UNSIGNED_INT and GL_PERCENTAGE_AMD) + } + } + +Revision History + 11/29/2007 - dginsburg + + Clarified the default state of a performance monitor object on creation + + 11/09/2007 - dginsbur + + Clarify what happens if SelectPerfMonitorCountersAMD is called on + a monitor with outstanding query results. + + Rename counterSize to countersSize + + Remove some ';' typos + + 06/13/2007 - dginsbur + + Add language on the asynchronous nature of the API and + counter accuracy/performance distortion. + + Add myself as the contact + + Remove INVALID_OPERATION error when countersList is NULL + + Clarify 64-bit issue + + Make PERCENTAGE_AMD counters float rather than uint + + Clarify accuracy distortion on variant counters only + + Tweak to overview language + + 06/09/2007 - dginsbur + + Fill in errors section and make many more errors explicit + + Fix the example code so it compiles + + 06/08/2007 - dginsbur + + Modified GetPerfMonitorGroupString and GetPerfMonitorCounterString to + be more client/server friendly. + + Modified example. + + Renamed parameters/variables to follow GL conventions. + + Modified several 'int' param types to 'sizei' + + Modifid counters type from 'int' to 'uint' + + Renamed argument 'cb' and 'cbret' + + Better documented GetPerfMonitorCounterData + + Add AMD adornment in many places that were missing it + + 06/07/2007 - dginsbur + + Cleanup formatting, remove tabs, make fit in proper page width + + Add FLOAT and UNSIGNED_INT to list of COUNTER_TYPEs + + Fix some bugs in the example code + + Rewrite introduction + + Clarified Issue 1 reasoning + + Added Issue 3 regarding use of 64-bit data types + + Added revision history + + 03/21/2007 - Initial version written. Written by amunshi. + + diff --git a/opengles/extensions/AMD/AMD_pinned_memory.txt b/opengles/extensions/AMD/AMD_pinned_memory.txt new file mode 100644 index 0000000000..16ed058b36 --- /dev/null +++ b/opengles/extensions/AMD/AMD_pinned_memory.txt @@ -0,0 +1,223 @@ +Name + + AMD_pinned_memory + +Name Strings + + GL_AMD_pinned_memory + +Contributors + + Pierre Boudier + Graham Sellers + +Contact + + Pierre Boudier, AMD (pierre.boudier 'at' amd.com) + +IP Status + + None. + +Status + + Shipping + +Version + + Last Modified Date: June 4, 2013 + Revision: 2.0 + +Number + + 411 + +Dependencies + + This specification is written against the OpenGL 4.2 (Core) Specification, + dated August 8, 2011. + +Overview + + This extension defines an interface that allows improved control + of the physical memory used by the graphics device. + + It allows an existing page of system memory allocated by the application + to be used as memory directly accessible to the graphics processor. One + example application of this functionality would be to be able to avoid an + explicit synchronous copy with sub-system of the application; for instance + it is possible to directly draw from a system memory copy of a video + image. + +New Procedures and Functions + + None + +New Tokens + + Accepted by the parameters of BindBuffer, BufferData, + BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + GetBufferParameteriv, GetBufferPointerv, MapBufferRange: + + EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 + +Additions to Chapter 2 of the OpenGL 4.2 (Core Profile) Specification +(OpenGL Operation) + + Additions to the table Table 2.8: Buffer object binding targets. + + +-------------------------------------+---------------------------------+-------------------------+ + | Target name | Purpose | Described in section(s) | + +-------------------------------------+---------------------------------+-------------------------+ + | EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD | Application-owned memory buffer | 2.9.2 | + +-------------------------------------+---------------------------------+-------------------------+ + + Modifications to Section 2.9.2, "Creating Buffer Object Data Stores" + + 2.9.2 Creating Buffer Object Data Stores + + The data store of a buffer object is created and initialized by calling + + void BufferData( enum target, sizeiptr size, const void *data, enum usage ); + + with set to one of the targets listed in table 2.8, set to + the size of the data store in basic machine units, and data pointing to the + source data in client memory. If is not + EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, then if is non-null, the source + data is copied to the buffer object's data store. If is null, then + the contents of the buffer object's data store are undefined. If + is EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, then the client's memory is used + directly by the GL for all subsequent operations on the buffer object's + data store. In this case, the application must guarantee the existence of + the buffer for the lifetime of the buffer object, or until its data store + is re-specified by another call to BufferData. is specified as one + of nine enumerated values, indicating the expected application usage + pattern of the data store. The values are: ... + +Additions to Chapter 3 of the OpenGL 4.2 (Core Profile) Specification +(Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 4.2 (Core Profile) Specification +(Per-Fragment Operations and the Framebuffer) + + None. + +Additions to Chapter 5 of the OpenGL 4.2 (Core Profile) Specification +(Special Functions) + + None. + +Additions to Chapter 6 of the OpenGL 4.2 (Core Profile) Specification +(State and State Requests) + + None. + +Errors + + INVALID_OPERATION is generated by BufferData if is + EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, and the store cannot be mapped to the + GPU address space. + +Issues + + 1) When a system memory is shared with the GL, do we need extra + synchronization for the application to update the content? + + RESOLVED: NO. once the memory page has been shared with the GL, + then all the regular OpenGL commands can be used to ensure + proper synchronization. the newly created buffer object is + no different from the ones that were allocated by GL, except + that the physical pages cannot be changed (but virtual mapping + can change). + + 2) Can the application still use the buffer using the CPU address? + + RESOLVED: YES. However, this access would be completely + non synchronized to the OpenGL pipeline, unless explicit + synchronization is being used (for example, through glFinish or by using + sync objects). + + 3) Can the application free the memory? + + RESOLVED: YES. However, the underlying buffer object should + have been deleted from the OpenGL to prevent any access by + the GPU, or the result is undefined, including program or even system + termination. + + 4) Is glMapBuffer on a shared buffer guaranteed to return the same system + address which was specified at creation time? + + RESOLVED: NO. The GL implementation might return a different virtual + mapping of that memory, although the same physical page will be used. + + 5) Is there any limitation on offset/size? + + RESOLVED: YES. Since the pinning of system memory is eventually handled + by the OS, there might be different restriction. It is recommended to + align the offset/size to the underlying page size (4k seems to be + widespread). + + 6) What happens if you use this extension on two separate buffers which are + sharing the same underlying physical page? + + RESOLVED: The behavior is undefined. some OS will not refcount how + many times a physical page is locked for GPU access, and may therefore + either fail to lock, or fail to properly unlock. + + 7) Should there be a query for the alignment value of offset/size? + + RESOLVED: NO. on the same system, it is possible to have several + different page sizes. + + 8) Why is the error produced for failure to pin memory INVALID_OPERATION? + Why not OUT_OF_MEMORY? + + OUT_OF_MEMORY invalidates OpenGL context state. Failure to pin memory + does not upset the state of the context, and so an error that does not + have this semantic was chosen. The exact cause of the failure may be + reported by a debug context. + +Example Usage + + The GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD target is used simply for the + purposes of allocation through BufferData. It is otherwise not referenced + by the GL (much like GL_COPY_READ_BUFFER, for example). Once the buffer's + data store has been associated with client memory, that memory may be used + for any purpose such as vertex attributes (GL_ARRAY_BUFFER), TBO + (GL_TEXTURE_BUFFER), pixel reads and writes (GL_PIXEL_UNPACK_BUFFER, + GL_PIXEL_PACK_BUFFER) or transform feedback (GL_TRANSFORM_FEEDBACK_BUFFER). + + As an example, consider the following example, which performs an + asynchronous pixel readback to client memory: + + GLuint buffer; + glGenBuffers(1, &buffer); + glBindBuffer(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, buffer); + + void * memory = malloc(1024 * 1024 * 4); + glBufferData(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, 1024 * 1024 * 4, GL_STREAM_COPY, memory); + + glBindBuffer(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, 0); + glBindBuffer(GL_PIXEL_PACK_BUFFER_AMD, buffer); + glReadPixels(0, 0, 1024, 1024, GL_RGBA, GL_UNSIGNED_BYTE, 0); + + GLsync s = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + + // Data will eventually end up in 'memory'. Other processing may occur + // during the transfer time. + + glClientWaitSync(s, GL_SYNC_FLUSH_COMMANDS_BIT, ~0ull); + + // It is now safe to use 'memory' + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 2 04/05/2013 gsellers Fixed a couple of typos. + 1 11/30/2011 gsellers Cleanup and minor updates. + xx 03/22/2011 pboudier Initial draft. + diff --git a/opengles/extensions/AMD/AMD_program_binary_Z400.txt b/opengles/extensions/AMD/AMD_program_binary_Z400.txt new file mode 100644 index 0000000000..af5f5e50b3 --- /dev/null +++ b/opengles/extensions/AMD/AMD_program_binary_Z400.txt @@ -0,0 +1,138 @@ +Name + + AMD_program_binary_Z400 + +Name Strings + + GL_AMD_program_binary_Z400 + +Contributors + + Joey Blankenship + +Contact + + Benj Lipchak, AMD (benj.lipchak 'at' amd.com) + +Status + + Complete. + +Version + + Last Modified Date: April 9, 2008 + Revision: #6 + +Number + + 48 + +Dependencies + + OpenGL ES 2.0 is required. + + OES_get_program_binary is required. + + Written based on the wording of the OpenGL ES 2.0 specification. + +Overview + + AMD provides an offline shader compiler as part of its suite of SDK tools + for AMD's Z400 family of embedded graphics accelerator IP. This extension + makes available a program binary format, Z400_BINARY_AMD. + + The offline shader compiler accepts a pair of OpenGL Shading Language + (GLSL) source shaders: one vertex shader and one fragment shader. It + outputs a compiled, optimized, and pre-linked program binary which can then + be loaded into a program objects via the ProgramBinaryOES command. + + Applications are recommended to use the OES_get_program_binary extension's + program binary retrieval mechanism for install-time shader compilation where + applicable. That cross-vendor extension provides the performance benefits + of loading pre-compiled program binaries, while providing the portability of + deploying GLSL source shaders with the application rather than vendor- + specific binaries. The details of this extension are obviated by the use + of that extension. + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the parameter of ProgramBinaryOES: + + Z400_BINARY_AMD 0x8740 + +Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation) + + Add the following paragraph to the end of section 2.15.4: + + "Z400_BINARY_AMD, returned in the list of PROGRAM_BINARY_FORMATS_OES, is a + format that may be loaded into a program object via ProgramBinaryOES." + + An implementation may reject a Z400_BINARY_AMD program binary by setting the + LINK_STATUS to FALSE and updating the program object's info log if it + determines the binary was produced by an incompatible or outdated version of + the shader compiler." + +GLX Protocol + + None. + +Errors + + None. + +New State + + None. + +Sample Usage + + void loadPrecompiledZ400ProgramBinary(const char* myZ400BinaryFileName, + GLuint progObj) + { + GLint binaryLength; + GLvoid* binary; + GLint success; + FILE* infile; + + // + // Read the program binary + // + infile = fopen(myZ400BinaryFileName, "rb"); + fseek(infile, 0, SEEK_END); + binaryLength = (GLint)ftell(infile); + binary = (GLvoid*)malloc(binaryLength); + fseek(infile, 0, SEEK_SET); + fread(binary, binaryLength, 1, infile); + fclose(infile); + + // + // Load the binary into the program object -- no need to link! + // + glProgramBinaryOES(progObj, GL_Z400_BINARY_AMD, binary, binaryLength); + free(binary); + + glGetProgramiv(progObj, GL_LINK_STATUS, &success); + + if (!success) + { + // + // Fallback to source shaders or gracefully exit. + // + } + } + +Revision History + + #06 04/09/2008 Benj Lipchak Remove INVALID_OPERATION error in favor + of just LINK_STATUS and info log. + Also improve sample code. + #05 03/12/2008 Benj Lipchak Reformulate as program binary. + #04 01/02/2008 Benj Lipchak Split GetProgramBinary into its own + multi-vendor extension proposal. + #03 11/26/2007 Benj Lipchak Add sample usage and define tokens. + #02 10/22/2007 Benj Lipchak Add error conditions. + #01 10/14/2007 Benj Lipchak First draft. diff --git a/opengles/extensions/AMD/AMD_query_buffer_object.txt b/opengles/extensions/AMD/AMD_query_buffer_object.txt new file mode 100644 index 0000000000..8aa747c43d --- /dev/null +++ b/opengles/extensions/AMD/AMD_query_buffer_object.txt @@ -0,0 +1,401 @@ +Name + + AMD_query_buffer_object + +Name Strings + + GL_AMD_query_buffer_object + +Contact + + Daniel Rakos (daniel.rakos 'at' amd.com) + +Contributors + + Daniel Rakos, AMD + Graham Sellers, AMD + Christophe Riccio, AMD + +Status + + Shipping in Catalyst 12.6 + +Version + + Last Modified Date: 03/07/2016 + Author Revision: 6 + +Number + + 420 + +Dependencies + + OpenGL 1.5 is required. + + This extension is written against the OpenGL 4.2 (core) specification. + +Overview + + Statistics about the operation of the OpenGL pipeline, such as the number + of samples that passed the depth test, the elapsed time between two events + or the number of vertices written to a transform feedback buffer may + be retrieved from the GL through query objects. The current value of a + query object may be retrieved by the application through the OpenGL API. + Should the result returned by the API be required for use in a shader, + it must be passed back to the GL via a program uniform or some other + mechanism. This requires a round-trip from the GPU to the CPU and back. + + This extension introduces a mechanism whereby the current value of a query + result may be retrieved into a buffer object instead of client memory. + This allows the query result to be made available to a shader without a + round-trip to the CPU for example by subsequently using the buffer object + as a uniform buffer, texture buffer or other data store visible to the + shader. This functionality may also be used to place the results of + many query objects into a single, large buffer and then map or otherwise + read back the entire buffer at a later point in time, avoiding a per-query + CPU-GPU synchronization event. + + The result of any query object type supported by the GL implementation + may be retrieved into a buffer object. The implementation will determine + the most efficient method of copying the query result to the buffer. + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the parameter of GetQueryObjectiv, GetQueryObjectuiv, + GetQueryObjecti64v and GetQueryObjectui64v: + + QUERY_RESULT_NO_WAIT_AMD 0x9194 + + Accepted by the parameters of BindBuffer, BufferData, + BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, + GetBufferParameteriv + and GetBufferPointerv: + + QUERY_BUFFER_AMD 0x9192 + + Accepted by the parameter of GetBooleanv, GetIntegerv, GetFloatv, + and GetDoublev: + + QUERY_BUFFER_BINDING_AMD 0x9193 + +Additions to Chapter 2 of the OpenGL 4.2 (core) Specification (OpenGL Operation) + + Modify Section 2.9, Buffer Objects + + Add to Table 2.8: Buffer object binding targets (p. 43) + + +---------------------+--------------------------+-------------------------+ + | Target name | Purpose | Described in section(s) | + +---------------------+--------------------------+-------------------------+ + | QUERY_BUFFER_AMD | Query result buffer | 6.1.7 | + +---------------------+--------------------------+-------------------------+ + +Additions to Chapter 3 of the OpenGL 3.2 (core) Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 3.2 (core) Specification (Per-Fragment Operations and the Frame Buffer) + + None. + +Additions to Chapter 5 of the OpenGL 3.2 (core) Specification (Special Functions) + + None. + +Additions to Chapter 6 of the OpenGL 3.2 (core) Specification (State and State Requests) + + Modify Section 6.1.7, Asynchronous Queries + + Add new paragraph before the third paragraph on p. 358 + + Initially, zero is bound for the QUERY_BUFFER_AMD, indicating that + is a pointer into client memory. However, if a non-zero buffer + object is bound as the current query result buffer, then is + treated as an offset into the designated buffer object. + + Replace last sentence of the third paragraph on p. 358 + beginning with "The state of a query object can be queried with ..." + + pname must be QUERY_RESULT, QUERY_RESULT_NO_WAIT_AMD + or QUERY_RESULT_AVAILABLE. + + Add new paragraph before the last paragraph on p. 358 + + If is QUERY_RESULT_NO_WAIT_AMD, then the query object's + result value is returned as a single integer in if the result + is available at the time of the state query. If the result is not + available then the destination memory location is not overwritten. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + INVALID_OPERATION is generated by GetQueryObjectiv, GetQueryObjectuiv, + GetQueryObjecti64v, or GetQueryObjectui64v if the command would cause data + to be written beyond the bounds of the buffer currently currently bound + to the QUERY_BUFFER_AMD target. + +New State + + Append to Table 6.41, "Query Object State" + + +----------------------------+-------+-------------------+---------------+-------------------------------------------+-------+ + | Get Value | Type | Get Command | Initial Value | Description | Sec. | + +----------------------------+-------+-------------------+---------------+-------------------------------------------+-------+ + | QUERY_BUFFER_BINDING_AMD | Z+ | GetIntegeriv | 0 | Query result buffer binding. | 6.1.7 | + +----------------------------+-------+-------------------+---------------+-------------------------------------------+-------+ + +New Implementation Dependent State + + None. + +Usage Examples + + Convenient macro definition for specifying buffer offsets: + + #define BUFFER_OFFSET(i) ((void*)NULL + (i)) + + Example 1: Using occlusion query result in shader + + // Create a buffer object for the query result + glGenBuffers(1, &queryBuffer); + glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer); + glBufferData(GL_QUERY_BUFFER_AMD, sizeof(GLuint), + NULL, GL_DYNAMIC_COPY); + + // Perform occlusion query + glBeginQuery(GL_SAMPLES_PASSED, queryId) + ... + glEndQuery(GL_SAMPLES_PASSED); + + // Get query results to buffer object + glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer); + glGetQueryObjectuiv(queryId, GL_QUERY_RESULT, BUFFER_OFFSET(0)); + + // Bind query result buffer as uniform buffer + glBindBufferBase(GL_UNIFORM_BUFFER, 0, queryBuffer); + ... + + --- Shader --- + + ... + uniform queryResult { + uint samplesPassed; + }; + ... + void main() { + ... + if (samplesPassed > threshold) { + // complex processing + ... + } else { + // simplified processing + ... + } + ... + } + + Example 2: Using occlusion query result in shader only if result is available + + // Create a buffer object for the query result + glGenBuffers(1, &queryBuffer); + glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer); + glBufferData(GL_QUERY_BUFFER_AMD, 2 * sizeof(GLuint), + NULL, GL_DYNAMIC_COPY); + + // Perform occlusion query + glBeginQuery(GL_SAMPLES_PASSED, queryId) + ... + glEndQuery(GL_SAMPLES_PASSED); + + // Get query availability and result (if available) to buffer object + glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer); + glGetQueryObjectuiv(queryId, GL_QUERY_RESULT_AVAILABLE, BUFFER_OFFSET(0)); + glGetQueryObjectuiv(queryId, GL_QUERY_RESULT_NO_WAIT_AMD, BUFFER_OFFSET(4)); + + // Bind query result buffer as uniform buffer + glBindBufferBase(GL_UNIFORM_BUFFER, 0, queryBuffer); + ... + + --- Shader --- + + ... + uniform queryResult { + uint resultAvailable; + uint samplesPassed; + }; + ... + void main() { + ... + if (resultAvailable) { + if (samplesPassed > threshold) { + // complex processing + ... + } else { + // simplified processing + ... + } + } else { + // default processing if no query result is available + ... + } + ... + } + + Example 3: Using a default value and QUERY_RESULT_NO_WAIT_AMD + + // Create a buffer object for the query result + // Store a default value in the buffer that will be used + // if the query results are not available + glGenBuffers(1, &queryBuffer); + glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer); + GLuint defaultValue = 42; + glBufferData(GL_QUERY_BUFFER_AMD, sizeof(GLuint), + &defaultValue, GL_DYNAMIC_COPY); + + // Perform occlusion query + glBeginQuery(GL_SAMPLES_PASSED, queryId) + ... + glEndQuery(GL_SAMPLES_PASSED); + + // Get query results to buffer object with no wait + // Default value remains untouched if results are not available + glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer); + glGetQueryObjectuiv(queryId, GL_QUERY_RESULT_NO_WAIT_AMD, BUFFER_OFFSET(0)); + ... + + Example 4: Using transform feedback query result to fill indirect draw buffer + + // Create a buffer object for the indirect draw command + glGenBuffers(1, &drawIndirectBuffer); + + // Initialize draw command + DrawArraysIndirectCommand cmd = { ... }; + glBindBuffer(GL_DRAW_INDIRECT_BUFFER, drawIndirectBuffer); + glBufferData(GL_DRAW_INDIRECT_BUFFER, sizeof(DrawArraysIndirectCommand), + &cmd, GL_DYNAMIC_COPY); + + // Perform transform feedback query + glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, queryId) + ... + glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN); + + // Write query result to the primCount field of the indirect draw command + glBindBuffer(GL_QUERY_BUFFER_AMD, drawIndirectBuffer); + glGetQueryObjectuiv(queryId, GL_QUERY_RESULT, + BUFFER_OFFSET(offsetof(DrawArraysIndirectCommand, primCount))); + + // Execute the indirect draw command + glDrawArraysIndirect(GL_TRIANGLES, BUFFER_OFFSET(0)); + ... + +Issues + + 1) What is QUERY_RESULT_NO_WAIT_AMD useful for? + + RESOLVED: The application may decide that it does not want to wait for the + result of the query object if it's not available at the time. This is not + a problem without this extension as the application can always query the + availability using QUERY_RESULT_AVAILABLE and decide to actually get the + results using QUERY_RESULT only if the result is available. However, when + using query buffers, QUERY_RESULT_AVAILABLE and QUERY_RESULT alone cannot + provide the same flexibility for shader based decision making as the + results are either always available (if QUERY_RESULT was used) or never. + QUERY_RESULT_NO_WAIT_AMD provides a way to query the result only if it's + available. Combined with QUERY_RESULT_AVAILABLE, the shader can decide + to use the result or not based on the availability (see usage example 2). + + 2) Should QUERY_RESULT_NO_WAIT_AMD be accepted by GetQueryObjectiv, + GetQueryObjectuiv, GetQueryObjecti64v and GetQueryObjectui64v in case + there is no buffer bound to QUERY_BUFFER_AMD? + + RESOLVED: YES, for completeness. + + 3) Is there any guarantee that GetQueryObject* will not wait for the + query results to become available if is QUERY_RESULT_NO_WAIT_AMD? + + RESOLVED: There is no need to have such guarantee. An implementation may + choose to wait for the results even in case of QUERY_RESULT_NO_WAIT_AMD, + however, that may incur a potential performance hit in case the application + expects it to not wait. + + 4) Should the INVALID_OPERATION error be generated if a GetQueryObject* + command would access data outside the rage of the bound query buffer? + + RESOLVED: YES. This requires considering the value of and the + size of the type of the written value to determine the maximum addressed + byte for the state query command. + + Note: This follows the precedence of the language introduced by + ARB_pixel_buffer_object. + + 5) Should we support 64 bit versions of the state query commands + (GetQueryObjecti64v and GetQueryObjectui64v)? + + RESOLVED: YES, both for completeness and to support timer queries. In this + case a 64 bit integer value is written to the buffer. + + 6) Should the extension support all query types supported by the current + GL implementation? + + RESOLVED: YES. There is not much value in providing additional capability + queries that would allow the application to find out which query object + types are supported. Also, the GL implementation can always choose to + implement the functionality in software for query types that cannot be + supported in hardware. + + 7) Is there any precedence that the pointer parameter of a glGet* command + is treated as an offset into a bound buffer object? + + RESOLVED: YES, glGetTexImage accepts an offset into the pixel pack buffer + in case a pixel pack buffer is bound. As pixel buffer objects are part of + the core specification since version 2.1, no precedence is introduced by + this extension. + + 8) What should be written to the query buffer when QUERY_RESULT_NO_WAIT_AMD + is used but the results are not available? + + DISCUSSION: Leaving the written value undefined is an option, however + in many cases the application can benefit from having a default value in + the query buffer if the results are not available. The following options + were considered to support such use cases: + + a. Write a predefined fixed value to the buffer. + b. Write a user specified value to the buffer. + c. Don't write anything to the buffer, leave the current value + untouched. + + The problem with option a. is that it may be difficult to select such + a predefined value that would not potentially conflict with a valid + value. Option b. could be fine, however it requires new API to specify + this default value. Thus, option c. is considered to most preferable. + + RESOLVED: Nothing, the current value in the specified offset of the + query buffer is leaved untouched. + + +Revision History + + Rev. Date Author Changes + ---- -------- -------- --------------------------------------------- + + 6 03/07/2016 drakos Fixed typo in example #4 + 5 06/01/2012 gsellers Minor cleanup. Shipped and ready for posting. + 4 03/21/2012 drakos Removed undefined behavior when using + QUERY_RESULT_NO_WAIT and added issue #8 + based on Graham's comments + 3 03/12/2012 drakos Assigned enums + 2 03/07/2012 drakos Clarified issues #4 and #5 + Added issue #7 based on Christophe's comments + 1 02/28/2012 drakos Initial revision diff --git a/opengles/extensions/AMD/AMD_sample_positions.txt b/opengles/extensions/AMD/AMD_sample_positions.txt new file mode 100644 index 0000000000..149c50c5bd --- /dev/null +++ b/opengles/extensions/AMD/AMD_sample_positions.txt @@ -0,0 +1,231 @@ +Name + + AMD_sample_positions + +Name Strings + + GL_AMD_sample_positions + +Contact + + Mais Alnasser, AMD (mais.alnasser 'at' amd.com) + +Contributors + + Mais Alnasser, AMD + Graham Sellers, AMD + Nick Haemel, AMD + +Status + + Complete, shipping. + +Version + + Last Modified Date: 04/06/11 + Revision: 7 + +Number + + 405 + +Dependencies + + OpenGL 1.1 is required. + + EXT_framebuffer_multisample or OpenGL 3.2 is required. + + This extension interacts with the ARB_texture_multisample extension. + + This extension is written against the OpenGL 3.2 (Core) specification. + +Overview + + This extension provides a mechanism to explicitly set sample positions for a + FBO with multi-sampled attachments. The FBO will use identical sample locations + for all pixels in each attachment. This forces TEXTURE_FIXED_SAMPLE_LOCATIONS + to TRUE if a multi-sampled texture is specified using TexImage2DMultisample + or TexImage3DMultisample. That is, using GetTexLevelParameter to query + TEXTURE_FIXED_SAMPLE_LOCATIONS will always return TRUE if the mechanism is + explicitly used to set the sample positions. + +New Tokens + + Accepted by the parameter of GetFloatv: + + SUBSAMPLE_DISTANCE_AMD 0x883F + +New Procedures and Functions + + void SetMultisamplefvAMD(enum pname, uint index, const float *val); + +Modifications to Chapter 2 of the OpenGL 3.2 (Core) Specification (OpenGL + Operation) + + None. + +Modifications to Chapter 3 of the OpenGL 3.2 Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 3.2 (Core) Specification +(Per-Fragment Operations and the Frame Buffer) + + Modify Section 4.1.3, Multisample Fragment Operations + + Modify the discussion of SampleMaski to start with "Next" instead + of "Finally". + + Add after the discussion of SampleMaski: + + Finally, a single sample location can be modified for all pixels in + a multi-sampled framebuffer using the following call: + + void SetMultisamplefvAMD(enum pname, uint index, clampf *val); + + must be SAMPLE_POSITION. corresponds to the + sample for which the location should be set. The sample location + is set by passing two floating point values in and + , each between 0.0 and 1.0, inclusive, corresponding to the + and locations in pixel space of that sample, respectively . (0.5, 0.5) + thus corresponds to the pixel center. The error INVALID_VALUE is generated + if is greater than or equal to the value of SAMPLES. + + SetMultisamplefvAMD generates an INVALID_OPERATION error if the currently + bound framebuffer is incomplete or is the default framebuffer. + + Using SetMultisamplefvAMD will cause any multisampled texture attached + to the currently bound FBO to use identical sample locations for all + of its pixels forcing to TRUE. That is, using + GetTexLevelParameter to query TEXTURE_FIXED_SAMPLE_LOCATIONS will + always return TRUE if the new mechanism is used to explicitly set + the sample positions. + + If is NULL, is ignored and all sample positions are returned + to their default values. + + The subpixel range [0,1] is discretized based on the implementation- + dependent value of SUBSAMPLE_DISTANCE_AMD. GetFloatv can be used with + SUBSAMPLE_DISTANCE_AMD as the pname parameter to query the subpixel + precision, which is the same for both the vertical and horizontal + directions. Given two sample positions (x0, y0) and (x1, y1), one can make + sure they don't fall in the same subpixel if + + abs(x0-x1) >= ssd and abs(y0-y1) >= ssd, + + where ssd is the float value returned when querying SUBSAMPLE_DISTANCE_AMD. + + The quantized sample positions may be queried by calling GetMultisamplefv. + +Additions to Chapter 5 of the OpenGL 3.2 (Core) Specification (Special Functions) + + None. + +Additions to Chapter 6 of the OpenGL 3.2 (Core) Specification (State and +State Requests) + + None. + +GLX Protocol + + None. + +Errors + + The error INVALID_VALUE is generated by SetMultisamplefvAMD if index + is greater than or equal to the value of SAMPLES. + + The error INVALID_OPERATION is generated by SetMultisamplefvAMD if + the currently bound framebuffer is the default framebuffer. + + The error INVALID_OPERATION is generated by SetMultisamplefvAMD if + the currently bound framebuffer is incomplete. + +New State + + None. + +New Implementation Dependent State + + Add to Table 6.12, Multisampling, p.277: + + Get Value Type Get Command Value Description Sec. + --------- ------- ----------- ------- ------------------------ ------ + SUBSAMPLE_DISTANCE_AMD R+ GetFloatv - precision step between 4.1.3 + subsamples + +Interaction with ARB_texture_multisample + + If ARB_texture_multisample is not supported, remove all references to + TEXTURE_FIXED_SAMPLE_LOCATIONS and to . Also, should + ARB_texture_multisample not be supported, the GetMultisamplefv entry point + must be added as described in the specification of ARB_texture_multisample + for the sake of completeness. + +Issues + + (1) What happens if an app just sets one sample position, + index 3 for example? + + RESOLVED: Any attachment to the bound FBO will have the index 3 + position updated. All the rest of the positions will keep their + original values. Any other fbos will not be affected by this change. + + (2) How does an app get back to the default state after setting + sample positions? + + RESOLVED: SetMultisamplefvAMD(SAMPLE_POSITION, 0, NULL) will restore + all the sample positions to their default state. + + (3) Should we also expose the precision? An app can use it in setting + sample positions? + + RESOLVED: SUBSAMPLE_DISTANCE_AMD is added as a new token. It can be used + by GetFloatv to query the precision step, which will be the same for + both the vertical and horizontal directions. The subpixel range [0,1] + is discretized based on the value of SUBSAMPLE_DISTANCE_AMD. Let ssd be the + float value returned when SUBSAMPLE_DISTANCE_AMD is queried, then one can + infer the subpixilization to be 1/ssd+1. For example, if ssd = 0.06667 + then the pixel is subdivided into 1/0.0667+1=16 subpixels in each + dimension. + + One can also avoid using sample positions that would map to the same + subpixel. A coordinate c will map to the greatest multiple of ssd that + is less or equal to c. For example, given two sample positions, (x0, y0) + and (x1, y1), if abs(x1-x0) < ssd and abs(y1-y0) < ssd, then both points + will map to the same subpixel, which means the application might want to + substitute one of these positions with another that is not redundant. + Using numerical values as an example, let a=(0.201, 0.0) and b=(0.25, 0.5) + be sample positions and ssd = 0.06667. Both the x-coordinate values 0.201 + and 0.25 fall between 0.06667*3=0.2 and 0.06667*4=0.26667 and would + therefore map to the same value of 0.2. The y-coordinates also map to the + same value of 0 because they both belong in the range [0, 0.06667). This + means the two points are redundant. Therefore, the application should + choose a different point c=(0.3, 0.45) for example. c would be a good + choice because the distance between its x-coordinate and a's x-coordinate + is greater than ssd, that is 0.3-0.201 > 0.06667. + + (4) Aside from evaluating the above equations, how can an application tell + what subsample positions the hardware is using? + + RESOLVED: GetMultisamplefv will return the quantized sample positions, + not the original positions sent to SetMultisamplefvAMD. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + 7 4/06/11 gsellers Clean up for posting on public registry. + 6 6/30/10 gsellers Assign enumerant value for SUBSAMPLE_DISTANCE_AMD. + 5 3/18/10 malnasse Generate INVALID_OPERATION error if attempting + to set sample positions for an incomplete framebuffer + 4 2/23/10 malnasse Generate INVALID_OPERATION error if attempting + to set sample positions for the default framebuffer + 3 2/05/10 gsellers Minor cleanup. Submission to AMD repository. + 2 2/02/10 malnasse - Added a mechanism to restore the sample + positions to their default state. + - Added the issues section. + - Added new token to help query the subsample precision + 1 1/27/10 malnasse First revision. + + diff --git a/opengles/extensions/AMD/AMD_seamless_cubemap_per_texture.txt b/opengles/extensions/AMD/AMD_seamless_cubemap_per_texture.txt new file mode 100644 index 0000000000..09747fb8bb --- /dev/null +++ b/opengles/extensions/AMD/AMD_seamless_cubemap_per_texture.txt @@ -0,0 +1,216 @@ +Name + + AMD_seamless_cubemap_per_texture + +Name Strings + + GL_AMD_seamless_cubemap_per_texture + +Contributors + + Pierre Boudier + Graham Sellers + Ahmet Oguz Akyuz + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Status + + In Progress. + +Version + + Last Modified Date: February 3, 2017 + Author revision: 7 + +Number + + 383 + +Dependencies + + OpenGL 1.1 is required. + + ARB_texture_cube_map is required. + + ARB_seamless_cube_map affects the definition of this extension. + + This extension is written against the OpenGL 1.5 Specification. + +Overview + + In unextended OpenGL, cube maps are treated as sets of six, independent + texture images. Once a face is selected from the set, it is treated exactly + as any other two-dimensional texture would be. When sampling linearly from + the texture, all of the individual texels that would be used to to create + the final, bilinear sample values are taken from the same cube face. The + normal, two-dimensional texture coordinate wrapping modes are honored. + This sometimes causes seams to appear in cube maps. + + ARB_seamless_cube_map addresses this issue by providing a mechanism whereby + an implementation could take each of the taps of a bilinear sample from + a different face, spanning face boundaries and providing seamless filtering + from cube map textures. However, in ARB_seamless_cube_map, this feature was + exposed as a global state, affecting all bound cube map textures. It was not + possible to mix seamless and per-face cube map sampling modes during + multisampling. Furthermore, if an application included cube maps that were + meant to be sampled seamlessly and non-seamlessly, it would have to track + this state and enable or disable seamless cube map sampling as needed. + + This extension addresses this issue and provides an orthogonal method for + allowing an implementation to provide a per-texture setting for enabling + seamless sampling from cube maps. + +IP Status + + None. + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the parameter of TexParameterf, TexParameteri, + TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv: + + TEXTURE_CUBE_MAP_SEAMLESS 0x884F (Previously defined in + ARB_seamless_cubemap) + +Additions to Chapter 2 of the 1.5 Specification (OpenGL Operation) + + None. + +Additions to Chapter 3 of the 1.5 Specification (Rasterization) + + Section 3.8.4, Texture Parameters, p. 144, append table 3.19 with the + following: + + Name Type Legal Values + ------------------------------ ----- -------------------- + TEXTURE_CUBE_MAP_SEAMLESS boolean FALSE, + TRUE + + Section 3.8.4, Texture Parameters, p. 143, append the last paragraph with: + + "The TEXTURE_CUBE_MAP_SEAMLESS parameter is specific to cube maps + and may be used to control the way that the GL handles sampling from + coordinates that lie outside the determined cube map face (see section + 3.8.6)." + + Section 3.8.6, Cube Map Texture Selection, p. 145, change the last + paragraph from + + "This new ( s t ) is used to find a texture value in the determined face's + two-dimensional texture image using the rules given in sections 3.8.7 + through 3.8.9." + + to: + + "If TEXTURE_CUBE_MAP_SEAMLESS is disabled globally and the value of the + the texture's TEXTURE_CUBE_MAP_SEAMLESS parameter is FALSE, the new + ( s t ) is used to find a texture value in the determined face's + two-dimensional image using the rules given in sections 3.8.7 through + 3.8.9. If TEXTURE_CUBE_MAP_SEAMLESS is emabled globally or the value + of the texture's TEXTURE_CUBE_MAP_SEAMLESS parameter is TRUE, seamless + cube map sampling is enabled, and texels are read from adjacent faces as + described in the ARB_seamless_cube_map extension." + +Additions to Chapter 4 of the 1.5 Specification (Per-Fragment Operations +and the Frame Buffer) + + None. + +Additions to Chapter 5 of the 1.5 Specification (Special Functions) + + None. + +Additions to Chapter 6 of the 1.5 Specification (State and State Requests) + + Section 6.1.3, Enumerated Queries, p. 216, modify the first paragraph + on page 216 to read: + + "... For GetTexParameter, value must be either TEXTURE_RESIDENT or one + of the symbolic values in table 3.19. The TEXTURE_CUBE_MAP_SEAMLESS + value may only be used when target is TEXTURE_CUBE_MAP. The lod argument + to GetTexLevelParameter ..." + +Additions to the GLX Specification + + None. + +Errors + + INVALID_ENUM is generated by TexParameter if is + TEXTURE_CUBE_MAP_SEAMLESS and is not TEXTURE_CUBE_MAP. + + INVALID_ENUM is generated by TexParameter if is TEXTURE_CUBE_MAP, + is TEXTURE_CUBE_MAP_SEAMLESS and is not either TRUE + or FALSE. + + INVALID_ENUM is generated by GetTexParameter if is + TEXTURE_CUBE_MAP_SEAMLESS and is not TEXTURE_CUBE_MAP. + +Dependencies on ARB_seamless_cube_map + + If ARB_seamless_cube_map is not supported, the value of the + TEXTURE_CUBE_MAP_SEAMLESS token is still used by this extension. + However, seamless cubemap filtering can only be enabled or disabled on a + per-texture basis as glEnable and glDisable will not accept + TEXTURE_CUBE_MAP_SEAMLESS. Even if ARB_seamless_cube_map is not + supported, the behavior of seamless cube map sampling is as described in + that extension. The logic to enable seamless filtering will behave as if + TEXTURE_CUBE_MAP_SEAMLESS were disabled (the default state). + +New State + + In table 6.16, Texture Objects, p. 242, add the following: + + Get Value Type Get Command Init Val Description Sec. Attribute + ------------------------- ------ -------------------- -------- -------------------------- ------ --------- + TEXTURE_CUBE_MAP_SEAMLESS n x B GetTexParameter[if]v FALSE Seamless cubemap sampling 3.8.6 texture + is enabled. + +New Implementation Dependent State + + None. + +Issues + + 1) How does this extension affect ARB_seamless_cube_map? Which takes + priority? Explain, in plain English, how seamless filtering gets enabled. + + RESOLVED: These two extensions are orthogonal and neither requires the + other to function. Seamless filtering is enabled for a cube map texture + either when TEXTURE_CUBE_MAP_SEAMLESS is enabled globally or when the + value of the individual texture's TEXTURE_CUBE_MAP_SEAMLESS parameter + is TRUE. The default for both extensions is to leave cube map sampling as + described in unextended OpenGL. Thus, an application may use either + extension and its behavior will be the same, regardless of the presence + of support for or use of the other. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + 7 02/03/17 Jon Leech Remove ARB suffix from TEXTURE_CUBE_MAP_SEAMLESS + (public bug 337). + 6 08/18/09 gsellers Renamed from AMD_texture_cube_face_select to + AMD_seamless_cubemap_per_texture to better follow + ARB version. + Use ARB token, GL_TRUE and GL_FALSE rather than + SAME_FACE and NEXT_FACE. + Change type of texture parameter to boolean. + Change wording of resolution to issue 1 to reflect + the new token names. + 5 05/08/09 gsellers Large rewrite after splitting global and + per-texture support into two extensions. + 4 05/05/09 gsellers Change token names for consistency. Include + interaction with EXT_texture_filter_anisotropic. + 3 04/09/09 gsellers Fix 'selected' language. Suggest behavior for + cases where ( s, t ) lies directly at a cube map + corner + 2 04/07/09 gsellers Minor updates + 1 04/06/09 gsellers Initial draft diff --git a/opengles/extensions/AMD/AMD_shader_atomic_counter_ops.txt b/opengles/extensions/AMD/AMD_shader_atomic_counter_ops.txt new file mode 100644 index 0000000000..25c377c56d --- /dev/null +++ b/opengles/extensions/AMD/AMD_shader_atomic_counter_ops.txt @@ -0,0 +1,282 @@ +Name + + AMD_shader_atomic_counter_ops + +Name Strings + + GL_AMD_shader_atomic_counter_ops + +Contact + + Daniel Rakos (daniel.rakos 'at' amd.com) + +Contributors + + Daniel Rakos, AMD + Graham Sellers, AMD + +Status + + Shipping + +Version + + Last Modified Date: 02/01/2013 + Author Revision: 2 + +Number + + OpenGL Extension #435 + +Dependencies + + OpenGL 4.2 or ARB_shader_atomic_counters is required. + + This extension is written against the OpenGL 4.3 (core) specification + and the GLSL 4.30.7 specification. + +Overview + + The ARB_shader_atomic_counters extension introduced atomic counters, but + it limits list of potential operations that can be performed on them to + increment, decrement, and query. This extension extends the list of GLSL + built-in functions that can operate on atomic counters. The list of new + operations include: + + * Increment and decrement with wrap + * Addition and subtraction + * Minimum and maximum + * Bitwise operators (AND, OR, XOR, etc.) + * Masked OR operator + * Exchange, and compare and exchange operators + +New Procedures and Functions + + None. + +New Tokens + + None. + +Additions to Chapter 8 of the GLSL 4.30.7 Specification (Built-in Functions) + + Modify Section 8.10, Atomic-Counter Functions + + Remove second paragraph ("The value returned by...") + + Modify third paragraph ("The underlying...") + + The underlying counter is a 32-bit unsigned integer. The result of + operations will wrap to [0, 2^32-1]. + + Additions to the table listing atomic counter built-in functions: + + Syntax Description + ------------------------------------ ------------------------------------------------------------------ + uint atomicCounterIncWrap( Atomically + atomic_uint c, 1. increments the counter for c, then forces it to zero if and + uint wrap only if the incremented value is greater than or equal to + ) , and + 2. returns its value prior to the operation. + These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterDecWrap( Atomically + atomic_uint c, 1. decrements the counter for c, then forces it to -1 if + uint wrap and only if the original value of the counter was either + ) zero or greater than , and + 2. returns its value resulting from the operation. + These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterAdd( Atomically + atomic_uint c, 1. adds the value of to the counter for c, and + uint data 2. returns its value prior to the operation. + ) These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterSubtract( Atomically + atomic_uint c, 1. subtracts the value of from the counter for c, and + uint data 2. returns the value resulting from the operation. + ) These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterReverseSubtract( Atomically + atomic_uint c, 1. subtracts the value of the counter for c from the value of + uint data and sets the counter for c to the result of the + ) operation, and + 2. returns the value prior to the operation. + These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterMin( Atomically + atomic_uint c, 1. sets the counter for c to the minimum of the value of the + uint data counter and the value of , and + ) 2. returns the value prior to the operation. + These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterMax( Atomically + atomic_uint c, 1. sets the counter for c to the maximum of the value of the + uint data counter and the value of , and + ) 2. returns the value prior to the operation. + These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterAnd( Atomically + atomic_uint c, 1. sets the counter for c to the result of the bitwise AND of + uint data the value of the counter and the value of , and + ) 2. returns the value prior to the operation. + These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterOr( Atomically + atomic_uint c, 1. sets the counter for c to the result of the bitwise OR of + uint data the value of the counter and the value of , and + ) 2. returns the value prior to the operation. + These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterXor( Atomically + atomic_uint c, 1. sets the counter for c to the result of the bitwise XOR of + uint data the value of the counter and the value of , and + ) 2. returns the value prior to the operation. + These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterMaskOr( Atomically + atomic_uint c, 1. sets the counter for c to the result of the operation: + uint mask, (counter ^ ~mask) | data + uint data 2. returns the value prior to the operation. + ) These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterExchange( Atomically + atomic_uint c, 1. sets the counter value for c to the value of , and + uint data 2. returns its value prior to the operation. + ) These two steps are done atomically with respect to the atomic + counter functions in this table. + + uint atomicCounterCompSwap( Atomically + atomic_uint c, 1. compares the value of and the counter value for c, + uint compare, 2. if the values are equal, sets the counter value for c to + uint data the value of , and + ) 3. returns its value prior to the operation. + These three steps are done atomically with respect to the atomic + counter functions in this table. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Usage Examples + + Example 1: Appending/consuming data to/from a ring buffer using a compute shader + + // Here we use increment/decrement with wrap to account for the wrapping at the + // end of the ring buffer. + // Using regular increment/decrement and performing a modulo manually is not + // satisfactory for non-power-of-two sized buffers as when the 32-bit counter + // wraps around we get incorrect results. + + // Append shader + layout(binding=0, offset=0) uniform atomic_uint ringCounter; + layout(binding=0, r32ui) uniform imageBuffer ringBuffer; + + void main() + { + uint myBufferData = ...; + + imageStore(ringBuffer, + atomicCounterIncWrap(ringCounter, imageSize(ringBuffer)), + myBufferData); + } + + // Consume shader + layout(binding=0, offset=0) uniform atomic_uint ringCounter; + layout(binding=0, r32ui) uniform imageBuffer ringBuffer; + + void main() + { + uint myBufferData = + imageLoad(ringBuffer, + atomicCounterDecWrap(ringCounter, imageSize(ringBuffer))).x; + } + + Example 2: Appending variable length records to a buffer using a compute shader + + // Here we use atomicCounterAdd to ensure that we "allocate" a contiguous list of + // elements in the buffer. + // Using atomicCounterIncrement cannot mimic this behavior as there is no guarantee + // that subsequent calls to atomicCounterIncrement return subsequent counter values. + + layout(binding=0, offset=0) uniform atomic_uint vlrCounter; + layout(binding=0, r32ui) uniform imageBuffer vlrBuffer; + + void main() + { + uint data[...] = ...; + uint recordLength = ...; + + uint recordStart = atomicCounterAdd(vlrCounter, recordLength); + + for (uint i = 0; i < recordLength; ++i) + { + imageStore(vlrBuffer, recordStart + i, data[i]); + } + } + +Issues + + 1) Should the new decrement with wrap and subtract operators match the + behavior of the existing decrement operator and return the post-operation + value of the counter? + + RESOLVED: Yes, for consistency with the existing functionality. + + 2) Most of the new operations introduced by this extension are already + supported on load/store images and shader storage buffers. What benefit + the application developer could get from using this extension? + + DISCUSSION: Atomic counter operations can have different performance + characteristics than load/store images or shader storage buffers. It is + expected that implementations can do atomic counter operations faster. + Also, there is no increment/decrement with wrap, reverse subtract and + mask-or operation for these storages (though the EXT version of load/store + image extension does provide a increment/decrement with wrap operators). + + RESOLVED: It enables existing operations for atomic counters and also + adds completely new operations that are not available for load/store + images and shader storage buffers. + + 3) What should be the result of the increment/decrement with wrap + operations if the original counter value is greater than the + parameter? + + RESOLVED: Increment with wrap will force the value of the counter to zero, + decrement with wrap will force the value of the counter to -1. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- --------------------------------------------- + + 2 02/01/2013 drakos Added issue #2 and #3 + Cleaned up naming convention + 1 11/13/2012 drakos Initial revision diff --git a/opengles/extensions/AMD/AMD_shader_ballot.txt b/opengles/extensions/AMD/AMD_shader_ballot.txt new file mode 100644 index 0000000000..f18a58ba3e --- /dev/null +++ b/opengles/extensions/AMD/AMD_shader_ballot.txt @@ -0,0 +1,687 @@ +Name + + AMD_shader_ballot + +Name Strings + + GL_AMD_shader_ballot + +Contact + + Qun Lin, AMD (quentin.lin 'at' amd.com) + +Contributors + + Qun Lin, AMD + Graham Sellers, AMD + Daniel Rakos, AMD + Rex Xu, AMD + Dominik Witczak, AMD + +Status + + Shipping + +Version + + Last Modified Date: 03/28/2018 + Author Revision: 5 + +Number + + ??? + +Dependencies + + This extension is written against the OpenGL Shading Language + Specification, Version 4.50. + + This extension requires ARB_shader_group_vote and ARB_shader_ballot. + + This extension interacts with ARB_gpu_shader_int64. + + This extension interacts with AMD_gpu_shader_half_float. + + This extension interacts with AMD_gpu_shader_int16. + +Overview + + The extensions ARB_shader_group_vote and ARB_shader_ballot introduced the + concept of sub-groups and a set of operations that allow data exchange + across shader invocations within a sub-group. + + This extension further extends the capabilities of these extensions with + additional sub-group operations. + +IP Status + + None. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Modifications to the OpenGL Shading Language Specification, Version 4.50 + + Including the following line in a shader can be used to control the + language features described in this extension: + + #extension GL_AMD_shader_ballot : + + where is as specified in section 3.3. + + New preprocessor #defines are added to the OpenGL Shading Language: + + #define GL_AMD_shader_ballot 1 + +Additions to Chapter 8 of the OpenGL Shading Language (GLSL) Specification, +version 4.30 (Built-in functions) + + Add Section 8.18, Shader Invocation Group Functions + + The , , group invocation functions process values of the + specified value across all active shader invocations in the sub-group + with three special group operatons according to the following table: + + Group Operation Description + --------------- --------------------------------------------------------- + Reduce A reduction operation for values of the specified value + in the sub-group + + InclusiveScan A binary operation with an identity and (where + is the size of the sub-group) elements { a[0], a[1], + .., a[n] } resulting in { a[0], (a[0] op a[1]), .., (a[0] + op a[1] op .. op a[n-1]) }. could be any of , + , . + + ExclusiveScan A binary operation with an identity and (where + is the size of the sub-group) elements { a[0], a[1], + .., a[n] } resulting in { I, a[0], (a[0] op a[1]), .., + (a[0] op a[1] op .. op a[n-2]) }. could be any of + , , . + + The identity in the group operations and + is decided according to the following table: + + Function Data Type Identity + -------- ----------------------------------- ---------- + Min 32-bit signed integer INT_MAX + 64-bit signed integer INT64_MAX + 32-bit unsigned integer UINT_MAX + 64-bit unsigned integer UINT64_MAX + 16-bit/32-bit/64-bit floating-point +INF + + Max 32-bit signed integer INT_MIN + 64-bit signed integer INT64_MIN + 32-bit/64-bit unsigned integer 0 + floating-point -INF + + Add 32-bit/64-bit signed integer 0 + 32-bit/64-bit unsigned integer 0 + 16-bit/32-bit/64-bit floating-point 0 + + +------------------------------------------------------+-----------------------------------------------------------+ + | Syntax | Description | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType minInvocationsAMD(genType v) | Returns the minimum value of across all active shader | + | genIType minInvocationsAMD(genIType v) | invocations in the sub-group with group | + | genUType minInvocationsAMD(genUType v) | operation. These functions must be used in uniform | + | genDType minInvocationsAMD(genDType v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType minInvocationsNonUniformAMD(genType v) | Returns the minimum value of across all active shader | + | genIType minInvocationsNonUniformAMD(genIType v) | invocations in the sub-group with group | + | genUType minInvocationsNonUniformAMD(genUType v) | operation. These functions could be used in non-uniform | + | genDType minInvocationsNonUniformAMD(genDType v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType minInvocationsInclusiveScanAMD(genType v) | Returns the minimum value of across all active shader | + | genIType minInvocationsInclusiveScanAMD(genIType v) | invocations in the sub-group with group | + | genUType minInvocationsInclusiveScanAMD(genUType v) | operation. These functions must be used in uniform | + | genDType minInvocationsInclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. | + | | | + | | | + | | | + | | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType minInvocationsInclusiveScanNonUniformAMD( | Returns the minimum value of across all active shader | + | genType v) | invocations in the sub-group with group | + | genType minInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genIType v) | control flow. These functions operate component-wise. | + | genUType minInvocationsInclusiveScanNonUniformAMD( | | + | genUType v) | | + | genDType minInvocationsInclusiveScanNonUniformAMD( | | + | genDType v) | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType minInvocationsExclusiveScanAMD(genType v) | Returns the minimum value of across all active shader | + | genIType minInvocationsExclusiveScanAMD(genIType v) | invocations in the sub-group with group | + | genUType minInvocationsExclusiveScanAMD(genUType v) | operation. These functions must be used in uniform | + | genDType minInvocationsExclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. | + | | | + | | | + | | | + | | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType minInvocationsExclusiveScanNonUniformAMD( | Returns the minimum value of across all active shader | + | genType v) | invocations in the sub-group with group | + | genIType minInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genIType v) | control flow. These functions operate component-wise. | + | genUType minInvocationsExclusiveScanNonUniformAMD( | | + | genUType v) | | + | genDType minInvocationsExclusiveScanNonUniformAMD( | | + | genDType v) | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType maxInvocationsAMD(genType v) | Returns the maximum value of across all active shader | + | genIType maxInvocationsAMD(genIType v) | invocations in the sub-group with group | + | genUType maxInvocationsAMD(genUType v) | operation. These functions must be used in uniform | + | genDType maxInvocationsAMD(genDType v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType maxInvocationsNonUniformAMD(genType v) | Returns the maximum value of across all active shader | + | genIType maxInvocationsNonUniformAMD(genIType v) | invocations in the sub-group with group | + | genUType maxInvocationsNonUniformAMD(genUType v) | operation. These functions could be used in non-uniform | + | genDType maxInvocationsNonUniformAMD(genDType v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType maxInvocationsInclusiveScanAMD(genType v) | Returns the maximum value of across all active shader | + | genIType maxInvocationsInclusiveScanAMD(genIType v) | invocations in the sub-group with group | + | genUType maxInvocationsInclusiveScanAMD(genUType v) | operation. These functions must be used in uniform | + | genDType maxInvocationsInclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. | + | | | + | | | + | | | + | | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType maxInvocationsInclusiveScanNonUniformAMD( | Returns the maximum value of across all active shader | + | genType v) | invocations in the sub-group with group | + | genType maxInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genIType v) | control flow. These functions operate component-wise. | + | genUType maxInvocationsInclusiveScanNonUniformAMD( | | + | genUType v) | | + | genDType maxInvocationsInclusiveScanNonUniformAMD( | | + | genDType v) | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType maxInvocationsExclusiveScanAMD(genType v) | Returns the maximum value of across all active shader | + | genIType maxInvocationsExclusiveScanAMD(genIType v) | invocations in the sub-group with group | + | genUType maxInvocationsExclusiveScanAMD(genUType v) | operation. These functions must be used in uniform | + | genDType maxInvocationsExclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. | + | | | + | | | + | | | + | | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType maxInvocationsExclusiveScanNonUniformAMD( | Returns the maximum value of across all active shader | + | genType v) | invocations in the sub-group with group | + | genIType maxInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genIType v) | control flow. These functions operate component-wise. | + | genUType maxInvocationsExclusiveScanNonUniformAMD( | | + | genUType v) | | + | genDType maxInvocationsExclusiveScanNonUniformAMD( | | + | genDType v) | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType addInvocationsAMD(genType v) | Returns the sum of the value of across all active | + | genIType addInvocationsAMD(genIType v) | shader invocations in the sub-group with group | + | genUType addInvocationsAMD(genUType v) | operation. These functions must be used in uniform | + | genDType addInvocationsAMD(genDType v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType addInvocationsNonUniformAMD(genType v) | Returns the sum of the value of across all active | + | genIType addInvocationsNonUniformAMD(genIType v) | shader invocations in the sub-group with group | + | genUType addInvocationsNonUniformAMD(genUType v) | operation. These functions could be used in non-uniform | + | genDType addInvocationsNonUniformAMD(genDType v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType addInvocationsInclusiveScanAMD(genType v) | Returns the sum of the value of across all active | + | genIType addInvocationsInclusiveScanAMD(genIType v) | shader invocations in the sub-group with | + | genUType addInvocationsInclusiveScanAMD(genUType v) | group operation. These functions must be used in uniform | + | genDType addInvocationsInclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. | + | | | + | | | + | | | + | | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType addInvocationsInclusiveScanNonUniformAMD( | Returns the sum of the value of across all active | + | genType v) | shader invocations in the sub-group with | + | genIType addInvocationsInclusiveScanNonUniformAMD( | group operation. These functions could be used in | + | genIType v) | non-uniform control flow. These functions operate | + | genUType addInvocationsInclusiveScanNonUniformAMD( | component-wise. | + | genUType v) | | + | genDType addInvocationsInclusiveScanNonUniformAMD( | | + | genDType v) | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType addInvocationsExclusiveScanAMD(genType v) | Returns the sum of the value of across all active | + | genIType addInvocationsExclusiveScanAMD(genIType v) | shader invocations in the sub-group with | + | genUType addInvocationsExclusiveScanAMD(genUType v) | group operation. These functions must be used in uniform | + | genDType addInvocationsExclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. | + | | | + | | | + | | | + | | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType addInvocationsExclusiveScanNonUniformAMD( | Returns the sum of the value of across all active | + | genType v) | shader invocations in the sub-group with | + | genIType addInvocationsExclusiveScanNonUniformAMD( | group operation. These functions could be used in | + | genIType v) | non-uniform control flow. These functions operate | + | genUType addInvocationsExclusiveScanNonUniformAMD( | component-wise. | + | genUType v) | | + | genDType addInvocationsExclusiveScanNonUniformAMD( | | + | genDType v) | | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType swizzleInvocationsAMD( | Swizzles data within a group of 4 consecutive invocations | + | genType data, uvec4 offset) | of the sub-group based on as described below: | + | genIType swizzleInvocationsAMD( | | + | genIType data, uvec4 offset) | for (i = 0; i < gl_SubGroupSizeARB; i+=4) { | + | genUType swizzleInvocationsAMD( | dataOut[i+0] = isActive[i+offset.x] ? | + | genUType data, uvec4 offset) | dataIn[i+offset.x] : 0; | + | | dataOut[i+1] = isActive[i+offset.y] ? | + | | dataIn[i+offset.y] : 0; | + | | dataOut[i+2] = isActive[i+offset.z] ? | + | | dataIn[i+offset.z] : 0; | + | | dataOut[i+3] = isActive[i+offset.w] ? | + | | dataIn[i+offset.w] : 0; | + | | } | + | | | + | | Where: | + | | - isActive[i] tells whether the invocation with the index | + | | is currently active in the sub-group. | + | | - dataIn[i] is the value of for invocation index | + | | . | + | | - dataOut[i] is the return value of the function for | + | | invocation index . | + | | | + | | Components of must be constant integer | + | | expression with a value in the range [0, 3]. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType swizzleInvocationsMaskedAMD( | Swizzles data within a group of 32 consecutive | + | genType data, uvec3 mask) | invocations with a limited mask as described below: | + | genIType swizzleInvocationsMaskedAMD( | | + | genIType data, uvec3 mask) | for (i = 0; i < gl_SubGroupSizeARB; i++) { | + | genUType swizzleInvocationsMaskedAMD( | j = (((i & 0x1f) & mask.x) | mask.y) ^ mask.z; | + | genIType data, uvec3 mask) | j |= (i & 0x20); // which group of 32 | + | | dataOut[i] = isActive[j] ? dataIn[j] : 0; | + | | } | + | | | + | | Where: | + | | - isActive[i] tells whether the invocation with the index | + | | is currently active in the sub-group. | + | | - dataIn[i] is the value of for invocation index | + | | . | + | | - dataOut[i] is the return value of the function for | + | | invocation index . | + | | | + | | Components of must be constant integer expression | + | | with a value in the range [0, 31]. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genType writeInvocationAMD( | Returns for all active invocations in the | + | genType inputValue, | sub-group except for the invocation whose invocation | + | genType writeValue, | index within the sub-group is for which | + | uint invocationIndex) | is returned as described below: | + | genIType writeInvocationAMD( | | + | genIType inputValue, | for (i = 0; i < gl_SubGroupSizeARB; i++) { | + | genIType writeValue, | out[i] = (i == invocationIndex) ? | + | uint invocationIndex) | writeValue:inputValue; | + | genUType writeInvocationAMD( | } | + | genUType inputValue, | | + | genUType writeValue, | Where out[i] is the return value of the function for | + | uint invocationIndex) | invocation index . | + | | | + | | and must be dynamically | + | | uniform within the sub-group, otherwise the return value | + | | of the function is undefined. | + +------------------------------------------------------+-----------------------------------------------------------+ + +Dependencies on ARB_gpu_shader_int64 + + If the shader enables ARB_gpu_shader_int64, this extension adds additional + shader invocation group functions. + + Add Section 8.18, Shader Invocation Group Functions + + +------------------------------------------------------+-----------------------------------------------------------+ + | Syntax | Description | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type minInvocationsAMD(genI64Type v) | Returns the minimum value of across all active shader | + | genU64Type minInvocationsAMD(genU64Type v) | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type minInvocationsNonUniformAMD(genI64Type v) | Returns the minimum value of across all active shader | + | genU64Type minInvocationsNonUniformAMD(genU64Type v) | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type minInvocationsInclusiveScanAMD( | Returns the minimum value of across all active shader | + | genI64Type v) | invocations in the sub-group with group | + | genU64Type minInvocationsInclusiveScanAMD( | operation. These functions must be used in uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type minInvocationsInclusiveScanNonUniformAMD( | Returns the minimum value of across all active shader | + | genI64Type v) | invocations in the sub-group with group | + | genU64Type minInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type minInvocationsExclusiveScanAMD( | Returns the minimum value of across all active shader | + | genI64Type v) | invocations in the sub-group with group | + | genU64Type minInvocationsExclusiveScanAMD( | operation. These functions must be used in uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type minInvocationsExclusiveScanNonUniformAMD( | Returns the minimum value of across all active shader | + | genI64Type v) | invocations in the sub-group with group | + | genU64Type minInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type maxInvocationsAMD(genI64Type v) | Returns the maximum value of across all active shader | + | genU64Type maxInvocationsAMD(genU64Type v) | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type maxInvocationsNonUniformAMD(genI64Type v) | Returns the maximum value of across all active shader | + | genU64Type maxInvocationsNonUniformAMD(genU64Type v) | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type maxInvocationsInclusiveScanAMD( | Returns the maximum value of across all active shader | + | genI64Type v) | invocations in the sub-group with group | + | genU64Type maxInvocationsInclusiveScanAMD( | operation. These functions must be used in uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type maxInvocationsInclusiveScanNonUniformAMD( | Returns the maximum value of across all active shader | + | genI64Type v) | invocations in the sub-group with group | + | genU64Type maxInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type maxInvocationsExclusiveScanAMD( | Returns the maximum value of across all active shader | + | genI64Type v) | invocations in the sub-group with group | + | genU64Type maxInvocationsExclusiveScanAMD( | operation. These functions must be used in uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type maxInvocationsExclusiveScanNonUniformAMD( | Returns the maximum value of across all active shader | + | genI64Type v) | invocations in the sub-group with group | + | genU64Type maxInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type addInvocationsAMD(genI64Type v) | Returns the sum of the value of across all active | + | genU64Type addInvocationsAMD(genU64Type v) | shader invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type addInvocationsNonUniformAMD(genI64Type v) | Returns the sum of the value of across all active | + | genU64Type addInvocationsNonUniformAMD(genU64Type v) | shader invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type addInvocationsInclusiveScanAMD( | Returns the sum of the value of across all active | + | genI64Type v) | shader invocations in the sub-group with | + | genU64Type addInvocationsInclusiveScanAMD( | group operation. These functions must be used in uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type addInvocationsInclusiveScanNonUniformAMD( | Returns the sum of the value of across all active | + | genI64Type v) | shader invocations in the sub-group with | + | genU64Type addInvocationsInclusiveScanNonUniformAMD( | group operation. These functions could be used in | + | genU64Type v) | non-uniform control flow. These functions operate | + | | component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type addInvocationsExclusiveScanAMD( | Returns the sum of the value of across all active | + | genI64Type v) | shader invocations in the sub-group with | + | genU64Type addInvocationsExclusiveScanAMD( | group operation. These functions must be used in uniform | + | genU64Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI64Type addInvocationsExclusiveScanNonUniformAMD( | Returns the sum of the value of across all active | + | genI64Type v) | shader invocations in the sub-group with | + | genU64Type addInvocationsExclusiveScanNonUniformAMD( | group operation. These functions could be used in | + | genU64Type v) | non-uniform control flow. These functions operate | + | | component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | uint mbcntAMD(uint64_t mask) | Returns the bit count of gl_SubGroupLtMaskARB with | + | | as described below: | + | | | + | | bitCount(gl_SubGroupLtMaskARB & mask). | + +------------------------------------------------------+-----------------------------------------------------------+ + +Dependencies on AMD_gpu_shader_half_float + + If the shader enables AMD_gpu_shader_half_float, this extension adds + additional shader invocation group functions. + + Add Section 8.18, Shader Invocation Group Functions + + +------------------------------------------------------+-----------------------------------------------------------+ + | Syntax | Description | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type minInvocationsAMD(genF16Type v) | Returns the minimum value of across all active shader | + | | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type minInvocationsNonUniformAMD(genF16Type v) | Returns the minimum value of across all active shader | + | | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type minInvocationsInclusiveScanAMD( | Returns the minimum value of across all active shader | + | genF16Type v) | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type minInvocationsInclusiveScanNonUniformAMD( | Returns the minimum value of across all active shader | + | genF16Type v) | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type minInvocationsExclusiveScanAMD( | Returns the minimum value of across all active shader | + | genF16Type v) | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type minInvocationsExclusiveScanNonUniformAMD( | Returns the minimum value of across all active shader | + | genF16Type v) | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type maxInvocationsAMD(genF16Type v) | Returns the maximum value of across all active shader | + | | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type maxInvocationsNonUniformAMD(genF16Type v) | Returns the maximum value of across all active shader | + | | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type maxInvocationsInclusiveScanAMD( | Returns the maximum value of across all active shader | + | genF16Type v) | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type maxInvocationsInclusiveScanNonUniformAMD( | Returns the maximum value of across all active shader | + | genF16Type v) | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type maxInvocationsExclusiveScanAMD( | Returns the maximum value of across all active shader | + | genF16Type v) | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type maxInvocationsExclusiveScanNonUniformAMD( | Returns the maximum value of across all active shader | + | genF16Type v) | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type addInvocationsAMD(genF16Type v) | Returns the sum of the value of across all active | + | | shader invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type addInvocationsNonUniformAMD(genF16Type v) | Returns the sum of the value of across all active | + | | shader invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type addInvocationsInclusiveScanAMD( | Returns the sum of the value of across all active | + | genF16Type v) | shader invocations in the sub-group with | + | | group operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type addInvocationsInclusiveScanNonUniformAMD( | Returns the sum of the value of across all active | + | genF16Type v) | shader invocations in the sub-group with | + | | group operation. These functions could be used in | + | | non-uniform control flow. These functions operate | + | | component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type addInvocationsExclusiveScanAMD( | Returns the sum of the value of across all active | + | genF16Type v) | shader invocations in the sub-group with | + | | group operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genF16Type addInvocationsExclusiveScanNonUniformAMD( | Returns the sum of the value of across all active | + | genF16Type v) | shader invocations in the sub-group with | + | | group operation. These functions could be used in | + | | non-uniform control flow. These functions operate | + | | component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + +Dependencies on AMD_gpu_shader_int16 + + If the shader enables AMD_gpu_shader_int16, this extension adds + additional shader invocation group functions. + + Add Section 8.18, Shader Invocation Group Functions + + +------------------------------------------------------+-----------------------------------------------------------+ + | Syntax | Description | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type minInvocationsAMD(genI16Type v) | Returns the minimum value of across all active shader | + | genU16Type minInvocationsAMD(genU16Type v) | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type minInvocationsNonUniformAMD(genI16Type v) | Returns the minimum value of across all active shader | + | genU16Type minInvocationsNonUniformAMD(genU16Type v) | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type minInvocationsInclusiveScanAMD( | Returns the minimum value of across all active shader | + | genI16Type v) | invocations in the sub-group with group | + | genU16Type minInvocationsInclusiveScanAMD( | operation. These functions must be used in uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type minInvocationsInclusiveScanNonUniformAMD( | Returns the minimum value of across all active shader | + | genI16Type v) | invocations in the sub-group with group | + | genU16Type minInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type minInvocationsExclusiveScanAMD( | Returns the minimum value of across all active shader | + | genI16Type v) | invocations in the sub-group with group | + | genU16Type minInvocationsExclusiveScanAMD( | operation. These functions must be used in uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type minInvocationsExclusiveScanNonUniformAMD( | Returns the minimum value of across all active shader | + | genI16Type v) | invocations in the sub-group with group | + | genU16Type minInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type maxInvocationsAMD(genI16Type v) | Returns the maximum value of across all active shader | + | genU16Type maxInvocationsAMD(genU16Type v) | invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type maxInvocationsNonUniformAMD(genI16Type v) | Returns the maximum value of across all active shader | + | genU16Type maxInvocationsNonUniformAMD(genU16Type v) | invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type maxInvocationsInclusiveScanAMD( | Returns the maximum value of across all active shader | + | genI16Type v) | invocations in the sub-group with group | + | genU16Type maxInvocationsInclusiveScanAMD( | operation. These functions must be used in uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type maxInvocationsInclusiveScanNonUniformAMD( | Returns the maximum value of across all active shader | + | genI16Type v) | invocations in the sub-group with group | + | genU16Type maxInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type maxInvocationsExclusiveScanAMD( | Returns the maximum value of across all active shader | + | genI16Type v) | invocations in the sub-group with group | + | genU16Type maxInvocationsExclusiveScanAMD( | operation. These functions must be used in uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type maxInvocationsExclusiveScanNonUniformAMD( | Returns the maximum value of across all active shader | + | genI16Type v) | invocations in the sub-group with group | + | genU16Type maxInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type addInvocationsAMD(genI16Type v) | Returns the sum of the value of across all active | + | genU16Type addInvocationsAMD(genU16Type v) | shader invocations in the sub-group with group | + | | operation. These functions must be used in uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type addInvocationsNonUniformAMD(genI16Type v) | Returns the sum of the value of across all active | + | genU16Type addInvocationsNonUniformAMD(genU16Type v) | shader invocations in the sub-group with group | + | | operation. These functions could be used in non-uniform | + | | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type addInvocationsInclusiveScanAMD( | Returns the sum of the value of across all active | + | genI16Type v) | shader invocations in the sub-group with | + | genU16Type addInvocationsInclusiveScanAMD( | group operation. These functions must be used in uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type addInvocationsInclusiveScanNonUniformAMD( | Returns the sum of the value of across all active | + | genI16Type v) | shader invocations in the sub-group with | + | genU16Type addInvocationsInclusiveScanNonUniformAMD( | group operation. These functions could be used in | + | genU16Type v) | non-uniform control flow. These functions operate | + | | component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type addInvocationsExclusiveScanAMD( | Returns the sum of the value of across all active | + | genI16Type v) | shader invocations in the sub-group with | + | genU16Type addInvocationsExclusiveScanAMD( | group operation. These functions must be used in uniform | + | genU16Type v) | control flow. These functions operate component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + | genI16Type addInvocationsExclusiveScanNonUniformAMD( | Returns the sum of the value of across all active | + | genI16Type v) | shader invocations in the sub-group with | + | genU16Type addInvocationsExclusiveScanNonUniformAMD( | group operation. These functions could be used in | + | genU16Type v) | non-uniform control flow. These functions operate | + | | component-wise. | + +------------------------------------------------------+-----------------------------------------------------------+ + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + None. + +Issues + + +Revision History + + Rev. Date Author Changes + ---- ---------- -------- -------------------------------------------------- + 5 03/28/2018 rexu Add interactions with ARB_gpu_shader_int16. New + group invocation functions are added to support + 16-bit integer type in group operations. + + 4 10/19/2016 rexu Add interactions with ARB_gpu_shader_int64 and + AMD_gpu_shader_half_float. New group invocation + functions are added to support 64-bit integer + type and 16-bit/64-bit floating-point type + in group operations. Clarify that in + swizzleInvocationsMaskedAMD() should be constant + integer expression with a value in the range + [0, 31]. + + 3 08/16/2016 rexu Clarify that minInvocationsAMD, maxInvocationsAMD, + addInvocationsAMD, along with their non-uniform + versions, operate component-wise rather than on + vector. + + 2 08/11/2016 rexu Add non-uniform versions of minInvocationsAMD, + maxInvocationsAMD, and addInvocationsAMD. + Support those operations in non-uniform control + flow. + + 1 04/21/2016 qlin Internal revisions. diff --git a/opengles/extensions/AMD/AMD_shader_explicit_vertex_parameter.txt b/opengles/extensions/AMD/AMD_shader_explicit_vertex_parameter.txt new file mode 100644 index 0000000000..39bea64137 --- /dev/null +++ b/opengles/extensions/AMD/AMD_shader_explicit_vertex_parameter.txt @@ -0,0 +1,218 @@ +Name + + AMD_shader_explicit_vertex_parameter + +Name Strings + + GL_AMD_shader_explicit_vertex_parameter + +Contact + + Qun Lin, AMD (Quentin.Lin 'at' amd.com) + +Contributors + + Qun Lin, AMD + Graham Sellers, AMD + Daniel Rakos, AMD + Dominik Witczak, AMD + +Status + + Pending + +Version + + Last Modified Date: 04/21/2016 + Author Revision: 2 + +Number + + OpenGL Extension #485 + +Dependencies + + OpenGL 2.0 or ARB_shader_objects is required. + + This extension is written against the OpenGL Shading Language + Specification, Version 4.50. + +Overview + + Unextended GLSL provides a set of fixed function interpolation modes and + even those are limited to certain types of interpolants (for example, + interpolation of integer and double isn't supported). + + This extension introduces new built-in functions allowing access to vertex + parameters explicitly in the fragment shader. It also exposes barycentric + coordinates as new built-in variables, which can be used to implement + custom interpolation algorithms using shader code. + +IP Status + + None. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Modifications to the OpenGL Shading Language Specification, Version 4.50 + + Including the following line in a shader can be used to control the + language features described in this extension: + + #extension GL_AMD_shader_explicit_vertex_parameter : + + where is as specified in section 3.3. + + New preprocessor #defines are added to the OpenGL Shading Language: + + #define GL_AMD_shader_explicit_vertex_parameter 1 + +Additions to Chapter 3 of the OpenGL Shading Language (GLSL) Specification, +version 4.50, (Basics) + + Modify section 3.6, Keywords p. 17 + + (Add __explicitInterpAMD to the list of keywords) + ...smooth noperspective __explicitInterpAMD + +Additions to Chapter 4 of the OpenGL Shading Language (GLSL) Specification, +version 4.50, (Variables and Types) + + Modify section 4.5, Interpolation Qualifiers p.81 + + (Add explicitInterpAMD to interpolation qualifier list) + + +-------------------+------------------------------------------------+ + | Qualifier | Meaning | + +-------------------+------------------------------------------------+ + | explicitInterpAMD | Explicit interpolation | + +-------------------+------------------------------------------------+ + + (Add a new paragraph after the description of noperspective) + + A variable qualified as __explicitInterpAMD can only be used as the + parameter of the built-in function interpolateAtVertex in fragment shader, + and it cannot be qualified with any other auxiliary storage qualifiers. + +Additions to Chapter 7 of the OpenGL Shading Language (GLSL) Specification, +version 4.50 (Built-in variables) + + + Modify Section 7.1, Built-in Languages Variable, p. 110 + + (Add to the list of built-in variables for the fragment languages) + + In the fragment language, built-in variables are intrinsically declared as: + + in vec2 gl_BaryCoordNoPerspAMD; + in vec2 gl_BaryCoordNoPerspCentroidAMD; + in vec2 gl_BaryCoordNoPerspSampleAMD; + in vec2 gl_BaryCoordSmoothAMD; + in vec2 gl_BaryCoordSmoothCentroidAMD; + in vec2 gl_BaryCoordSmoothSampleAMD; + in vec3 gl_BaryCoordPullModelAMD + + The built-in variables are fragment shader input + variables. Except the , the variables provide + the (I,J) pair of the barycentric coordinates interpolated at a fixed + location within the pixel. The K coordinate can be derived given the + identity I+J+K=1.0. + + returns (1/W, 1/I, 1/J) at the pixel center and + the shader can use it to calculate gradients and to interpolate I, J, and + W to any desired sample location. + + The interpolation mode of gl_BaryCoord??AMD variables are as follows + +---------------------------------+-----------------------------------------------------------+ + | Variable name | Description | + +---------------------------------+-----------------------------------------------------------+ + | gl_BaryCoordNoPerspAMD | Linear interpolation evaluated at the pixel's center | + | gl_BaryCoordNoPerspCentroidAMD | Linear interpolation evaluated at the centroid | + | gl_BaryCoordNoPerspSampleAMD | Linear interpolation evaluated at each covered sample | + | gl_BaryCoordSmoothAMD | Perspective interpolation evaluated at the pixel's center | + | gl_BaryCoordSmoothCentroidAMD | Perspective interpolation evaluated at the centroid | + | gl_BaryCoordSmoothSampleAMD | Perspective interpolation evaluated at each covered sample| + +---------------------------------+-----------------------------------------------------------+ + +Additions to Chapter 8 of the OpenGL Shading Language (GLSL) Specification, +version 4.30 (Built-in functions) + + Modify Section 8.13.2, "Interpolation Functions", p. 180 + + (Add to the end of last paragraph in this page) + The return value of the functions interpolateAtCentroid, + interpolateAtSample, and interpolateAtOffset is undefined if + is declared with __explicitInterpAMD. + + add to the table of functions, p.181: + + +----------------------------------------------------+--------------------------------------------------------+ + | Syntax | Description | + +----------------------------------------------------+--------------------------------------------------------+ + | genType interpolateAtVertexAMD(genType | Returns the value of the input without | + | interpolant, uint vertexIdx) | any interpolation. i.e. the raw output value of | + | genIType interpolateAtVertexAMD(genIType | previous shader stage. selects for which | + | interpolant, uint vertexIdx) | vertex of the primitive the value of is | + | genUType interpolateAtVertexAMD(genUType | returned. | + | interpolant, uint vertexIdx) | This return value is equivalent with interpolating | + | | the input using the following | + | | set of barycentric coordinates, depending on | + | | the value of : | + | | | + | | vertexIdx Barycentric coordinates | + | | 0 I=0, J=0, K=1 | + | | 1 I=1, J=0, K=0 | + | | 2 I=0, J=1, K=0 | + | | | + | | However this order has no association with the vertex | + | | order specified by the application in the originating | + | | draw. | + | | The value of must be constant integer | + | | expression with a value in the range [0, 2]. | + +----------------------------------------------------+--------------------------------------------------------+ + +Additions to Chapter 9 of the OpenGL Shading Language (GLSL) Specification, +version 4.30, (Shading Language Grammar) + + Modify Chapter 9, Shading Language Grammar for Core Profile, p. 187 + + (Add new token __EXPLICITINTERPAMD to list) + ... NOPERSPECTIVE FLAT SMOOTH __EXPLICITINTERPAMD + + Modify Chapter 9, Shading Language Grammar for Core Profile, p. 194 + + (Add __EXPLICITINTERPAMD to grammar interpolation_qualifier) + + interpolation_qualifier: + SMOOTH + FLAT + NOPERSPECTIVE + __EXPLICITINTERPAMD + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + None. + +Issues + + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + 2 05/19/2016 dwitczak Minor update. + 1 04/21/2016 qlin Internal revisions. diff --git a/opengles/extensions/AMD/AMD_shader_image_load_store_lod.txt b/opengles/extensions/AMD/AMD_shader_image_load_store_lod.txt new file mode 100644 index 0000000000..d7aa6ad976 --- /dev/null +++ b/opengles/extensions/AMD/AMD_shader_image_load_store_lod.txt @@ -0,0 +1,186 @@ +Name + + AMD_shader_image_load_store_lod + +Name Strings + + GL_AMD_shader_image_load_store_lod + +Contact + + Rex Xu, AMD (rex.xu 'at' amd.com) + +Contributors + + Rex Xu, AMD + Zhou Jin, AMD + Qun Lin, AMD + Daniel Rakos, AMD + +Status + + Shipping. + +Version + + Last Modified Date: 07/03/2017 + Author Revision: 2 + +Number + + 513 + +Dependencies + + This extension is written against the OpenGL 4.5 (Core Profile) + Specification. + + This extension is written against version 4.50 of the OpenGL Shading + Language Specification. + + OpenGL 4.0 and GLSL 4.00 are required. + + This extension interacts with ARB_sparse_texture2. + +Overview + + This extension was developed based on the ARB_shader_image_load_store + extension to allow implementations supporting loads and stores on + mipmap texture images. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Modifications to the OpenGL Shading Language Specification, Version 4.50 + + Including the following line in a shader can be used to control the + language features described in this extension: + + #extension GL_AMD_shader_image_load_store_lod : + + where is as specified in section 3.3. + + New preprocessor #defines are added to the OpenGL Shading Language: + + #define GL_AMD_shader_image_load_store_lod 1 + +Additions to Chapter 8 of the OpenGL Shading Language Specification (Built-in +Functions) + + Modify Section 8.12 Image Functions + + (insert a new paragraph, following the fourth paragraph on p. 179) + + ... "Texture Image Loads and Stores" of the OpenGL specification. + + Loads and stores could also be done on mipmap texture images with the + level-of-detail specified explicitly. In such case, the IMAGE_LOD_PARAMS + is used instead. Similar to IMAGE_PARAMS, the IMAGE_LOD_PARAMS in the + prototypes below is a placeholder representing 21 separate functions, each + for a different type of image variable. The IMAGE_LOD_PARAMS placeholder is + replaced by one of the following parameter list: + + gimage1D image, int P, int lod + gimage2D image, ivec2 P, int lod + gimage3D image, ivec3 P, int lod + gimageCube image, ivec3 P, int lod + gimage1DArray image, ivec2 P, int lod + gimage2DArray image, ivec3 P, int lod + gimageCubeArray image, ivec3 P, int lod + + (insert new functions to the "Syntax" table cell of each image memory + function group on p. 180-181) + + +-----------------------------------------+-------------------------------+ + | Syntax | Description | + +-----------------------------------------+-------------------------------+ + | gvec4 imageLoadLodAMD(readonly | Loads the texel at the | + | IMAGE_LOD_PARAMS) | coordinate

from the image | + | | unit (in | + | | IMAGE_MIP_PARAMS). When | + | | ,

, identify | + | | a valid texel, the bits used | + | | to represent the selected | + | | texel in the memory are | + | | converted to a vec4, ivec4, | + | | uvec4 in the manner described | + | | in the section 8.25 "Texture | + | | Image Loads and Stores" of | + | | the OpenGL Specification and | + | | returned. | + +-----------------------------------------+-------------------------------+ + | void imageStoreLodAMD(writeonly | Store into the texel | + | IMAGE_LOD_PARAMS, | at the coordinate

from | + | gvec4 data) | the image specified by | + | | . When ,

, | + | | identify a valid texel, | + | | the bits used to represent | + | | are converted to the | + | | format of the image unit in | + | | the manner described in | + | | section 8.25 "Texture Image | + | | Loads and Stores" of the | + | | OpenGL Specification and | + | | stored to the specified texel.| + +-----------------------------------------+-------------------------------+ + +Dependencies on ARB_sparse_texture2 + + If the shader enables ARB_sparse_texture2, this extension adds additional + image load functions. + + +-------------------------------------------------+-----------------------+ + | Syntax | Description | + +-------------------------------------------------+-----------------------+ + | int sparseImageLoadLodAMD(gimage2D image, | Loads a texel from | + | ivec2 P, int lod, | the image as | + | out gvec4 texel) | in imageLoadLodAMD(), | + | int sparseImageLoadLodAMD(gimage3D image, | but return texture | + | ivec3 P, int lod, | access residency | + | out gvec4 texel) | information from the | + | int sparseImageLoadLodAMD(gimageCube image, | function and the | + | ivec3 P, int lod, | filtered lookup | + | out gvec4 texel) | result in the out | + | int sparseImageLoadLodAMD(gimage2DArray image, | parameter . | + | ivec3 P, int lod, | | + | out gvec4 texel) | | + | int sparseImageLoadLodAMD(gimageCuberray image, | | + | ivec3 P, int lod, | | + | out gvec4 texel) | | + +-------------------------------------------------+-----------------------+ + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + (1) What is the intention of this extension? + + RESOLVED: This extension is designed to support loads and stores on + mipmap texture images with the level-of-detail specified explicitly. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ------------------------------------------------- + 2 07/03/17 rexu Rename this extension and use suffix "lod" to + keep the consistency with existing texture and + image functions. Remove gimage2DRect and + gimageBuffer dimensions for these new built-in + functions in that they do not support mipmapping. + + 1 06/30/17 rexu Initial draft. diff --git a/opengles/extensions/AMD/AMD_shader_stencil_export.txt b/opengles/extensions/AMD/AMD_shader_stencil_export.txt new file mode 100644 index 0000000000..c0359d41f8 --- /dev/null +++ b/opengles/extensions/AMD/AMD_shader_stencil_export.txt @@ -0,0 +1,209 @@ +Name + + AMD_shader_stencil_export + +Name Strings + + GL_AMD_shader_stencil_export + +Contributors + + Graham Sellers, AMD + Andrew Lewycky, AMD + Mais Alnasser, AMD + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Status + + In Progress. + +Version + + Last Modified Date: 04/07/2010 + Author Revision: 5 + +Number + + 382 + +Dependencies + + OpenGL 1.0 is required. + + ARB_fragment_shader is required. + + This extension is written against the OpenGL Shading Language Specification + version 1.40.05 + +Overview + + In OpenGL, the stencil test is a powerful mechanism to selectively discard + fragments based on the content of the stencil buffer. However, facilites + to update the content of the stencil buffer are limited to operations such + as incrementing the existing value, or overwriting with a fixed reference + value. + + This extension provides a mechanism whereby a shader may generate the + stencil reference value per invocation. When stencil testing is enabled, + this allows the test to be performed against the value generated in the + shader. When the stencil operation is set to GL_REPLACE, this allows a + value generated in the shader to be written to the stencil buffer directly. + +IP Status + + None. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Additions to Chapter 2 of the OpenGL 2.1 Specification (OpenGL Operation) + + None. + +Additions to Chapter 3 of the OpenGL 2.1 Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 2.1 Specification (Per-Fragment Operations +and the Framebuffer) + + None. + +Additions to Chapter 5 of the OpenGL 2.1 Specification (Special +Functions) + + None. + +Additions to Chapter 6 of the OpenGL 2.1 Specification (State and +State Requests) + + None. + +Additions to the OpenGL Shading Language Version 1.40.05 + + Add a new Section 3.3.x, GL_AMD_shader_stencil_export Extension (p. 11) + + 3.3.x GL_AMD_shader_stencil_export + + To use the GL_AMD_shader_stencil_export extension in a shader it must be + enabled using the #extension directive. + + The shading language preprocessor #define GL_AMD_shader_stencil_export will + be defined to 1 if the GL_AMD_shader_stencil_export extension is supported. + + Modify Section 7.2, "Fragment Shader Special Variables": + + Add to the list of built-in special variables, p.63: + + out int gl_FragStencilRefAMD; + + Modify the paragraph beginning, "Fragment shaders output values to the + OpenGL pipeline..." to: + + Fragment shaders output values to the OpenGL pipeline using the built-in + variables gl_FragColor, gl_FragData, gl_FragDepth, and gl_FragStencilRefAMD + unless the discard statement is executed. Both gl_FragColor and gl_FragData + are deprecated; the preferred usage is to explicitly declare these outputs + in the fragment shader using the out storage qualifier. + + Insert a new paragraph after the paragraph describing gl_FragDepth: + + Writing to gl_FragStencilRefAMD will establish the stencil reference value + for the fragment being processed. Only the least significant bits of the + integer gl_FragStencilRefAMD are considered up to the value of STENCIL_BITS + and higher order bits are discarded. If stencil testing is enabled and no + shader writes to gl_FragStencilRefAMD, then the fixed function value for + stencil reference will be used as the fragment's stencil reference value. + If a shader statically assignes a value to gl_FragStencilRefAMD, and there + is an execution path through the shader that does not set + gl_FragStencilRefAMD, then the value of the fragment's stencil reference + value may be undefined for executions of the shader that take that path. + That is, if the set of linked shaders statically contain a write to + gl_FragStencilRefAMD, then it is responsible for always writing it. + + Modify the first paragraph on p.64: + + If a shader executes the discard keyword, the fragment is discarded, and + the values of any user-defined fragment outputs, gl_FragDepth, gl_FragColor, + gl_FragData, and gl_FragStencilRefAMD become irrelevant. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + 1) Should gl_FragStencilRefAMD be initialized to the current stencil + reference value on input to the fragment shader? + + RESOLVED: No. gl_FragStencilRefAMD is write-only. If the current stencil + reference value is required in a shader, the application should place + it in a uniform. + + 2) Is it possible to output the stencil mask from the shader? + + RESOLVED: No. + + 3) Is the global stencil mask still applied? + + RESOLVED: Yes. The mask is global as there is no way to export the + stencil mask from the shader. + + 4) How is two-sided stencil handled? How do we export front and back + stencil references? + + RESOLVED: There is only one export from the shader. However, two sided + stencil reference generation may be achived as: + + if (gl_FrontFacing) + gl_FragStencilRefAMD = foo; + else + gl_FragStencilRefAMD = bar; + + If both front and back stencil reference values are needed in a single + shader, user defined uniforms may be used. + + 5) If the value written to gl_FragStencilRefAMD is outside of the range of + values representable by the stencil buffer, what happens? + + RESOLVED: The additional bits are discarded. This is logical as the + stencil mask is still applied and its bit-depth is that of the stencil + buffer. If clamping is desired, this should be performed in the shader. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 5 04/07/2010 gsellers Remove erroneous language stating that + gl_FragStencilRefAMD is initialized to the fixed + function reference value. + 4 09/27/2009 gsellers Update issues 1, 4 and 5. + 3 07/16/2009 gsellers Address two-sided stencil references. + Add issues 3, 4 and 5. + 2 07/14/2009 gsellers Add AMD suffix to gl_FragStencilRef. Resolve (1) + 1 07/10/2009 gsellers Initial draft. \ No newline at end of file diff --git a/opengles/extensions/AMD/AMD_shader_stencil_value_export.txt b/opengles/extensions/AMD/AMD_shader_stencil_value_export.txt new file mode 100644 index 0000000000..921fd993af --- /dev/null +++ b/opengles/extensions/AMD/AMD_shader_stencil_value_export.txt @@ -0,0 +1,164 @@ +Name + + AMD_shader_stencil_value_export + +Name Strings + + GL_AMD_shader_stencil_value_export + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Status + + Shipping + +Version + + Last Modified Date: 12/12/2013 + Author Revision: 2 + +Number + + OpenGL Extension #444 + +Dependencies + + OpenGL 2.0 or ARB_fragment_shader is required. + + The AMD_shader_stencil_export extension affects the definition of this + extension. + + The AMD_stencil_operation_extended extension is required. + + This extension is written against the OpenGL Shading Language (GLSL) + Specification, Version 4.00.7. + +Overview + + OpenGL includes stencil testing functionality that allows an application + specified value (the reference value) to be compared against the content + of a stencil buffer and fragments kept or discarded based on the results + of this test. In addition to updating the stencil buffer with simple + operations such as inversion or incrementation, this reference value may be + written directly into the stencil buffer. + + AMD_stencil_operation_extended further extended the number of + operations that may be performed on the stencil buffer to include logical + and arithmetic operations. It also introduced new state, the stencil + operation source value, to allow these new operations to be performed on + the stencil buffer using an application supplied constant value as a source + value, rather than the reference value used in the stencil test. + + The AMD_shader_stencil_export extension allowed the reference value + used for the stencil test to be generated and exported from a fragment + shader. This extension provides similar functionality for the stencil + operation source value, allowing it to be generated in and exported from + the fragment shader too. + +IP Status + + None. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Modifications to the OpenGL 4.0 (Core Profile) Specification + + None. + +Modifications to Chapter 3 of the OpenGL Shading Language Specification, +Version 4.00.7 + + Add new Section 3.3.x, GL_AMD_shader_stencil_value_export Extension, p.15 + + 3.3.x GL_AMD_shader_stencil_value_export + + To use the GL_AMD_shader_stencil_value_export extension in a shader it must + be enabled using the #extension directive. + + The shading language preprocessor #define GL_AMD_shader_stencil_value_export + will be defined to 1 if the GL_AMD_shader_stencil_value_export extension is + supported. + +Modifications to Chapter 7 of the OpenGL Shading Language Specification, +Version 4.00.7 (Built-in Variables) + + Modify Section 7.1, "Built-in Language Variables": + + Add to the list of built-in special variables for the fragment language, + p.86: + + out int gl_FragStencilValueAMD; + + Insert the following paragraph, after the paragraph describing + gl_FragStencilRefAMD (as introduced by AMD_shader_stencil_export) on p.89: + + Writing to gl_FragStencilValueAMD will establish the stencil operation + source value for the fragment being processed. Only the least significant + STENCIL_BITS bits of the integer gl_FragStencilValueAMD are considered and + higher order bits are discarded. If stencil buffering is enabled and no + shader writes to gl_FragStencilValueAMD, the fixed function value for + stencil operation source will be used as the fragment's stencil operation + source value. If a shader statically assignes a value to + gl_FragStencilValueAMD, and there is an execution path through the shader + that does not set gl_FragStencilValueAMD, then the value of the fragment's + stencil operation source value may be undefined for executions of the + shader that take that path. That is, if the set of linked shaders + statically contain a write to gl_FragStencilValueAMD, then it is + responsible for always writing it. + + Modify the paragraph on p.89, describing the 'discard' keyword: + + If a shader executes the discard keyword, the fragment is discarded, and + the values of any user-defined fragment outputs, gl_FragDepth, + gl_FragStencilRefAMD, and gl_FragStencilValueAMD become irrelevant. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Dependencies on AMD_shader_stencil_export + + If AMD_shader_stencil_export is not supported, remove all references to + gl_FragStencilRefAMD. + +Issues + + 1) What is the behavior of gl_FragStencilValueAMD with respect to masks, + significant bits and so on? + + The behavior of the value written to gl_FragStencilValueAMD is the same + as that of the fixed function value set through glStencilOpValueAMD. That + is, the value is not masked until the result of the operation is written + to the stencil buffer. Bits that cannot be represented by the stencil + buffer are simply discarded. + +Revision History + + Rev. Date Author Changes + ---- ---------- -------- ----------------------------------------- + 2 12/12/2013 gsellers Minor cleanup ready for posting. + 1 06/10/2010 gsellers Initial revision diff --git a/opengles/extensions/AMD/AMD_shader_trinary_minmax.txt b/opengles/extensions/AMD/AMD_shader_trinary_minmax.txt new file mode 100644 index 0000000000..d3956889a7 --- /dev/null +++ b/opengles/extensions/AMD/AMD_shader_trinary_minmax.txt @@ -0,0 +1,136 @@ +Name + + AMD_shader_trinary_minmax + +Name Strings + + GL_AMD_shader_trinary_minmax + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Status + + Shipping + +Version + + Last Modified Date: 10/01/2012 + Author Revision: 2 + +Number + + 428 + +Dependencies + + OpenGL 2.0 or ARB_shader_objects is required. + + This extension is written against the OpenGL Shading Language + Specification, Version 4.30. + +Overview + + This extension introduces three new trinary built-in functions to the + OpenGL Shading Languages. These functions allow the minimum, maximum + or median of three inputs to be found with a single function call. These + operations may be useful for sorting and filtering operations, for example. + By explicitly performing a trinary operation with a single built-in + function, shader compilers and optimizers may be able to generate better + instruction sequences for perform sorting and other multi-input functions. + +IP Status + + None. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Additions to Chapter 2 of the OpenGL Shading Language (GLSL) Specification, +version 4.30, (Overview of OpenGL Shading) + + None. + +Additions to Chapter 3 of the OpenGL Shading Language (GLSL) Specification, +version 4.30, (Basics) + + None. + +Additions to Chapter 4 of the OpenGL Shading Language (GLSL) Specification, +version 4.30, (Variables and Types) + + None. + +Additions to Chapter 5 of the OpenGL Shading Language (GLSL) Specification, +version 4.30, (Operators and Expressions) + + None. + +Additions to Chapter 6 of the OpenGL Shading Language (GLSL) Specification, +version 4.30, (Statement Structure) + + None. + +Additions to Chapter 7 of the OpenGL Shading Language (GLSL) Specification, +version 4.30 (Built-in variables) + + None. + +Additions to Chapter 8 of the OpenGL Shading Language (GLSL) Specification, +version 4.30 (Built-in functions) + + In Section 8.3, "Common Functions", add to the table of functions, p.133: + + +---------------------------------------------------+--------------------------------------------------------+ + | Syntax | Description | + +---------------------------------------------------+--------------------------------------------------------+ + | genType min3(genType x, genType y, genType z) | Returns the per-component minimum value of x, y, and z | + | genIType min3(genIType x, genIType y, genIType z) | Returns the per-component minimum value of x, y, and z | + | genUType min3(genUType x, genUType y, genUType z) | Returns the per-component minimum value of x, y, and z | + +---------------------------------------------------+--------------------------------------------------------+ + | genType max3(genType x, genType y, genType z) | Returns the per-component maximum value of x, y, and z | + | genIType max3(genIType x, genIType y, genIType z) | Returns the per-component maximum value of x, y, and z | + | genUType max3(genUType x, genUType y, genUType z) | Returns the per-component maximum value of x, y, and z | + +---------------------------------------------------+--------------------------------------------------------+ + | genType mid3(genType x, genType y, genType z) | Returns the per-component median value of x, y, and z | + | genIType mid3(genIType x, genIType y, genIType z) | Returns the per-component median value of x, y, and z | + | genUType mid3(genUType x, genUType y, genUType z) | Returns the per-component median value of x, y, and z | + +---------------------------------------------------+--------------------------------------------------------+ + +Additions to Chapter 9 of the OpenGL Shading Language (GLSL) Specification, +version 4.30, (Shading Language Grammar) + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + None. + +Issues + + 1) Should the trinary min and max functions be given new names (min3, max3) + or simply overload the existing min and max functions? + + RESOLVED: Use new names. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 2 10/01/2012 gsellers Update to GLSL 4.30. Ready to post. + 1 11/01/2012 gsellers Initial Revision diff --git a/opengles/extensions/AMD/AMD_sparse_texture.txt b/opengles/extensions/AMD/AMD_sparse_texture.txt new file mode 100644 index 0000000000..bb02f8077e --- /dev/null +++ b/opengles/extensions/AMD/AMD_sparse_texture.txt @@ -0,0 +1,822 @@ +Name + + AMD_sparse_texture + +Name Strings + + GL_AMD_sparse_texture + +Contributors + + Graham Sellers, AMD + Pierre Boudier, AMD + Juraj Obert, AMD + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Status + + Shipping. + +Version + + Last Modified Date: 03/27/2012 + AMD Revision: 6 + +Number + + 426 + +Dependencies + + OpenGL 2.0 or ARB_fragment_shader is required. + + This extension is written against the OpenGL 4.2 (Core) Specification. + + This extension is written against the OpenGL Shading Language (GLSL) + Specification, version 4.20. + +Overview + + Recent advances in application complexity and a desire for higher + resolutions have pushed texture sizes up considerably. Often, the amount + of physical memory available to a graphics processor is a limiting factor + in the performance of texture-heavy applications. Once the available + physical memory is exhausted, paging may occur bringing performance down + considerably - or worse, the application may fail. Nevertheless, the amount + of address space available to the graphics processor has increased to the + point where many gigabytes - or even terabytes of address space may be + usable even though that amount of physical memory is not present. + + This extension allows the separation of the graphics processor's address + space (reservation) from the requirement that all textures must be + physically backed (commitment). This exposes a limited form of + virtualization for textures. Use cases include sparse (or partially + resident) textures, texture paging, on-demand and delayed loading of + texture assets and application controlled level of detail. + +New Procedures and Functions + + void TexStorageSparseAMD(enum target, + enum internalFormat, + sizei width, + sizei height, + sizei depth, + sizei layers, + bitfield flags); + + void TextureStorageSparseAMD(uint texture, + enum target, + enum internalFormat, + sizei width, + sizei height, + sizei depth, + sizei layers, + bitfield flags); + +New Tokens + + Accepted by the parameter to TexStorageSparseAMD and TextureStorageSparseAMD: + + TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 + + Accepted by the parameter to GetInternalformativ: + + VIRTUAL_PAGE_SIZE_X_AMD 0x9195 + VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 + VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 + + Accepted by the parameter to GetIntegerv, GetFloatv, GetDoublev, + GetInteger64v, and GetBooleanv: + + MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 + MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 + MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A + + Accepted by the parameter of GetTexParameter{if}v: + + MIN_SPARSE_LEVEL_AMD 0x919B + + Accepted by the parameter of TexParameter{if}{v} and + GetTexParameter{if}v: + + MIN_LOD_WARNING_AMD 0x919C + +Additions to Chapter 2 of the OpenGL 4.2 (Core) Specification (OpenGL Operation) + + None. + +Additions to Chapter 3 of the OpenGL 4.2 (Core) Specification (Rasterization) + + Add new Subsection 3.8.3 "Texture Storage Allocation". Renumber + subsequent sections. + + 3.8.3 Texture Storage Allocation + + The command + + void TexStorageSparseAMD(enum target, + enum internalFormat, + sizei width, + sizei height, + sizei depth, + sizei layers, + bitfield flags); + + is used to specify the storage requirements for a texture object. + must be one of TEXTURE_1D, TEXTURE_1D_ARRAY, TEXTURE_2D, TEXTURE_RECTANGLE, + TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP, TEXTURE_CUBE_MAP_ARRAY or TEXTURE_3D + for a one-dimensional texture, one-dimensional array texture, + two-dimensional texture, rectangular texture, two-dimensional array texture, + cube-map texture, cube-map array texture, or three-dimensional texture, + respectively. + + , , and determine the size of the allocated texture. + When is TEXTURE_1D or TEXTURE_1D_ARRAY, and must + be 1. When is TEXTURE_2D, TEXTURE_RECTANGLE or TEXTURE_2D_ARRAY, + must be 1. When is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY, + , and must be equal. For the non-array targets (TEXTURE_1D, + TEXTURE_2D, TEXTURE_CUBE_MAP and TEXTURE_3D), must be 1, otherwise + it specifies the number of layers in the array. specifies + the internal storage format for the texture data and must be one of the + sized internal formats listed in Table 3.12. + + , and must be less than or equal to the value of + MAX_SPARSE_TEXTURE_SIZE_AMD, and must be less than or equal to the + value of MAX_SPARSE_3D_TEXTURE_SIZE_AMD. must be less than or + equal to the value of MAX_SPARSE_ARRAY_TEXTURE_LAYERS_AMD. + + contains a bitfield that is used to control the allocation strategy + used for the texture. + + If contains TEXTURE_STORAGE_SPARSE_BIT_AMD, storage is reserved for + the texture data, but not committed immediately, otherwise, storage is + both reserved and committed at time of specification . If the texture is + marked as sparse (and storage is therefore uncommitted), storage for the + texture data is committed on later specification through commands such as + TexSubImage1D, TexSubImage2D or CopyTexSubImage2D. + + Texture image stores allocated via calls to TextStorageSparseAMD are always + considered complete, whether or not physical backing store for all mipmap + levels has been allocated. + + The TextureStorageSparseAMD command operates identically to the + TexStorageSparseAMD command except, rather than specifying storage requirements + for the current bound texture for the texture unit indicated by the current + active texture state and the target parameter, this command specifies storage + requirements for the texture object named by the initial texture parameter. + The error INVALID_VALUE is generated if is zero. + + Add new Subsection 3.8.6 "Texture Storage Commitment and Decommitment", + p.212. Renumber subsequent sections. + + For texture images allocated by calling TexStorageSparseAMD or + TextureStorageSparseAMD with a parameter which contains + the TEXTURE_STORAGE_SPARSE_BIT_AMD, physical storage for the underlying + texture data may not yet be committed. Commitment is made by calling + TexSubImage1D, TexSubImage2D, TexSubImage3D, with containing a value + other than NULL. When such a command is encountered, physical storage + for the specified region of the texture is committed and the data + becomes resident. If is NULL and no buffer is bound to the + PIXEL_UNPACK_BUFFER binding, then the data corresponding to + the specified region is decommitted and released to the GL. If a buffer is + bound to the PIXEL_UNPACK_BUFFER binding point, then is interpreted + as normal - that is, if is NULL, then it indicates an offset of + zero into that buffer's data store. + + Compressed texture data may be specified by calling CompressedTexSubImage1D, + CompressedTexSubImage2D or CompressedTexSubImage3D. Again, physical pages + are allocated on demand when is non-NULL and freed when is + NULL and no buffer is bound to the PIXEL_UNPACK_BUFFER binding point. + + The origin and size of committed regions must be integer multiples of the + virtual page size in each dimension as appropriate for the specified level + of the specified texture. The virtual page size for a sparse texture may be + determined by calling GetInternalformativ with set to + VIRTUAL_PAGE_SIZE_X_AMD, VIRTUAL_PAGE_SIZE_Y_AMD or VIRTUAL_PAGE_SIZE_Z_AMD + to query the X, Y or Z dimension of the page size, respectively. Calling + TexSubImage* or CopyTexSubImage* with , (for 2D and 3D + textures) or (for 3D textures) not set to integer multiples of + VIRTUAL_PAGE_SIZE_X_AMD, VIRTUAL_PAGE_SIZE_Y_AMD or VIRTUAL_PAGE_SIZE_Z_AMD, + respectively, will generate an INVALID_VALUE error. An INVALID_VALUE error + is also generated if , (for 2D and 3D textures) or + (for 3D textures) is not a multiple of VIRTUAL_PAGE_SIZE_X_AMD, + VIRTUAL_PAGE_SIZE_Y_AMD or VIRTUAL_PAGE_SIZE_Z_AMD, respectively. + + Calling TexStorageSparseAMD or TextureStorageSparseAMD on an already + committed texture decommits any associated storage and, if + contains TEXTURE_STORAGE_SPARSE_BIT_AMD, returns the image store to + fully uncommitted. Likewise, calling one of the TexImage commands + reallocates the storage for the texture image data and commits it + immediately. + + When storage is committed for texture levels greater than or equal to + the value of MIN_SPARSE_LEVEL_AMD for a sparse texture, all levels greater + than or equal to that level become committed. The value of + MIN_SPARSE_LEVEL_AMD may be retrieved by calling GetTexParameter{if}v with + set to MIN_SPARSE_LEVEL_AMD. Sampling from a committed level of a + texture that has not yet had data specified produces undefined results, + but will not result in instability or program termination. + + Add new paragraph heading "Effects of Texture Commitment on Completeness" + to end of Section 3.8.17 "Texture Completeness", p.237. + + Effects of Texture Commitment on Completeness + + Texture images whose storage was allocated without commitment (by calling + TexStorageSparseAMD or TextureStorageSparseAMD with a parameter + containing TEXTURE_STORAGE_SPARSE_BIT_AMD) are always considered complete, + regardless of their commitment status. Using such a texture image as + the source for rendering operations produces results as described + in sections XXX and XXX of the OpenGL Specification and section XXX + of the OpenGL Shading Language specification. + + User-Specified LOD Warning Thresholds + + In addition to detecting attempts to read from uncommitted regions of a + sparse texture, the GL can also signal to the shader that it required texels + that reside at LODs below some user specified threshold. This may be used, + for example, to specify a watermark and to provide feedback to an + application before it attempts to fetch from uncommitted texture regions. + Any attempt to fetch from lower LOD than the user-specified LOD warning + level will generate an LOD warning, which may be detected in the shader + by calling the sparseTexelMinLodWarning built-in function. When this + function returns , the sparseTexelLodWarningFetch function may + be called to determine the requested LOD that generated this warning. If + the data representing this LOD is resident, the texture read will still + return valid texel data. + + To specify the user-defined LOD watermark for a texture, call TexParameteri + with set to a valid texture target, and with set to + MIN_LOD_WARNING_AMD. Setting MIN_LOD_WARNING_AMD to zero effectively + disables the warning. + +Additions to Chapter 4 of the OpenGL 4.2 (Core) Specification (Per-Fragment Operations +and the Framebuffer) + + None. + +Additions to Chapter 5 of the OpenGL 4.2 (Core) Specification (Special +Functions) + + None. + +Additions to Chapter 6 of the OpenGL 4.2 (Core) Specification (State and +State Requests) + + None. + +Additions to Chapter 2 of the OpenGL Shading Language (GLSL) Specification, +version 4.20, (Overview of OpenGL Shading) + + None. + +Additions to Chapter 3 of the OpenGL Shading Language (GLSL) Specification, +version 4.20, (Basics) + + None. + +Additions to Chapter 4 of the OpenGL Shading Language (GLSL) Specification, +version 4.20, (Variables and Types) + + None. + +Additions to Chapter 5 of the OpenGL Shading Language (GLSL) Specification, +version 4.20, (Operators and Expressions) + + None. + +Additions to Chapter 6 of the OpenGL Shading Language (GLSL) Specification, +version 4.20, (Statement Structure) + + None. + +Additions to Chapter 7 of the OpenGL Shading Language (GLSL) Specification, +version 4.20 (Built-in variables) + + None. + +Additions to Chapter 8 of the OpenGL Shading Language (GLSL) Specification, +version 4.20, (Built-in Functions) + + Add the Subection 8.9.3, "Uncommitted Texture Images", renumber subsequent + sections. + + If a standard texture function is used to sample from a region of a texture + image where storage is uncommitted, undefined data is returned to the + shader (although no instability results). If the application can guarantee + that this will not occur (such as when well defined texture coordinates are + used with a texture atlas, for example), then standard texturing functions + may be used with partially resident textures. If there is a possibility that + at the time of use, data in the texture may be non-resident (uncommitted), + one of the sparse texture functions may be used to determine the residency + status of the data. + + The sparse texture functions return a condition code indicating the success + of a texel fetch operation. If texture data is present at the sampled + location, the texture data is returned in the inout parameter and + the function returns zero. If texture data is not present at the sampled + location, is unmodified and the function returns a non-zero status + code. It is then the responsibility of the shader to determine the + appropriate course of action. + + Add the following tables to the end of Section 8.9.3: + + Sparse texture lookup functions: + + +-------------------------------------------------------------------+-------------------------------------------+ + | Syntax | Description | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTexture(gsampler1D sampler, float P, | Behave as in texture(), but with | + | inout gvec4 texel [, float bias]); | data returned in and a | + | | status code produced as the return value | + | int sparseTexture(gsampler2D sampler, vec2 P, | of the function. | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTexture(gsampler2DRect sampler, vec2 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTexture(gsampler3D sampler, vec3 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTexture(gsampler1DArray sampler, vec2 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTexture(gsampler2DArray sampler, vec3 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTexture(gsamplerCube sampler, vec3 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTexture(gsamplerCubeArray sampler, vec4 P, | | + | inout gvec4 texel [, float bias]); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureProj(gsampler1D sampler, | Behave as in textureProj(), but with | + | vec2 P, | data returned in and a | + | inout gvec4 texel [, float bias]); | status code produced as the return value | + | | of the function. | + | int sparseTextureProj(gsampler1D sampler, | | + | vec4 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureProj(gsampler2D sampler, | | + | vec3 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureProj(gsampler2DRect sampler, | | + | vec3 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureProj(gsampler2D sampler, | | + | vec4 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureProj(gsampler2DRect sampler, | | + | vec4 P, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureProj(gsampler3D sampler, | | + | vec4 P, | | + | inout gvec4 texel [, float bias]); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureLod(gsampler1D sampler, | Behave as in textureLod(), but with | + | float P, float lod, | data returned in and a | + | inout gvec4 texel); | status code produced as the return value | + | | of the function. | + | int sparseTextureLod(gsampler2D sampler, | | + | vec2 P, float lod, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureLod(gsampler3D sampler, | | + | vec3 P, float lod, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureLod(gsampler1DArray sampler, | | + | vec2 P, float lod, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureLod(gsampler2DArray sampler, | | + | vec3 P, float lod, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureLod(gsamplerCube sampler, | | + | vec3 P, float lod, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureLod(gsamplerCubeArray sampler, | | + | vec4 P, float lod, | | + | inout gvec4 texel); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureOffset(gsampler1D sampler, | Behave as in textureOffset(), but | + | float P, int offset, | with data returned in and a | + | inout gvec4 texel [, float bias]); | status code produced as the return value | + | | of the function. | + | int sparseTextureOffset(gsampler2D sampler, | | + | vec2 P, ivec2 offset, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureOffset(gsampler3D sampler, | | + | vec3 P, ivec3 offset, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureOffset(gsampler1DArray sampler, | | + | vec2 P, int offset, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureOffset(gsampler2DArray sampler, | | + | vec3 P, ivec2 offset, | | + | inout gvec4 texel [, float bias]); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureProjOffset(gsampler1D sampler, | Behave as in textureProjOffset(), but | + | vec2 P, int offset, | with data returned in and a | + | inout gvec4 texel [, float bias]); | status code produced as the return value | + | | of the function. | + | int sparseTextureProjOffset(gsampler1D sampler, | | + | vec4 P, int offset, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureProjOffset(gsampler2D sampler, | | + | vec3 P, ivec2 offset, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureProjOffset(gsampler2D sampler, | | + | vec4 P, ivec2 offset, | | + | inout gvec4 texel [, float bias]); | | + | | | + | int sparseTextureProjOffset(gsampler3D sampler, | | + | vec4 P, ivec3 offset, | | + | inout gvec4 texel [, float bias]); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureLodOffset(gsampler1D sampler, | Behave as in textureLodOffset(), but | + | float P, float lod, int offset, | with data returned in and a | + | inout gvec4 texel); | status code produced as the return value | + | | of the function. | + | int sparseTextureLodOffset(gsampler2D sampler, | | + | vec2 P, float lod, ivec2 offset, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureLodOffset(gsampler3D sampler, | | + | vec3 P, float lod, ivec3 offset, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureLodOffset(gsampler1DArray sampler, | | + | vec2 P, float lod, int offset, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureLodOffset(gsampler2DArray sampler, | | + | vec3 P, float lod, ivec2 offset, | | + | inout gvec4 texel); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureProjLod(gsampler1D sampler, | Behave as in textureProjLod(), but | + | vec2 P, float lod, | with data returned in and a | + | inout gvec4 texel); | status code produced as the return value | + | | of the function. | + | int sparseTextureProjLod(gsampler1D sampler, | | + | vec4 P, float lod, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureProjLod(gsampler2D sampler, | | + | vec3 P, float lod, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureProjLod(gsampler2D sampler, | | + | vec4 P, float lod, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureProjLod(gsampler3D sampler, | | + | vec4 P, float lod, | | + | inout gvec4 texel); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureProjLodOffset(gsampler1D sampler, | Behave as in textureProjLodOffset(), but | + | vec2 P, float lod, int offset, | with data returned in and a | + | inout gvec4 texel); | status code produced as the return value | + | | of the function. | + | int sparseTextureProjLodOffset(gsampler1D sampler, | | + | vec4 P, float lod, int offset, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureProjLodOffset(gsampler2D sampler, | | + | vec3 P, float lod, ivec2 offset, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureProjLodOffset(gsampler2D sampler, | | + | vec4 P, float lod, ivec2 offset, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureProjLodOffset(gsampler3D sampler, | | + | vec4 P, float lod, ivec3 offset, | | + | inout gvec4 texel); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureGrad(gsampler1D sampler, float P, | Behave as in textureGrad(), but | + | float dPdx, float dPdy, | with data returned in and a | + | inout gvec4 texel); | status code produced as the return value | + | | of the function. | + | int sparseTextureGrad(gsampler2D sampler, vec2 P, | | + | vec2 dPdx, vec2 dPdy, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureGrad(gsampler3D sampler, vec3 P, | | + | vec3 dPdx, vec3 dPdy, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureGrad(gsampler1DArray sampler, vec2 P, | | + | float dPdx, float dPdy, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureGrad(gsampler2DArray sampler, vec3 P, | | + | vec2 dPdx, vec2 dPdy, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureGrad(gsamplerCube sampler, vec3 P, | | + | vec2 dPdx, vec2 dPdy, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureGrad(gsamplerCubeArray sampler, vec4 P, | | + | vec2 dPdx, vec2 dPdy, | | + | inout gvec4 texel); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureGradOffset(gsampler1D sampler, float P, | Behave as in textureGradOffset(), but | + | float dPdx, float dPdy, int offset, | with data returned in and a | + | inout gvec4 texel); | status code produced as the return value | + | | of the function. | + | int sparseTextureGradOffset(gsampler2D sampler, vec2 P, | | + | vec2 dPdx, vec2 dPdy, ivec2 offset, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureGradOffset(gsampler3D sampler, vec3 P, | | + | vec3 dPdx, vec3 dPdy, ivec3 offset, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureGradOffset(gsampler1DArray sampler, vec2 P, | | + | float dPdx, float dPdy, int offset, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureGradOffset(gsampler2DArray sampler, vec3 P, | | + | vec2 dPdx, vec2 dPdy, ivec2 offset, | | + | inout gvec4 texel); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureProjGrad(gsampler1D sampler, | Behave as in textureProjGrad(), but | + | vec2 P, float dPdx, float dPdy, | with data returned in and a | + | inout gvec4 texel); | status code produced as the return value | + | | of the function. | + | int sparseTextureProjGrad(gsampler1D sampler, | | + | vec4 P, float dPdx, float dPdy, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureProjGrad(gsampler2D sampler, | | + | vec3 P, vec2 dPdx, vec2 dPdy, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureProjGrad(gsampler2D sampler, | | + | vec4 P, vec2 dPdx, vec2 dPdy, | | + | inout gvec4 texel); | | + | | | + | int sparseTextureProjGrad(gsampler3D sampler, | | + | vec4 P, | | + | inout gvec4 texel); | | + +-------------------------------------------------------------------+-------------------------------------------+ + | int sparseTextureProjGradOffset(gsampler1D sampler, vec2 P, | Behave as in textureProjGradOffset(), but | + | float dPdx, float dPdy, | with data returned in and a | + | int offset, inout gvec4 texel); | status code produced as the return value | + | | of the function. | + | int sparseTextureProjGradOffset(gsampler1D sampler, vec4 P, | | + | float dPdx, float dPdy, | | + | int offset, inout gvec4 texel); | | + | | | + | int sparseTextureProjGradOffset(gsampler2D sampler, vec3 P, | | + | vec2 dPdx, vec2 dPdy, | | + | ivec2 offset, inout gvec4 texel); | | + | | | + | int sparseTextureProjGradOffset(gsampler2D sampler, vec4 P, | | + | vec2 dPdx, vec2 dPdy, | | + | ivec2 offset, inout gvec4 texel); | | + | | | + | int sparseTextureProjGradOffset(gsampler3D sampler, vec4 P, | | + | vec3 dPdx, vec3 dPdy, | | + | ivec3 offset, inout gvec4 texel); | | + +-------------------------------------------------------------------+-------------------------------------------+ + + Add the following table and description. + + The following functions may be used to interpret the status codes returned + by the sparse texture lookup functions. + + +-------------------------------------------------------------------+-------------------------------------------+ + | Syntax | Description | + +-------------------------------------------------------------------+-------------------------------------------+ + | bool sparseTexelResident(int code); | Returns true if the texture read that | + | | produced retrieved valid data, and | + | | false otherwise. | + | | | + | bool sparseTexelMinLodWarning(int code); | Returns true if the texture read that | + | | produced required a texel fetch | + | | from any LOD lower than the user | + | | specified LOD warning threshold. | + | | | + | int sparseTexelLodWarningFetch(int code); | Returns the LOD calculated by the texture | + | | read that generated and resulted | + | | in a condition that would cause | + | | sparseTexelMinLodWarning to return true. | + | | If the LOD warning was not encountered, | + | | this function returns zero. | + +-------------------------------------------------------------------+-------------------------------------------+ + + +Additions to Chapter 9 of the OpenGL Shading Language (GLSL) Specification, +version 4.20, (Shading Language Grammar) + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + INVALID_ENUM is generated by TexStorageSparseAMD + and TextureStorageSparseAMD if is not one of the supported + texture targets. + + INVALID_ENUM is generated by TexStorageSparseAMD + and TextureStorageSparseAMD if is not one of the + accepted internal texture formats. + + INVALID_VALUE is generated by TexStorageSparseAMD + and TextureStorageSparseAMD if or is not 1 and + is TEXTURE_1D or TEXTURE_1D_ARRAY. + + INVALID_VALUE is generated by TexStorageSparseAMD + and TextureStorageSparseAMD if is not 1 and is + TEXTURE_2D, TEXTURE_RECTANGLE or TEXTURE_2D_ARRAY. + + INVALID_VALUE is generated by TexStorageSparseAMD + and TextureStorageSparseAMD if , and are not + equal and is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY. + + INVALID_VALUE is generated by TexStorageSparseAMD + and TextureStorageSparseAMD if is not 1 and is not + one of the ARRAY texture targets. + + INVALID_VALUE is generated by TexStorageSparseAMD + and TextureStorageSparseAMD if or is greater than the + value of MAX_SPARSE_TEXTURE_SIZE_AMD, or if is greater than + the value of MAX_SPARSE_3D_TEXTURE_SIZE_AMD, or if is greater + than the value of MAX_SPARSE_ARRAY_TEXTURE_LAYERS_AMD. + + INVALID_VALUE is generated by TexImage* and CopyTexImage* if the dimensions + of the updated region are not integer multiples of VIRTUAL_PAGE_SIZE_X_AMD, + VIRTUAL_PAGE_SIZE_Y_AMD (for 2D and 3D textures) and VIRTUAL_PAGE_SIZE_Z_AMD + (for 3D textures). + +New State + + Append to Table 6.16, "Textures (state per texture object)" + + +-----------------------+-------+-------------------+---------------+-------------------------------------------+-------+ + | Get Value | Type | Get Command | Initial Value | Description | Sec. | + +-----------------------+-------+-------------------+---------------+-------------------------------------------+-------+ + | MIN_LOD_WARNING_AMD | Z+ | GetTexParameteriv | 0 | User-specified minimum LOD warning level. | 3.8.6 | + +-----------------------+-------+-------------------+---------------+-------------------------------------------+-------+ + +New Implementation Dependent State + + Append to Table 6.42, "Implementation Dependent Values" + + +-----------------------------------+-------+-------------+-----------------+---------------------------------------+-------+ + | Get Value | Type | Get Command | Minimum Value | Description | Sec. | + +-----------------------------------+-------+-------------+-----------------+---------------------------------------+-------+ + | MAX_SPARSE_TEXTURE_SIZE_AMD | Z+ | GetIntegerv | 16384 | Maximum 1D/2D/rectangle texture image | 3.8.6 | + | | | | | dimension for a sparse texture. | | + | MAX_SPARSE_3D_TEXTURE_SIZE_AMD | Z+ | GetIntegerv | 2048 | Maximum 3D texture image dimension | 3.8.6 | + | | | | | for a sparse texture. | | + | MAX_SPARSE_3D_TEXTURE_SIZE_AMD | Z+ | GetIntegerv | 2048 | Maximum number of layers in a sparse | 3.8.6 | + | | | | | array texture. | | + +-----------------------------------+-------+-------------+-----------------+---------------------------------------+-------+ + +Issues + + 1) Are all supported texture targets exposed? Are any exposed that are not + supported well by hardware? + + RESOLVED: All texture targets are exposed except for multisample, and + buffer textures. + + 2) Why do we have and separate in TexStorageSparseAMD and + TextureStorageSparseAMD, whereas in TexImage3D, specifies the + size of the 2D array, for example? + + Because it's easier to validate and because I don't want to hack up my + extension if we introduce 3D-array textures. + + 3) Does this play nice with the proposed EXT_texture_storage extension + (which defines some very similar entry points to TexStorageSparseAMD + and TextureStorageSparseAMD)? Can it be made to play nice? + + RESOLVED: Yes, it should interact just fine. Unfortunately, + EXT_texture_storage didn't introduce any mechanism to convey flags or + allocation strategies and so those entry points could not be used here. + Otherwise, textures allocated with TexStorage* APIs should appear as + fully resident textures if used with sparse texture sampling functions. + + 4) Is it possible to attach a partially resident texture to an FBO and + render into it? + + RESOLVED: Yes, this is supported. Keep in mind, though, that data rendered + to an attachment in areas that are not resident will be discarded and there + is no mechanism to detect this. Also, depth, stencil and multisample + formats are not supported by this extension. + + 5) What happens if TEXTURE_STORAGE_SPARSE_BIT_AMD is not present in + TexStorageSparseAMD or TextureStorageSparseAMD? + + RESOLVED: Texture storage will be both allocated and committed. The + texture is still considered immutable and so this is mostly equivalent + to calling the TexStorage API. + + 6) Does this extension increase the maximum supported texture size? + + RESOLVED: No, not explicitly. The maximum supported texture size is + still queryable by retrieving the value of MAX_TEXTURE_SIZE. A new token, + MAX_SPARSE_TEXTURE_SIZE_AMD is added to query the maximum sparse texture + size, which may be larger than the non-sparse maximum. However, there + is no requirement for it to be so. + + 7) What if a larger sparse textures are supported than non-sparse textures? + + RESOLVED: Query the maximum sparse texture size by retrieving the value + of MAX_SPARSE_TEXTURE_SIZE_AMD. + + 8) How do you decommit (free) a region of a sparse texture? + + RESOLVED: Call TexSubImageND with set to NULL and without a + pixel unpack buffer bound. + + 9) - + + 10) Is compression supported for sparse textures? + + RESOLVED: Yes, but be aware that the dimensions of a single tile could + be substantially larger when the texture is compressed. + + 11) Does this work with non-power-of-two textures? + + RESOLVED: Yes, so long as the texture size is an integer multiple of + the texture tile size in all dimensions. + + 12) Are multisampled sparse textures supported? + + RESOLVED: No. + + 13) What about OUT_OF_MEMORY errors? + + RESOLVED: OUT_OF_MEMORY errors can be reported if there isn't sufficient + system memory to allocate internal structures (even a fully uncommitted + sparse texture requires some internal resources), or if there isn't + sufficient video memory to commit all requested regions. + + The error doesn't have to be reported upon creation of a sparse texture. + For example, allocation of two 64 GB sparse textures might succeed, but + their simulatenous use in one draw call might result in an OUT_OF_MEMORY + error being reported by the GL later. + + 14) Does CopyTexSubImage work with sparse textures? + + RESOLVED: Yes. + + 15) Does GetTexImage work with sparse texture? + + RESOLVED: Yes in general. However, the call can fail based on + implementation-specific limitations. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 6 03/27/2012 gsellers Resolve some issues. + Clarify interactions with PBO. + 5 03/14/2012 jobert Rename some tokens. + Assign token values. + 4 20/04/2011 gsellers Add min-lod warning. + Add sparse texture fetch return code built-ins. + Add new state tables. + Add 3D sparse texture size limit. + Add support for cube textures and cube texture + arrays. + Add issues 10 and 11, remove issue 9. + 3 25/03/2011 gsellers Change required version of GL to 2.0 (or + equivalent extensions). + Add query for virtual page size. + Add restrictions on page size and alignment + during commitment. + Add MAX_SPARSE_TEXTURE_SIZE_AMD. + Add issues 6 through 9. + Add MIN_SPARSE_LEVEL_AMD. + 2 25/02/2011 jobert Expanded the Issues section + 1 11/02/2011 gsellers Initial Revision diff --git a/opengles/extensions/AMD/AMD_stencil_operation_extended.txt b/opengles/extensions/AMD/AMD_stencil_operation_extended.txt new file mode 100644 index 0000000000..e658a6702d --- /dev/null +++ b/opengles/extensions/AMD/AMD_stencil_operation_extended.txt @@ -0,0 +1,248 @@ +Name + + AMD_stencil_operation_extended + +Name Strings + + GL_AMD_stencil_operation_extended + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Status + + Shipping + +Version + + Last Modified Date: 01/11/2012 + Author Revision: 4 + +Number + + 413 + +Dependencies + + OpenGL 1.0 is required. + + The definition of this extension is affected by EXT_stencil_wrap and + OpenGL 2.0. + + This extension is written against the OpenGL Specification, Version 4.2 + (Core Profile). + +Overview + + Stencil buffers are special buffers that allow tests to be made against an + incoming value and action taken based on that value. The stencil buffer is + updated during rasterization, and the operation used to update the stencil + buffer is chosen based on whether the fragment passes the stencil test, + and if it does, whether it passes the depth test. Traditional OpenGL + includes support for several primitive operations, such as incrementing, + or clearing the content of the stencil buffer, or replacing it with a + specified reference value. + + This extension adds support for an additional set of operations that may + be performed on the stencil buffer under each circumstance. Additionally, + this extension separates the value used as the source for stencil + operations from the reference value, allowing different values to be used + in the stencil test, and in the update of the stencil buffer. + +IP Status + + None. + +New Procedures and Functions + + void StencilOpValueAMD(enum face, uint value); + +New Tokens + + Accepted by the , and parameters of StencilOp + and StencilOpSeparate: + + SET_AMD 0x874A + AND 0x1501 + XOR 0x1506 + OR 0x1507 + NOR 0x1508 + EQUIV 0x1509 + NAND 0x150E + REPLACE_VALUE_AMD 0x874B + + Accepted by the parameter of GetIntegerv, GetFloatv, GetBooleanv + GetDoublev and GetInteger64v: + + STENCIL_OP_VALUE_AMD 0x874C + STENCIL_BACK_OP_VALUE_AMD 0x874D + +Additions to Chapter 2 of the OpenGL 4.2 (Core Profile) Specification +(OpenGL Operation) + + None. + +Additions to Chapter 3 of the OpenGL 4.2 (Core Profile) Specification +(Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 4.2 (Core Profile) Specification +(Per-Fragment Operations and the Framebuffer) + + Add to the functions introduced in Section 4.1.4 "Stencil Test", p.287 + + The stencil test is controlled with + + + void StencilOpValueAMD(enum face, uint value); + + Modify the paragraph beginning "StencilFuncSeparate and StencilOpSeparate + take a argument...", p.288 + + StencilFuncSeparate, StencilOpSeparate and StencilOpValue take a + argument which can be FRONT, BACK or FRONT_AND_BACK and indicates + which set of state is affected. + + Replace the second and third paragraphs on p.288, describing StencilOp and + StencilOpSeparate with the following three paragraphs: + + StencilOp and StencilOpSeparate take three arguments that indicate what + happens to the stored stencil value if this or certain subsequent tests fail + or pass. sfail indicates what action is taken if the stencil test fails. + The inputs to the stencil operation are the stencil reference value, the + stencil operation source value, and the current content of the stencil + buffer. The accepted symbolic constants are KEEP, ZERO, SET_AMD, REPLACE, + REPLACE_VALUE_AMD, INCR, DECR, INVERT, INCR_WRAP, DECR_WRAP, AND, XOR, OR, + NOR, EQUIV, and NAND. These correspond to keeping the current value, setting + to zero, setting to the maximum representable value, replacing with the + reference value, replacing with the operation source value, incrementing by + the operation source value with saturation, decrementing by the operation + source value with saturation, bitwise inverting it, incrementing by the + operation source value without saturation, decrementing by the operation + source value without saturation, logically ANDing the operation source + value value with it, logically XORing the operation source value value with + it, logically ORing the operation source value with it, logically NORing + the operation source value with it, logically XORing the operation source + value with it and replacing the it with the logically inverted result of + that computation, and logically NANDing the operation source value with it, + respectively. + + For purposes of increment, decrement, the stencil bits are considered + as an unsigned integer. Incrementing or decrementing with saturation clamps + the stencil value between 0 and the maximum representable value. + Incrementing without saturation will wrap such that incrementing the + content of the stencil buffer in such a way that overflow occurs will cause + the result of the operation to be masked by the number of bits representable + by the stencil buffer. Decrementing without saturation will wrap such that + decrementing the content of the stencil buffer in a manner such that the + result of the subtraction would be negative causes the two's complement + result to be interpreted as an unsigned integer and masked to the number of + bits representable by the stencil buffer. + + The stencil operation source value is set by calling StencilOpValueAMD + with set to GL_FRONT, GL_BACK or GL_FRONT_AND_BACK, and set + to the new value of the stencil operation source value. + + Modify the paragraph beginning "If the stencil test fails, the ... ", p.288 + as follows: + + If the stencil test fails, the incoming fragment is discarded. The state + required consists of the most recent values passed to StencilFunc or + StencilFuncSeparate, to StencilOp or StencilOpSeparate, and to + StencilOpValueAMD, and a bit indicating whether stencil testing is enabled + or disabled. In the initial state, stenciling is disabled, the front and + back reference values are both zero, the front and back stencil comparison + functions are both ALWAYS, the front and back stencil mask are both set to + the value 2^S - 1, where S is greater than or equal to the number of bits + in the deepest buffer supported by the GL implementation, and the front + and back stencil operation values are both 1. Initially, all three front + and back stencil operations are KEEP. + +Additions to Chapter 5 of the OpenGL 4.2 (Core Profile) Specification +(Special Functions) + + None. + +Additions to Chapter 6 of the OpenGL 4.2 (Core Profile) Specification +(State and State Requests) + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + INVALID_ENUM is generated by StencilOpValueAMD if is not FRONT, + BACK or FRONT_AND_BACK. + +New State + + Modify Table 6.20 "Pixel Operations", p.394: + + +--------------------------------+----------+---------------+-----------+-------------------------------------------+--------+ + | | | Get | Initial | | | + | Get Value | Type | Command | Value | Description | Sec. | + +--------------------------------+----------+---------------+-----------+-------------------------------------------+--------+ + | STENCIL_FAIL | Z16 | GetIntegerv | KEEP | Front stencil fail action | 4.1.4 | + | STENCIL_PASS_DEPTH_FAIL | Z16 | GetIntegerv | KEEP | Front stencil depth buffer fail action | 4.1.4 | + | STENCIL_PASS_DEPTH_PASS | Z16 | GetIntegerv | KEEP | Front stencil depth buffer pass action | 4.1.4 | + | STENCIL_BACK_FAIL | Z16 | GetIntegerv | KEEP | Back stencil fail action | 4.1.4 | + | STENCIL_BACK_PASS_DEPTH_FAIL | Z16 | GetIntegerv | KEEP | Back stencil depth buffer fail action | 4.1.4 | + | STENCIL_BACK_PASS_DEPTH_PASS | Z16 | GetIntegerv | KEEP | Back stencil depth buffer pass action | 4.1.4 | + | STENCIL_OP_VALUE_AMD | Z+ | GetIntegerv | 1 | Front stencil operation value | 4.1.4 | + | STENCIL_BACK_OP_VALUE_AMD | Z+ | GetIngeterv | 1 | Back stencil operation value | 4.1.4 | + +--------------------------------+----------+---------------+-----------+-------------------------------------------+--------+ + + NOTE: The existing STENCIL{_BACK}_{*} enumerants change have changed from Z8 to Z16. + +Dependencies on EXT_stencil_wrap + + If EXT_stencil_wrap is not supported, remove references to INCR_WRAP and + DECR_WRAP. Also, change the definition of the STENCIL_{*} state to Z14 + rather than Z16. + +Dependencies on OpenGL 2.0 + + If the GL version is less than 2.0, remove all references to + StencilOpSeparate. Furthermore, the parameter to StencilOpValueAMD + must be FRONT_AND_BACK, otherwise an INVALID_ENUM error will be generated. + +Issues + + 1) Is the stencil mask applied to the stencil operation value? + + RESOLVED: No, only to the reference and current values before the test. + The stencil operation is carried out on the full value. The stencil write + mask is applied to the result during stencil buffer update, however. + + 2) Is this really backwards compatible? Does it break OpenGL? + + RESOLVED: Yes, this is backwards compatible and does not break anything. + The INCR{_WRAP} and DECR{_WRAP} operations have been semantically redefined + to be generalized add and subtract operations. However, the stencil + operation source value is used in the addition operation and its default is + 1. Therefore, in the default state (assuming the stencil operation source + value is not changed), INCR and DECR still increment and decrement by 1. + + 3) What if I want to apply a logical operation with the stencil reference + value and the current stencil buffer contents? + + RESOLVED: Set the stencil operation source value to the same thing as the + stencil reference value. + +Revision History + + Rev. Date Author Changes + ---- ---------- -------- ----------------------------------------- + 4 01/11/2012 gsellers Update for OpenGL 4.2. Prepare for posting. + 3 12/17/2010 yunzhang update enum definitions + 2 06/10/2010 gsellers Add separate stencil op value. Add issues. + 1 06/08/2010 gsellers Initial revision diff --git a/opengles/extensions/AMD/AMD_texture_gather_bias_lod.txt b/opengles/extensions/AMD/AMD_texture_gather_bias_lod.txt new file mode 100644 index 0000000000..64b4666a9d --- /dev/null +++ b/opengles/extensions/AMD/AMD_texture_gather_bias_lod.txt @@ -0,0 +1,306 @@ +Name + + AMD_texture_gather_bias_lod + +Name Strings + + GL_AMD_texture_gather_bias_lod + +Contact + + Rex Xu, AMD (Rex.Xu 'at' amd.com) + +Contributors + + Rex Xu, AMD + Timothy Lottes, AMD + Qun Lin, AMD + Daniel Rakos, AMD + Graham Sellers, AMD + Dominik Witczak, AMD + Matthäus G. Chajdas, AMD + + +Status + + Shipping + +Version + + Last Modified Date: 05/10/2017 + Author Revision: 5 + +Number + + 502 + +Dependencies + + This extension is written against the OpenGL 4.5 (Core Profile) Specification. + + This extension is written against version 4.50 of the OpenGL Shading Language Specification. + + OpenGL 4.0 and GLSL 4.00 are required. + + This extension interacts with ARB_sparse_texture2. + +Overview + + This extension was developed based on existing built-in texture gather functions to allow + implementations supporting bias of implicit level of detail and explicit control of level of + detail in texture gather operations. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Modifications to the OpenGL Shading Language Specification, Version 4.50 + + Including the following line in a shader can be used to control the language features described + in this extension: + + #extension GL_AMD_texture_gather_bias_lod : + + where is as specified in section 3.3. + + New preprocessor #defines are added to the OpenGL Shading Language: + + #define GL_AMD_texture_gather_bias_lod 1 + +Additions to Chapter 8 of the OpenGL Shading Language Specification (Built-in Functions) + + Modify Section 8.9.3 Texture Gather Functions + + (modify the first sentence of the first paragraph on p. 170) + + The texture gather functions take components of a single floating-point vector operand as a + texture coordinate, determine a set of four texels to sample either from the base level of + detail and its bias (if present) of the specified texture image or from the explicit level of + detail (if present) of this texture image, and return one component from each texel in a four- + component result vector. + + (modify certain functions in the "Syntax" table cell of each gather function group, adding + an optional parameter for those sampler types: gsampler2D, gsampler2DArray, + gsamplerCube, gsamplerCubeArray, and modify four-texel sampling formulas in the "Description" + table cell of textureGather() on p. 171-172) + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | gvec4 textureGather(gsampler2D sampler, vec2 P [, int comp | Returns the value | + | [, float bias]]) | | + | gvec4 textureGather(gsampler2DArray sampler, vec3 P | gvec4( | + | [, int comp [, float bias]]) | Sample_i0_j1( | + | gvec4 textureGather(gsamplerCube sampler, vec3 P | P, base, bias).comp, | + | [, int comp [, float bias]]) | Sample_i1_j1( | + | gvec4 textureGather(gsamplerCubeArray sampler, vec4 P | P, base, bias).comp, | + | [, int comp [, float bias]]) | Sample_i1_j0( | + | ... | P, base, bias).comp, | + | | Sample_i0_j0( | + | | P, base, bias).comp) | + | | ... | + +--------------------------------------------------------------+------------------------------+ + | gvec4 textureGatherOffset(gsampler2D sampler, vec2 P, | Perform a texture gather | + | ivec2 offset [, int comp | operation as in | + | [, float bias]]) | textureGather() by | + | gvec4 textureGatherOffset(gsampler2DArray sampler, vec3 P, | as described in | + | ivec2 offset [, int comp | textureOffset() except that | + | [, float bias]]) | the can be variable | + | ... | (non constant) and ... | + +--------------------------------------------------------------+------------------------------+ + | gvec4 textureGatherOffsets(gsampler2D sampler, vec2 P, | Operate identically to | + | ivec2 offsets[4] [, int comp | textureGatherOffset() except | + | [, float bias]]) | that is used to | + | gvec4 textureGatherOffsets(gsampler2DArray sampler, vec3 P, | determine the location of the| + | ivec2 offsets[4] [, int comp | four texels to sample. ... | + | [, float bias]]) | | + | ... | | + +--------------------------------------------------------------+------------------------------+ + + (insert new gather function table cells, at the end of the section, p. 172) + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | gvec4 textureGatherLodAMD(gsampler2D sampler, vec2 P, | Perform a texture gather | + | float lod [, int comp]) | operation as in | + | gvec4 textureGatherLodAMD(gsampler2DArray sampler, vec3 P, | textureGather() with explicit| + | float lod [, int comp]) | LOD, but the four-texel | + | gvec4 textureGatherLodAMD(gsamplerCube sampler, vec3 P, | sampling is modified as | + | float lod [, int comp]) | follow: | + | gvec4 textureGatherLodAMD(gsamplerCubeArray sampler, vec4 P, | | + | float lod [, int comp]) | gvec4( | + | | Sample_i0_j1(P, lod).comp, | + | | Sample_i1_j1(P, lod).comp, | + | | Sample_i1_j0(P, lod).comp, | + | | Sample_i0_j0(P, lod).comp) | + +--------------------------------------------------------------+------------------------------+ + | gvec4 textureGatherLodOffsetAMD(gsampler2D sampler, vec2 P, | Perform a texture gather | + | float lod, ivec2 offset | operation as in | + | [, int comp]) | textureGatherOffset() but | + | gvec4 textureGatherLodOffsetAMD(gsampler2DArray sampler, | with explicit LOD. | + | vec3 P, float lod, | | + | ivec2 offset [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + | gvec4 textureGatherLodOffsetsAMD(gsampler2D sampler, vec2 P, | Perform a texture gather | + | float lod, ivec2 offsets[4] | operation as in | + | [, int comp]) | textureGatherOffsets() but | + | gvec4 textureGatherLodOffsetsAMD(gsampler2DArray sampler, | with explicit LOD. | + | vec3 P, float lod, | | + | ivec2 offsets[4] | | + | [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + +Dependencies on ARB_sparse_texture2 + + If the shader enables ARB_sparse_texture2, this extension modifies certain variants of + sparseTextureGather*(), adding optional parameter for those sampler types: gsampler2D, + gsampler2DArray, gsamplerCube, gsamplerCubeArray. + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherARB(gsampler2D sampler, vec2 P, | Do a texture gather operation| + | out gvec4 texel [, int comp | as in textureGather(), but | + | [, float bias]]) | return texture access | + | int sparseTextureGatherARB(gsampler2DArray sampler, vec3 P, | residency information from | + | out gvec4 texel [, int comp | the function and the filtered| + | [, float bias]]) | lookup result in the out | + | int sparseTextureGatherARB(gsamplerCube sampler, vec3 P, | parameter . | + | out gvec4 texel [, int comp | | + | [, float bias]]) | | + | int sparseTextureGatherARB(gsamplerCubeArray sampler, vec4 P,| | + | out gvec4 texel [, int comp | | + | [, float bias]]) | | + | ... | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherOffsetARB(gsampler2D sampler, vec2 P, | Do a texture gather operation| + | ivec2 offset, | as in textureGatherOffset(), | + | out gvec4 texel | but return texture access | + | [, int comp [, float bias]])| residency information from | + | int sparseTextureGatherOffsetARB(gsampler2DArray sampler, | the function and the filtered| + | vec3 P, ivec2 offset, | lookup result in the out | + | out gvec4 texel | parameter . | + | [, int comp [, float bias]])| | + | ... | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherOffsetsARB(gsampler2D sampler, vec2 P,| Do a texture gather operation| + | ivec2 offsets[4], | as in textureGatherOffsets(),| + | out gvec4 texel | but return texture access | + | [, int comp | residency information from | + | [, float bias]]) | the function and the filtered| + | int sparseTextureGatherOffsetsARB(gsampler2DArray sampler, | lookup result in the out | + | vec3 P, ivec2 offsets[4], | parameter . | + | out gvec4 texel | | + | [, int comp | | + | [, float bias]]) | | + | ... | | + +--------------------------------------------------------------+------------------------------+ + + Meanwhile, this extension adds additional texture gather functions as follow if the shader + enables ARB_sparse_texture2, providing explicit control of level of detail. + + +--------------------------------------------------------------+------------------------------+ + | Syntax | Description | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherLodAMD(gsampler2D sampler, vec2 P, | Do a texture gather operation| + | float lod, out gvec4 texel | as in textureGather() with, | + | [, int comp]) | explicit LOD, but return | + | int sparseTextureGatherLodAMD(gsampler2DArray sampler, | texture access residency | + | vec3 P, float lod, | information from the function| + | out gvec4 texel [, int comp]) | and the filtered lookup | + | int sparseTextureGatherLodAMD(gsamplerCube sampler, vec3 P, | result in the out parameter | + | float lod, out gvec4 texel | . | + | [, int comp]) | | + | int sparseTextureGatherLodAMD(gsamplerCubeArray sampler, | | + | vec4 P, float lod, | | + | out gvec4 texel [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherLodOffsetAMD(gsampler2D sampler, | Do a texture gather operation| + | vec2 P, float lod, | as in textureGatherOffset() | + | ivec2 offset, | with explicit LOD, but return| + | out gvec4 texel | texture access residency | + | [, int comp]) | information from the function| + | int sparseTextureGatherLodOffsetAMD(gsampler2DArray sampler, | and the filtered lookup | + | vec3 P, float lod, | result in the out parameter | + | ivec2 offset, | . | + | out gvec4 texel | | + | [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + | int sparseTextureGatherLodOffsetsAMD(gsampler2D sampler, | Do a texture gather operation| + | vec2 P, float lod, | as in textureGatherOffsets() | + | ivec2 offsets[4], | with explicit LOD, but return| + | out gvec4 texel | texture access residency | + | [, int comp]) | information from the function| + | int sparseTextureGatherLodOffsetsAMD(gsampler2DArray sampler,| and the filtered lookup | + | vec3 P, float lod, | result in the out parameter | + | ivec2 offsets[4], | . | + | out gvec4 texel | | + | [, int comp]) | | + +--------------------------------------------------------------+------------------------------+ + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + (1) Could you explain the function syntax since is added as another optional parameter? + + RESOLVED: This extension adds as another optional parameter apart from the existing + parameter . The function syntax is somewhat similar to rules of default parameters in + C++. To be exact, when is not specified, should not be specified as well; when + is specified, could be specified or not. For example, + + uniform sampler2D samp2D; + + vec2 P; + int comp; + float bias; + + ... + + textureGather(samp2D, P); // legal, both comp and bias are not specified + textureGather(samp2D, P, bias); // illegal, bias is specified while comp is not + textureGather(samp2D, P, comp); // legal, comp is specified while bias is not + textureGather(samp2D, p, comp, bias); // legal both comp and bias are specified + + (2) Which level-of-detail do texture gather functions use, if the extension is defined? + + RESOLVED: If GL_AMD_texture_gather_bias_lod extension is *enabled*, *all* texture + gather functions (ie. the ones which do not take the extra bias argument and + the ones that do) fetch texels from implicit LOD in fragment shader stage. In all + other shader stages, base level is used instead. + + If the extension is *disabled*, all texture gather functions always fetch texels + from the base mip level. + + +Revision History + + Rev. Date Author Changes + ---- -------- -------- --------------------------------------------------------------------- + 5 05/10/17 dwitczak Added issue 2. + + 4 01/24/17 dwitczak Fix sparseTextureGatherOffsetsARB() and + sparseTextureGatherLodOffsetAMD() function prototypes. + + 3 11/17/16 rexu Clarify that when parameter is specified, the optional + parameter, prior to , should be specified as well based on + the calling rules of default parameters. + + 2 11/16/16 rexu Add the interaction with ARB_sparse_texture2. + + 1 11/15/16 rexu Initial draft. diff --git a/opengles/extensions/AMD/AMD_texture_texture4.txt b/opengles/extensions/AMD/AMD_texture_texture4.txt new file mode 100644 index 0000000000..60ecd4a0be --- /dev/null +++ b/opengles/extensions/AMD/AMD_texture_texture4.txt @@ -0,0 +1,299 @@ +Name + + AMD_texture_texture4 + +Name Strings + + GL_AMD_texture_texture4 + +Contact + + Bill Licea-Kane, AMD ( Bill.Licea-Kane 'at' amd.com ) + +Contributors + + Pierre Boudier + Eric Boumaour + Alex Chalfin + Nick Haemel + Evan Hart + Bill Licea-Kane + Benj Lipchak + Lijun Qu + +Status + + Complete + +Version + + Last Modified Date: Mar 6, 2009 + Revision: 6 + +Number + + 362 + +Dependencies + + OpenGL 1.1 is required. + + The extension is written against the OpenGL 2.0 Specification. + + The extension is written against the OpenGL Shading Language V 1.20 + Specification. + + This extension interacts with EXT_texture_anisotropic. + + +Overview + + This extension adds new shading language built-in texture functions + to the shading language. + + These texture functions may be used to access one component textures. + + The texture4 built-in function returns a texture value derived from + a 2x2 set of texels in the image array of level levelbase is selected. + These texels are selected in the same way as when the value of + TEXTURE_MIN_FILTER is LINEAR, but instead of these texels being + filtered to generate the texture value, the R, G, B and A texture values + are derived directly from these four texels. + +IP Status + + No known claims. + +New Procedures and Functions + + None + +New Tokens + + None + +Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL +Operation) + + None + +Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) + + Add to section 3.8.8 (P. 174, Prior to "And for a one-dimensional texture"): + + "For a texture4 built-in function (see OpenGL Shading Language), a 2x2 set + of texels in the image array of level levelbase is selected. These + texels are selected in the same way as when the value of TEXTURE_MIN_FILTER + is LINEAR, but instead of these texels being filtered to generate the + texture value, the R, G, B and A texture values are derived directly + from these four texels, + + TauR = Taui0j1 (3.26a) + TauG = Taui1j1 + TauB = Taui1j0 + TauA = Taui0j0 + + ___________________________________________________________________ + | | + | 1.0 +---+---+---+---+---+---+---+---+ | + | 7| | | | | | | | | | + | +---+---+---+---+---+---+---+---+ | + | 6| | | | | | R | G | | | + | +---+---+---+---+---+---+---+---+ | + | 5| | | | | | A | B | | | + | +---+---+---+---+---+---+---+---+ | + | 4| | | | | | | | | | + | +---+---+---+---+---+---+---+---+ | + | 3| | | | | | | | | | + | +---+---+---+---+---+---+---+---+ | + | 2| | | | | | | | | | + | +---+---+---+---+---+---+---+---+ | + | 1| | | | | | | | | | + | +---+---+---+---+---+---+---+---+ | + | 0| | | | | | | | | | + | 0.0 +---+---+---+---+---+---+---+---+ | + | 0 1 2 3 4 5 6 7 | + | 0.0 1.0 | + | | + | Figure 3.10a. An example of an 8x8 texture image and the | + | components returned for texture4. | + | | + |_________________________________________________________________| + + + To achieve this packing, the use of texture4 is + restricted to textures with a single component base internal format of + ALPHA, DEPTH_COMPONENT, INTENSITY, or LUMINANCE and cannot be used + with a three-dimensional texture (see section 3.8.10)." + + Add to caption of Table 3.21 (p. 184) + + "If the texture4 built-in function is used to access a sampler, + texture source components are derived as if the Texture Base + Internal Format is RGBA. + + Add to Section 3.11.2, Shader Execution, Texture Access + (p. 195) Prior to paragraph beginning "If a fragment shader uses a sampler..." + + Texture4 lookups must be consistent with the texture state; the + results of the texture4 lookup are undefined if: + + - The base internal format of the texture not one of ALPHA, + DEPTH_COMPONENT, INTENSITY, or LUMINANCE. + + - The wrap modes is not either CLAMP_TO_EDGE or REPEAT. + +Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment +Operations and the Frame Buffer) + + None + +Additions to Chapter 5 of the OpenGL 2.0 Specification (Special +Functions) + + None + +Additions to Chapter 6 of the OpenGL 2.0 Specification (State and +State Requests) + + None + +Additions to Chapter 1 of the OpenGL Shading Language 1.20 Specification +(Introduction) + +Additions to Chapter 2 of the OpenGL Shading Language 1.20 Specification +(Overview of OpenGL Shading) + +Additions to Chapter 3 of the OpenGL Shading Language 1.20 Specification +(Basics) + +Additions to Chapter 4 of the OpenGL Shading Language 1.20 Specification +(Variables and Types) + +Additions to Chapter 5 of the OpenGL Shading Language 1.20 Specification +(Operators and Expressions) + +Additions to Chapter 6 of the OpenGL Shading Language 1.20 Specification +(Statements and Structure) + +Additions to Chapter 7 of the OpenGL Shading Language 1.20 Specification +(Built-in Variables) + +Additions to Chapter 8 of the OpenGL Shading Language 1.20 Specification +(Built-in Functions) + + Add to 8.7, Texture Lookup Functions + (p. 85) prior to paragraph beginning "In all functions below..." + + Add to 8.7, Texture Lookup Functions, + (p. 85) to the texture built-in function table: + + Syntax + vec4 texture4( sampler2D sampler, vec2 coord) + Description + Use the texture coordinate coord to do a texture lookup + in the 2D texture currently bound to sampler, and return + the four nearest (unfiltered) texels. + +Additions to Chapter 9 of the OpenGL Shading Language 1.20 Specification +(Shading Language Grammar) + +Additions to Chapter 10 of the OpenGL Shading Language 1.20 +Specification (Issues) + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None + +Interactions with EXT_texture_filter_anisotropic + + Texture4 is not an area filter. No LOD calculations are performed + and only texels in the baselevel can be returned. + + Therefore, for the texture4 built-in function the preferred implementation + would sample four texels even if TEXTURE_MAX_ANISOTROPY_EXT is greater than 1.0. + +Issues + + 1) How is this related to ATI_texture_nearest_four? + + ATI_texture_nearest_four only set texture filter state. + + This extension adds built-in functions to the shading language + that will fetch four texels from the baselevel. + + 2) What about extending this to allow texture4 fetches from + RG, RGB, and RGBA textures? + + Resolution - defer. This extension only fetches from one component + textures. + + 3) What about the use of this extension with fixed function? + + Resolution - The built-in functions are added to the shading + language only. There is no ability to fetch four texels in + fixed function. + + 4) What naming convention do we use for the new texture built-in + functions? + + Resolution - Even though this extension is written against + OpenGL Shading Language 1.20, we use the naming convention + for OpenGL Shading Language 1.30. + + 5) Should we add built-in texture functions for: + * Fetch4 with Absolute LOD? + * Fetch4 with Relative LOD? + * Fetch4 with coordinate offsets? + * Fetch4 with compare? + + Resolved - No. + + 6) If the texture is not a single component, or if the + wrap modes are not clamp_to_edge or repeat, is the texture + treated as incomplete, or are the values returned by the + texture4 built-in undefined? + + Unresolved. This draft makes them undefined. + + 7) Can both texture *AND* texture4 built-in functions + sample from the same sampler in a shader? + + No. + +Revision History: + + Date: 03/06/2008 + Revision: 6 (wwlk) + Remove redundant s (Apple v Microsoft) + + Date: 03/04/2008 + Revision: 5 (wwlk) + General cleanup for posting to registry. + + Date: 01/15/2009 + Revision: 4 (wwlk) + Updated IP Status. + + Date: 06/24/2008 + Revision: 3 (wwlk) + Deleted mip-mapping section. (Inadvertent undelete.) + + Date: 06/24/2008 + + Revision: 2 (wwlk) + Dropped texture filter state. + Document restrictions of texture4. (Baselevel only.) + + + Date: 06/18/2008 + Revision: 1 (wwlk) + 1st draft derived from ATI_texture_nearest_four diff --git a/opengles/extensions/AMD/AMD_transform_feedback3_lines_triangles.txt b/opengles/extensions/AMD/AMD_transform_feedback3_lines_triangles.txt new file mode 100644 index 0000000000..4c7831742b --- /dev/null +++ b/opengles/extensions/AMD/AMD_transform_feedback3_lines_triangles.txt @@ -0,0 +1,114 @@ +Name + + AMD_transform_feedback3_lines_triangles + +Name Strings + + GL_AMD_transform_feedback3_lines_triangles + +Contributors + + Eric Zolnowski, AMD + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Status + + Complete. Shipping in ATI Catalyst 10.6 Drivers. + +Version + + Last Modified Date: 03/22/2010 + Author Revision: 1 + +Number + + 397 + +Dependencies + + OpenGL 4.0 or ARB_transform_feedback3 is required. + + This extension is written against the OpenGL 4.0 (Core) Specification. + +Overview + + OpenGL 4.0 introduced the ability to record primitives into multiple output + streams using transform feedback. However, the restriction that all streams + must output POINT primitives when more than one output stream is active was + also introduced. This extension simply removes that restriction, allowing + the same set of primitives to be used with multiple transform feedback + streams as with a single stream. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Additions to Chapter 2 of the OpenGL 4.0 (Core) Specification (OpenGL Operation) + + Modify Section 2.13.4 "Geometry Shader Execution Environment" + + Replace the last paragraph of the subsection titled "Geometry Shader + Vertex Streams", p.119, with the following: + + Geometry shaders that emit vertices into multiple vertex streams are + currently limited to using the same output primitive type on all streams. + A program will fail to link if it includes a geometry shader that calls + the EmitStreamVertex buit-in function and has two or more output streams + with different primitive types. + +Additions to Chapter 3 of the OpenGL 4.0 (Core) Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 4.0 (Core) Specification (Per-Fragment Operations +and the Framebuffer) + + None. + +Additions to Chapter 5 of the OpenGL 4.0 (Core) Specification (Special +Functions) + + None. + +Additions to Chapter 6 of the OpenGL 4.0 (Core) Specification (State and +State Requests) + + None. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + None. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 1 03/22/2010 gsellers Initial draft diff --git a/opengles/extensions/AMD/AMD_transform_feedback4.txt b/opengles/extensions/AMD/AMD_transform_feedback4.txt new file mode 100644 index 0000000000..ddea238041 --- /dev/null +++ b/opengles/extensions/AMD/AMD_transform_feedback4.txt @@ -0,0 +1,291 @@ +Name + + AMD_transform_feedback4 + +Name Strings + + GL_AMD_transform_feedback4 + +Contributors + + Graham Sellers, AMD + Eric Zolnowski, AMD + +Contact + + Graham Sellers (graham.sellers 'at' amd.com) + +Status + + Shipping + +Version + + Last Modified Date: 31/04/2014 + Author Revision: 5 + +Number + + OpenGL Extension #450 + +Dependencies + + OpenGL 4.0 or ARB_transform_feedback3 is required. + + This extension is written against the OpenGL Specification, Version 4.4 + (Core Profile). + + This extension is written against the OpenGL Shading Language (GLSL) + Specification, Version 4.40 + +Overview + + Transform feedback is a mechanism to record the output of the vertex, + tessellation evaluation or geometry shader into one or more buffers for + further processing, recursive rendering or read-back by the client. + ARB_transform_feedback3 (and OpenGL 4.0) extended the transform feedback + subsystem to allow multiple streams of primitive information to be + captured. However, it imposed a limitation that the primitive type for all + streams must be POINTS if more than one stream is to be captured. + AMD_transform_feedback3_lines_triangles relaxed that restriction to allow + lines or triangles to be captured, in the case where multiple streams are + to be processed. However, it still required that all streams share the same + primitive type. Additionally, with all current extensions to transform + feedback, only a single primitive stream may be rasterized. + + This extension enhances transform feedback in two significant ways. First, + it allows multiple transform feedback streams to be captured, each with its + own, independent primitve type. Second, it allows any combination of streams + to be rasterized. As an example, this enables the geometry shader to take + a single stream of triangle geometry and emit filled triangles with a + wireframe outline and a point at each vertex, all in a single pass through + the input vertices. Combined with features such those provided by + ARB_viewport_array, layered rendering, shader subroutines and so on, an + application can render several views of its geoemtry, each with a + radically different style, all in a single pass. + +IP Status + + None. + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the parameter of Enablei, Disablei and IsEnabledi: + + STREAM_RASTERIZATION_AMD 0x91A0 + +Additions to Chapter 11 of the OpenGL 4.4 (Core Profile) Specification +(Programmable Vertex Processing) + + Modify subsection 11.3.4.3, "Geometry Shader Vertex Streams": + + Replace the second to last paragraph of the subsection with: + + The primitives emitted to all vertex streams are passed to the transform + feedback stage to be captured and written to buffer objects in the manner + specified by the transform feedback state. The primitives emitted to vertex + streams for which rasterization is enabled are then passed to subsequent + pipeline stages for clipping, rasterization, and subsequent fragment + processing. + + Replace the last paragraph of the subsection with: + + Geometry shaders that emit vertices to multiple vertex streams may + generate a different primitive type on each stream. Any combination of + streams may be rasterized (see Section 3.1). This allows a geometry shader + to transform a single input vertex stream into multiple primitives of + different types, all of which may be rasterized. + +Additions to Chapter 14 of the OpenGL 4.4 (Core Profile) Specification +(Fixed-Function Primitive Assembly and Rasterization) + + Modify Section 14.1 "Discarding Primitives Before Rasterization", p. 409: + + Primitives sent to any vertex stream (see section 13.2) may be processed + further. When geometry shaders are disabled, all vertices are considered + to be emitted to stream zero. + Primitives can be optionally discarded before rasterization but after + the optional transform feedback stage (see section 13.2). All primitives + may be discarded by calling Enable with RASTERIZER_DISCARD. When enabled, + primitives emitted to any stream are discarded. When enabled, + RASTERIZER_DISCARD also causes the Clear and ClearBuffer* commands to be + ignored. When RASTERIZER_DISCARD is disabled, primitives emitted on streams + for which rasterization is enabled are passed through to the rasterization + stage to be processed normally. Rasterization for specific streams may be + enabled by calling Enablei (or disabled by calling Disablei) with the + constant STREAM_RASTERIZATION_AMD and the index of the selected stream. + Initially, rasterization is enabled for stream zero and is disabled for all + other streams. + If primitives are emitted on more than one stream for which + rasterization is enabled, the order of rasterization of primitives on + different streams is undefined. However, it is guaranteed that all + primitives emitted on a single stream are rasterized in the order in which + they are generated, and that all primitives generated by a single invocation + of a geometry shader are rasterized in stream order, starting with the + lowest numbered stream. + +Additions to Chapter 15 of the OpenGL 4.4 (Core Profile) Specification +(Programmable Fragment Processing) + + Modify Section 15.2, "Shader Execution" + + Insert the following paragraph to subsection 15.2.2, "Shader Inputs", + after the paragraph describing gl_SamplePosition on p. 433: + + The built-in read-only variable gl_StreamID contains the index of the + vertex stream from which the vertices forming the primitive currently being + rasterized were taken. User defined input varying variables belonging to + this stream have defined values, whilst all other user defined input + variables are undefined. When no geometry shader is active, gl_StreamID + is zero. When a geometry shader is active and writes to multiple output + vertex streams for which rasterization is enabled, gl_StreamID may range + from zero to the value of MAX_VERTEX_STREAMS - 1. + +Modifications to Chapter 4 of the OpenGL Shading Language Specification, +Version 4.40 (Variables and Types) + + Append to the end of Section 4.4.1 "Input Layout Qualifiers" + + The identifier is used to specify that a fragment shader input + variable or block is associated with a particular vertex stream (numbered + beginning with zero). A default stream number may be declared at global + scope by qualifying interface qualifier out as in this example: + + layout (stream = 1) in; + + The stream number specified in such a declaration replaces any previous + default and applies to all subsequent block and variable declarations until + a new default is established. The initial default stream number is zero. + + Each input block or non-block input variable is associated with a + vertex stream. If the block or variable is declared with the + identifier, it is associated with the specified stream; otherwise, it is + associated with the current default stream. A block member may be declared + with a stream identifier, but the specified stream must match the stream + associated with the containing block. One example: + + layout (stream = 1) in; // default is now stream 1 + out vec4 var1; // var1 belongs to default stream (1) + layout (stream = 2) in Block1 { // "Block1" belongs to stream 2 + layout (stream = 2) vec4 var2; // redundant block member stream decl + layout (stream = 3) vec2 var3; // ILLEGAL (must match block stream) + vec3 var4; // belongs to stream 2 + }; + layout (stream = 0) in; // default is now stream 0 + in vec4 var5; // var5 belongs to default stream (0) + in Block2 { // "Block2" belongs to default stream (0) + vec4 var6; + }; + layout ( stream = 3) in vec4 var7; // var7 belongs to stream 3 + + Each fragment processed by the fragment shader receives its input + variables from a specific stream corresponding to the stream upon which the + source vertices were emitted in the geometry shader. Each invocation of + the fragment shader processes a fragment belonging to a primitive generated + from vertices emitted to a single stream. The index of the stream to which + these vertices belong is available in the built-in variable gl_StreamID + (see Section 7.1, "Built-in Language Variables"). Only those input variables + belonging to the current stream have defined values. Reading from a variable + belonging to any other stream may cause undefined behavior, including + program termination. + +Modifications to Chapter 7 of the OpenGL Shading Language Specification, +Version 4.40 (Built-in Variables) + + Add to the list of built-in variables in the fragment language, sec. 7.1, + p.122. + + in int gl_StreamID; + + Insert the following paragraph after the description of gl_SamplePosition + on p.122: + + The input variable gl_StreamID indicates the vertex stream from which + vertices were taken to generate the primitive to which the current fragment + belongs. This information may be used to deduce which of the fragment + shader input variables contain defined values. Reading from input variables + belonging to a vertex stream other than that indicated by gl_StreamID + may produce undefined behavior, possibly including application termination. + +Modifications to Chapter 8 of the OpenGL Shading Language Specification, +Version 4.40 (Built-in Functions) + + Remove the final paragraph of section 8.15 "Geometry Shader Functions" on + p.180, which disallows shaders with multiple streams that are not all + set to POINTS primitive type. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + INVALID_VALUE is generated by Enablei, Disablei and IsEnabledi if + is STREAM_RASTERIZATION_AMD and is greater than or equal to + MAX_VERTEX_STREAMS_AMD. + +New State + + Append to table 23.9, Rasterization + + +---------------------------------------------------+-----------+-------------------+---------------+-----------------------------------------------+-------+ + | | | Get | Initial | | | + | Get Value | Type | Command | Value | Description | Sec. | + +---------------------------------------------------+-----------+-------------------+---------------+-----------------------------------------------+-------+ + | STREAM_RASTERIZATION_AMD | nxB | GetBoolean | See 14.1 | Per stream rasterizer enable | 14.1 | + +---------------------------------------------------+-----------+-------------------+---------------+-----------------------------------------------+-------+ + +Issues + + 1) Why is rasterization order undefined? + + DISCUSSION: Implementations typically break large draws into chunks and + process each separately. Within each chunk, the rasterization order is + guaranteed. Between chunks, ordering is also guaranteed - everything in + early chunks is rasterized before later chunks. However, this means + that primitives emitted to higher numbered streams in early chunks will + be rasterized before primitives emitted to lower numbered streams in + later chunks. Because the boundaries between chunks are not necessarily + in fixed positions, it is not possible to specify where they will be and + therefore guarantee rasterization order. + + 2) Is this still useful then? + + RESOLVED: Yes, sure. If rendering is order independent (depth test on, + blending off for example), or can be guaranteed to not overlap (viewport + arrays, layered rendering and so on), it makes no difference whether + rasterization order between streams is guaranteed or not. + + 3) What's the need for multiple 'streams' in the fragment shader? + + DISCUSSION: In unextended OpenGL, the inputs to the fragment shader are + derived from the vertices generated on stream 0 in the geometry shader + (the vertex shader always writes to stream 0). When multiple streams can + be rasterized, the fragment shader can be invoked as part of a primitive + on any stream. As each stream can have wildly different outputs in the + geometry shader, it is really not possible to have only a single set + of inputs in the fragment shader. Therefore, we expose each stream + independently. Only those variables written by the geometry shader on the + stream from which the current primitive was generated will be defined, + and the others will likely have garbage in them (aliases of the real + variables). That stream is given by the new gl_StreamID built-in in the + fragment shader. Other built-in variables (such as gl_FragCoord) are + always available on any stream. + +Revision History + + Rev. Date Author Changes + ---- ---------- -------- ----------------------------------------- + 5 31/04/2014 gsellers Update for OpenGL 4.4, ready for posting. + 4 12/03/2012 gsellers Update against OpenGL 4.3. + 3 05/01/2011 gsellers Assign enumerants + 2 10/14/2010 gsellers Add fragment shader streams. + 1 10/11/2010 gsellers Initial revision diff --git a/opengles/extensions/AMD/AMD_vertex_shader_layer.txt b/opengles/extensions/AMD/AMD_vertex_shader_layer.txt new file mode 100644 index 0000000000..2c558a6aa0 --- /dev/null +++ b/opengles/extensions/AMD/AMD_vertex_shader_layer.txt @@ -0,0 +1,242 @@ +Name + + AMD_vertex_shader_layer + +Name Strings + + GL_AMD_vertex_shader_layer + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Contributors + + Graham Sellers + +Status + + Shipping. + +Version + + Last Modified Date: March 19, 2012 + Revision: 3 + +Number + + 417 + +Dependencies + + OpenGL 3.0 or EXT_texture_array is required. + + OpenGL 3.2 and ARB_geometry_shader4 affect the definition of this + extension. + + The extension is written against the OpenGL 4.2 Specification, Core Profile, + January 19, 2012 and the OpenGL Shading Language Specification, version + 4.20.11. + +Overview + + The gl_Layer built-in shading language variable was introduced with the + ARB_geometry_shader extension and subsequently promoted to core OpenGL + in version 3.2. This variable is an output from the geometry shader stage + that allows rendering to be directed to a specific layer of an array + texture, slice of a 3D texture or face of a cube map or cube map array + attachment of the framebuffer. Thus, this extremely useful functionality is + only available if a geometry shader is present - even if the geometry shader + is not otherwise required by the application. This adds overhead to the + graphics processing pipeline, and complexity to applications. It also + precludes implementations that cannot support geometry shaders from + supporting rendering to layered framebuffer attachments. + + This extension exposes the gl_Layer built-in variable in the vertex shader, + allowing rendering to be directed to layered framebuffer attachments with + only a vertex and fragment shader present. Combined with features such + as instancing, or static vertex attributes and so on, this allows a wide + variety of techniques to be implemented without the requirement for a + geometry shader to be present. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Additions to Chapter 2 of the OpenGL 4.2 (Core) Specification (OpenGL Operation) + + Add the following paragraph to the "Shader Outputs" subsection of + section 2.11, "Vertex Shaders" on p. 112. + + The built-in special variable gl_Layer, if written, holds the layer to + which rendering should be directed and is discussed in the next subsection. + + Insert the following subsection after the "Shader Outputs" subsection on + p.112. + + "Layered Rendering" + + Vertex shaders can be used to render to one of several different layers + of cube map textures, three-dimensional textures, or one- or two-dimensional + texture arrays. This functionality allows an application to bind an entire + complex texture to a framebuffer object, and render primitives to arbitrary + layers computed at run time. For example, it can be used to project and + render a scene onto all six faces of a cube map texture in one pass. The + layer to render to is specified by writing to the built-in output variable + gl_Layer. Layered rendering requires the use of framebuffer objects + (see section 4.4.7). + + Replace the first paragraph of the "Layer and Viewport Selection" subsection + of section 2.13, "Geometry Shaders", p.150 with: + + The special built-in variable gl_Layer is available to geometry + shaders to direct rendering to a specific layer of a layered framebuffer + attachment and has the same effect as the similarly named variable in the + vertex shader. + +Additions to Chapter 3 of the OpenGL 4.2 (Core) Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 4.2 (Core) Specification (Per-Fragment Operations +and the Framebuffer) + + Modify section 4.4.7, "Layered Framebuffers", p. 339: + + Remove the first bullet point from the list on p. 339. + Modify the second bullet point to read: + + * the current vertex or geometry shader (if present) does not statically + assign a value to the built-in output variable gl_Layer. + + Modify the following paragraph to read: + + Otherwise, the layer for each point, line or triangle generated by + primitive assembly, or emitted by the geometry shader (if present) is taken + from the gl_Layer output of one of the vertices of the primitive. The + vertex used is implementation-dependent. To obtain defined results, all + vertices of a single primitive (including strips, fans and loops) should + receive the same value for gl_Layer. When a geometry shader is present, + since the EndPrimitive built-in function starts a new output primitive, + defined results can be achieved if EndPrimitive is called between two + vertices emitted with different layer numbers. A layer number written by a + vertex or geometry shader has no effect if the framebuffer is not layered. + +Additions to Chapter 5 of the OpenGL 4.2 (Core) Specification (Special +Functions) + + None. + +Additions to Chapter 6 of the OpenGL 4.2 (Core) Specification (State and +State Requests) + + None. + +Additions to Chapter 7 of the OpenGL Shading Language Specification, Version 4.20 + + Add to the list of vertex shader built-in variables, Section 7.1, p.97: + + out int gl_Layer; + + Modify the first paragraph on p.100, describing gl_Layer as follows: + + The output variable gl_Layer is available only in the vertex and + geometry languages, and is used to select ... See section 2.11.11, + "Shader Exection" (under "Shader Outputs") and section 4.4.7, "Layered + Framebuffers" in the OpenGL Graphics System for more information. + + Add the following paragraph after the discussion of cube-map arrays on + p.101: + + Should a vertex shader write to gl_Layer when a geometry shader is + present, this value will be discarded and the value written to gl_Layer + by the geometry shader (if any) will be used instead. If the geometry + shader does not write to gl_Layer, layer zero will be assumed. If + selection of layer by the vertex shader is desired in the presence of a + geometry shader, the layer should be communicated from the vertex shader + to the geometry shader via a user defined varying per-vertex and the + geometry shader used to copy the appropriate value to the gl_Layer output + variable. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Interaction with versions of OpenGL prior to 3.2 or with the absence of +ARB_geometry_shader4 + + If geometry shaders are not supported, remove all references to geometry + shaders. gl_Layer is still introduced in the vertex shader. However, + layered framebuffer attachments were also introduced with geometry shaders, + and so this extension is of limited use. In order to expose this extension + on an implementation that does not support geometry shaders in a meaningful + way, it may be necessary to introduce an extension that adds layered + framebuffer attachments alone. + +Issues + + 1) What happens when there is a tessellation shader in the pipe? + + RESOLVED: gl_Layer is not exposed to tessellation shaders. The primary + motivation for this extension is to allow simple applications using only + vertex and fragment shaders to take advantage of layered rendering. To use + vertex-shader specified layers in a program that uses tessellation, the + layer can be passed from vertex to control to evaluation shader and then + a geometry shader can be used to initialize gl_Layer as would be the case + in the absence of this extension. + + 2) Can we use the provoking vertex semantics to decide which layer will + be rendered to in case the vertices of a single primitive are emitted + with different layer index? + + RESOLVED: Yes, the provoking vertex semantics, including + LAYER_PROVOKING_VERTEX remain in place. + + 3) Why we don't introduce layered framebuffers in this extension as we + did in ARB_geometry_shader4? + + RESOLVED: The scope of changes required to introduce layered framebuffer + attachments, cube map attachments, 3D texture attachments and so on would + be quite large and serve little purpose, at least as far as AMD's + implementation of this extension is concerned. However, requiring + ARB_geometry_shader4 is not conducive to allowing support for this + extension in the absence of geometry shader support. Therefore, we decided + to expose only the layer functionality here and leave it to said + hypothetical implementation to define the behavior of layered attachments + as a separate extension. + + 4) What happens if the VS writes gl_Layer while there is a geometry shader + present? + + RESOLVED: The value written by the VS is lost and the value written by + the GS (if any) is used. If the GS does not write gl_Layer then layer + zero is assumed. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 3 19/03/2012 gsellers Address final feedback. + 2 15/03/2012 gsellers Ready for posting in repository. + 1 04/05/2011 gsellers Initial draft diff --git a/opengles/extensions/AMD/AMD_vertex_shader_tessellator.txt b/opengles/extensions/AMD/AMD_vertex_shader_tessellator.txt new file mode 100644 index 0000000000..9c91ac3f8e --- /dev/null +++ b/opengles/extensions/AMD/AMD_vertex_shader_tessellator.txt @@ -0,0 +1,641 @@ +Name + + AMD_vertex_shader_tessellator + +Name Strings + + GL_AMD_vertex_shader_tessellator + +Contact + + Bill Licea-Kane, AMD ( Bill.Licea-Kane 'at' amd.com ) + +Status + + Complete + +Version + + Last Modified Date: 2009-03-06 + Author Revision: 8 + +Number + + 363 + +Dependencies + + + OpenGL 2.0 is required. + + EXT_gpu_shader4 affects the definition of this extension. + + EXT_geometry_shader4 affects the definition of this extension. + + This extension interracts with AMDX_vertex_shader_tesselator. + + This extension is written against the OpenGL Shading Language + 1.20 Specification. + + The extension is written against the OpenGL 2.1 Specification. + +Overview + + The vertex shader tessellator gives new flexibility to the shader + author to shade at a tessellated vertex, rather than just at a + provided vertex. + + In unextended vertex shading, the built-in attributes such as + gl_Vertex, gl_Normal, and gl_MultiTexcoord0, together with the + user defined attributes, are system provided values which are + initialized prior to vertex shader invocation. + + With vertex shading tessellation, additional vertex shader special + values are available: + + ivec3 gl_VertexTriangleIndex; // indices of the three control + // points for the vertex + vec3 gl_BarycentricCoord; // barycentric coordinates + // of the vertex + + i o + |\ + | \ + *--* + |\ |\ + | \| \ + *--*--* + |\ |\ |\ + | \| \| \ + j o--*--*--o k + + Figure 1 A Tessellated Triangle + o = control point (and tessellated vertex) + * = tessellated vertex + + ivec4 gl_VertexQuadIndex; // indices for the four control + // points for the vertex + vec2 gl_UVCoord; // UV coordinates of the vertex + + i o--*--*--o k + |\ |\ |\ | + | \| \| \| + *--*--*--* + |\ |\ |\ | + | \| \| \| + *--*--*--* + |\ |\ |\ | + | \| \| \| + j o--*--*--o l + + Figure 2 A Tessellated Quad + o = control point (and tessellated vertex) + * = tessellated vertex + + When this extension is enabled, conventional built-in attributes + and user defined attributes are uninitialized. The shader writer + is responsible for explicitly fetching all other vertex data either + from textures, uniform buffers, or vertex buffers. + + The shader writer is further responsible for interpolating + the vertex data at the given barycentric coordinates or uv + coordinates of the vertex. + +IP Status + + No known claims. + +New Procedures and Functions + + void TessellationFactorAMD( float factor ); + void TessellationModeAMD( enum mode ); + +New Types + + (None.) + +New Tokens + + Returned by the parameter of GetActiveUniform: + + SAMPLER_BUFFER_AMD 0x9001 + INT_SAMPLER_BUFFER_AMD 0x9002 + UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 + + Accepted by TessellationModeAMD + + DISCRETE_AMD 0x9006 + CONTINUOUS_AMD 0x9007 + + Accepted by GetIntegerv + + TESSELLATION_MODE_AMD 0x9004 + + Accepted by GetFloatv + + TESSELLATION_FACTOR_AMD 0x9005 + +Additions to Chapter 2 of the OpenGL 2.1 Specification +(OpenGL Operation) + + Modify section 2.15.3, "Shader Variables", page 75 + + Add the following new return types to the description of + GetActiveUniform on p. 81. + + SAMPLER_BUFFER_AMD, + INT_SAMPLER_BUFFER_AMD, + UNSIGNED_INT_SAMPLER_BUFFER_AMD. + + Replace section "Samplers" p. 83 with: + + Samplers + + Samplers are special uniforms used in the OpenGL Shading Language + to identify the texture object or vertex buffer object used for + each lookup. + + Samplers and Texture objects + + If the sampler is one of the texture types, the value of a sampler + indicates the texture image unit being accessed. Setting a + sampler's value to i selects texture image unit number i. The values + of i range from zero to the implementation dependent maximum + supported number of texture image units. + + The type of the sampler identifies the target on the texture image + unit. The texture object bound to that texture image unit's target + is then used for the texture lookup. For example, a variable of type + sampler2D selects target TEXTURE 2D on its texture image unit. + Binding of texture objects to targets is done as usual with + BindTexture. Selecting the texture image unit to bind to is done as + usual with ActiveTexture. + + It is not allowed to have variables of different sampler types + pointing to the same texture image unit within a program object. + This situation can only be detected at the next rendering command + issued, and an INVALID OPERATION error will then be generated. + + Samplers and vertex buffer objects + + If the sampler is one of the vertex types, the value of a sampler + indicates the vertex array being accessed. Setting a sampler's + value to i selects vertex array i. The values of i range from zero + to the implementation dependent maximum supported max vertex + attributes. Binding of vertex buffer objects to vertex arrays is + done as usual with BindBuffer. + + It is not allowed to have multiple variables of samplers to the same + vertex array within a program object. This situation can only be + detected at the next rendering command issued, and an INVALID + OPERATION error will then be generated. + + All samplers + + The location of a sampler needs to be queried with + GetUniformLocation, just like any uniform variable. Sampler values + need to be set by calling Uniform1i{v}. Loading samplers with any + of the other Uniform* entry points is not allowed and will result + in an INVALID OPERATION error. + + Active samplers are samplers actually being used in a program + object. The LinkProgram command determines if a sampler is active or + not. The LinkProgram command will attempt to determine if the active + samplers in the shader(s) contained in the program object exceed the + maximum allowable limits. If it determines that the count of active + samplers exceeds the allowable limits, then the link fails (these + limits can be different for different types of shaders). Each active + sampler variable counts against the limit, even if multiple samplers + refer to the same texture image unit. If this cannot be determined + at link time, for example if the program object only contains a + vertex shader, then it will be determined at the next rendering + command issued, and an INVALID OPERATION error will then be + generated. + + Insert section prior to "Validation" on p. 87 + + Tessellation + + If a vertex shader enables GL_AMD_vertex_shader_tessellation, then + the shader writer is responsible for fetching and evaluating the + vertex attributes at the barycentric coordinates of the vertex. + (See the shading language specification.) + + Only indexed triangles or indexed quads may be drawn with such a + shader. Each triangle or quad will introduce generated vertices + (including the original vertices of the triangle or quad) + controlled by: + + void TessellationFactorAMD( float factor ); + + where the factor is a value between 1.0 and 15.0 inclusive + + The introduction of generated vertices is further controlled by: + + void TessellationModeAMD( enum mode ); + + where mode is either DISCRETE_AMD or CONTINUOUS_AMD. + + Add to the list of "begin errors": + + * any two samplers of vertex type refer to the same vertex array. + + * Any sampler bound to a vertex array has vertex buffer object 0 + bound. + + * A vertex shader enables GL_AMD_vertex_shader_tessellation, + statically reads gl_VertexTriangleIndex or gl_BarycentricCoord + and the Implicit Begin mode is NOT GL_TRIANGLES + + * A vertex shader enables GL_AMD_vertex_shader_tessellation, + statically reads gl_VertexQuadIndex or gl_UVCoord and + the Implicit Begin mode is NOT GL_QUADS + + * A vertex shader enables GL_AMD_vertex_shader_tessellation and + the command is RasterPos. + +Additions to Chapter 3 of the OpenGL 2.1 Specification (Rasterization) + +Additions to Chapter 4 of the OpenGL 2.1 Specification (Per-Fragment +Operations and the Frame Buffer) + +Additions to Chapter 5 of the OpenGL 2.1 Specification +(Special Functions) + + +Additions to Chapter 6 of the OpenGL 2.1 Specification (State and State +Requests) + + +Additions to Appendix A of the OpenGL 2.1 Specification (Invariance) + +Modifications to The OpenGL Shading Language 1.20 Specification + + Including the following line in a shader can be used to control the + language features described in this extension: + + #extension GL_AMD_vertex_shader_tessellator : + + where is as specified in section 3.3. + + A new preprocessor #define is added to the OpenGL Shading Language: + + #define GL_AMD_vertex_shader_tessellator 1 + +Additions to Chapter 1 of the OpenGL Shading Language 1.20 Specification +(Introduction) + +Additions to Chapter 2 of the OpenGL Shading Language 1.20 Specification +(Overview of OpenGL Shading) + + 2.1 Vertex Processor + + Change 2nd paragraph to: + + The vertex processor operates on one vertex at a time. It does not + replace graphics operations that require knowledge of several + vertices at a time. While a tessellated vertex however has LIMITED + knowledge of the immediately adjacent control points (three for a + triangle, four for a quad), the vertex processor is still operating + on one tessellated vertex at a time. The vertex shaders running on + the vertex processor must compute the homogeneous position + of the incoming vertex. + + +Additions to Chapter 3 of the OpenGL Shading Language 1.20 Specification +(Basics) + + 3.6 Keywords + + Add the keywords + + __samplerVertexAMD + __isamplerVertexAMD + __usamplerVertexAMD + +Additions to Chapter 4 of the OpenGL Shading Language 1.20 Specification +(Variables and Types) + +4.3.4 Attribute, Change third sentence: + + "Attribute values are read-only as far as the vertex shader is + concerned, unless GL_AMD_vertex_shader_tessellator is enabled. If + GL_AMD_vertex_shader is enabled, they are read-write with undefined + initial values." + +Additions to Chapter 5 of the OpenGL Shading Language 1.20 Specification +(Operators and Expressions) + +Additions to Chapter 6 of the OpenGL Shading Language 1.20 Specification +(Statements and Structure) + +Additions to Chapter 7 of the OpenGL Shading Language 1.20 Specification +(Built-in Variables) + +7.1 Vertex Shader Special Variables + +Add the list of intrinsically declared with the following types: + + // if GL_AMD_vertex_shader_tessellator enabled + + ivec3 gl_VertexTriangleIndex; // may be read + // indices of the three control + // points for the vertex + vec3 gl_BarycentricCoord; // may be read + // barycentric coordinates of the + // vertex + + ivec4 gl_VertexQuadIndex; // may be read + vec2 gl_UVCoord; // may be read + + + If gl_VertexTriangleIndex and/or gl_BarycentricCoord is statically + read by the shader, the shader is a Triangle Tessellator shader. + + If gl_VertexQuadIndex and/or gl_UVCoord is statically read by the + shader, the shader is a Quad Tessellator shader. + + It is a link error if both a Triangle Tessellator shader and a Quad + Tessellator shader are attached to a program. + +7.3 Vertex Shader Built-In Attributes + +Add the following paragraph. + + If GL_AMD_vertex_shader_tessellator is enabled, the values of the + built-in Attributes are undefined. + +Additions to Chapter 8 of the OpenGL Shading Language 1.20 Specification +(Built-in Functions) + +8.7 Texture Lookup Functions + +Rename section to "Lookup Functions" + +Add in front of first sentence: + + Vertex lookup functions are available to the vertex shader. + +Add to the front of the table of functions: + + Syntax: + vec4 vertexFetchAMD( __samplerVertexAMD sampler, int i ); + ivec4 vertexFetchAMD( __isamplerVertexAMD sampler, int i ); + uvec4 vertexFetchAMD( __usamplerVertexAMD sampler, int i ); + + Description: + + If GL_AMD_vertex_shader_tessellator is enabled, fetch the "ith" + element from the vertex buffer bound to the vertex array bound to + the sampler. + +Additions to Chapter 9 of the OpenGL Shading Language 1.20 Specification +(Shading Language Grammar) + +Additions to Chapter 10 of the OpenGL Shading Language 1.20 +Specification (Issues) + +Additions to the AGL/EGL/GLX/WGL Specifications + + None + + +Dependencies on ARB_vertex_shader + + ARB_vertex_shader is required. + +Interactions with EXT_gpu_shader4 + + If EXT_gpu_shader4 is not supported, remove all references to: + + __isamplerVertexAMD + __usamplerVertexAMD + ivec4 vertexFetchAMD + uvec4 vertexFetchAMD + +Interactions with EXT_geometry_shader4 + + If EXT_geometry_shader4 is supported, change the last + paragraph of Section 2.16, Geometry Shaders to: + + A program object that includes a geometry shader must also include + a vertex shader; otherwise a link error will occur. If a program + object that includes a geometry shader also includes a vertex shader + with that has enabled GL_AMD_vertex_shader_tessellator, a link error + will occur. + +Interactions with AMDX_vertex_shader_tessellator + + This extension is symantically identical to the experimental + AMDX_vertex_shader_tessellator. (It has been "promoted" to + non-experimental status.) + + Only the prefix AMDX has been changed to AMD. + Only the suffix AMDX has been changed to AMD. + + We encourage applications and shader writers to migrate from + AMDX to AMD. However, the AMDX entry points, enums, keywords + and function names are not yet deprecated. + +Errors + +New State + +Add to Table 6.5 Vertex Array Data + + Get Value Type Get Command Value Description Sec. Attribute + --------- ---- --------------- ------- -------------------- ---- --------- + TESSELLATION_FACTOR_AMD R GetFloatv 1.0 tessellation factor 2.8 vertex-array + TESSELLATION_MODE_AMD Z_2 GetIntegerv DISCRETE_AMD tessellation mode 2.8 vertex-array + +New Implementation Dependent State + + None. + +Sample Code + +#extension GL_AMD_vertex_shader_tessellator : require + +__samplerVertexAMD Vertex; +__samplerVertexAMD Normal; +__samplerVertexAMD Texcoord0; +__samplerVertexAMD Temperature; +__samplerVertexAMD Pressure; + +attribute float myTemperature; + +void main ( void ) +{ + gl_Vertex = vec4( 0.0 ); + gl_Normal = vec4( 0.0 ); + gl_MultiTexCoord0 = vec4( 0.0 ); + myTemperature = 0.0; + float myPressure = 0.0; // Don't have to interpolate to attribute + + for ( int i=0; i<3; i++ ) + { + float weight = gl_BarycentricCoord[i]; + + gl_Vertex += weight*vertexFetchAMD( Vertex, gl_VertexTriangleIndex[i] ); + gl_Normal += weight*vertexFetchAMD( Normal, gl_VertexTriangleIndex[i] ); + gl_MultiTexCoord0 += weight*vertexFetchAMD( Texcoord0, gl_VertexTriangleIndex[i] ); + myTemperature += weight*vertexFetchAMD( Temperature, gl_VertexTriangleIndex[i] ).x; + myPressure += weight*vertexFetchAMD( Pressure, gl_VertexTriangleIndex[i] ).x; + + } + // Rest of vertex shader goes here.... +} + +Issues + +1) Does this belong conceptually in the pipe as subsuming geometry + shader (after primitive combine) or vertex unpack. + + Vertex unpack. Even though there is "primitive information" it + is limited to the immediate neighborhood. + +2) Do we need a new stage? + + If we add a "tessellation" stage: + + Input to the tessellator is the unpacked vertex attributes, but + each attribute is now an array of size 3, the "superprim" attributes, + plus a barycentric coordinate. + + The output of the tessellator is the varying. + + The varying output of the tessellator then becomes the attributes + input to the vertex shader. + + Alternatively, we can make the "unpack" part of the vertex shader + responsibility. + + No. We'll just make the attributes undefined, and the + "vertex unpack" stage naturally collapses into the vertex shader. + +3) Why make attributes undefined but writable? + + This is the easiest way to have an unpack shader merged into + existing shaders. + +4) What variants of vertexFetch do we need. + + 1D is probably all we need, and probably all we will ever need. + The return types should be vec4, ivec4 and uvec4. + So, we need: + + vec4 vertexFetchAMD( __samplerVertexAMD sampler, int i ); + ivec4 vertexFetchAMD( __isamplerVertexAMD sampler, int i ); + uvec4 vertexFetchAMD( __usamplerVertexAMD sampler, int i ); + +5) How does __samplerVertexAMD and vertexFetchAMD interact with vertex arrays? + + The __samplerVertexAMD becomes an active uniform. As existing + samplers are bound to texture units, the samplerVertex is bound to a + VertexAttrib array, and similarly, the "enable" of the + VertexAttribArray is ignored. vertexFetchAMD will use the size, + type, normalized and stride to fetch the "ith" element from the array + as the following pseudocode: + + if (generic vertex attribute j array normalization flag is set, and + type is not FLOAT or DOUBLE) + VertexAttrib[size]N[type]v + (j, generic vertex attribute j array element i); + else + VertexAttrib[size][type]v + (j, generic vertex attribute j array element i); + +6) What happens if a buffer object is not bound to an array? + + There is no reason why it shouldn't work, but there's also no good + reason to make it work. Undefined. + +7) What about "conventional" OpenGL array state (Vertex, Color, Normal, + TexCoord, etc....)? + + By binding the buffer objects to the appropriate vertexAttrib array, + and setting appropriate size, type, normalized and stride, the + application programmer can access all "conventional" OpenGL array + state? + +8) Are attributes declared or used in the shader "active?" + + For the purposes of GetActiveAttrib, GetAttribLocation and + BindAttribLocation, no. + +9) What about geometry shaders and tessellation? + + Future hardware may relax this restriction, but you can not + successfully link a program that includes a vertex shader that has + enabled GL_AMD_vertex_shader_tessellator and a geometry shader. + +10) What draw calls do we support? + + To the shader writer, everything looks like indexed triangles or + indexed quads, with discrete and continuous tessellation. These + indexed triangles result from a polygon Begin/End object, a + triangle resulting from a triangle strip, triangle fan, or series + of separate triangles, or a quadrilateral arising from a + quadrilateral strip, series of separate quadrilaterals, or a Rect + command. + + Points, Lines and pixel rectangles and bitmaps are unsupported by + a tessellation shader. + +11) Do we need additional enables? + + Lets first see how "implicit" enable of vertex arrays and + tessellation draw calls works. The first follows precedent (samplers + override texture enable hierarchy.) The second seems to follow. + +11) What about begin errors? + + They are evil, but I don't see how they can be avoided. + Clearly sampler validation needs to follow precedent. + +12) What about quads? + + Quads are necessary for subdivision surfaces such as Catmull-Clark. + We have received several significant requests to support subdivision + surfaces. + +Revision History + + Revision 1, 2007-06-26 wwlk + Preliminary review document + + Revision 2, 2007-08-16 wwlk + Review document + + Correct spelling of "tessellate" throughout. Blush. + Rename special variables. + Add additional sampler types. + Remove "1D" from sampler types and vertex fetches. + Add core OpenGL api spec changes. + Add interactions with EXT_gpu_shader4. + Add many issues. + Expanded example shader. + + Revision 3, 2007-08-17 wwlk + Correct edit headers + (OpenGL 1.5 -> OpenGL 2.0) + (Shading Language 1.10 -> Shading Language 1.20) + + Revision 4, 2007-09-21 wwlk + Fix typo in reserved keywords (remove "1D") + Added support for all polygon calls, explicitly disallowing points + lines and RasterPos, + List additional BEGIN errors - yes they are evil. + + Revision 5, 2008-05-22 wwlk + Add quad support + + Revision 6, 2009-03-05 wwlk + General cleanup to ready for posting to repository + + Revision 7, 2009-03-05 wwlk + Promote from AMDX to AMD. + + Revision 8, 2009-03-06 wwlk + Minor update to enums section. + Cleaned up typos and . diff --git a/opengles/extensions/AMD/AMD_vertex_shader_viewport_index.txt b/opengles/extensions/AMD/AMD_vertex_shader_viewport_index.txt new file mode 100644 index 0000000000..b509869eec --- /dev/null +++ b/opengles/extensions/AMD/AMD_vertex_shader_viewport_index.txt @@ -0,0 +1,215 @@ +Name + + AMD_vertex_shader_viewport_index + +Name Strings + + GL_AMD_vertex_shader_viewport_index + +Contact + + Graham Sellers, AMD (graham.sellers 'at' amd.com) + +Contributors + + Graham Sellers + +Status + + Shipping. + +Version + + Last Modified Date: March 15, 2012 + Revision: 2 + +Number + + 416 + +Dependencies + + OpenGL 4.1 or ARB_viewport_array is required. + + The extension is written against the OpenGL 4.2 Specification, Core Profile, + January 19, 2011 and the OpenGL Shading Language Specification, + version 4.20.11. + +Overview + + The gl_ViewportIndex built-in variable was introduced by the + ARB_viewport_array extension and OpenGL 4.1. This variable is available + in un-extended OpenGL only to the geometry shader. When written in the + geometry shader, it causes geometry to be directed to one of an array + of several independent viewport rectangles. + + In order to use any viewport other than zero, a geometry shader must be + present. Geometry shaders introduce processing overhead and potential + performance issues. This extension exposes the gl_ViewportIndex built-in + variable to the vertex shader, allowing the functionality introduced by + ARB_viewport_array to be accessed without requiring a geometry shader to + be present. + +New Procedures and Functions + + None. + +New Tokens + + None. + +Additions to Chapter 2 of the OpenGL 4.2 (Core) Specification (OpenGL Operation) + + Add the following paragraph to the "Output Variables" subsection of + section 2.11, "Vertex Shaders" on p. 106. + + The built-in special variable gl_ViewportIndex, if written, is used to + direct rendering to one of several viewports and is discussed further in + the next section. + + Insert the following subsection after the "Shader Outputs" subsection on + p.106. + + "Viewport Selection" + + Vertex shaders can be used to render to one of several different + viewport rectangles. The destination viewport rectangle for a primitive + may be specified by writing to the built-in output variable + gl_ViewportIndex in the vertex shader. This functionality allows a vertex + shader to direct rendering to one of several viewport rectangles. The + specific vertex of a primitive from which gl_ViewportIndex is taken + is implementation defined and may be determined by calling GetIntegerv with + the symbolic constant VIEWPORT_INDEX_PROVOKING_VERTEX. + + If the value returned is PROVOKING_VERTEX then vertex selection follows the + convention specified to ProvokingVertex (see Section 2.19). If the value + returned is FIRST_VERTEX_CONVENTION, selection is always taken from the + first vertex of the primitive. If the value returned is + LAST_VERTEX_CONVENTION, the selection is always taken from the last vertex + of the primitive. If the value returned is UNDEFINED_VERTEX, the selection + is not guaranteed to be taken from any specific vertex. The vertex + considered the provoking vertex for particular primitive types is given + in table 2.15. + + Replace the second paragraph of the "Layer and Viewport Selection" subsection + of section 2.13, "Geometry Shaders", p.135 (which describes + gl_ViewportIndex) with: + + The special built-in variable gl_ViewportIndex is available to geometry + shaders to direct rendering to a specific viewport in an array of + viewports and has the same effect as the similarly named variable in the + vertex shader. + + Modify section 2.14.1 "Controling the Viewport" as follows: + + Multiple viewports are available and are numbered zero through the value + of MAX_VIEWPORTS minus one. If a vertex or geometry shader is active and + writes to gl_ViewportIndex, the viewport transformation uses the viewport + corresponding to the value assigned to gl_ViewportIndex taken from an + implementation-dependent primitive vertex. If the value of the viewport + index is outside the range zero to the value of MAX_VIEWPORTS minus one, + the results of the viewport transformation are undefined. If the active + vertex shaders or geometry shaders (if present) do not write to + gl_ViewportIndex, the viewport numbered zero is used by the viewport + transformation. + +Additions to Chapter 3 of the OpenGL 4.2 (Core) Specification (Rasterization) + + None. + +Additions to Chapter 4 of the OpenGL 4.2 (Core) Specification (Per-Fragment Operations +and the Framebuffer) + + None. + +Additions to Chapter 5 of the OpenGL 4.2 (Core) Specification (Special +Functions) + + None. + +Additions to Chapter 6 of the OpenGL 4.2 (Core) Specification (State and +State Requests) + + None. + +Additions to Chapter 7 of the OpenGL Shading Language Specification, Version 4.20 + + Add to the list of vertex shader built-in variables, Section 7.1, p. 97: + + out int gl_ViewportIndex; + + Modify the first paragraph on p.101, describing gl_ViewpotIndex as follows: + + The output variable gl_ViewportIndex is available only in the vertex and + geometry languages and provides the index of the viewport to which the next + primitive assembled from the resulting vertices or emitted from the + geometry shader (if present) should be drawn. Primitives generated during + primitive assembly will undergo viewport transformation and scissor testing + using the viewport transformation and scissor rectangle selected by the + value of gl_ViewportIndex. The viewport index used will come from one of + the vertices in the primitive being processed. However, which vertex the + viewport index comes from is implementation-dependent, so it is best to use + the same viewport index for all vertices of the primitive. If a vertex or + geometry shader (if present) does not assign a value to gl_ViewportIndex, + viewport transform and scissor rectangle zero will be used. If a vertex + or geometry shader statically assigns a value to gl_ViewportIndex and there + is a path through the shader that does not assign a value to + gl_ViewportIndex, the value of gl_ViewportIndex is undefined for executions + of the shader that take that path. See section 2.11.11, under "Output + Variables" of the OpenGL Graphics System Specification (Core Profile) for + more information. + +Additions to the AGL/GLX/WGL Specifications + + None. + +GLX Protocol + + None. + +Errors + + None. + +New State + + None. + +New Implementation Dependent State + + None. + +Issues + + 1) What happens when there is a tessellation shader in the pipe? + + RESOVED: gl_ViewportIndex is not exposed to tessellation shaders. The + primary motivation for this extension is to allow simple applications using + only vertex and fragment shaders to take advantage of multiple viewports. + To use vertex-shader specified viewport indices in a program that uses + tessellation, the viewport index can be passed from vertex to control to + evaluation shader and then a geometry shader can be used to initialize + gl_ViewportIndex as would be the case in the absence of this extension. + + 2) What happens if gl_ViewportIndex is written in the vertex shader and + a geometry shader is present? + + RESOLVED: The value written in the VS is lost. If the GS writes + gl_ViewportIndex, that value is used, otherwise the zeroth viewport + is used. + + 3) Are provoking vertex semantics honored for the purposes of writes to + gl_ViewportIndex in the VS? + + RESOLVED: Yes, they are. Query VIEWPORT_INDEX_PROVOKING_VERTEX to determine + the 'provokingness' of gl_ViewportIndex. In general, though, it's best + practice to ensure that all vertices of a single primitive (including + strips, fans and loops) have the same value for gl_ViewportIndex. + +Revision History + + Rev. Date Author Changes + ---- -------- -------- ----------------------------------------- + + 2 03/15/2012 gsellers Finalize for posting in public repository + 1 04/05/2011 gsellers Initial draft diff --git a/opengles/extensions/AMD/GLX_AMD_gpu_association.txt b/opengles/extensions/AMD/GLX_AMD_gpu_association.txt new file mode 100644 index 0000000000..c9e0a930b9 --- /dev/null +++ b/opengles/extensions/AMD/GLX_AMD_gpu_association.txt @@ -0,0 +1,462 @@ +Name + + AMD_gpu_association + +Name Strings + + GLX_AMD_gpu_association + +Contact + + David Mao, AMD (david.mao 'at' amd.com) + +Status + + Complete + +Version + + Last Modified Date: September 18, 2014 + Author Revision: 2 + + Based on: GLX_SGI_make_current_read specification + Date: 3/20/1997 + + EXT_framebuffer_object specification + Date: 2/13/2007 Revision #119 + +Number + + 398 + +Dependencies + + OpenGL 1.5 is required. + + GLX 1.3 is required. + + GL_EXT_framebuffer_object is required. + + GLX_ARB_get_proc_address is required. + + This extension interacts with GLX_SGI_make_current_read. + + This extension interacts with GL_EXT_framebuffer_blit. + + This extension interacts with GLX_ARB_create_context. + + This extension interacts with WGL_AMD_gpu_association. + +Overview + + + There currently is no way for applications to efficiently use GPU + resources in systems that contain more than one GPU. Vendors have + provided methods that attempt to split the workload for an + application among the available GPU resources. This has proven to be + very inefficient because most applications were never written with + these sorts of optimizations in mind. + + This extension provides a mechanism for applications to explicitly + use the GPU resources on a given system individually. By providing + this functionality, a driver allows applications to make appropriate + decisions regarding where and when to distribute rendering tasks. + + The set of GPUs available on a system can be queried by calling + glXGetGPUIDsAMD. The current GPU assigned to a specific context + can be determined by calling glXGetContextGPUIDAMD. Each GPU in a + system may have different performance characteristics in addition + to supporting a different version of OpenGL. The specifics of each + GPU can be obtained by calling glXGetGPUInfo. This will allow + applications to pick the most appropriate GPU for each rendering + task. + + Once all necessary GPU information has been obtained, a context tied + to a specific GPU can be created with glXCreateAssociatedContextAMD. + These associated contexts can be made current with + glXMakeAssociatedContextCurrentAMD and deleted with + glXDeleteAssociatedContextAMD. Only one GPU associated or + non-associated context can be current at one time per thread. + + To provide an accelerated path for blitting data from one context + to another, the new blit function BlitContextFramebufferAMD has + been added. + + + + +New Procedures and Functions + + unsigned int glXGetGPUIDsAMD(unsigned int maxCount, unsigned int *ids); + + int glXGetGPUInfoAMD(unsigned int id, int property, GLenum dataType, + unsigned int size, void *data) + + unsigned int glXGetContextGPUIDAMD(GLXContext ctx); + + GLXContext glXCreateAssociatedContextAMD(unsigned int id, + GLXContext share_list); + + GLXContext glXCreateAssociatedContextAttribsAMD(unsigned int id, + GLXContext share_context, + const int *attribList); + + Bool glXDeleteAssociatedContextAMD(GLXContext ctx); + + Bool glXMakeAssociatedContextCurrentAMD(GLXContext ctx); + + GLXContext glXGetCurrentAssociatedContextAMD(void); + + void glXBlitContextFramebufferAMD(GLXContext dstCtx, GLint srcX0, GLint srcY0, + GLint srcX1, GLint srcY1, GLint dstX0, + GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + +New Tokens + + Accepted by the parameter of glXGetGPUInfo: + + GLX_GPU_VENDOR_AMD 0x1F00 + GLX_GPU_RENDERER_STRING_AMD 0x1F01 + GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 + GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 + GLX_GPU_RAM_AMD 0x21A3 + GLX_GPU_CLOCK_AMD 0x21A4 + GLX_GPU_NUM_PIPES_AMD 0x21A5 + GLX_GPU_NUM_SIMD_AMD 0x21A6 + GLX_GPU_NUM_RB_AMD 0x21A7 + GLX_GPU_NUM_SPI_AMD 0x21A8 + + Accepted by the argument of glXGetGPUInfoAMD: + + GL_UNSIGNED_BYTE + GL_UNSIGNED_INT + GL_INT + GL_FLOAT + + Accepted by the argument of glXBlitContextFramebufferAMD: + + GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT + GL_STENCIL_BUFFER_BIT + +Additions to the WGL Specification + + None. This specification is written for GLX. + +Additions to the GLX 1.4 Specification + + Add a new section in between 3.3.7 and 3.3.8 entitled "GPU + Associated Contexts" + + GPU Associated Contexts + + When multiple GPUs are present, a context can be created for + off-screen rendering that is associated with a specific GPU. + This will allow applications to achieve an app-specific + distributed GPU utilization. + + The IDs for available GPUs can be queried with the command: + + unsigned int glXGetGPUIDsAMD(unsigned int maxCount, unsigned int *ids); + + where is the max number of IDs that can be returned and + is the array of returned IDs. If the function succeeds, + the return value is the number of total GPUs available. The + value 0 is returned if no GPUs are available or if the call has + failed. The array pointer passed into the function will be + populated by the smaller of maxCount or the total GPU count + available. The ID 0 is reserved and will not be retuned as a + valid GPU ID. If the array is NULL, the function will + only return the total number of GPUs. will be tightly packed + with no 0 values between valid ids. + + Calling glXGetGPUIDsAMD once with set to zero returns + the total available GPU count which can be used to allocate an + appropriately sized id array before calling glXGetGPUIDsAMD + again to query the full set of supported GPUs. + + Each GPU in a system may have different properties, performance + characteristics and different supported OpenGL versions. To + determine which GPU is best suited for a specific task the + following functions may be used: + + int glXGetGPUInfoAMD(unsigned int id, int property, GLenum dataType, + unsigned int size, void *data); + + is a GPU id obtained from calling glXGetGPUIDsAMD. The GPU ID + must be a valid GPU ID. The function will fail if is an invalid + GPU ID and -1 will be returned. is the information being + queried. may be GL_UNSIGNED_INT, GL_INT, GL_FLOAT, or + GL_UNSIGNED_BYTE and signals what data type is to be returned. + signals the size of the data buffer passed into glXGetGPUInfoAMD. + This is the count of the array of type . is the + buffer which will be filled with the requested information. For a + string, will be the number of characters allocated and will + include NULL termination. For arrays of type GL_UNSIGNED_INT, GL_INT, + and GL_FLOAT will be the array depth. If the function + succeeds, the number of values written will be returned. If the number + of values written is equal to , the query should be repeated with + a larger buffer. Strings should be queried using the + GL_UNSIGNED_BYTE type, are UTF-8 encoded and will be NULL terminated. + If the function fails, -1 will be returned. + + defines the GPU property to be queried, and may be one of + GLX_GPU_OPENGL_VERSION_STRING_AMD, GLX_GPU_RENDERER_STRING_AMD, + GLX_GPU_FASTEST_TARGET_GPUS_AMD, GLX_GPU_RAM_AMD, GLX_GPU_CLOCK_AMD, + GLX_GPU_NUM_PIPES_AMD, GLX_GPU_NUM_SIMD_AMD, GLX_GPU_NUM_RB_AMD, or + GLX_GPU_NUM_SPI_AMD. + + If is not sufficient to hold the entire value for a particular + property, the number of values returned will equal . If + is inappropriate for , for instance INT for a + property which is a string, the function will fail and -1 will be + returned. + + Querying GLX_GPU_OPENGL_VERSION_STRING_AMD returns the highest supported + OpenGL version string and GLX_GPU_RENDERER_STRING_AMD returns name + of the GPU. must be GL_UNSIGNED_BYTE with the previous + properties. Querying GLX_GPU_FASTEST_TARGET_GPUS_AMD returns an array + of the IDs of GPUs with the fastest data blit rates when using + glXBlitContextFramebufferAMD. This list is ordered fastest + first. This provides a performance hint about which contexts and GPUS + are capable of transfering data between each other the quickest. Querying + GLX_GPU_RAM_AMD returns the amount of RAM available to GPU in MB. Querying + GLX_GPU_CLOCK_AMD returns the GPU clock speed in MHz. Querying + GLX_GPU_NUM_PIPES_AMD returns the nubmer of 3D pipes. Querying + GLX_GPU_NUM_SIMD_AMD returns the number of SIMD ALU units in each + shader pipe. Querying GLX_GPU_NUM_RB_AMD returns the number of render + backends. Querying GLX_GPU_NUM_SPI_AMD returns the number of shader + parameter interpolaters. If the being queried is not + applicable for the GPU specified by , the value 0 will be returned. + + Unassociated contexts are created by calling glXCreateNewContext. + Although these contexts are unassociated, their use will still be + tied to a single GPU in most cases. For this reason it is advantageous + to be able to query the GPU an existing unassociated context resides + on. If multiple GPUs are available, it would be undesirable + to use one for rendering to visible surfaces and then chose the + same one for off-screen rendering. Use the following command to + determine which GPU a context is attached to: + + unsigned int glXGetContextGPUIDAMD(GLXContext ctx); + + is the context for which the GPU id will be returned. If the + context is invalid or if an error has occurred, glXGetContextGPUIDAMD + will return 0. + + To create an associated context, use: + + GLXContext glXCreateAssociatedContextAMD(unsigned int id, + GLXContext share_list); + + must be a valid GPU id and cannot be 0. must either + be NULL or that of an associated context created with the the same GPU + ID as . If was created using a different ID, + glXCreateAssociatedContextAMD will fail and return NULL. If a context was + successfully created the handle will be returned by + glXCreateAssociatedContextAMD. If a context could not be created, NULL + will be returned. If a context could not be created, error information + can be obtained by calling GetLastError. Upon successful creation, + no pixel format is tied to an associated context and the context is not + tied to a specific Display. Associated contexts are always direct contexts. + Associated Contexts always support only GLX_RGBA_TYPE rendering type. + + glXCreateAssociatedContextAMD can generate the following errors: + GLXBadContext if is neither zero nor a valid GLX rendering + context; BadMatch if the server context state for share list exists in + an address space that cannot be shared with the newly created context + or if share list was created on a different screen than the one + referenced by config; BadAlloc if the server does not have enough resources + to allocate the new context. + + To create an associated context and request a specific GL version, use: + + GLXContext glXCreateAssociatedContextAttribsAMD(unsigned int id, + GLXContext share_list, const int *attribList) + + All capabilities and limitations of glXCreateContextAttribsARB apply + to glXCreateAssociatedContextAttribsAMD. Additionally, must be + a valid GPU ID and cannot be 0. If a context was successfully created + the handle will be returned by glXCreateAssociatedContextAttribsAMD. + If a context could not be created, NULL will be returned. Upon + successful creation, no pixel format is tied to an associated context. + + must either be NULL or that of an associated context created + with the the same GPU ID as . If was created using a + different ID, glXCreateAssociatedContextAttribsAMD will fail and return NULL. + + glXCreateAssociatedContextAttribsAMD can generate the following errors: + GLXBadContext if is neither zero nor a valid GLX rendering + context; BadMatch if the server context state for share list exists in + an address space that cannot be shared with the newly created context + or if share list was created on a different screen than the one + referenced by config; BadAlloc if the server does not have enough resources + to allocate the new context. + + A context must be deleted once it is no longer needed. Use the + following call to delete an associated context: + + Bool glXDeleteAssociatedContextAMD(GLXContext ctx); + + If the function succeeds, TRUE will be returned, otherwise FALSE is + returned. must be a valid associated context created by + calling glXCreateAssociatedContextAMD. If an unassociated context, + created by calling glXCreateNewContext, is passed into , the + function will fail. An associated context cannot be deleted by calling + glXDestroyContext. If an associated context is passed into + glXDestroyContext, the result is undefiend. + + To render using an associated context, it must be made the current + context for a thread: + + Bool glXMakeAssociatedContextCurrentAMD(GLXContext ctx); + + is a context handle created by calling + glXCreateAssociatedContextAMD. If was created using + glXCreateNewContext, the call will fail, FALSE will be returned and + the error BadAccess will be generated. If is not a valid context + and not NULL, the call will fail, FALSE will be returned and the error + GLXBadContext will be generated. If the call succeeds, TRUE will be + returned. To detach the current associated context, pass NULL as . + + Only one type of context can be current to a thread at a time. If an + unassociated context is current to a thread when + glXMakeAssociatedContextCurrentAMD is called with a valid , it + is as if glxMakeContextCurrent is called first with a ctx value of NULL. + If an associated context is current and glxMakeContextCurrent is called + with a valid context, it is as if glXMakeAssociatedContextCurrentAMD is + called with a ctx value of NULL. + + The current associated context can be queried by calling: + + GLXContext glXGetCurrentAssociatedContextAMD(void); + + The current associated context is returned on a successful call to + this function. If no associated context is current, NULL is returned. + If an unassociated context is current, NULL will be returned. + + An associated context can not be passed in as a parameter into + glXCopyContext. If an associated context is passed into glXCopyContext, + the error GLXBadContext will be generated. + + The addresses returned from glXGetProcAddressARB are only valid for the + current context. It may be invalid to use proc addresses obtained from + a traditional context with an associated context. Furthermore, the + OpenGL version and extensions supported on an associated context may + differ. Each context should be treated seperately, proc addressses + should be queried for each after context creation. + + Calls to glXSwapBuffers when an associated context is current will have + no effect. + + There is no way to use pBuffers with associated contexts. + + Overlays and underlays are not supported with associated contexts. + + The same associated context is used for both write and read operations. + + To facilitate high performance data communication between multiple + contexts, a new function is necessary to blit data from one context + to another. + + VOID glXBlitContextFramebufferAMD(GLXContext dstCtx, GLint srcX0, GLint srcY0, + GLint srcX1, GLint srcY1, GLint dstX0, + GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + + is the context handle for the write context. is the + bitwise OR of a number of values indicating which buffers are to be + copied. The values are GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, and + GL_STENCIL_BUFFER_BIT, which are described in section 4.2.3. The + pixels corresponding to these buffers are copied from the source + rectangle, bound by the locations (srcX0, srcY0) and (srcX1, srcY1), + to the destination rectangle, bound by the locations (dstX0, dstY0) + and (dstX1, dstY1). The lower bounds of the rectangle are inclusive, + while the upper bounds are exclusive. + + The source context is the current GL context. Specifying the current + GL context as the will result in the error + GL_INVALID_OPERATION being generated. If is invalid, the + error GL_INVALID_OPERATION will be generated. If no context is + current at the time of this call, the error GL_INVALID_OPERATION + will be generated. These errors may be queried by calling glGetError. + The target framebuffer will be the framebuffer bound to + GL_DRAW_FRAMEBUFFER_EXT in the context . The source framebuffer + will be the framebuffer bound to GL_READ_FRAMEBUFFER_EXT in the + currently bound context. + + The restrictions that apply to the source and destination rectangles + specified with , , , , , + , and are the same as those that apply for + glBlitFramebufferEXT. The same error conditions exist as for + glBlitFramebufferEXT. + + When called, this function will execute immediately in the currently + bound context. It is up to the caller to maintain appropriate + synchronization between the current context and to ensure + rendering to the appropriate surfaces has completed on the current + and contexts. + +Additions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment +Operations and the Frame Buffer) +Modify the beginning of section 4.4.1 as follows: + + When an assoicated context is bound, the default state for an associated + context is invalid for rendering. Because there is no attached window, + there is no default framebuffer surface to render to. An app created + framebuffer object must be bound for rendering to be valid. If the + object bound to GL_FRAMEBUFFER_BINDING_EXT is 0, it is as if the + framebuffer is incomplete, and an + GL_INVALID_FRAMEBUFFER_OPERATION_EXT error will be generated + where rendering is attempted. + + +New State + + None + + +Interactions with GL_EXT_framebuffer_blit + + If the framebuffer blit extension is not supported, all language + referring to glBlitFramebufferEXT and glXBlitContextFramebufferAMD + is removed. + +Interactions with GL_EXT_framebuffer_object + + If GLX_AMD_gpu_association is supported, a context created with it + will also support EXT_framebuffer_object. + + +Interactions with GLX_SGI_make_current_read + + If the make current read extension is supported, it is invalid to pass + an associated context handle as a parameter to + glXMaketCurrentReadSGI. If an associated context is passed into + glXMaketCurrentReadSGI, the error GLXBadContext will be generated. + +Interactions with GLX_create_context + + If GLX_create_context is not supported, all language + referring to glXCreateAssociatedContextAttribsAMD is removed. + + +Issues + + 1) Should the language for the new context creation methods be added to + GLX 1.4 section 3.3.7 or in a new section? + + Resolved. Although it is also possible to add this exension text to + section 3.3.7, the resulting text would not flow well or be as coherent. + + +Revision History + + + Rev. Date Author Changes + ---- -------- -------- --------------------------------------------- + + 2 09/18/2014 gsellers Fixed types in function prototypes. + Update contact. Minor formatting fixes. + 0.1 11/04/2009 nickh Initial version. diff --git a/opengles/extensions/AMD/WGL_AMD_gpu_association.txt b/opengles/extensions/AMD/WGL_AMD_gpu_association.txt new file mode 100644 index 0000000000..9ed93ed073 --- /dev/null +++ b/opengles/extensions/AMD/WGL_AMD_gpu_association.txt @@ -0,0 +1,502 @@ +Name + + AMD_gpu_association + +Name Strings + + WGL_AMD_gpu_association + +Contact + + Nick Haemel, AMD (nick.haemel 'at' amd.com) + +Status + + Complete + +Version + + Last Modified Date: March 03, 2009 + Author Revision: 1.0 + + Based on: WGL_ARB_make_current_read specification + Date: 3/15/2000 Version: 1.1 + + EXT_framebuffer_object specification + Date: 2/13/2007 Revision #119 + +Number + + 361 + +Dependencies + + OpenGL 1.5 is required. + + WGL_ARB_extensions_string is required. + + GL_EXT_framebuffer_object is required. + + This extension interacts with WGL_ARB_make_current_read. + + This extension interacts with GL_EXT_framebuffer_blit. + + This extension interacts with WGL_ARB_create_context. + + +Overview + + + There currently is no way for applications to efficiently use GPU + resources in systems that contain more than one GPU. Vendors have + provided methods that attempt to split the workload for an + application among the available GPU resources. This has proven to be + very inefficient because most applications were never written with + these sorts of optimizations in mind. + + This extension provides a mechanism for applications to explicitly + use the GPU resources on a given system individually. By providing + this functionality, a driver allows applications to make appropriate + decisions regarding where and when to distribute rendering tasks. + + The set of GPUs available on a system can be queried by calling + wglGetGPUIDsAMD(). The current GPU assigned to a specific context + can be determined by calling wglGetContextGPUIDAMD. Each GPU in a + system may have different performance characteristics in addition + to supporting a different version of OpenGL. The specifics of each + GPU can be obtained by calling wglGetGPUInfo. This will allow + applications to pick the most appropriate GPU for each rendering + task. + + Once all necessary GPU information has been obtained, a context tied + to a specific GPU can be created with wglCreateAssociatedContextAMD. + These associated contexts can be made current with + wglMakeAssociatedContextCurrentAMD and deleted with + wglDeleteAssociatedContextAMD. Only one GPU associated or + non-associated context can be current at one time per thread. + + To provide an accelerated path for blitting data from one context + to another, the new blit function BlitContextFramebufferAMD has + been added. + + + + +New Procedures and Functions + + UINT wglGetGPUIDsAMD(UINT maxCount, UINT *ids); + + INT wglGetGPUInfoAMD(UINT id, INT property, GLenum dataType, + UINT size, void *data) + + UINT wglGetContextGPUIDAMD(HGLRC hglrc); + + HGLRC wglCreateAssociatedContextAMD(UINT id); + + HGLRC wglCreateAssociatedContextAttribsAMD(UINT id, HGLRC hShareContext, + const int *attribList); + + BOOL wglDeleteAssociatedContextAMD(HGLRC hglrc); + + BOOL wglMakeAssociatedContextCurrentAMD(HGLRC hglrc); + + HGLRC wglGetCurrentAssociatedContextAMD(void); + + VOID wglBlitContextFramebufferAMD(HGLRC dstCtx, GLint srcX0, GLint srcY0, + GLint srcX1, GLint srcY1, GLint dstX0, + GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + +New Tokens + + Accepted by the parameter of wglGetGPUInfo: + + WGL_GPU_VENDOR_AMD 0x1F00 + WGL_GPU_RENDERER_STRING_AMD 0x1F01 + WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 + WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 + WGL_GPU_RAM_AMD 0x21A3 + WGL_GPU_CLOCK_AMD 0x21A4 + WGL_GPU_NUM_PIPES_AMD 0x21A5 + WGL_GPU_NUM_SIMD_AMD 0x21A6 + WGL_GPU_NUM_RB_AMD 0x21A7 + WGL_GPU_NUM_SPI_AMD 0x21A8 + + Accepted by the argument of wglGetGPUInfoAMD: + + GL_UNSIGNED_BYTE + GL_UNSIGNED_INT + GL_INT + GL_FLOAT + + Accepted by the argument of wglBlitContextFramebufferAMD: + + GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT + GL_STENCIL_BUFFER_BIT + + +Additions to the GLX Specification + + This specification is written for WGL. + + +GLX Protocol + + This specification is written for WGL. + + +Additions to the WGL Specification + + GPU Associated Contexts + + When multiple GPUs are present, a context can be created for + off-screen rendering that is associated with a specific GPU. + This will allow applications to achieve an app-specific + distributed GPU utilization. + + The IDs for available GPUs can be queried with the command: + + UINT wglGetGPUIDsAMD(UINT maxCount, UINT *ids); + + where is the max number of IDs that can be returned and + is the array of returned IDs. If the function succeeds, + the return value is the number of total GPUs available. The + value 0 is returned if no GPUs are available or if the call has + failed. The array pointer passed into the function will be + populated by the smaller of maxCount or the total GPU count + available. The ID 0 is reserved and will not be retuned as a + valid GPU ID. If the array is NULL, the function will + only return the total number of GPUs. will be tightly packed + with no 0 values between valid ids. + + Calling wglGetGPUIDsAMD once with set to zero returns + the total available GPU count which can be used to allocate an + appropriately sized id array before calling wglGetGPUIDsAMD + again to query the full set of supported GPUs. + + Each GPU in a system may have different properties, performance + characteristics and different supported OpenGL versions. To + determine which GPU is best suited for a specific task the + following functions may be used: + + INT wglGetGPUInfoAMD(UINT id, INT property, GLenum dataType, + UINT size, void *data); + + is a GPU id obtained from calling wglGetGPUIDsAMD. The GPU ID + must be a valid GPU ID. The function will fail if is an invalid + GPU ID and -1 will be returned. is the information being + queried. may be GL_UNSIGNED_INT, GL_INT, GL_FLOAT, or + GL_UNSIGNED_BYTE and signals what data type is to be returned. + signals the size of the data buffer passed into wglGetGPUInfoAMD. + This is the count of the array of type . is the + buffer which will be filled with the requested information. For a + string, will be the number of characters allocated and will + include NULL termination. For arrays of type GL_UNSIGNED_INT, GL_INT, + and GL_FLOAT will be the array depth. If the function + succeeds, the number of values written will be returned. If the number + of values written is equal to , the query should be repeated with + a larger buffer. Strings should be queried using the + GL_UNSIGNED_BYTE type, are UTF-8 encoded and will be NULL terminated. + If the function fails, -1 will be returned. + + defines the GPU property to be queried, and may be one of + WGL_GPU_OPENGL_VERSION_STRING_AMD, WGL_GPU_RENDERER_STRING_AMD, + WGL_GPU_FASTEST_TARGET_GPUS_AMD, WGL_GPU_RAM_AMD, WGL_GPU_CLOCK_AMD, + WGL_GPU_NUM_PIPES_AMD, WGL_GPU_NUM_SIMD_AMD, WGL_GPU_NUM_RB_AMD, or + WGL_GPU_NUM_SPI_AMD. + + If is not sufficient to hold the entire value for a particular + property, the number of values returned will equal . If + is inappropriate for , for instance INT for a + property which is a string, the function will fail and -1 will be + returned. + + Querying WGL_GPU_OPENGL_VERSION_STRING_AMD returns the highest supported + OpenGL version string and WGL_GPU_RENDERER_STRING_AMD returns name + of the GPU. must be GL_UNSIGNED_BYTE with the previous + properties. Querying WGL_GPU_FASTEST_TARGET_GPUS_AMD returns an array + of the IDs of GPUs with the fastest data blit rates when using + wglBlitContextFramebufferAMD. This list is ordered fastest + first. This provides a performance hint about which contexts and GPUS + are capable of transfering data between each other the quickest. Querying + WGL_GPU_RAM_AMD returns the amount of RAM available to GPU in MB. Querying + WGL_GPU_CLOCK_AMD returns the GPU clock speed in MHz. Querying + WGL_GPU_NUM_PIPES_AMD returns the nubmer of 3D pipes. Querying + WGL_GPU_NUM_SIMD_AMD returns the number of SIMD ALU units in each + shader pipe. Querying WGL_GPU_NUM_RB_AMD returns the number of render + backends. Querying WGL_GPU_NUM_SPI_AMD returns the number of shader + parameter interpolaters. If the being queried is not + applicable for the GPU specified by , the value 0 will be returned. + + Unassociated contexts are created by calling wglCreateContext. + Although these contexts are unassociated, their use will still be + tied to a single GPU in most cases. For this reason it is advantageous + to be able to query the GPU an existing unassociated context resides + on. If multiple GPUs are available, it would be undesirable + to use one for rendering to visible surfaces and then chose the + same one for off-screen rendering. Use the following command to + determine which GPU a context is attached to: + + UINT wglGetContextGPUIDAMD(HGLRC hglrc); + + is the context for which the GPU id will be returned. If the + context is invalid or if an error has occurred, wglGetContextGPUIDAMD + will return 0. + + To create an associated context, use: + + HGLRC wglCreateAssociatedContextAMD(UINT id); + + must be a valid GPU id and cannot be 0. If a context was + successfully created the handle will be returned by + wglCreateAssociatedContextAMD. If a context could not be created, NULL + will be returned. If a context could not be created, error information + can be obtained by calling GetLastError. Upon successful creation, + no pixel format is tied to an associated context. + + To create an associated context and request a specific GL version, use: + + HGLRC wglCreateAssociatedContextAttribsAMD(UINT id, + HGLRC hShareContext, const int *attribList) + + All capabilities and limitations of wglCreateContextAttribsARB apply + to wglCreateAssociatedContextAttribsAMD. Additionally, must be + a valid GPU ID and cannot be 0. If a context was successfully created + the handle will be returned by wglCreateAssociatedContextAttribsAMD. + If a context could not be created, NULL will be returned. In this + case, error information can be obtained by calling GetLastError. Upon + successful creation, no pixel format is tied to an associated context. + + must either be NULL or that of an associated context + created with the the same GPU ID as . If was + created using a different ID, wglCreateAssociatedContextAttribsAMD + will fail and return NULL. + + + A context must be deleted once it is no longer needed. Use the + following call to delete an associated context: + + BOOL wglDeleteAssociatedContextAMD(HGLRC hglrc); + + If the function succeeds, TRUE will be returned, otherwise FALSE is + returned. must be a valid associated context created by + calling wglCreateAssociatedContextAMD. If an unassociated context, + created by calling wglCreateContext, is passed into , the + function will fail. An associated context cannot be deleted by calling + wglDeleteContext. If an associated context is passed into + wglDeleteContext, the result is undefiend. + + To render using an associated context, it must be made the current + context for a thread: + + BOOL wglMakeAssociatedContextCurrentAMD(HGLRC hglrc); + + is a context handle created by calling + wglCreateAssociatedContextAMD. If was created using + wglCreateContext, the call will fail and FALSE will be returned. If + is not a valid context and not NULL, the call will fail and + FALSE will be returned. If the call succeeds, TRUE will be returned. + To detach the current associated context, pass NULL as . + + Only one type of context can be current to a thread at a time. If an + unassociated context is current to a hdc when + wglMakeAssociatedContextCurrentAMD is called with a valid , it + is as if wglMakeCurrent is called first with an hglrc of NULL. If an + associated context is current and wglMakeCurrent is called with a + valid context, it is as if wglMakeAssociatedContextCurrentAMD is + called with an hglrc of NULL. + + The current associated context can be queried by calling: + + HGLRC wglGetCurrentAssociatedContextAMD(void); + + The current associated context is returned on a successful call to + this function. If no associated context is current, NULL is returned. + If an unassociated context is current, NULL will be returned. + + Associated contexts can be shared just as unassociated contexts can by + calling wglShareLists. Associated contexts can only be shared with + other contexts that were created with the same GPU id. Associated + contexts cannot be shared with non-associated contexts. FALSE will be + returned if either context is not valid or not an associated context + associated with the same GPU. + + An associated context can not be passed in as a parameter into + wglCopyContext. If an associated context is passed into wglCopyContext, + the result is undefiend. + + The addresses returned from wglGetProcAddress are only valid for the + current context. It may be invalid to use proc addresses obtained from + a traditional context with an associated context. Furthermore, the + OpenGL version and extensions supported on an associated context may + differ. Each context should be treated seperately, proc addressses + should be queried for each after context creation. + + Calls to wglSwapBuffers and wglSwapLayerBuffers when an associated + context is current will return FALSE and will have no effect. + + There is no way to use pBuffers with associated contexts. + + Overlays and underlays are not supported with associated contexts. + + The same associated context is used for both write and read operations. + + To facilitate high performance data communication between multiple + contexts, a new function is necessary to blit data from one context + to another. + + VOID wglBlitContextFramebufferAMD(HGLRC dstCtx, GLint srcX0, GLint srcY0, + GLint srcX1, GLint srcY1, GLint dstX0, + GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + + is the context handle for the write context. is the + bitwise OR of a number of values indicating which buffers are to be + copied. The values are GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, and + GL_STENCIL_BUFFER_BIT, which are described in section 4.2.3. The + pixels corresponding to these buffers are copied from the source + rectangle, bound by the locations (srcX0, srcY0) and (srcX1, srcY1), + to the destination rectangle, bound by the locations (dstX0, dstY0) + and (dstX1, dstY1). The lower bounds of the rectangle are inclusive, + while the upper bounds are exclusive. + + The source context is the current GL context. Specifying the current + GL context as the will result in the error + GL_INVALID_OPERATION being generated. If is invalid, the + error GL_INVALID_OPERATION will be generated. If no context is + current at the time of this call, the error GL_INVALID_OPERATION + will be generated. These errors may be queried by calling glGetError. + The target framebuffer will be the framebuffer bound to + GL_DRAW_FRAMEBUFFER_EXT in the context . The source framebuffer + will be the framebuffer bound to GL_READ_FRAMEBUFFER_EXT in the + currently bound context. + + The restrictions that apply to the source and destination rectangles + specified with , , , , , + , and are the same as those that apply for + glBlitFramebufferEXT. The same error conditions exist as for + glBlitFramebufferEXT. + + When called, this function will execute immediately in the currently + bound context. It is up to the caller to maintain appropriate + synchronization between the current context and to ensure + rendering to the appropriate surfaces has completed on the current + and contexts. + +Additions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment +Operations and the Frame Buffer) +Modify the beginning of section 4.4.1 as follows: + + When an assoicated context is bound, the default state for an associated + context is invalid for rendering. Because there is no attached window, + there is no default framebuffer surface to render to. An app created + framebuffer object must be bound for rendering to be valid. If the + object bound to GL_FRAMEBUFFER_BINDING_EXT is 0, it is as if the + framebuffer is incomplete, and an + GL_INVALID_FRAMEBUFFER_OPERATION_EXT error will be generated + where rendering is attempted. + + +New State + + None + + +Interactions with GL_EXT_framebuffer_blit + + If the framebuffer blit extension is not supported, all language + referring to glBlitFramebufferEXT and wglBlitContextFramebufferAMD + is removed. + +Interactions with GL_EXT_framebuffer_object + + If WGL_AMD_gpu_association is supported, and context created with it + will also support EXT_framebuffer_object. + + +Interactions with WGL_ARB_make_current_read + + If the make current read extension is supported, it is invalid to pass + an associated context handle as a parameter to + wglMakeContextCurrentARB. If an associated context is passed into + wglMakeContextCurrentARB, the result is undefiend. + +Interactions with WGL_ARB_create_context + If wglCreateContextAttribsARB is not supported, all language + referring to wglCreateAssociatedContextAttribsAMD is removed. + + +Issues + +1. Is a different DC necessary in addition to an associated context? + + - Resolved. It seems unnecessary. An associated DC would be a virtual + DC with no real meaning. Using an associated DC would require apps to + create windows and set pixelformats that are meaningless. + +2. Should the list of IDs returned by wglGetGPUIDs be ordered in some + way? By fastest GPU? + + - Resolved. There is no need to create a restriction. The GPU info can + be queried. + +3. What happens when the GPUs support different versions of OpenGL? + Do we allow this? Do we need the + + - Resolved. It is the applications responsibility to use each GPU + appropriately based on the supported version of OpenGL. + +4. What should the relation between wglMakeAssociatedContextCurrentAMD and + wglMakeCurrent be? Should it be legal to have an associated context and a + normal context current to the same thread? + + - Resolved. It seems feasible to have an associated context and a normal + one both current, but for simplicity, only one of any type will be allowed + per thead. + +5. Will a call to wglShareLists with contexts that were not created through + wglCreateContext make it through to the driver? If not, will a new + shareLists call be necessary? + + -Resolved. This is not an issue. + +6. Is GPUClock a good parameter for the GPUInfo structure? How should + relative GPU performance be presented? + + - Resolved. This is sufficent. One alternative would be to test execution of + some amount of geometry rendering. But applications are better positioned + to perform this based on their rendering needs. + +7. Is BlitContextFramebufferEXT the best way to transfer data from one + context to another? Or would it be better to create a read and write + context bind point? + + - Resolved. Both methods would work well. Adding a new function prevents + the additional state that would have to be tracked for a global read and + write bind point. In addition, using global (wgl) bind points may + introduce mutability issues when multiple threads are being used. + Only one thread could use the interface at a time. + +8. Should the GPU ID be part of the pixel format? That would allow + apps to search for a format that worked on different GPUs. + + - Resolved. Using the pixel format would provide a non-intrusive solution, + but would require the app to use a DC that is not available through + current interfaces. In addition, the app would have to create a + dummy window. + +9. Are there any problems calling wglShareLists with contexts not created + by Windows? + + - Resolved. This is not an issue. + +10. What should happen in an associated context when the default FBO is + bound? The 2 options seem to be 1. Throw an error and do not render, + 2. Discard all rendering as failing the pixel ownership test. + + - The first option seems more logical. + + +Revision History + 03/03/2009 - Initial version written. Written by nickh diff --git a/opengles/extensions/ANDROID/ANDROID_extension_pack_es31a.txt b/opengles/extensions/ANDROID/ANDROID_extension_pack_es31a.txt new file mode 100644 index 0000000000..cd3cc7e610 --- /dev/null +++ b/opengles/extensions/ANDROID/ANDROID_extension_pack_es31a.txt @@ -0,0 +1,156 @@ +Name + + ANDROID_extension_pack_es31a + +Name Strings + + GL_ANDROID_extension_pack_es31a + +Contact + + Jesse Hall (jessehall 'at' google.com) + +Contributors + + Jesse Hall, Google + +Status + + Complete. + +Version + + Last Modified Date: July 7, 2014 + Revision: 3 + +Number + + OpenGL ES Extension #187 + +Dependencies + + OpenGL ES 3.1 and GLSL ES 3.10 are required. + + The following extensions are required: + * KHR_debug + * KHR_texture_compression_astc_ldr + * KHR_blend_equation_advanced + * OES_sample_shading + * OES_sample_variables + * OES_shader_image_atomic + * OES_shader_multisample_interpolation + * OES_texture_stencil8 + * OES_texture_storage_multisample_2d_array + * EXT_copy_image + * EXT_draw_buffers_indexed + * EXT_geometry_shader + * EXT_gpu_shader5 + * EXT_primitive_bounding_box + * EXT_shader_io_blocks + * EXT_tessellation_shader + * EXT_texture_border_clamp + * EXT_texture_buffer + * EXT_texture_cube_map_array + * EXT_texture_sRGB_decode + +Overview + + This extension changes little functionality directly. Instead it serves to + roll up the 20 extensions it requires, allowing applications to check for + all of them at once, and enable all of their shading language features with + a single #extension statement. The Android platform provides special support + outside of OpenGL ES to help applications target this set of extensions. + + In addition, this extension ensures support for images, shader storage + buffers, and atomic counters in fragment shaders. In unextended OpenGL ES + the minimum value of the relevant implementation-defined limits is zero; + this extension raises these minimums to match the minimums for compute + shaders. + +New Procedures and Functions + + None + +New Tokens + + None + +Modifications to Chapter 20 of the OpenGL ES 3.1 Specification (State Tables) + + Modify Table 20.44, Implementation Dependent Fragment Shader Limits, p. 395: + + Get Value Type Get Command Minimum Value Description Sec. + ----------------------- ---- ----------- ------------- ------------------------- ----- + MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS Z+ GetIntegerv 1 No. of atomic counter 7.7 + buffers accessed by a + fragment shader + MAX_FRAGMENT_ATOMIC_COUNTERS Z+ GetIntegerv 8 No. of atomic counters 7.7 + accessed by a fragment + shader + MAX_FRAGMENT_IMAGE_UNIFORMS Z+ GetIntegerv 4 No. of image variables in 11.1.3 + fragment shaders + MAX_FRAGMENT_SHADER_STORAGE_BLOCKS Z+ GetIntegerv 4 No. of shader storage 7.8 + blocks accessed by a + fragment shader + [[Change minimum values]] + +Modifications to The OpenGL ES Shading Language Specification, Version 3.10 +(Revision 5) + + Including the following line in a shader: + + #extension GL_ANDROID_extension_pack_es31a : + + has the same effect as including the following lines: + + #extension GL_KHR_blend_equation_advanced : + #extension GL_OES_sample_variables : + #extension GL_OES_shader_image_atomic : + #extension GL_OES_shader_multisample_interpolation : + #extension GL_OES_texture_storage_multisample_2d_array : + #extension GL_EXT_geometry_shader : + #extension GL_EXT_gpu_shader5 : + #extension GL_EXT_primitive_bounding_box : + #extension GL_EXT_shader_io_blocks : + #extension GL_EXT_tessellation_shader : + #extension GL_EXT_texture_buffer : + #extension GL_EXT_texture_cube_map_array : + + where is as specified in section 3.4. + + A new preprocessor #define is added to the OpenGL ES Shading Language: + + #define GL_ANDROID_extension_pack_es31a 1 + +New Implementation Dependent State + + None + +Issues + + (1) Should all the extensions be enabled in all shader stages? What happens + if an extension is enabled in a stage that it does not modify? + + RESOLVED: All extensions are enabled in all stages. + + Enabling this extension in a shader has exactly the same behavior as + enabling each of the required extensions individually. None of the other + extensions limit what shader stages they can be enabled in. Generally, if + the modifications introduced by an extension do not apply to a shader stage, + then enabling it in that stage is a no-op. If an extension does introduce + new features to the language in a stage, a shader that doesn't use the new + features will behave the same whether it enables the extension or not. + + +Revision History + + Revision 3, 2014/7/7 (Jesse Hall) + - Changed status from "draft" to "complete" + - Corrected capitalization of EXT_texture_sRGB_decode + + Revision 2, 2014/5/2 (Jesse Hall) + - Added dependency on EXT_primitive_bounding_box + - Added and resolved Issue #1 + + Revision 1, 2014/4/18 (Jesse Hall) + - Initial version diff --git a/opengles/extensions/ANGLE/ANGLE_depth_texture.txt b/opengles/extensions/ANGLE/ANGLE_depth_texture.txt new file mode 100644 index 0000000000..afbbcd7e56 --- /dev/null +++ b/opengles/extensions/ANGLE/ANGLE_depth_texture.txt @@ -0,0 +1,402 @@ +Name + + ANGLE_depth_texture + +Name Strings + + GL_ANGLE_depth_texture + +Contributors + + Nicolas Capens, TransGaming / Google + Daniel Koch, TransGaming / NVIDIA + Shannon Woods, TransGaming / Google + Kenneth Russell, Google + Vangelis Kokkevis, Google + Gregg Tavares, Google + Contributors to OES_depth_texture + Contributors to OES_packed_depth_stencil + +Contact + + Shannon Woods, Google (shannonwoods 'at' google.com) + +Status + + Implemented in ANGLE. + +Version + + Last Modified Date: February 25, 2013 + Revision: #4 + +Number + + OpenGL ES Extension #138 + +Dependencies + + OpenGL ES 2.0 is required. + This extension is written against the OpenGL ES 2.0.25 specification + + OES_packed_depth_stencil affects the definition of this extension. + + EXT_texture_storage affects the definition of this extension. + +Overview + + This extension defines support for 2D depth and depth-stencil + textures in an OpenGL ES implementation. + + This extension incorporates the depth texturing functionality of + OES_depth_texture and OES_packed_depth_stencil, but does not + provide the ability to load existing data via TexImage2D or + TexSubImage2D. This extension also allows implementation + variability in which components from a sampled depth texture + contain the depth data. Depth textures created with this + extension only support 1 level. + +New Procedures and Functions + + None + +New Tokens + + Accepted by the parameter of TexImage2D and TexSubImage2D and + parameter of TexImage2D: + + DEPTH_COMPONENT 0x1902 + DEPTH_STENCIL_OES 0x84F9 + + Accepted by the parameter of TexImage2D, TexSubImage2D: + + UNSIGNED_SHORT 0x1403 + UNSIGNED_INT 0x1405 + UNSIGNED_INT_24_8_OES 0x84FA + + Accepted by the parameter of TexStorage2DEXT: + + DEPTH_COMPONENT16 0x81A5 + DEPTH_COMPONENT32_OES 0x81A7 + DEPTH24_STENCIL8_OES 0x88F0 + +Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation) + + Update Section 2.10.5 "Shader Execution" in the subsection titled + "Texture Access" add a new paragraph before the last paragraph add + this line: + + "The stencil index texture internal component is ignored if the base + internal format is DEPTH_STENCIL_OES. + + If a vertex shader uses..." + +Additions to Chapter 3 of the OpenGL ES 2.0 specification (Rasterization) + + Add the following rows to Table 3.2 (page 62): + + type Parameter GL Data Type Special + ------------------------------------------------ + ... ... ... + UNSIGNED_SHORT ushort No + UNSIGNED_INT uint No + UNSIGNED_INT_24_8_OES uint Yes + + Add the following rows to Table 3.3 (page 62): + + Format Name Element Meaning and Order Target Buffer + ------------------------------------------------------------------ + ... ... ... + DEPTH_COMPONENT Depth Depth + DEPTH_STENCIL_OES Depth and Stencil Index Depth and Stencil + ... ... ... + + Add a row to Table 3.5 "Packed pixel formats" (page 64): + + type Parameter GL Type Components Pixel Formats + ------------------------------------------------------------------ + ... ... ... ... + UNSIGNED_INT_24_8_OES uint 2 DEPTH_STENCIL_OES + + Add a new table after Table 3.6 (page 64): + + UNSIGNED_INT_24_8_OES + + 31 30 29 28 27 26 ... 12 11 10 9 8 7 6 5 4 3 2 1 0 + +----------------------------------+---------------+ + | 1st Component | 2nd Component | + +----------------------------------+---------------+ + + Table 3.6.B: UNSIGNED_INT formats + + Add a row to Table 3.7 "Packed pixel field assignments" (page 65): + + Format | 1st 2nd 3rd 4th + ------------------+------------------------------- + ... | ... ... ... ... + DEPTH_STENCIL_OES | depth stencil N/A N/A + + Add the following paragraph to the end of the section "Conversion to + floating-point" (page 65): + + "For groups of components that contain both standard components and index + elements, such as DEPTH_STENCIL_OES, the index elements are not converted." + + In section 3.7.1 "Texture Image Specification", update page 67 to + say: + + "The selected groups are processed as described in section 3.6.2, stopping + just before final conversion. Each R, G, B, A, or depth value so generated + is clamped to [0, 1], while the stencil index values are masked by 2^n-1, + where n is the number of stencil bits in the internal format resolution + (see below). + + Components are then selected from the resulting R, G, B, A, depth, or + stencil index values to obtain a texture with the base internal format + specified by . Table 3.8 summarizes the mapping of R, G, + B, A, depth, or stencil values to texture components, as a function of the + base internal format of the texture image. may be + specified as one of the internal format symbolic constants listed in + table 3.8. Specifying a value for that is not one of the + above values generates the error INVALID_VALUE. If does + not match , the error INVALID_OPERATION is generated. + + Textures with a base internal format of DEPTH_COMPONENT or + DEPTH_STENCIL_OES are supported by texture image specification commands + only if is TEXTURE_2D. Using these formats in conjunction with + any other will result in an INVALID_OPERATION error. + + Textures with a base internal format of DEPTH_COMPONENT or + DEPTH_STENCIL_OES only support one level of image data. Specifying a + non-zero value for will result in an INVALID_OPERATION error. + + Textures with a base internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES + require either depth component data or depth/stencil component data. + Textures with other base internal formats require RGBA component data. The + error INVALID_OPERATION is generated if the base internal format is + DEPTH_COMPONENT or DEPTH_STENCIL_OES and is not DEPTH_COMPONENT or + DEPTH_STENCIL_OES, or if the base internal format is not DEPTH_COMPONENT or + DEPTH_STENCIL_OES and is DEPTH_COMPONENT or DEPTH_STENCIL_OES. + + Textures with a base internal format of DEPTH_COMPONENT or + DEPTH_STENCIL_OES do not support loading image data via the TexImage + commands. They can only have their contents specified by rendering + to them. The INVALID_OPERATION error is generated by the TexImage2D + command if is not NULL for such textures." + + Add a row to table 3.8 (page 68), and update the title of the + second column: + + Base Internal Format RGBA, Depth and Stencil Values Internal Components + ------------------------------------------------------------------------- + ... ... ... + DEPTH_COMPONENT Depth D + DEPTH_STENCIL_OES Depth,Stencil D,S + ... ... ... + + Update the caption for table 3.8 (page 68) + + "Table 3.8: Conversion from RGBA, depth, and stencil pixel components to + internal texture components. Texture components R, G, B, A, and L are + converted back to RGBA colors during filtering as shown in table 3.12. + Texture components D are converted to RGBA colors as described in + section 3.7.8-1/2." + + Add the following to section 3.7.2 "Alternate Texture Image Specification + Commands": + + "CopyTexImage2D and CopyTexSubImage2D generate the INVALID_OPERATION + error if the base internal format of the destination texture is + DEPTH_COMPONENT or DEPTH_STENCIL_OES. + + TexSubImage2D generates the INVALID_OPERATION error if the base internal + format of the texture is DEPTH_COMPONENT or DEPTH_STENCIL_OES." + + Add a new section between sections 3.7.8 and 3.7.9: + + "3.7.8-1/2 Depth/Stencil Textures + + If the currently bound texture's base internal format is DEPTH_COMPONENT or + DEPTH_STENCIL_OES, then the output of the texture unit is as described + below. Otherwise, the texture unit operates in the normal manner. + + Let be the depth texture value, provided by the shader's texture lookup + function. Then the effective texture value is computed as follows: + = + + If the texture image has a base internal format of DEPTH_STENCIL_OES, then + the stencil index texture component is ignored. The texture value does + not include a stencil index component, but includes only the depth + component. + + The resulting is assigned to . In some implementations, is + also assigned to , , or . Thus in table 3.12, textures with + depth component data behave as if their base internal format is RGBA, with + values in , , and being implementation dependent." + + Add the following to section 3.7.11 "Mipmap Generation": + + "If the level zero array contains depth or depth-stencil data, the + error INVALID_OPERATION is generated." + + Insert a new paragraph after the first paragraph of the "Texture Access" + subsection of section 3.8.2 on page 87, which says: + + "Texture lookups involving textures with depth component data generate + a texture source color by using depth data directly, as described in + section 3.7.8-1/2. The stencil texture internal component is ignored + if the base internal format is DEPTH_STENCIL_OES." + +Additions to Chapter 4 of the OpenGL ES 2.0 specification (Per-Fragment +Operations and the Framebuffer) + + In section 4.4.5 "Framebuffer Completeness", replace the the 3rd + paragraph with the following text: + + "* An internal format is color-renderable if it is one of the formats + from table 4.5 noted as color-renderable or if it is unsized format + RGBA or RGB. No other formats, including compressed internal formats, + are color-renderable. + + * An internal format is depth-renderable if it is one of the sized + internal formats from table 4.5 noted as depth-renderable, if it + is the unsized format DEPTH_COMPONENT or if it is the internal + format value of DEPTH24_STENCIL8_OES. No other formats are + depth-renderable. + + * An internal format is stencil-renderable if it is one of the sized + internal formats from table 4.5 noted as stencil-renderable or if it + is DEPTH24_STENCIL8_OES. No other formats are stencil-renderable." + +Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special +Functions) + + None. + +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State +Requests) + + None. + +Interactions with OES_packed_depth_stencil + + If OES_packed_depth_stencil is not supported, mentions of + DEPTH_STENCIL_OES and UNSIGNED_INT_24_8_OES as a format/type combinations + for TexImage2D and TexSubImage2D are omitted. Mentions of + the internal format DEPTH24_STENCIL8_OES are also omitted. + +Interactions with EXT_texture_storage + + If EXT_texture_storage is supported the following internalformat + to format/type mappings are used: + + + ---------------- -------- ------ + DEPTH_COMPONENT16 DEPTH_COMPONENT UNSIGNED_SHORT + DEPTH_COMPONENT32_OES DEPTH_COMPONENT UNSIGNED_INT + DEPTH24_STENCIL8_OES DEPTH_STENCIL_OES UNSIGNED_INT + + Textures with the above only support one level of + image data. Specifying a value other than one for the parameter + to TexStorage2DEXT will result in an INVALID_OPERATION error. + + If EXT_texture_storage is not supported, ignore any references + to TexStorage2DEXT. + +Errors + + The error INVALID_OPERATION is generated by TexImage2D if and + are DEPTH_COMPONENT and is not UNSIGNED_SHORT, + or UNSIGNED_INT. + + The error INVALID_OPERATION is generated by TexSubImage2D if is + DEPTH_COMPONENT and is not UNSIGNED_SHORT, or UNSIGNED_INT. + + The error INVALID_OPERATION is generated by TexImage2D if and + are not DEPTH_COMPONENT and is UNSIGNED_SHORT, + or UNSIGNED_INT. + + The error INVALID_OPERATION is generated by TexSubImage2D if is + not DEPTH_COMPONENT and is UNSIGNED_SHORT, or UNSIGNED_INT. + + The error INVALID_OPERATION is generated by TexImage2D if and + are DEPTH_STENCIL_OES and is not + UNSIGNED_INT_24_8_OES. + + The error INVALID_OPERATION is generated by TexSubImage2D if + is DEPTH_STENCIL_OES and is not UNSIGNED_INT_24_8_OES. + + The error INVALID_OPERATION is generated by TexImage2D if and + is not DEPTH_STENCIL_OES and is + UNSIGNED_INT_24_8_OES. + + The error INVALID_OPERATION is generated by TexSubImage2D if + is not DEPTH_STENCIL_OES and is UNSIGNED_INT_24_8_OES. + + The error INVALID_OPERATION is generated in the following situations: + - TexImage2D is called with and of + DEPTH_COMPONENT or DEPTH_STENCIL_OES and + - is not TEXTURE_2D, + - is not NULL, or + - is not zero. + - TexSubImage2D is called with of DEPTH_COMPONENT or + DEPTH_STENCIL_OES. + - TexStorage2DEXT is called with of DEPTH_COMPONENT16, + DEPTH_COMPONENT32_OES, or DEPTH24_STENCIL8_OES, and + - is not TEXTURE_2D, or + - is not one. + - CopyTexImage2D is called with an that has a base + internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES. + - CopyTexSubImage2D is called with a target texture that has a base + internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES. + - GenerateMipmap is called on a texture that has a base internal format + of DEPTH_COMPONENT or DEPTH_STENCIL_OES. + +New State + + None. + +Issues + + 1) What are the differences between this extension and OES_depth_texture + and OES_packed_depth_stencil? + + RESOLVED: This extension: + - does not support loading pre-baked depth stencil data via + TexImage2D or TexSubImage2D. + - allows variability in the y-, z-, and w-components of the sample + results from depth textures. + - only supports one level textures. + - explicitly lists the errors for unsupported functionality. + Since these were not clearly specified in the OES_depth_texture + extension there may be differences in error values between + implementations of OES_depth_texture and ANGLE_depth_texture. + This specification was also rebased to apply against the OpenGL ES 2.0 + specification instead of the OpenGL specification, making it more + obvious what all the functionality changes are. + + 2) Why does TexSubImage2D accept the new format/type combinations even + though it does not actually support loading data? + + RESOLVED: This was done to be more consistent with the OES_depth_texture + extension and to make it easier to add support for loading texture + data if it is possible to support in the future. + + 3) Why are only 1-level depth textures supported? + + RESOLVED: The only use for multiple levels of depth textures would + be for fitlered texturing. However since it is not possible to + render to non-zero-level texture levels in OpenGL ES 2.0, and since + this extension forbids loading existing data and GenerateMipmap on + depth textures, it is impossible to initialize or specify contents + for non-zero levels of depth textures. + +Revision History + + 02/25/2013 swoods revise to allow texture lookup to guarantee depth values + only in red channel of sample result. + 06/04/2012 dgkoch fix errors, disallow multi-level depth textures. + 05/30/2012 dgkoch minor updates and add issues. + 05/23/2012 dgkoch intial revision based on OES_depth_texture and + OES_packed_depth_stencil and rebased against the ES 2.0 spec + diff --git a/opengles/extensions/ANGLE/ANGLE_framebuffer_blit.txt b/opengles/extensions/ANGLE/ANGLE_framebuffer_blit.txt new file mode 100644 index 0000000000..53056c4497 --- /dev/null +++ b/opengles/extensions/ANGLE/ANGLE_framebuffer_blit.txt @@ -0,0 +1,437 @@ +Name + + ANGLE_framebuffer_blit + +Name Strings + + GL_ANGLE_framebuffer_blit + +Contributors + + Contributors to EXT_framebuffer_blit + Daniel Koch, TransGaming Inc. + Shannon Woods, TransGaming Inc. + Kenneth Russell, Google Inc. + Vangelis Kokkevis, Google Inc. + +Contact + + Daniel Koch, TransGaming Inc. (daniel 'at' transgaming 'dot' com) + +Status + + Implemented in ANGLE ES2 + +Version + + Last Modified Date: Sept 22, 2012 + Author Revision: 4 + +Number + + OpenGL ES Extension #83 + +Dependencies + + OpenGL ES 2.0 is required. + + The extension is written against the OpenGL ES 2.0 specification. + + OES_texture_3D affects the definition of this extension. + +Overview + + This extension modifies framebuffer objects by splitting the + framebuffer object binding point into separate DRAW and READ + bindings. This allows copying directly from one framebuffer to + another. In addition, a new high performance blit function is + added to facilitate these blits and perform some data conversion + where allowed. + +IP Status + + No known IP claims. + +New Procedures and Functions + + void BlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1, + int dstX0, int dstY0, int dstX1, int dstY1, + bitfield mask, enum filter); + +New Tokens + + Accepted by the parameter of BindFramebuffer, + CheckFramebufferStatus, FramebufferTexture2D, FramebufferTexture3DOES, + FramebufferRenderbuffer, and + GetFramebufferAttachmentParameteriv: + + // (reusing the tokens from EXT_framebuffer_blit) + READ_FRAMEBUFFER_ANGLE 0x8CA8 + DRAW_FRAMEBUFFER_ANGLE 0x8CA9 + + Accepted by the parameters of GetIntegerv and GetFloatv: + + // (reusing the tokens from EXT_framebuffer_blit) + DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 // alias FRAMEBUFFER_BINDING + READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA + + +Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) + + Change the last paragraph of section 3.7.2 (Alternate Texture Image + Specification Commands) to: + + "Calling CopyTexSubImage3DOES, CopyTexImage2D or CopyTexSubImage2D will + result in an INVALID_FRAMEBUFFER_OPERATION error if the object bound + to READ_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer complete" + (section 4.4.4.2)." + +Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment +Operations and the Framebuffer) + + Change the first word of Chapter 4 from "The" to "A". + + Append to the introduction of Chapter 4: + + "Conceptually, the GL has two active framebuffers; the draw + framebuffer is the destination for rendering operations, and the + read framebuffer is the source for readback operations. The same + framebuffer may be used for both drawing and reading. Section + 4.4.1 describes the mechanism for controlling framebuffer usage." + + Modify the first sentence of the last paragraph of section 4.1.1 as follows: + + "While an application-created framebuffer object is bound to + DRAW_FRAMEBUFFER_ANGLE, the pixel ownership test always passes." + + Add to 4.3.1 (Reading Pixels), right before the subsection titled + "Obtaining Pixels from the Framebuffer": + + "Calling ReadPixels generates INVALID_FRAMEBUFFER_OPERATION if + the object bound to READ_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer + complete" (section 4.4.4.2). GetIntegerv generates an INVALID_OPERATION + error if the object bound to READ_FRAMEBUFFER_BINDING_ANGLE is not + framebuffer complete, or if the GL is using a framebuffer object + (i.e. READ_FRAMEBUFFER_BINDING_ANGLE is non-zero) and there is no color + attachment." + + Insert a new section 4.3.2 titled "Copying Pixels" and renumber the + subsequent sections. Add the following text: + + "BlitFramebufferANGLE transfers a rectangle of pixel values from one + region of the read framebuffer to another in the draw framebuffer. + + BlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1, + int dstX0, int dstY0, int dstX1, int dstY1, + bitfield mask, enum filter); + + is the bitwise OR of a number of values indicating which + buffers are to be copied. The values are COLOR_BUFFER_BIT, + DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT, which are described in + section 4.2.3. The pixels corresponding to these buffers are + copied from the source rectangle, bound by the locations (srcX0, + srcY0) and (srcX1, srcY1), to the destination rectangle, bound by + the locations (dstX0, dstY0) and (dstX1, dstY1). The lower bounds + of the rectangle are inclusive, while the upper bounds are + exclusive. + + The actual region taken from the read framebuffer is limited to the + intersection of the source buffers being transferred, which may include + the color buffer, the depth buffer, and/or the stencil buffer depending on + . The actual region written to the draw framebuffer is limited to the + intersection of the destination buffers being written, which may include + the color buffer, the depth buffer, and/or the stencil buffer + depending on . Whether or not the source or destination regions are + altered due to these limits, the offset applied to pixels being transferred + is performed as though no such limits were present. + + Stretching and scaling during a copy are not supported. If the source + and destination rectangle dimensions do not match, no copy is + performed and an INVALID_OPERATION error is generated. + Because stretching is not supported, must be NEAREST and + no filtering is applied. + + Flipping during a copy is not supported. If either the source or + destination rectangle specifies a negative dimension, the error + INVALID_OPERATION is generated. If both the source and + destination rectangles specify a negative dimension for the same + direction, no reversal is required and the operation is supported. + + If the source and destination buffers are identical, and the + source and destination rectangles overlap, the result of the blit + operation is undefined. + + The pixel copy bypasses the fragment pipeline. The only fragment + operations which affect the blit are the pixel ownership test and + the scissor test. + + If a buffer is specified in and does not exist in both the + read and draw framebuffers, the corresponding bit is silently + ignored. + + Calling BlitFramebufferANGLE will result in an + INVALID_FRAMEBUFFER_OPERATION error if the objects bound to + DRAW_FRAMEBUFFER_BINDING_ANGLE and READ_FRAMEBUFFER_BINDING_ANGLE are + not "framebuffer complete" (section 4.4.4.2)." + + Calling BlitFramebufferANGLE will result in an INVALID_OPERATION + error if includes COLOR_BUFFER_BIT and the source and + destination color formats to not match. + + Calling BlitFramebufferANGLE will result in an INVALID_OPERATION + error if includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT + and the source and destination depth and stencil buffer formats do + not match. + + If includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, only + complete buffers can be copied. If the source rectangle does not + specify the complete source buffer or the destination rectangle + (after factoring the scissor region, if applicable) does not specify + the complete destination buffer, an INVALID_OPERATION + error is generated. + + Modify the beginning of section 4.4.1 as follows: + + "The default framebuffer for rendering and readback operations is + provided by the windowing system. In addition, named framebuffer + objects can be created and operated upon. The namespace for + framebuffer objects is the unsigned integers, with zero reserved + by the GL for the default framebuffer. + + A framebuffer object is created by binding an unused name to + DRAW_FRAMEBUFFER_ANGLE or READ_FRAMEBUFFER_ANGLE. The binding is + effected by calling + + void BindFramebuffer(enum target, uint framebuffer); + + with set to the desired framebuffer target and + set to the unused name. The resulting framebuffer + object is a new state vector, comprising one set of the state values + listed in table 6.23 for each attachment point of the + framebuffer, set to the same initial values. There is one + color attachment point, plus one each + for the depth and stencil attachment points. + + BindFramebuffer may also be used to bind an existing + framebuffer object to DRAW_FRAMEBUFFER_ANGLE or + READ_FRAMEBUFFER_ANGLE. If the bind is successful no change is made + to the state of the bound framebuffer object, and any previous + binding to is broken. + + If a framebuffer object is bound to DRAW_FRAMEBUFFER_ANGLE or + READ_FRAMEBUFFER_ANGLE, it becomes the target for rendering or + readback operations, respectively, until it is deleted or another + framebuffer is bound to the corresponding bind point. Calling + BindFramebuffer with set to FRAMEBUFFER binds the + framebuffer to both DRAW_FRAMEBUFFER_ANGLE and READ_FRAMEBUFFER_ANGLE. + + While a framebuffer object is bound, GL operations on the target + to which it is bound affect the images attached to the bound + framebuffer object, and queries of the target to which it is bound + return state from the bound object. Queries of the values + specified in table 6.20 (Implementation Dependent Pixel Depths) + and table 6.yy (Framebuffer Dependent Values) are + derived from the framebuffer object bound to DRAW_FRAMEBUFFER_ANGLE. + + The initial state of DRAW_FRAMEBUFFER_ANGLE and READ_FRAMEBUFFER_ANGLE + refers to the default framebuffer provided by the windowing + system. In order that access to the default framebuffer is not + lost, it is treated as a framebuffer object with the name of 0. + The default framebuffer is therefore rendered to and read from + while 0 is bound to the corresponding targets. On some + implementations, the properties of the default framebuffer can + change over time (e.g., in response to windowing system events + such as attaching the context to a new windowing system drawable.)" + + Change the description of DeleteFramebuffers as follows: + + " contains names of framebuffer objects to be + deleted. After a framebuffer object is deleted, it has no + attachments, and its name is again unused. If a framebuffer that + is currently bound to one or more of the targets + DRAW_FRAMEBUFFER_ANGLE or READ_FRAMEBUFFER_ANGLE is deleted, it is as + though BindFramebuffer had been executed with the corresponding + and zero. Unused names in + are silently ignored, as is the value zero." + + + In section 4.4.3 (Renderbuffer Objects), modify the first two sentences + of the description of FramebufferRenderbuffer as follows: + + " must be DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE, or + FRAMEBUFFER. If is FRAMEBUFFER, it behaves as + though DRAW_FRAMEBUFFER_ANGLE was specified. The INVALID_OPERATION + error is generated if the value of the corresponding binding is zero." + + In section 4.4.3 (Renderbuffer Objects), modify the first two sentences + of the description of FramebufferTexture2D as follows: + + " must be DRAW_FRAMEBUFFER_ANGLE, + READ_FRAMEBUFFER_ANGLE, or FRAMEBUFFER. If is + FRAMEBUFFER, it behaves as though DRAW_FRAMEBUFFER_ANGLE was + specified. The INVALID_OPERATION error is generated if the value of the + corresponding binding is zero." + + In section 4.4.5 (Framebuffer Completeness), modify the first sentence + of the description of CheckFramebufferStatus as follows: + + "If is not DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or + FRAMEBUFFER, the error INVALID_ENUM is generated. If is + FRAMEBUFFER, it behaves as though DRAW_FRAMEBUFFER_ANGLE was + specified." + + Modify the first sentence of the subsection titled "Effects of Framebuffer + Completeness on Framebuffer Operations" to be: + + "Attempting to render to or read from a framebuffer which is not + framebuffer complete will generate an + INVALID_FRAMEBUFFER_OPERATION error." + + + +Additions to Chapter 6 of the OpenGL 1.5 Specification (State and State +Requests) + + In section 6.1.3, modify the first sentence of the description of + GetFramebufferAttachmentParameteriv as follows: + + " must be DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or + FRAMEBUFFER. If is FRAMEBUFFER, it behaves as + though DRAW_FRAMEBUFFER_ANGLE was specified." + + Modify the title of Table 6.23 (Framebuffer State) to be "Framebuffer + (state per attachment point)". + + +Dependencies on OES_texture_3D + + On an OpenGL ES implementation, in the absense of OES_texture_3D, + omit references to FramebufferTexture3DOES and CopyTexSubImage3DOES. + +Errors + + The error INVALID_FRAMEBUFFER_OPERATION is generated if + BlitFramebufferANGLE is called while the + draw framebuffer is not framebuffer complete. + + The error INVALID_FRAMEBUFFER_OPERATION is generated if + BlitFramebufferANGLE, ReadPixels, CopyTex{Sub}Image*, is called while the + read framebuffer is not framebuffer complete. + + The error INVALID_OPERATION is generated if GetIntegerv is called + while the read framebuffer is not framebuffer complete, or if there + is no color attachment present on the read framebuffer object. + + The error INVALID_VALUE is generated by BlitFramebufferANGLE if + has any bits set other than those named by + COLOR_BUFFER_BIT, DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT. + + The error INVALID_OPERATION is generated if BlitFramebufferANGLE is + called and includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT + and the source and destination depth or stencil buffer formats do + not match. + + The error INVALID_OPERATION is generated if BlitFramebufferANGLE is + called and any of the following conditions are true: + - the source and destination rectangle dimensions do not match + (ie scaling or flipping is required). + - includes COLOR_BUFFER_BIT and the source and destination + buffer formats do not match. + - includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT and the + source or destination rectangles do not specify the entire source + or destination buffer (after applying any scissor region). + + The error INVALID_ENUM is generated by BlitFramebufferANGLE if + is not NEAREST. + + The error INVALID_ENUM is generated if BindFramebuffer, + CheckFramebufferStatus, FramebufferTexture{2D|3DOES}, + FramebufferRenderbuffer, or + GetFramebufferAttachmentParameteriv is called and is + not DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or FRAMEBUFFER. + +New State + + (Add a new table 6.xx, "Framebuffer (state per framebuffer target binding point)") + + Get Value Type Get Command Initial Value Description Section + ------------------------------ ---- ----------- -------------- ------------------- ------------ + DRAW_FRAMEBUFFER_BINDING_ANGLE Z+ GetIntegerv 0 framebuffer object bound 4.4.1 + to DRAW_FRAMEBUFFER_ANGLE + READ_FRAMEBUFFER_BINDING_ANGLE Z+ GetIntegerv 0 framebuffer object 4.4.1 + to READ_FRAMEBUFFER_ANGLE + + Remove reference to FRAMEBUFFER_BINDING from Table 6.23. + + (Add a new table 6.yy, "Framebuffer Dependent Values") + + Get Value Type Get Command Initial Value Description Section + ---------------------------- ---- ----------- -------------- ------------------- ------------ + SAMPLE_BUFFERS Z+ GetIntegerv 0 Number of multisample 3.2 + buffers + SAMPLES Z+ GetIntegerv 0 Coverage mask size 3.2 + + Remove the references to SAMPLE_BUFFERS and SAMPLES from Table 6.17. + + +Issues + + 1) What should we call this extension? + + Resolved: ANGLE_framebuffer_blit. + + This extension is a result of a collaboration between Google and + TransGaming for the open-source ANGLE project. Typically one would + label a multi-vendor extension as EXT, but EXT_framebuffer_blit + is already the name for this on Desktop GL. Additionally this + isn't truely a multi-vendor extension because there is only one + implementation of this. We'll follow the example of the open-source + MESA project which uses the project name for the vendor suffix. + + 2) Why is this done as a separate extension instead of just supporting + EXT_framebuffer_blit? + + To date, EXT_framebuffer_blit has not had interactions with OpenGL ES + specified and, as far as we know, it has not previously been exposed on + an ES 1.1 or ES 2.0 implementation. Because there are enough + differences between Desktop GL and OpenGL ES, and since OpenGL ES 2.0 + has already subsumed the EXT_framebuffer_object functionality (with + some changes) it was deemed a worthwhile exercise to fully specify the + interactions. Additionally, some of the choices in exactly which + functionality is supported by BlitFramebufferANGLE is dictated by + what is reasonable to support on a implementation which is + layered on Direct3D9. It is not expected that other implementations + will necessary have the same set of restrictions or requirements. + + 3) How does this extension differ from EXT_framebuffer_blit? + + This extension is designed to be a pure subset of the + EXT_framebuffer_blit functionality as applicable to OpenGL ES 2.0. + + Functionality that is unchanged: + - the split DRAW and READ framebuffer attachment points and related sematics. + - the token values for the DRAW/READ_FRAMEBUFFER and DRAW/READ_FRAMBUFFER_BINDING + - the signature of the BlitFramebuffer entry-point. + + Additional restrictions imposed by BlitFramebufferANGLE: + - no color conversions are supported + - no scaling, stretching or flipping are supported + - no filtering is supported (a consequence of no stretching) + - only whole depth and/or stencil buffers can be copied + +Revision History + + Revision 1, 2010/07/06 + - copied from revision 15 of EXT_framebuffer_object + - removed language that was clearly not relevant to ES2 + - rebased changes against the OpenGL ES 2.0 specification + - added ANGLE-specific restrictions + Revision 2, 2010/07/15 + - clarifications of implicit clamping to buffer sizes (from ARB_fbo) + - clarify that D/S restricts apply after the scissor is applied + - improve some error language + Revision 3, 2010/08/06 + - add additional contributors, update implementation status + Revision 4, 2012/09/22 + - document errors for GetIntegerv. + diff --git a/opengles/extensions/ANGLE/ANGLE_framebuffer_multisample.txt b/opengles/extensions/ANGLE/ANGLE_framebuffer_multisample.txt new file mode 100644 index 0000000000..cf5e45830c --- /dev/null +++ b/opengles/extensions/ANGLE/ANGLE_framebuffer_multisample.txt @@ -0,0 +1,363 @@ +Name + + ANGLE_framebuffer_multisample + +Name Strings + + GL_ANGLE_framebuffer_multisample + +Contributors + + Contributors to EXT_framebuffer_multisample + Daniel Koch, TransGaming Inc. + Shannon Woods, TransGaming Inc. + Kenneth Russell, Google Inc. + Vangelis Kokkevis, Google Inc. + +Contacts + + Daniel Koch, TransGaming Inc. (daniel 'at' transgaming 'dot' com) + +Status + + Implemented in ANGLE ES2 + +Version + + Last Modified Date: Aug 6, 2010 + Author Revision: #3 + +Number + + OpenGL ES Extension #84 + +Dependencies + + Requires OpenGL ES 2.0. + + Requires GL_ANGLE_framebuffer_blit (or equivalent functionality). + + The extension is written against the OpenGL ES 2.0 specification. + + OES_texture_3D affects the definition of this extension. + +Overview + + This extension extends the framebuffer object framework to + enable multisample rendering. + + The new operation RenderbufferStorageMultisampleANGLE() allocates + storage for a renderbuffer object that can be used as a multisample + buffer. A multisample render buffer image differs from a + single-sample render buffer image in that a multisample image has a + number of SAMPLES that is greater than zero. No method is provided + for creating multisample texture images. + + All of the framebuffer-attachable images attached to a framebuffer + object must have the same number of SAMPLES or else the framebuffer + object is not "framebuffer complete". If a framebuffer object with + multisample attachments is "framebuffer complete", then the + framebuffer object behaves as if SAMPLE_BUFFERS is one. + + The resolve operation is affected by calling + BlitFramebufferANGLE (provided by the ANGLE_framebuffer_blit + extension) where the source is a multisample application-created + framebuffer object and the destination is a single-sample + framebuffer object (either application-created or window-system + provided). + +New Procedures and Functions + + void RenderbufferStorageMultisampleANGLE( + enum target, sizei samples, + enum internalformat, + sizei width, sizei height); + +New Types + + None. + +New Tokens + + Accepted by the parameter of GetRenderbufferParameteriv: + + RENDERBUFFER_SAMPLES_ANGLE 0x8CAB + + Returned by CheckFramebufferStatus: + + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 + + Accepted by the parameter of GetBooleanv, GetIntegerv, + and GetFloatv: + + MAX_SAMPLES_ANGLE 0x8D57 + +Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation) + +Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) + + Add to the last paragraph of 3.7.2 (Alternate Texture Image Specification) + (as modified by ANGLE_framebuffer_blit) the following: + + "Calling CopyTexSubImage3DOES, CopyTexImage2D or CopyTexSubImage2D will + result in INVALID_OPERATION being generated if the object bound to + READ_FRAMEBUFFER_BINDING_ANGLE is "framebuffer complete" and the value + of SAMPLE_BUFFERS is greater than zero." + +Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment +Operations and the Framebuffer) + + Add to 4.3.1 (Reading Pixels), right before the subsection titled + "Obtaining Pixels from the Framebuffer": + + "ReadPixels generates INVALID_OPERATION if READ_FRAMEBUFFER_BINDING_ANGLE + (section 4.4) is non-zero, the read framebuffer is framebuffer + complete, and the value of SAMPLE_BUFFERS for the read framebuffer + is greater than zero." + + In 4.3.2 (Copying Pixels), add to the section describing BlitFramebuffer + that was added by ANGLE_framebuffer_blit. + + "If SAMPLE_BUFFERS for the read framebuffer is greater than zero and + SAMPLE_BUFFERS for the draw framebuffer is zero, the samples + corresponding to each pixel location in the source are converted to + a single sample before being written to the destination. + + If SAMPLE_BUFFERS for the draw framebuffer is greater than zero, + no copy is performed and an INVALID_OPERATION error is generated. + + If SAMPLE_BUFFERS for the read framebuffer is greater than zero and + includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, no copy is + performed and an INVALID_OPERATION error is generated. + + If SAMPLE_BUFFERS for the read framebuffer is greater than zero and + the format of the read and draw framebuffers are not identical, no + copy is performed and an INVALID_OPERATION error is generated. + + If SAMPLE_BUFFERS for the read framebuffer is greater than zero, the + dimensions of the source and destination rectangles provided to + BlitFramebufferANGLE must be identical and must specify the complete + source and destination buffers, otherwise no copy is performed and + an INVALID_OPERATION error is generated." + + Modification to 4.4.3 (Renderbuffer Objects) + + Add, just above the definition of RenderbufferStorage: + + "The command + + void RenderbufferStorageMultisampleANGLE( + enum target, sizei samples, + enum internalformat, + sizei width, sizei height); + + establishes the data storage, format, dimensions, and number of + samples of a renderbuffer object's image. must be + RENDERBUFFER. must be one of the color-renderable, + depth-renderable, or stencil-renderable formats described in table 4.5. + and are the dimensions in pixels of the renderbuffer. If + either or is greater than the value of + MAX_RENDERBUFFER_SIZE, or if is greater than MAX_SAMPLES_ANGLE, + then the error INVALID_VALUE is generated. If OpenGL ES is unable to + create a data store of the requested size, the error OUT_OF_MEMORY + is generated. + + Upon success, RenderbufferStorageMultisampleANGLE deletes any existing + data store for the renderbuffer image and the contents of the data + store after calling RenderbufferStorageMultisampleANGLE are undefined. + RENDERBUFFER_WIDTH is set to , RENDERBUFFER_HEIGHT is + set to , and RENDERBUFFER_INTERNAL_FORMAT is set to + . + + If is zero, then RENDERBUFFER_SAMPLES_ANGLE is set to zero. + Otherwise represents a request for a desired minimum + number of samples. Since different implementations may support + different sample counts for multisampled rendering, the actual + number of samples allocated for the renderbuffer image is + implementation dependent. However, the resulting value for + RENDERBUFFER_SAMPLES_ANGLE is guaranteed to be greater than or equal + to and no more than the next larger sample count supported + by the implementation. + + An OpenGL ES implementation may vary its allocation of internal component + resolution based on any RenderbufferStorageMultisampleANGLE parameter (except + target), but the allocation and chosen internal format must not be a + function of any other state and cannot be changed once they are + established. The actual resolution in bits of each component of the + allocated image can be queried with GetRenderbufferParameteriv." + + Modify the definiton of RenderbufferStorage as follows: + + "The command + + void RenderbufferStorage(enum target, enum internalformat, + sizei width, sizei height); + + is equivalent to calling RenderbufferStorageMultisampleANGLE with + equal to zero." + + In section 4.4.5 (Framebuffer Completeness) in the subsection + titled "Framebuffer Completeness" add an entry to the bullet list: + + * The value of RENDERBUFFER_SAMPLES_ANGLE is the same for all attached + images. + { FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE } + + Also add a paragraph to the end of the section after the definition + of CheckFramebufferStatus: + + "The values of SAMPLE_BUFFERS and SAMPLES are derived from the + attachments of the currently bound framebuffer object. If the + current DRAW_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer complete", + then both SAMPLE_BUFFERS and SAMPLES are undefined. Otherwise, + SAMPLES is equal to the value of RENDERBUFFER_SAMPLES_ANGLE for the + attached images (which all must have the same value for + RENDERBUFFER_SAMPLES_ANGLE). Further, SAMPLE_BUFFERS is one if + SAMPLES is non-zero. Otherwise, SAMPLE_BUFFERS is zero. + +Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions) + + +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State +Requests) + + In section 6.1.3 (Enumeraged Queries), modify the third paragraph + of the description of GetRenderbufferParameteriv as follows: + + "Upon successful return from GetRenderbufferParameteriv, if + is RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT, + RENDERBUFFER_INTERNAL_FORMAT, or RENDERBUFFER_SAMPLES_ANGLE, then + will contain the width in pixels, height in pixels, internal format, or + number of samples, respectively, of the image of the renderbuffer + currently bound to ." + + +Dependencies on ANGLE_framebuffer_blit + + ANGLE_framebuffer_blit is required. Technically, ANGLE_framebuffer_blit + would not be required to support multisampled rendering, except for + the fact that it provides the only method of doing a multisample + resovle from a multisample renderbuffer. + +Dependencies on OES_texture_3D + + On an OpenGL ES implementation, in the absense of OES_texture_3D, + omit references to CopyTexSubImage3DOES. + +Errors + + The error INVALID_OPERATION is generated if ReadPixels or + CopyTex{Sub}Image* is called while READ_FRAMEBUFFER_BINDING_ANGLE + is non-zero, the read framebuffer is framebuffer complete, and the + value of SAMPLE_BUFFERS for the read framebuffer is greater than + zero. + + If both the draw and read framebuffers are framebuffer complete and + the draw framebuffer has a value of SAMPLE_BUFFERS that is greater + than zero, then the error INVALID_OPERATION is generated if + BlitFramebufferANGLE is called. + + If both the draw and read framebuffers are framebuffer complete and + the read framebuffer has a value of SAMPLE_BUFFERS that is greater + than zero, the error INVALID_OPERATION is generated if + BlitFramebufferANGLE is called and any of the following conditions + are true: + - includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT. + - the source or destination rectangles do not specify the entire + source or destination buffer. + + If both the draw and read framebuffers are framebuffer complete and + either has a value of SAMPLE_BUFFERS that is greater than zero, then + the error INVALID_OPERATION is generated if BlitFramebufferANGLE is + called and the formats of the draw and read framebuffers are not + identical. + + If either the draw or read framebuffer is framebuffer complete and + has a value of SAMPLE_BUFFERS that is greater than zero, then the + error INVALID_OPERATION is generated if BlitFramebufferANGLE is called + and the specified source and destination dimensions are not + identical. + + If RenderbufferStorageMultisampleANGLE is called with not + equal to RENDERBUFFER, the error INVALID_ENUM is generated. + + If RenderbufferStorageMultisampleANGLE is called with an + that is not listed as one of the color-, depth- + or stencil-renderable formats in Table 4.5, then the error + INVALID_ENUM is generated. + + If RenderbufferStorageMultisampleANGLE is called with or + greater than MAX_RENDERBUFFER_SIZE, then the error + INVALID_VALUE is generated. + + If RenderbufferStorageMultisampleANGLE is called with a value of + that is greater than MAX_SAMPLES_ANGLE or less than zero, + then the error INVALID_VALUE is generated. + + The error OUT_OF_MEMORY is generated when + RenderbufferStorageMultisampleANGLE cannot create storage of the + specified size. + +New State + + Add to table 6.22 (Renderbuffer State) + + Get Value Type Get Command Initial Value Description Section + ------------------------------- ------ -------------------------- ------------- -------------------- ------- + RENDERBUFFER_SAMPLES_ANGLE Z+ GetRenderbufferParameteriv 0 number of samples 4.4.3 + + + Add to table 6.yy (Framebuffer Dependent Vaues) (added by + ANGLE_framebuffer_blit), the following new framebuffer dependent state. + + Get Value Type Get Command Minimum Value Description Section + ----------------- ---- ----------- ------------- ------------------- ------- + MAX_SAMPLES_ANGLE Z+ GetIntegerv 1 Maximum number of 4.4.3 + samples supported + for multisampling + + + +Issues + + Issues from EXT_framebuffer_multisample have been removed. + + 1) What should we call this extension? + + Resolved: ANGLE_framebuffer_blit. + + This extension is a result of a collaboration between Google and + TransGaming for the open-source ANGLE project. Typically one would + label a multi-vendor extension as EXT, but EXT_framebuffer_mulitsample + is already the name for this on Desktop GL. Additionally this + isn't truely a multi-vendor extension because there is only one + implementation of this. We'll follow the example of the open-source + MESA project which uses the project name for the vendor suffix. + + 2) How does this extension differ from EXT_framebuffer_multisample? + + This is designed to be a proper subset of EXT_framebuffer_multisample + functionality as applicable to OpenGL ES 2.0. + + Functionality that is unchanged: + - creation of multisample renderbuffers. + - whole buffer multi-sample->single-sample resolve. + - no format conversions, stretching or flipping supported on multisample blits. + + Additional restrictions on BlitFramebufferANGLE: + - multisample resolve is only supported on color buffers. + - no blits to multisample destinations (no single->multi or multi-multi). + - only entire buffers can be resolved. + +Revision History + + Revision 1, 2010/07/08 + - copied from revision 7 of EXT_framebuffer_multisample + - removed language that was not relevant to ES2 + - rebase changes against the Open GL ES 2.0 specification + - added ANGLE-specific restrictions + Revision 2, 2010/07/19 + - fix missing error code + Revision 3, 2010/08/06 + - add additional contributors, update implementation status + - disallow negative samples diff --git a/opengles/extensions/ANGLE/ANGLE_instanced_arrays.txt b/opengles/extensions/ANGLE/ANGLE_instanced_arrays.txt new file mode 100644 index 0000000000..97b9fe49dc --- /dev/null +++ b/opengles/extensions/ANGLE/ANGLE_instanced_arrays.txt @@ -0,0 +1,362 @@ +Name + + ANGLE_instanced_arrays + +Name Strings + + GL_ANGLE_instanced_arrays + +Contributors + + Contributors to ARB_instanced_arrays + Nicolas Capens, TransGaming Inc. + James Helferty, TransGaming Inc. + Kenneth Russell, Google Inc. + Vangelis Kokkevis, Google Inc. + +Contact + + Daniel Koch, TransGaming Inc. (daniel 'at' transgaming.com) + +Status + + Implemented in ANGLE r976. + +Version + + Last Modified Date: February 3, 2017 + Author Revision: 4 + +Number + + OpenGL ES Extension #109 + +Dependencies + + OpenGL ES 2.0 is required. + + This extension is written against the OpenGL ES 2.0 Specification. + +Overview + + A common use case in GL for some applications is to be able to + draw the same object, or groups of similar objects that share + vertex data, primitive count and type, multiple times. This + extension provides a means of accelerating such use cases while + restricting the number of API calls, and keeping the amount of + duplicate data to a minimum. + + This extension introduces an array "divisor" for generic + vertex array attributes, which when non-zero specifies that the + attribute is "instanced." An instanced attribute does not + advance per-vertex as usual, but rather after every + conceptual draw calls. + + (Attributes which aren't instanced are repeated in their entirety + for every conceptual draw call.) + + By specifying transform data in an instanced attribute or series + of instanced attributes, vertex shaders can, in concert with the + instancing draw calls, draw multiple instances of an object with + one draw call. + +IP Status + + No known IP claims. + +New Tokens + + Accepted by the parameters of GetVertexAttribfv and + GetVertexAttribiv: + + VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE + +New Procedures and Functions + + void DrawArraysInstancedANGLE(enum mode, int first, sizei count, + sizei primcount); + + void DrawElementsInstancedANGLE(enum mode, sizei count, enum type, + const void *indices, sizei primcount); + + void VertexAttribDivisorANGLE(uint index, uint divisor); + +Additions to Chapter 2 of the OpenGL ES 2.0 Specification +(OpenGL ES Operation) + + Modify section 2.8 (Vertex Arrays), p. 21 + + After description of EnableVertexAttribArray / DisableVertexAttribArray + add the following: + + "The command + + void VertexAttribDivisorANGLE(uint index, uint divisor); + + modifies the rate at which generic vertex attributes advance when + rendering multiple instances of primitives in a single draw call + (see DrawArraysInstancedANGLE and DrawElementsInstancedANGLE below). + If is zero, the attribute at slot advances once + per vertex. If is non-zero, the attribute advances once + per instances of the primitives being rendered. + An attribute is referred to as "instanced" if its value is + non-zero." + + Replace the text describing DrawArrays and DrawElements in the + "Transferring Array Elements" subsection of 2.8, from the second paragraph + through the end of the section with the following: + + "The command + + void DrawArraysOneInstance( enum mode, int first, sizei count, int instance ); + + does not exist in the GL, but is used to describe functionality in + the rest of this section. This function constructs a sequence of + geometric primitives by transferring elements through + + - 1 of each enabled non-instanced array to the GL. + specifies what kind of primitives are constructed, as defined in section + 2.6.1. + + If an enabled vertex attribute array is instanced (it has a non-zero + attribute as specified by VertexAttribDivisorANGLE), the element + that is transferred to the GL is given by: + + floor( / ). + + If an array corresponding to a generic attribute required by a vertex shader + is not enabled, then the corresponding element is taken from the current + generic attribute state (see section 2.7). + + If an array corresponding to a generic attribute required by a vertex shader + is enabled, the corresponding current generic attribute value is unaffected + by the execution of DrawArraysOneInstance. + + Specifying < 0 results in undefined behavior. Generating the error + INVALID_VALUE is recommended in this case. + + The command + + void DrawArrays( enum mode, int first, sizei count ); + + is equivalent to the command sequence + + DrawArraysOneInstance(mode, first, count, 0); + + The command + + void DrawArraysInstancedANGLE(enum mode, int first, sizei count, + sizei primcount); + + behaves identically to DrawArrays except that + instances of the range of elements are executed, and the + advances for each iteration. Instanced attributes that + have N, (where N > 0, as specified by + VertexAttribDivisorANGLE) advance once every N instances. + + It has the same effect as: + + if (mode, count, or primcount is invalid) + generate appropriate error + else { + for (i = 0; i < primcount; i++) { + DrawArraysOneInstance(mode, first, count, i); + } + } + + The command + + void DrawElementsOneInstance( enum mode, sizei count, enum type, + void *indices, int instance ); + + does not exist in the GL, but is used to describe functionality in + the rest of this section. This command constructs a sequence of + geometric primitives by successively transferring the elements + whose indices are stored in the currently bound element array buffer + (see section 2.9.2) at the offset defined by to the GL. + The -th element transferred by DrawElementsOneInstance will be taken + from element [i] of each enabled non-instanced array. + must be one of UNSIGNED_BYTE, UNSIGNED_SHORT, or UNSIGNED_INT, + indicating that the index values are of GL type ubyte, ushort, or uint + respectively. specifies what kind of primitives are constructed, + as defined in section 2.6.1. + + If an enabled vertex attribute array is instanced (it has a non-zero + attribute as specified by VertexAttribDivisorANGLE), the element + that is transferred to the GL is given by: + + floor( / ); + + If an array corresponding to a generic attribute required by a vertex + shader is not enabled, then the corresponding element is taken from the + current generic attribute state (see section 2.7). Otherwise, if an array + is enabled, the corresponding current generic attribute value is + unaffected by the execution of DrawElementsOneInstance. + + The command + + void DrawElements( enum mode, sizei count, enum type, + const void *indices); + + behaves identically to DrawElementsOneInstance with the + parameter set to zero; the effect of calling + + DrawElements(mode, count, type, indices); + + is equivalent to the command sequence: + + if (mode, count or type is invalid ) + generate appropriate error + else + DrawElementsOneInstance(mode, count, type, indices, 0); + + The command + + void DrawElementsInstancedANGLE(enum mode, sizei count, enum type, + const void *indices, sizei primcount); + + behaves identically to DrawElements except that + instances of the set of elements are executed and the instance + advances between each set. Instanced attributes are advanced as they do + during the execution of DrawArraysInstancedANGLE. It has the same effect as: + + if (mode, count, primcount, or type is invalid ) + generate appropriate error + else { + for (int i = 0; i < primcount; i++) { + DrawElementsOneInstance(mode, count, type, indices, i); + } + } + + If the number of supported generic vertex attributes (the value of + MAX_VERTEX_ATTRIBS) is , then the client state required to implement + vertex arrays consists of boolean values, memory pointers, + integer stride values, symbolic constants representing array types, + integers representing values per element, boolean values + indicating normalization, and integers representing vertex attribute + divisors. + + In the initial state, the boolean values are each false, the memory + pointers are each NULL, the strides are each zero, the array types are + each FLOAT, the integers representing values per element are each four, + and the divisors are each zero." + +Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) + + None + +Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment +Operations and the Framebuffer) + + None + +Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions) + + None + +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State +Requests) + + In section 6.1.8, add VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE to the list of + pnames accepted by GetVertexAttribfv and GetVertexAttribiv. + +Additions to the AGL/EGL/GLX/WGL Specifications + + None + +Dependencies on OES_element_index_uint + + If OES_element_index_uint is not supported, removed all references + to UNSIGNED_INT indices and the associated GL data type uint in + the description of DrawElementsOneInstance. + +Errors + + INVALID_VALUE is generated by VertexAttribDivisorANGLE if + is greater than or equal to MAX_VERTEX_ATTRIBS. + + INVALID_ENUM is generated by DrawElementsInstancedANGLE if is + not one of UNSIGNED_BYTE, UNSIGNED_SHORT or UNSIGNED_INT. + + INVALID_VALUE is generated by DrawArraysInstancedANGLE if , + , or is less than zero. + + INVALID_ENUM is generated by DrawArraysInstancedANGLE or + DrawElementsInstancedANGLE if is not one of the modes described in + section 2.6.1. + + INVALID_VALUE is generated by DrawElementsInstancedANGLE if or + is less than zero. + + INVALID_OPERATION is generated by DrawArraysInstancedANGLE or + DrawElementsInstancedANGLE if there is not at least one enabled + vertex attribute array that has a of zero and is bound to an + active generic attribute value in the program used for the draw command. + +New State + + Changes to table 6.2, p. 136 (Vertex Array Data) + + Initial + Get Value Type Get Command Value Description Sec. + --------- ----- ----------- ------- ----------- ---- + VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 8*xZ+ GetVertexAttrib 0 Instance Divisor 2.8 + +Issues + + 1) Should vertex attribute zero be instance-able? + + Resolved: Yes. + Discussion: In Direct3D 9 stream 0 must be specified as indexed data + and it cannot be instanced. In ANGLE we can work around this by + remapping any other stream that does have indexed data (ie a zero + attribute divisor) to stream 0 in D3D9. This works because the HLSL + vertex shader matches attributes against the stream by using the + shader semantic index. + + 2) Can all vertex attributes be instanced simultaneously? + + Resolved: No + Discussion: In rare cases it is possible for no attribute to have a + divisor of 0, meaning that all attributes are instanced and none of + them are regularly indexed. This in turn means each instance can only + have a single position element, and so it only actually renders + something when rendering point primitives. This is not a very + meaningful way of using instancing (which is likely why D3D restricts + stream 0 to be indexed regularly for position data in the first place). + We could implement it by drawing these points one at a time (essentially + emulating instancing), but it would not be very efficient and there + seems to be little-to-no value in doing so. + + If all of the enabled vertex attribute arrays that are bound to active + generic attributes in the program have a non-zero divisor, the draw + call should return INVALID_OPERATION. + + 3) Direct3D 9 only supports instancing for DrawIndexedPrimitive which + corresponds to DrawElementsInstanced. Should we support + DrawArraysInstanced? + + Resolved: Yes + Discussion: This can be supported easily enough by simply manufacturing + a linear index buffer of sufficient size and using that to do indexed + D3D9 drawing. + + 4) How much data is needed in a buffer for an instanced attribute? + + Resolved: Where stride is the value passed to VertexAttribPointer: + + if stride > 0 + size = stride * ceil(primcount / divisor); + else + size = elementsize * ceil(primcount / divisor); + +Revision History + + #4 February 3, 2017 Jon Leech + - Correct reference to ES 2.0 state table from 6.7 to 6.2 (public bug + 1390) + #3 February 8, 2012 dgkoch + - clarify Issue 3 and the error condition for no indexed attributes + #2 January 24, 2012 dgkoch + - fix typos, add clarifications, and more errors + #1 January 17, 2012 dgkoch + - initial GLES2 version from ARB_instanced_arrays diff --git a/opengles/extensions/ANGLE/ANGLE_pack_reverse_row_order.txt b/opengles/extensions/ANGLE/ANGLE_pack_reverse_row_order.txt new file mode 100644 index 0000000000..6ec06491e8 --- /dev/null +++ b/opengles/extensions/ANGLE/ANGLE_pack_reverse_row_order.txt @@ -0,0 +1,168 @@ +Name + + ANGLE_pack_reverse_row_order + +Name Strings + + GL_ANGLE_pack_reverse_row_order + +Contact + + Daniel Koch, TransGaming (daniel 'at' transgaming.com) + +Contributors + + Brian Salomon + Daniel Koch + +Status + + Implemented in ANGLE ES2 + +Version + + Last Modified Date: February 22, 2011 + Author Revision: 22 + +Number + + OpenGL ES Extension #110 + +Dependencies + + OpenGL 1.5 or OpenGL ES 1.0 are required. + + Some of the functionality of this extension is not supported + when implemented against OpenGL ES. + + EXT_texture_rg interacts with this extension. + + The extension is written against the OpenGL 3.2 Specification + (Core Profile). + +Overview + + This extension introduces a mechanism to allow reversing the order + in which image rows are written into a pack destination. This + effectively allows an application to flip the results of a ReadPixels + in the y direction operation without having to render upside down. + + The coordinate system of OpenGL is vertically reversed in comparison to a + number of other graphics systems such as native windowing APIs. Applications + that perform ReadPixels may have to either render to an intermediate color + buffer before calling ReadPixels or perform a flip in software after + ReadPixels. In some systems the GL can perform the row reversal during + ReadPixels without incurring additional cost. + +IP Status + + No known IP claims. + +New Procedures and Functions + + None + +New Types + + None + +New Tokens + + Accepted by the parameter of PixelStore{if}, GetIntegerv(), + GetBooleanv(), and GetFloatv(): + + PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 + +Additions to Chapter 3 of the OpenGL 3.2 Specification (Rasterization) + + In Section 4.3.1 (Reading Pixels) add a row to table 4.7: + + +------------------------------+---------+---------------+-------------+ + | Parameter Name | Type | Initial Value | Valid Range | + +------------------------------+---------+---------------+-------------+ + | PACK_REVERSE_ROW_ORDER_ANGLE | boolean | FALSE | TRUE/FALSE | + +------------------------------+---------+---------------+-------------+ + + In Section 4.3.1 (Reading Pixels) modify the second paragraph of subsection + "Placement in Pixel Pack Buffer or Client Memory" to read: + + When PACK_REVERSE_ROW_ORDER_ANGLE is FALSE groups of elements are placed + in memory just as they are taken from memory when transferring pixel + rectangles to the GL. That is, the ith group of the jth row + (corresponding to the ith pixel in the jth row) is placed in memory just + where the ith group of the jth row would be taken from when transferring + pixels. See Unpacking under section 3.7.2. The only difference is that + the storage mode parameters whose names begin with PACK_ are used + instead of those whose names begin with UNPACK_. If the format is RED, + GREEN, BLUE, or ALPHA, only the corresponding single element is written. + Likewise if the format is RG, RGB, or BGR, only the corresponding two or + three elements are written. Otherwise all the elements of each group are + written. When PACK_REVERSE_ROW_ORDER_ANGLE is TRUE the order of the rows + of elements is reversed before the data is packed. That is, the element + corresponding to pixel (x, y + height - 1) becomes the first element + packed, followed by (x + 1, y + height - 1), etc. Otherwise, pixel data + is packed in the same manner as when PACK_REVERSE_ROW_ORDER_ANGLE is + FALSE. + +Additions to Chapter 6 of the OpenGL 3.2 Specification (State and State Requests) + + In Section 6.1.4 add the following sentence to the fifth paragraph + (beginning with "For three-dimensional and two-dimensional array + textures..."): + When PACK_REVERSE_ROW_ORDER_ANGLE is TRUE the order of rows within + each image are reversed without reordering the images themselves. + +Dependencies on OpenGL ES + + If implemented for OpenGL ES, this extension behaves as specified, except: + + -Delete all references to formats RED, GREEN, BLUE, RG, and BGR. + + -The language about image order in Section 6.1.4 does not apply as OpenGL ES + does not have GetTexImage. + +Dependencies on EXT_texture_rg + + If EXT_texture_rg is present reinsert language about formats RED and RG + into the OpenGL ES 2.0 specification. + +Errors + + None + +New State + Initial + Get Value Type Get Command Value Description Sec. + --------- ---- ----------- ------- ----------- ---- + PACK_REVERSE_ROW_ORDER_ANGLE B GetIntegerv FALSE Pixel pack row order reversal 4.3.1 + +New Implementation Dependent State + + None + +Issues + + None + +Sample Code + + /* Allocate space to hold the pixel data */ + const GLvoid* pixels = malloc(width * height * 4); + + /* Bind the framebuffer object to be read */ + glBindFramebuffer(GL_READ_FRAMEBUFFER, framebuffer); + + /* Enable row order reversal */ + glPixelStore(GL_PACK_REVERSE_ROW_ORDER_ANGLE, TRUE); + + /* The pixel data stored in pixels will be in top-down order, ready for + * use with a windowing system API that expects this order. + */ + glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); + +Revision History + + Revision 1, 2011/11/22 (Brian Salomon) + - First version + Revision 2, 2012/02/22 (dgkoch) + - prepare for publishing diff --git a/opengles/extensions/ANGLE/ANGLE_program_binary.txt b/opengles/extensions/ANGLE/ANGLE_program_binary.txt new file mode 100644 index 0000000000..95eeefddf4 --- /dev/null +++ b/opengles/extensions/ANGLE/ANGLE_program_binary.txt @@ -0,0 +1,94 @@ +Name + + ANGLE_program_binary + +Name Strings + + GL_ANGLE_program_binary + +Contributors + + Alastair Patrick, Google Inc. + Daniel Koch, TransGaming Inc. + +Contact + + Alastair Patrick, Google Inc. (apatrick 'at' google 'dot' com) + +Status + + Implemented in ANGLE. + +Version + + Last Modifed Date: June 6, 2012 + Revision: #1 + +Number + + OpenGL ES Extension #139 + +Dependencies + + OpenGL ES 2.0 is required. + OES_get_program_binary is required. + This extension is written against the OpenGL ES 2.0.25 specification. + +Overview + + This extension makes available a program binary format, + PROGRAM_BINARY_ANGLE. It enables retrieving and loading of pre-linked + ANGLE program objects. + +New Procedures and Functions + + None + +New Tokens + + Accepted by the parameter of ProgramBinaryOES: + + PROGRAM_BINARY_ANGLE 0x93A6 + +Additions to Chapter 2 of the OpenGL-ES 2.0 Specification (OpenGL Operation) + + Add the following paragraph to the end of section 2.15.4, Program Binaries: + + "PROGRAM_BINARY_ANGLE, returned in the list of PROGRAM_BINARY_FORMATS_OES, + is a format that may be loaded into a program object via ProgramBinaryOES." + +Additions to Chapter 3 of the OpenGL ES 2.0 specification (Rasterizatoin) + + None. + +Additions to Chapter 4 of the OpenGL ES 2.0 specification (Per-Fragment +Operations and the Framebuffer) + + None. + +Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special +Functions) + + None. + +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State +Requests) + + None. + +Errors + + None + +New State + + None. + +Issues + + None + +Revision History + + 06/06/2012 apatrick intial revision + diff --git a/opengles/extensions/ANGLE/ANGLE_texture_compression_dxt.txt b/opengles/extensions/ANGLE/ANGLE_texture_compression_dxt.txt new file mode 100644 index 0000000000..0e844bfec0 --- /dev/null +++ b/opengles/extensions/ANGLE/ANGLE_texture_compression_dxt.txt @@ -0,0 +1,163 @@ +Name + + ANGLE_texture_compression_dxt + +Name Strings + + GL_ANGLE_texture_compression_dxt1 + GL_ANGLE_texture_compression_dxt3 + GL_ANGLE_texture_compression_dxt5 + +Contributors + + Gregg Tavares, Google Inc. + Daniel Koch, TransGaming Inc. + Al Patrick, Google Inc. + +Contacts + + Gregg Tavares, Google Inc. (gman 'at' google 'dot' com) + +Status + + Implemented in ANGLE ES2 + +Version + + Last Modified Date: Sept 22, 2012 + Author Revision: 2 + +Number + + OpenGL ES Extension #111 + +Dependencies + + Requires OpenGL ES 1.0. + + The extension is written against the OpenGL ES 2.0 specification. + +Overview + + These extensions are exactly the same as EXT_texture_compression_dxt1 + except they additionally expose the COMPRESSED_RGBA_S3TC_DXT3_ANGLE and + COMPRESSED_RGBA_S3TC_DXT5_ANGLE formats and have a size restrictions + such that the size must be a multiple of four (except for mip levels + where the dimensions are either 2 or 1). + + See EXT_texture_compression_dxt1 for the full list of changes. Also + see EXT_texture_compression_s3tc for a description of the formats. + +IP Status + + A license to the S3TC Intellectual Property may be necessary for + implementation of this extension. You should consult with your + Attorney to determine the need for a license. + +New Procedures and Functions + + None. + +New Types + + None. + +New Tokens + + Accepted by the parameter of CompressedTexImage2D + and the parameter of CompressedTexSubImage2D: + + COMPRESSED_RGB_S3TC_DXT1_ANGLE 0x83F0 + COMPRESSED_RGBA_S3TC_DXT1_ANGLE 0x83F1 + COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 + COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 + +Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) + + Add the following to Section 3.7.3 (Compressed Texture Images) + (at the end of the description of the CompressedTexImage2D command): + + Compressed Internal Format Base Internal Format + ========================== ==================== + COMPRESSED_RGB_S3TC_DXT1_ANGLE RGB + COMPRESSED_RGBA_S3TC_DXT1_ANGLE RGBA + COMPRESSED_RGBA_S3TC_DXT3_ANGLE RGBA + COMPRESSED_RGBA_S3TC_DXT5_ANGLE RGBA + + Table 3.x: Specific Compressed Internal Formats + + If is one of the S3TC formats listed in Table 3.x, + the compressed texture is stored in the appropriate S3TC compressed + texture format (see Appendix). The GL and the S3TC texture compression + algorithm support only 2D images without borders. + + CompressedTexImage2D will produce the INVALID_OPERATION error when + is one of the values from Table 3.x under the following + conditions: + + * is non-zero. + * is not one, two, or a multiple of four. + * is not one, two, or a multiple of four. + + Add the following to Section 3.7.3 (Compressed Texture Images) + (at the end of the description of the CompressedTexSubImage2D command): + + If the internal format of the texture image being modified is listed + in Table 3.x, the texture is stored in the appropriate S3TC compressed + texture format (see Appendix). Since DXT/S3TC images are easily edited + along 4x4 texel boundaries, the limitations of CompressedTexSubImage2D + are relaxed. CompressedTexSubImage2D will result in an INVALID_OPERATION + error only if one of the following conditions occurs: + + * is not a multiple of four or equal to TEXTURE_WIDTH. + * is not a multipls of four or equal to TEXTURE_HEIGHT. + * or is not a multiple of four. + * does not match the internal format of the texture image + being modified. + + The following restrictions at the end of section 3.7.3 do not apply + to S3TC DXT texture formats, since subimage modification is straightforward + as long as the subimage is properly aligned. + +Errors + + INVALID_OPERATION is generated by CompressedTexImage2D if + is one of the compressed internal formats from Table 3.x and any of the + following apply: + - is not equal to zero. + - is not one, two, or a multiple of four. + - is not one, two, or a multiple of four. + + INVALID_OPERATION is generated by TexImage2D and CopyTexImage2D if + is one of the compressed internal formats from + Table 3.x. + + INVALID_OPERATION is generated by TexSubImage2D and CopyTexSubImage2D + if the internal format of the texture currently bound to is + one of the compressed internal formats from Table 3.x. + + INVALID_OPERATION is generated by CompressedTexSubImage2D if + is one of the compressed interal formats from Table 3.x and any of the + following apply: + - is not a multiple of four or equal to TEXTURE_WIDTH; + - is not a multiple of four or equal to TEXTURE_HEIGHT; + - or is not a multiple of four; + - does not match the internal format of the texture image + being modified. + +New State + + None. + +Appendix: + + The format for the S3TC Compressed Texture Images Formats is documented + in the appendix of EXT_texture_compression_s3tc. + +Revision History + + Revision 1, 2010/08/06 - gman + - Initial revision + Revision 2, 2012/09/22 - dgkoch + - Added DXT1 formats and documented multiple of 4 restriction. + diff --git a/opengles/extensions/ANGLE/ANGLE_texture_usage.txt b/opengles/extensions/ANGLE/ANGLE_texture_usage.txt new file mode 100644 index 0000000000..17936538f7 --- /dev/null +++ b/opengles/extensions/ANGLE/ANGLE_texture_usage.txt @@ -0,0 +1,202 @@ +Name + + ANGLE_texture_usage + +Name Strings + + GL_ANGLE_texture_usage + +Contributors + + Nicolas Capens, TransGaming + Daniel Koch, TransGaming + +Contact + + Daniel Koch, TransGaming (daniel 'at' transgaming.com) + +Status + + Complete + +Version + + Last Modified Date: November 10, 2011 + Version: 2 + +Number + + OpenGL ES Extension #112 + +Dependencies + + This extension is written against the OpenGL ES 2.0 Specification. + +Overview + + In some implementations it is advantageous to know the expected + usage of a texture before the backing storage for it is allocated. + This can help to inform the implementation's choice of format + and type of memory used for the allocation. If the usage is not + known in advance, the implementation essentially has to make a + guess as to how it will be used. If it is later proven wrong, + it may need to perform costly re-allocations and/or reformatting + of the texture data, resulting in reduced performance. + + This extension adds a texture usage flag that is specified via + the TEXTURE_USAGE_ANGLE TexParameter. This can be used to + indicate that the application knows that this texture will be + used for rendering. + +IP Status + + No known IP claims. + +New Procedures and Functions + + None + +New Tokens + + Accepted as a value for for the TexParameter{if} and + TexParameter{if}v commands and for the parameter of + GetTexParameter{if}v: + + TEXTURE_USAGE_ANGLE 0x93A2 + + Accepted as a value to for the TexParameter{if} and + to for the TexParameter{if}v commands with a of + TEXTURE_USAGE_ANGLE; returned as possible values for when + GetTexParameter{if}v is queried with a of TEXTURE_USAGE_ANGLE: + + NONE 0x0000 + FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 + +Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL ES Operation) + + None + +Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) + + Add a new row to Table 3.10 (Texture parameters and their values): + + Name | Type | Legal Values + ------------------------------------------------------------ + TEXTURE_USAGE_ANGLE | enum | NONE, FRAMEBUFFER_ATTACHMENT_ANGLE + + Add a new section 3.7.x (Texture Usage) before section 3.7.12 and + renumber the subsequent sections: + + "3.7.x Texture Usage + + Texture usage can be specified via the TEXTURE_USAGE_ANGLE value + for the argument to TexParameter{if}[v]. In order to take effect, + the texture usage must be specified before the texture contents are + defined either via TexImage2D or TexStorage2DEXT. + + The usage values can impact the layout and type of memory used for the + texture data. Specifying incorrect usage values may result in reduced + functionality and/or significantly degraded performance. + + Possible values for when is TEXTURE_USAGE_ANGLE are: + + NONE - the default. No particular usage has been specified and it is + up to the implementation to determine the usage of the texture. + Leaving the usage unspecified means that the implementation may + have to reallocate the texture data as the texture is used in + various ways. + + FRAMEBUFFER_ATTACHMENT_ANGLE - this texture will be attached to a + framebuffer object and used as a desination for rendering or blits." + + Modify section 3.7.12 (Texture State) and place the last 3 sentences + with the following: + + "Next, there are the three sets of texture properties; each consists of + the selected minification and magnification filters, the wrap modes for + and , and the usage flags. In the initial state, the value assigned + to TEXTURE_MIN_FILTER is NEAREST_MIPMAP_LINEAR, and the value for + TEXTURE_MAG_FILTER is LINEAR. and wrap modes are both set to + REPEAT. The initial value for TEXTURE_USAGE_ANGLE is NONE." + + +Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment +Operations and the Framebuffer) + + None + +Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special +Functions): + + None + +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and +State Requests) + + None + +Dependencies on EXT_texture_storage + + If EXT_texture_storage is not supported, omit any references to + TexStorage2DEXT. + +Errors + + If TexParameter{if} or TexParamter{if}v is called with a + of TEXTURE_USAGE_ANGLE and the value of or is not + NONE or FRAMEBUFFER_ATTACHMENT_ANGLE the error INVALID_VALUE is + generated. + +Usage Example + + /* create and bind texture */ + glGenTextures(1, &texture); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, texture); + + /* specify texture parameters */ + glTexParameteri(GL_TEXTURE_2D, GL_*, ...); /* as before */ + + /* specify that we'll be rendering to the texture */ + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_USAGE_ANGLE, GL_FRAMEBUFFER_ATTACHMENT_ANGLE); + + glTexStorage2DEXT(GL_TEXTURE_2D, levels, ...); // Allocation + for(int level = 0; level < levels; ++level) + glTexSubImage2D(GL_TEXTURE_2D, level, ...); // Initialisation + +Issues + + 1. Should there be a dynamic usage value? + + DISCUSSION: We could accept a dynamic flag to indicate that a texture will + be updated frequently. We could map this to D3D9 dynamic textures. This would + allow us to avoid creating temporary surfaces when updating the texture. + However renderable textures cannot be dynamic in D3D9, which eliminates the + primary use case for this. Furthermore, the memory usage of dynamic textures + typically increases threefold when you lock it. + + 2. Should the texture usage be an enum or a bitfield? + + UNRESOLVED. Using a bitfield would allow combination of values to be specified. + On the other hand, if combinations are really required, additional + could be added as necessary. Querying a bitfield via the GetTexParameter command + feels a bit odd. + + 3. What should happen if TEXTURE_USAGE_ANGLE is set/changed after the texture + contents have been specified? + + RESOLVED: It will have no effect. However, if the texture is redefined (for + example by TexImage2D) the new allocation will use the updated usage. + GetTexParameter is used to query the value of the TEXTURE_USAGE_ANGLE + state that was last set by TexParameter for the currently bound texture, or + the default value if it has never been set. There is no way to determine the + usage that was in effect at the time the texture was defined. + +Revision History + + Rev. Date Author Changes + ---- ----------- --------- ---------------------------------------- + 1 10 Nov 2011 dgkoch Initial revision + 2 10 Nov 2011 dgkoch Add overview + + diff --git a/opengles/extensions/ANGLE/ANGLE_translated_shader_source.txt b/opengles/extensions/ANGLE/ANGLE_translated_shader_source.txt new file mode 100644 index 0000000000..69161156fc --- /dev/null +++ b/opengles/extensions/ANGLE/ANGLE_translated_shader_source.txt @@ -0,0 +1,118 @@ +Name + + ANGLE_translated_shader_source + +Name Strings + + GL_ANGLE_translated_shader_source + +Contributors + + Daniel Koch, TransGaming Inc. + Gregg Tavares, Google Inc. + Kenneth Russell, Google Inc. + Zhenyao Mo, Google Inc. + +Contact + + Zhenyao Mo, Google Inc. (zmo 'at' google 'dot' com) + +Status + + Implemented in ANGLE ES2 + +Version + + Last Modified Date: October 5, 2011 + Author Revision: 2 + +Number + + OpenGL ES Extension #113 + +Dependencies + + OpenGL ES 2.0 is required. + + The extension is written against the OpenGL ES 2.0 specification. + +Overview + + WebGL uses the GLSL ES 2.0 spec on all platforms, and translates these + shaders to the host platform's native language (HLSL, GLSL, and even GLSL + ES). For debugging purposes, it is useful to be able to examine the shader + after translation. + + This extension addes a new function to query the translated shader source, + and adds a new enum for GetShaderiv's parameter to query the + translated shader source length. + +IP Status + + No known IP claims. + +New Types + + None + +New Procedures and Functions + + void GetTranslatedShaderSourceANGLE(uint shader, sizei bufsize, + sizei* length, char* source); + +New Tokens + + Accepted by the parameter of GetShaderiv: + + TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 + +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State +Requests) + + Append in the end of the fourth paragraph of section 6.1.8 (Shader and + Program Queries): + + " If is TRANSLATED_SHADER_LENGTH_ANGLE, the length of the translated + source string, including a null terminator, is returned. If no source has + been defined, CompileShader has not been called, or the translation has + failed for , zero is returned." + + Append after the last paragraph of section 6.1.8 (Shader and Program + Queries): + + "The command + + void GetTranslatedShaderSourceANGLE( uint shader, sizei bufSize, + sizei *length, char *source ); + + returns in the string making up the translated source code for + the shader object . The string will be null terminated. + The actual number of characters written into , excluding the null + terminator, is returned in . If is NULL, no length is + returned. The maximum number of characters that may be written into + , including the null terminator, is speciï¬ed by . The + string is the translated string of a concatenation of the strings + passed to the GL using ShaderSource. The length of this translated string + is given by TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, which can be queried + with GetShaderiv. + + If no source has been defined, CompileShader has not been called, or the + translation has failed for , zero is returned for , and + an empty string is returned for . + + If the value of SHADER_COMPILER is not TRUE, then the error INVALID_- + OPERATION is generated." + +Issues + + 1) What enum value should be used for TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE? + + RESOLVED: The first draft used a temporary enum value. This been replaced + with a enum allocated from the ANGLE range of GL enums. + +Revision History + + Revision 1, 2011/09/29, zmo + - first draft + Revision 2, 2011/10/05, dgkoch + - assigned enum diff --git a/opengles/extensions/APPLE/APPLE_aux_depth_stencil.txt b/opengles/extensions/APPLE/APPLE_aux_depth_stencil.txt new file mode 100644 index 0000000000..762082b15e --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_aux_depth_stencil.txt @@ -0,0 +1,111 @@ +Name + + APPLE_aux_depth_stencil + +Name Strings + + GL_APPLE_aux_depth_stencil + +Contact + + Bob Beretta, Apple Inc. (beretta 'at' apple.com) + +Version + + 1.0 + +Number + + 370 + +Dependencies + + None + +Overview + + Normally, each OpenGL drawable allocates at most one depth buffer and one + stencil buffer, regardless of how many aux buffers there are. + + When the APPLE_aux_depth_stencil extension is used, and the depth buffer + size is non-zero, the GL silently allocates a separate depth buffer for the + color buffer and for each aux buffer. Similarly, if the stencil buffer size + is non-zero, a separate stencil buffer is allocated for the color buffer and + each aux buffer. This extension does not cause separate depth or stencil + buffers to be allocated for the left and right buffers of a stereo drawable. + A context with no aux buffers will be unaffected by this extension. + + Switching the draw or read buffer from the color buffer to an aux buffer, or + switching between two aux buffers, simultaneously switches the associated + depth and stencil buffers, for drawing or reading. + + For example, if an OpenGL context has two aux buffers and non-zero depth + buffer size, it will have a total of three depth buffers - one associated + with the color buffer and one associated with each aux buffer. If that + context is used to render to AUX0, then to render to AUX1, the changes to + the depth buffer made by the rendering to AUX1 will not affect the depth + buffer associated with AUX0, and vice versa. + +Issues + + (1) Because the additional depth and stencil buffers must be present when + the OpenGL context is created, the extension cannot be enabled or disabled + after context creation. How is it enabled? + + RESOLVED: The extension is enabled by creating the context with a pixel + format, or visual, specification that includes the aux_depth_stencil + attribure. On MacOSX, this is done by passing the CGLPFAAuxDepthStencil + boolean attribute to CGLChoosePixelFormat. If you create a context with an + aux_depth_stencil pixel format or visual, the context is permanently in + aux_depth_stencil mode. + + (2) Because the extension must be enabled before a context is created, there + is no extension string to query. Is there still an extension string? + + RESOLVED: The normal semantic of querying the OpenGL extension string does + not apply. If the extension is not supported, the attempt to create a pixel + format or visual with the aux_depth_stencil attribute will fail. However, + the GL_APPLE_aux_depth_stencil extension string is still exported for + consistency. + + (3) Once a context has been created, is it possible to whether or not + aux_depth_stencil is active? + + RESOLVED: Yes. GetIntegerv can be used to query AUX_DEPTH_STENCIL_APPLE to + see if the current context is an aux_depth_stencil context. The return + value is guaranteed to be TRUE if the context was created with an + aux_depth_stencil pixel format, and FALSE otherwise. + + (4) How does this extension interact with ARB_draw_buffers? + + RESOLVED: When a fragment program renders to multiple output color buffers, + only the depth and stencil buffers associated with draw buffer 0 are used. + The additional depth and stencil buffers created by aux_depth_stencil are + accessible to the fragment program only when their associated color buffer + is the current draw buffer 0. + +New Procedures and Functions + + None + +New Tokens + + Accepted by the parameter of GetIntegerv. + + AUX_DEPTH_STENCIL_APPLE 0x8A14 + +Errors + + None + +New State + + None + +New Implementation Dependent State + +Get Value Type Get Command Values Description Section +------------------------------- ------ ------------- ------------- ------------------ ------------ +AUX_DEPTH_STENCIL_APPLE Z2 GetIntegerv True or False aux depth stencil - + enabled + diff --git a/opengles/extensions/APPLE/APPLE_client_storage.txt b/opengles/extensions/APPLE/APPLE_client_storage.txt new file mode 100644 index 0000000000..c463a15d16 --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_client_storage.txt @@ -0,0 +1,204 @@ +Name + + APPLE_client_storage + +Name Strings + + GL_APPLE_client_storage + +Contact + + Geoff Stahl, Apple (gstahl 'at' apple.com) + +Status + + Complete + +Version + + $Date: 2002/08/27 01:40:16 $ $Revision: 1.6 $ + +Number + + 270 + +Dependencies + + OpenGL 1.1 is required. + The extension is written against the OpenGL 1.2.1 Specification. + +Overview + + This extension provides a simple mechanism to optimize texture data handling + by clients. GL implementations normally maintain a copy of texture image + data supplied clients when any of the various texturing commands, such as + TexImage2D, are invoked. This extension eliminates GL's internal copy of + the texture image data and allows a client to maintain this data locally for + textures when the UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter is + TRUE at the time of texture specification. Local texture data storage is + especially useful in cases where clients maintain internal copies of + textures used in any case. This results in what could be considered an + extra copy of the texture image data. Assuming all operations are error + free, the use of client storage has no affect on the result of texturing + operations and will not affect rendering results. APPLE_client_storage + allows clients to optimize memory requirements and copy operations it also + requires adherence to specific rules in maintaining texture image data. + + Clients using this extension are agreeing to preserve a texture's image data + for the life of the texture. The life of the texture is defined, in this + case, as the time from first issuing the TexImage3D, TexImage2D or + TexImage1D command, for the specific texture object with the + UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter set to TRUE, until the + DeleteTextures command or another TexImage command for that same object. + Only after DeleteTextures has completed, or new texture is specified, can + the local texture memory be released, as it will no longer be utilized by + OpenGL. Changing the UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter + will have no additional effect once the texturing command has been issued + and specifically will not alleviate the client from maintaining the texture + data. + + Client storage is implemented as a pixel storage parameter which affects + texture image storage at the time the texturing command is issued. As with + other pixel storage parameters this state may differ from the time the + texturing command in executed if the command is placed in a display list. + The PixelStore command is used to set the parameter + UNPACK_CLIENT_STORAGE_APPLE. Values can either be TRUE or FALSE, with TRUE + representing the use of client local storage and FALSE indicating the OpenGL + engine and not the client will be responsible for maintaining texture + storage for future texturing commands issued per the OpenGL specification. + The default state for the UNPACK_CLIENT_STORAGE_APPLE parameter is FALSE + + Client storage is only available for texture objects and not the default + texture (of any target type). This means that a texture object has to + generated and bound to be used with client storage. Setting + UNPACK_CLIENT_STORAGE_APPLE to TRUE and texturing with the default texture + will result in normally texturing with GL maintaining a copy of the texture + image data. + + Normally, client storage will be used in conjunction with normal texturing + techniques. An application would use GenTextures to generate texture + objects as needed. BindTexture to the texture object name of interest. + Enable client storage via the PixelStore command setting the + UNPACK_CLIENT_STORAGE_APPLE parameter to TRUE. Then use TexImage3D, + TexImage2D or TexImage1D to specify the texture image. If no further use of + client storage is desired, it is recommended to again use the PixelStore + command, in this case setting the UNPACK_CLIENT_STORAGE_APPLE parameter to + FALSE to disable client storage, since this pixel state is maintained unless + explicitly set by the PixelStore command. + + If an application needs to modify the texture, using TexSubImage for + example, it should be noted that the pointer passed to TexSubImage1D, + TexSubImage2D or TexSubImage3D does not have to the same, or within the + original texture memory. It if is not, there is the likelihood of GL + copying the new data to the original texture memory owned by the client, + thus actually modifying this texture image data. This does not affect + requirement to maintain the original texture memory but also does not add + the requirement to maintain the sub image data, due to the copy. + + Once a client has completed use of the texture stored in client memory, it + should issue a DeleteTextures command to delete the texture object or issue + a texture command, with the same target type, for the object, with either a + different data pointer, or UNPACK_CLIENT_STORAGE_APPLE set to false, in any + case, breaking the tie between GL and the texture buffer. An implicit Flush + command is issued in these cases, ensuring all access to the texture by + OpenGL is complete. Only at this point can the texture buffer be safely + released. Releasing the texture buffer prior has undefined results and will + very possibly display texel anomalies at run time. System level memory + management and paging schemes should not affect the use of client storage. + Consider in any case, that GL has an alias of the base pointer for this + block of texture memory which is maintained until GL is finished rendering + with the texture and it has been deleted or reassigned to another set of + texture data. As long as this alias exists, applications must not + de-allocate, move or purge this memory. + +New Procedures and Functions + + None + +New Tokens + + Accepted by the parameters of PixelStore: + + UNPACK_CLIENT_STORAGE_APPLE 0x85B2 + +Additions to Chapter 3 of the 1.2.1 Specification (Rasterization) + + + - (3.6.1, p. 75) Add new PixelStore parameter: + + Add to Table 3.1 (p. 76): + + Parameter Name Type Initial Value Valid Range + -------------- ---- ------------- ----------- + UNPACK_CLIENT_STORAGE_APPLE boolean FALSE TRUE/FALSE + + - (3.8.1, p. 117) Last paragraph first sentence changed to: + + "If the pixel storage parameter UNPACK_CLIENT_STORAGE_APPLE is false the + image indicated to the GL by the image pointer is decoded and copied into + the GL's internal memory." + + - (3.8.1, p. 118) Add paragraphs before to last paragraph in section: + + "If the pixel storage parameter UNPACK_CLIENT_STORAGE_APPLE is TRUE, GL + will not copy but instead will attempt to decode the texture image + data directly from client memory. GL will fall back to the default copy + and decode behavior if modifications to the texture image data are + required to decode the texels. This fall back may occur if ARB_imaging is + enabled, texture image data format or internal format indexed, + UNPACK_SWAP_BYTES is TRUE, or texturing from the default texture object. + Otherwise, GL will attempt to use the client local memory directly to + decode the texels. + + Clients using the UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter will + maintain a texture's image data for the life of the texture. The life of + the texture in this case is the time from issuing this texture command, + for the specific texture object, until the DeleteTextures command or + another texture command for this same texture object. Only after + DeleteTextures has completed, or new texture image data is specified, can + the client local memory be released. Releasing the texture buffer prior + has undefined results and will very possibly display texel anomalies at + run time. System level memory management and paging schemes should not + affect the use of client local storage. Consider, that GL has an alias of + the base pointer for this block of client memory which is maintained until + GL is finished rendering with the texture and it has been deleted or + reassigned to other texture image data. As long as this alias exists, + clients must not de-allocate, move or purge this memory. Otherwise, + texturing from with client local storage is unchanged from the default + copy and decode behavior." + + - (3.8.2, p. 123) Add final paragraph in section: + + "Note, if the existing target texture array has enabled client local + storage via the UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter and if + client local storage is being used, TexSubImage and CopyTexImage may + directly modify the client memory being used as storage for a texture's + image data." + +Additions to Chapter 6 of the 1.2.1 Specification (State and State Requests) + + None + +Additions to the GLX Specification + + None + +GLX Protocol + + None + +Errors + + None (Texturing using client local storage behaves as texturing with client + local storage and no additional errors are generated) + +New State + (table 6.17, p. 207) + Get Value Type Get Command Initial Value Description Sec. Attribute + --------- ---- ----------- ------------- ----------- ---- --------- + UNPACK_CLIENT_STORAGE_APPLE B GetBooleanv FALSE Value of 4.3 pixel-store + UNPACK_CLIENT_STORAGE_APPLE + +New Implementation Dependent State + + None diff --git a/opengles/extensions/APPLE/APPLE_clip_distance.txt b/opengles/extensions/APPLE/APPLE_clip_distance.txt new file mode 100644 index 0000000000..d9ed836f8e --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_clip_distance.txt @@ -0,0 +1,219 @@ +Name + + APPLE_clip_distance + +Name Strings + + GL_APPLE_clip_distance + +Contact + + Eric Sunalp, Apple (esunalp 'at' apple.com) + +Contributors + + Keith Bauer + Alex Eddy + Benj Lipchak + +Status + + Complete + +Version + + Last Modified Date: December 9, 2013 + Revision: 1 + +Number + + OpenGL ES Extension #193 + +Dependencies + + OpenGL ES 2.0 or OpenGL ES 3.0 is required. + + This extension is written against the OpenGL ES 2.0.25 Specification + (November 2, 2010) and the OpenGL ES 3.0.2 Specification (April 8, 2013). + +Overview + + This extension adds support for hardware clip planes to OpenGL ES 2.0 + and 3.0. These were present in OpenGL ES 1.1, but were removed to + better match certain hardware. Since they're useful for certain + applications, notable CAD, we return them here. + +IP Status + + No known IP claims. + +New Tokens + + Accepted by the parameters of GetBooleanv, GetIntegerv, + GetInteger64v, and GetFloatv: + + MAX_CLIP_DISTANCES_APPLE 0x0D32 + + Accepted by the parameters of Enable, Disable and IsEnabled: + + CLIP_DISTANCE0_APPLE 0x3000 + CLIP_DISTANCE1_APPLE 0x3001 + CLIP_DISTANCE2_APPLE 0x3002 + CLIP_DISTANCE3_APPLE 0x3003 + CLIP_DISTANCE4_APPLE 0x3004 + CLIP_DISTANCE5_APPLE 0x3005 + CLIP_DISTANCE6_APPLE 0x3006 + CLIP_DISTANCE7_APPLE 0x3007 + +Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation) +[ES2] or +Additions to Chapter 2 of the OpenGL ES 3.0 Specification (OpenGL Operation) +[ES3] + +Modify Section 2.13, Primitive Clipping (p. 46) [ES2] or +Modify Section 2.17, Primitive Clipping (p. 91) [ES3] + + This view volume may be further restricted by as many as n client- + defined half-spaces. (n is an implementation-dependent maximum that must + be at least 8.) + + The clip volume is the intersection of all such half-spaces with the view + volume (if no client-defined half-spaces are enabled, the clip volume is + the view volume). + + A vertex shader may write a single clip distance for each supported + half-space to elements of the gl_ClipDistance[] array. Half-space n is + then given by the set of points satisfying the inequality + + c_n(P) >= 0, + + where c_n(P) is the value of clip distance n at point P. For point + primitives, c_n(P) is simply the clip distance for the vertex in question. + For line and triangle primitives, per-vertex clip distances are + interpolated using a weighted mean, with weights derived according to the + algorithms described in sections 3.4 [ES2] or 3.5 [ES3] and + 3.5 [ES2] or 3.6[ES3]. + + Client-defined half-spaces are enabled with the generic Enable command + and disabled with the Disable command. The value of the argument to + either command is CLIP_DISTANCEi_APPLE, where i is an integer between 0 + and n − 1; specifying a value of i enables or disables the plane equation + with index i. The constants obey CLIP_DISTANCEi_APPLE = + CLIP_DISTANCE0_APPLE + i. + +Additions to OpenGL ES Shading Language 1.00 Specification [ES2] or +Additions to OpenGL ES Shading Language 3.00 Specification [ES3] + + Including the following line in a shader can be used to control + the language features described in this extension: + + #extension GL_APPLE_clip_distance : + + where is as described in section 3.4. + + A new preprocessor #define is added to the OpenGL ES Shading Language: + + #define GL_APPLE_clip_distance 1 + +Additions to Chapter 7 of the OpenGL ES Shading Language 1.00 Specification +(Built-in Variables) [ES2] or +Additions to Chapter 7 of the OpenGL ES Shading Language 3.00 Specification +(Built-in Variables) [ES3] + +Modify Section 7.1, Vertex Shader Special Variables (p. 59) [ES2] + + varying highp float gl_ClipDistance[]; + +Modify Section 7.1, Vertex Shader Special Variables (p. 77) [ES3] + + out highp float gl_ClipDistance[]; + +Modify Section 7.1, Vertex Shader Special Variables (p. 59) [ES2] or +Modify Section 7.1, Vertex Shader Special Variables (p. 77) [ES3] + + The variable gl_ClipDistance provides the mechanism for controlling + user clipping. The element gl_ClipDistance[i] specifies a clip distance + for each plane i. A distance of 0 means the vertex is on the plane, a + positive distance means the vertex is inside the clip plane, and a + negative distance means the point is outside the clip plane. The clip + distances will be linearly interpolated across the primitive and the + portion of the primitive with interpolated distances less than 0 will + be clipped. + + The gl_ClipDistance array is predeclared as unsized and must be sized by + the shader either redeclaring it with a size or indexing it only with + integral constant expressions. This needs to size the array to include + all the clip planes that are enabled via the OpenGL ES API; if the size + does not include all enabled planes, results are undefined. The size can + be at most gl_MaxClipDistances. The number of varying vectors (see + gl_MaxVaryingVectors) consumed by gl_ClipDistance will match the size + of the array divided by four, no matter how many planes are enabled. + The shader must also set all values in gl_ClipDistance that have been + enabled via the OpenGL API, or results are undefined. Values written + into gl_ClipDistance for planes that are not enabled have no effect. + +Modify Section 7.4, Built-in Constants (p. 61) [ES2] or +Modify Section 7.3, Built-In Constants (p. 78) [ES3] + + const mediump int gl_MaxClipDistances = 8; + +Additions to the AGL/EGL/GLX/WGL Specifications + + None + +Errors + + none + +New State + + Initial + Get Value Type Get Command Value Description Sec. + -------------- ------ ----------- -------- ----------------- ---- + CLIP_DISTANCE- 8* x B IsEnabled FALSE ith user clipping 2.13 [ES2] or + iAPPLE plane enabled 2.17 [ES3] + + +New Implementation Dependent State + + Minimum + Get Value Type Get Command Value Description Sec. + -------------- ------ ----------- -------- ----------------- ---- + MAX_CLIP_DIST- Z+ GetIntegerv 8 Maximum number of 2.13 [ES2] or + ANCES_APPLE user clipping 2.17 [ES3] + planes + +Conformance Tests + + Unspecified at this time. + +Issues + + (1) GLSL 300 doesn't support unsized arrays, how should gl_ClipDistance + be sized? + + RESOLVED: For maximal compatibility, it works like ES2/desktop, + remaining unsized until sized by direct access or explicitly + redeclared. Language describing this behavior must be added to the + extension specification since it's gone from the base language + specification. + + (2) Should we specify gl_ClipDistance as input to the fragment shader? + + RESOLVED: No. Although this departs from the desktop, we don't know + of anyone who needs or wants this behavior, and it complicates the + driver without adding any additional functionality (the user can + always pass clip distances to the fragment shader in user-defined + varyings if they wish). + + (3) Should the GLSL built-in be named gl_ClipDistanceAPPLE? + + RESOLVED: No. Very few GLSL extensions have adopted name suffixes, it + would hinder portability of shaders between OpenGL and OpenGL ES, and + if in the future gl_ClipDistance becomes part of some core ES shading + language there are no likely incompatibilities with this extension. + +Revision History + + Revision 1, 2013/12/13 + - diff --git a/opengles/extensions/APPLE/APPLE_color_buffer_packed_float.txt b/opengles/extensions/APPLE/APPLE_color_buffer_packed_float.txt new file mode 100644 index 0000000000..4451d285da --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_color_buffer_packed_float.txt @@ -0,0 +1,174 @@ +Name + + APPLE_color_buffer_packed_float + +Name Strings + + GL_APPLE_color_buffer_packed_float + +Contributors + + Alexander Rogoyski, Apple Inc + Serge Metral, Apple Inc + +Contact + + Alexander Rogoyski, Apple Inc (rogoyski 'at' apple.com) + +Status + + Complete + +Version + + Last Modified Date: February 13, 2014 + Version: 1.0 + +Number + + OpenGL ES Extension #194 + +Dependencies + + Requires EXT_color_buffer_half_float + + Requires OpenGL ES 3.0 or APPLE_texture_packed_float + + Written against the OpenGL ES 2.0.25 (Nov. 2010) Specification. + + OpenGL ES 2.0 interacts with this extension. + + OpenGL ES 3.0 interacts with this extension. + +Overview + + This extension allows two packed floating point formats + R11F_G11F_B10F and as RGB9_E5 defined in APPLE_texture_packed_float or + OpenGL ES 3.0 or to be rendered to via framebuffer objects. + +New Procedures and Functions + + None + +New Tokens + + None + +Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment +Operations and the Framebuffer) + + Modify Section 4.3.1 (Reading Pixels), p. 104 + + (modify first paragraph, p 104) ...Only two combinations of format and type + are accepted. The first varies depending on the format of the currently + bound rendering surface. For normalized fixed-point rendering surfaces, + the combination format RGBA and type UNSIGNED_BYTE is accepted. For + R11F_G11F_B10F surfaces, the combination RGB and + UNSIGNED_INT_10F_11F_11F_REV_APPLE is accepted. For RGB9_E5 surfaces, the + combination RGB and GL_UNSIGNED_INT_5_9_9_9_REV_APPLE is accepted. For + floating-point rendering surfaces, the combination format RGBA and type + FLOAT is accepted. The second is an implementation-chosen format... + + (modify "Conversion of RGBA Values", p. 106) The R, G, B, and A values + form a group of elements. For a fixed-point color buffer, each element is + converted to floating-point according to section 2.1.2. For a floating- + point color buffer, the elements are unmodified. + + Add to Table 4.4, p. 106: + + type Parameter Component + Token Name GL Data Type Conversion Formula + ---------------------------------- ------------- ------------------ + UNSIGNED_INT_10F_11F_11F_REV_APPLE uint see below + UNSIGNED_INT_5_9_9_9_REV uint see below + + + (modify "Final Conversion", p. 106) If type is not FLOAT, HALF_FLOAT_OES, + UNSIGNED_INT_10F_11F_11F_REV_APPLE or UNSIGNED_INT_5_9_9_9_REV + each component is first clamped to [0,1]. Then the appropriate conversion + formula from table 4.4 is applied to the component. + + "Encoding of Special Internal Formats" + + If is UNSIGNED_INT_10F_11F_11F_REV_APPLE, the red, green, + and blue bits are converted to unsigned 11-bit, unsigned 11-bit, + and unsigned 10-bit floating-point values as described in + "Unsigned 11-BitFloating-Point Numbers" and "Unsigned 10-Bit + Floating-Point Numbers" + + If is UNSIGNED_INT_5_9_9_9_REV_APPLE, the red, green, and + blue bits are converted to a shared exponent format according to + the following procedure: Components red, green, and blue are + first clamped (in the process, mapping NaN to zero) as follows: + + red_c = max(0, min(sharedexp_max, red)) + green_c = max(0, min(sharedexp_max, green)) + blue_c = max(0, min(sharedexp_max, blue)) + + where: + + sharedexp_max = (2^N - 1) / 2^N * 2^(E_max - B) + + N is the number of mantissa bits per component (9), B is the + exponent bias (15), and E_max is the maximum allowed biased exponent + value (31). The largest clamped component, max_c, is determined: + + max_c = max(red_c, green_c, blue_c) + + A preliminary shared exponent exp_p is computed: + + exp_p = max(-B - 1, floor(log2(max_c))) + 1 + B + + A refined shared exponent exp_s is computed: + + max_s = floor(max_c / 2^(exp_p - B - N) + 0.5) + + / exp_p, 0 <= max_s < 2^N + exp_s = + \ exp_p+1, max_s = 2^N + + Finally, three integer values in the range 0 to 2^N - 1 are computed: + + red_s = floor(red_c / 2^(exp_s - B - N) + 0.5) + green_s = floor(green_c / 2^(exp_s - B - N) + 0.5) + blue_s = floor(blue_c / 2^(exp_s - B - N) + 0.5) + + The resulting red_s, green_s, blue_s, and exp_s are stored in the red, + green, blue, and shared bits respectively. + + Add to Table 4.5, p. 117: + + Sized Renderable R G B A D S Shared + Internal Format Type bits bits bits bits bits bits bits + -------------------- ---------------- ---- ---- ---- ---- ---- ---- ------ + R11F_G11F_B10F_APPLE color-renderable f11 f11 f10 + RGB9_E5_APPLE color-renderable 9 9 9 5 + + (modify table description) Table 4.5: Renderbuffer image formats, showing + their renderable type (color-, depth-, or stencil-renderable) and the number + of bits each format contains for color (R, G, B, A), depth (D), and stencil + (S) components. The component resolution prefix indicates the internal data + type: f is floating-point, no prefix is unsigned normalized fixed-point. + +Errors + + Relaxation of INVALID_ENUM errors + --------------------------------- + + RenderbufferStorage accepts the new R11F_G11F_B10F_APPLE and + RGB9_E5_APPLE token for . + +Dependencies on OpenGL ES 3.0 + + Replace all references to UNSIGNED_INT_10F_11F_11F_REV_APPLE and + UNSIGNED_INT_5_9_9_9_REV_APPLE with non _APPLE versions respectively. + +New Implementation Dependent State + + None + +Revision History + + 1.0 2014/02/1 rogoyski Initial version + + diff --git a/opengles/extensions/APPLE/APPLE_copy_texture_levels.txt b/opengles/extensions/APPLE/APPLE_copy_texture_levels.txt new file mode 100644 index 0000000000..405f32c69d --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_copy_texture_levels.txt @@ -0,0 +1,171 @@ +Name + + APPLE_copy_texture_levels + +Name Strings + + GL_APPLE_copy_texture_levels + +Contact + + Eric Sunalp, Apple Inc., (esunalp 'at' apple.com) + +Contributors + + Alex Eddy, Apple + Richard Schreyer, Apple + Eric Sunalp, Apple + Michael Swift, Apple + +Status + + Complete + +Version + + Last Modified Date: November 29, 2011 + Revision: 2 + +Number + + OpenGL ES Extension #123 + +Dependencies + + OpenGL ES 1.1 or OpenGL ES 2.0 is required. + + EXT_texture_storage is required. + + This specification is written against the OpenGL ES 2.0.25 (Full Specification). + +Overview + + This extension provides an efficient path for copying a contiguous subset of mipmap + levels from one texture to the matching subset of mipmap levels of another texture, + where matches are determined by the equality of a level's dimensions. + + This extension is dependent on the existence of the extension EXT_texture_storage. + Immutable textures are used to guarantee that storage is allocated up front for the + source and destination textures and that the internal formats of those textures are + sized the same. + + An efficient copy can be achieved by implementations because the internal storage + requirements are the same between textures and will remain unchanged when moving data. + It is expected that in all cases, moving levels from one texture to another is a + simple copy operation without any necessary conversion. This extension can be used as + an alternative to TEXTURE_BASE_LEVEL. In some implementations, changing the value of + TEXTURE_BASE_LEVEL can incur a costly re-allocation at runtime. + + Texture streaming is an expected use case for this extension. For example, a developer + may want to stream in a larger base level for a given texture from a storage device. + To achieve this, a copy of the current mipmap levels are made into a destination + whose storage was specified to accommodate the source levels and the larger base + level. The efficiency of the copy without conversion allows for the smaller mipmap + levels to be in place while the larger base level is being read from the storage + device and uploaded. + +New Tokens + + None + +New Procedures and Functions + + void CopyTextureLevelsAPPLE(uint destinationTexture, uint sourceTexture, + int sourceBaseLevel, sizei sourceLevelCount); + +New State + + None + +New Implementation Dependent State + + None + +Additions to Chapter 3 of the 2.0.25 Specification (Rasterization) + + -- Restate the first paragraph of section 3.7.2, Alternate Texture Image Specification + Commands + + Texture images may also be specified using image data taken directly from the + framebuffer or from a subset of levels of a given texture. Rectangular subregions of + existing texture images may also be respecified. + + -- Append to section 3.7.2, Alternate Texture Image Specification Commands + + The command + + void CopyTextureLevelsAPPLE(uint destinationTexture, uint sourceTexture, + int sourceBaseLevel, sizei sourceLevelCount); + + is used to specify a texture image by copying a contiguous subset of mipmap levels + from one texture to the matching subset of mipmap levels of another texture, where + matches are determined by the equality of a level's dimensions. An INVALID_OPERATION + is generated when the count and dimensions of the source texture levels don't exactly + match the count and dimensions of a subset of corresponding destination texture + levels. + + Both and specify the texture object names to act + as the source and destination of the copy as apposed to operating on the currently + bound textures for a given set of texture units. + + It is a requirement that both and are immutable + textures and that they are both specified with the same sized internal format + enumeration. An INVALID_OPERATION is generated if either texture's + TEXTURE_IMMUTABLE_FORMAT_EXT is FALSE or if the sized internal formats don't match. + It is a requirement that the 's target specification is the same as + the 's target specification. If not, then an INVALID_OPERATION + is generated. + + and are used to specify the inclusive range of + mipmap levels to be copied from the source texture to the destination texture. + can assume a value from zero to n-1, where n is the number of levels + for which the source texture was specified. Anything outside of this range will result + in the generation of an INVALID_VALUE error. is added to + to specify the range of levels to be copied to the destination. An + INVALID_VALUE is generated if that value is greater than the number of levels for + which the source texture was specified. Additionally, must be + equal to or greater than one, or an INVALID_VALUE will be generated. + +Errors + + The error INVALID_OPERATION is generated by CopyTextureLevelsAPPLE when the count and + dimensions of the source texture levels, from source base level to source base level + plus source level count, don't exactly match the count and dimensions of a subset of + matching destination texture levels. + + The error INVALID_OPERATION is generated by CopyTextureLevelsAPPLE if either the + source texture or destination texture is a texture for which + TEXTURE_IMMUTABLE_FORMAT_EXT is FALSE. + + The error INVALID_OPERATION is generated by CopyTextureLevelsAPPLE if the internal format + of the source texture is different than that of the destination texture. + + The error INVALID_OPERATION is generated by CopyTextureLevelsAPPLE if the source and + the destination target specification differ. + + The error INVALID_VALUE is generated by CopyTextureLevelsAPPLE if the value passed to + the parameter or is zero. + + The error INVALID_VALUE is generated by CopyTextureLevelsAPPLE if the value passed to + the parameter is less than zero. + + The error INVALID_VALUE is generated by CopyTextureLevelsAPPLE if the value passed to + the parameter is greater than n-1, where n is the number of levels + for which the source texture was specified. + + The error INVALID_VALUE is generated by CopyTextureLevelsAPPLE if the value passed to + the parameter , is less than one, or when added to the parameter + , is greater than n-1, where n is the number of levels for which the + source texture was specified. + +Issues + + None + +Revision History + + Revision 2, 2011/11/29 (Eric Sunalp) + - Incorporate initial feedback. + + Revision 1, 2011/11/10 (Eric Sunalp) + - Draft proposal. diff --git a/opengles/extensions/APPLE/APPLE_element_array.txt b/opengles/extensions/APPLE/APPLE_element_array.txt new file mode 100644 index 0000000000..c6ce8fbec2 --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_element_array.txt @@ -0,0 +1,288 @@ +Name + + APPLE_element_array + +Name Strings + + GL_APPLE_element_array + +Contact + + Bob Beretta, Apple Computer (beretta 'at' apple.com) + +Version + + 1.0 + +Number + + 271 + +Dependencies + + Written based on the wording of the OpenGL 1.3 specification. + + Assumes support for the APPLE_vertex_array_range extension. + +Overview + + This extension provides facilities to improve DrawElements style vertex + indices submission performance by allowing index arrays. Using this + extension these arrays can be contained inside a vertex array range and + thus pulled directly by the graphics processor, avoiding the CPU overhead + of touching the index data. + + This extension is most useful when used in conjunction with the + APPLE_vertex_array_range extension. APPLE_vertex_array_range provides an + interface for storing vertex array data. In cases where large amounts of + vertex data are in use, the index data used to construct primitives + (typically as passed to the GL through DrawElements) can impose a + significant bandwidth burden. APPLE_element_array allows the application to + specify independent arrays of elements, which can then be cached using + APPLE_vertex_array_range. In effect this creates a more orthogonal + interface for both vertex indices and data. + + +Issues + + Must the element array be enabled? + + RESOLVED: Yes, for orthogonality with the rest of the API. + +New Procedures and Functions + + void ElementPointerAPPLE(enum type, const void *pointer); + + void DrawElementArrayAPPLE(enum mode, int first, sizei count) + + void DrawRangeElementArrayAPPLE(enum mode, uint start, + uint end, int first, sizei count) + + void MultiDrawElementArrayAPPLE(enum mode, const int *first, + const sizei *count, sizei primcount); + + void MultiDrawRangeElementArrayAPPLE(enum mode, uint start, uint end, + const int *first, + const sizei *count, + sizei primcount); + + +New Tokens + + Accepted by the parameter of EnableClientState and + DisableClientState and the parameter of IsEnabled: + + ELEMENT_ARRAY_APPLE 0x8A0C + + Accepted by the parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev: + + ELEMENT_ARRAY_TYPE_APPLE 0x8A0D + + Accepted by the parameter of GetPointerv: + + ELEMENT_ARRAY_POINTER_APPLE 0x8A0E + + +Additions to Chapter 2 of the GL Specification (OpenGL Operation) + + In section 2.6.3, GL Commands within Begin/End, add + ElementArrayAPPLE to the list of commands that are not allowed + within any Begin/End pair, but may or may not generate an error. + + + Inserted in section 2.8, Vertex Arrays, after the description of + DrawRangeElements, but before the description of + InterleavedArrays: + + "The commands + + void DrawElementArrayAPPLE(enum mode, int first, sizei count) + + void DrawRangeElementArrayAPPLE(enum mode, uint start, + uint end, int first, sizei count) + + can be used to construct a sequence of geometric primitives in the same + manner as DrawElements and DrawRangeElements, but using a previously defined + array of indices. For DrawElementArrayAPPLE, the and + arguments match the corresponding arguments to DrawElements. For + DrawRangeElementArrayAPPLE, the , , and arguments + match the corresponding arguments to DrawRangeElements. For either routine, + the argument specifies the first element of the current element + array to be used in generating primitives. + + For both DrawElementArrayAPPLE and DrawRangeElementArrayAPPLE, the list of + indices used to generate primitives is defined by the command + + void ElementPointer(enum type, const void *pointer) + + The argument is used to specify the list of indices, and the + argument specifies their format. These arguments match the and + arguments to DrawElements and DrawRangeElements, and the allowed + types match those accepted by these two commands -- GL_UNSIGNED_BYTE, + GL_UNSIGNED_SHORT, and GL_UNSIGNED_INT. ElementPointer does not specify a + stride between successive indices in the array, the values must be stored + sequentially in memory. + + The commands MultiDrawElementArrayAPPLE and MultiDrawRangeElementArrayAPPLE + provides functionality equivalent to EXT_multi_draw_arrays allowing multiple + lists of indices in one call. + + + The command + + void MultiDrawElementArrayAPPLE(enum mode, const int *first, + const sizei *count, sizei primcount) + + is equivalent to the following sequence of commands: + + for(i=0; i=0) && (*(count+i)>0)) + DrawElementArrayAPPLE(mode, *(first+i), *(count+i)); + } + + and the command + + void MultiDrawRangeElementArrayAPPLE(enum mode, uint start, uint end, + const int *first, + const sizei *count, + sizei primcount) + + is equivalent to the following sequence of commands: + + for(i=0; i=0) && (*(count+i)>0)) + DrawRangeElementArrayAPPLE(mode, start, end, *(first+i), + *(count+i)); + } + + The array of element indices can be enabled and disabled by calling + EnableClientState and DisableClientState with the argument + ELEMENT_ARRAY_APPLE. DrawElements and DrawRangeElements ignore the currently + enabled element array. + + If a DrawElementArrayAPPLE or DrawRangeElementArrayAPPLE command is issued + when there is no currently enabled element array, an error is generated, no + drawing is done and the current state is not updated." + + + Replace the last paragraph of section 2.8 "Vertex Arrays" (page 28) with the + following: + + "If the number of supported texture units (the value of MAX_TEXTURE_UNITS) + is k, then the client state required to implement vertex arrays consists of + 5+k boolean values, 6+k memory pointers, 5+k integer stride values, 5+k + symbolic constants representing array types, and 3+k integers representing + values per element. In the initial state, the boolean values are each + disabled, the memory pointers are each null, the strides are each zero, the + array types are each FLOAT, except for the element array type, which is + UNSIGNED_INT, and the integers representing values per element are each + four." + + + Add to the section describing the operation of the vertex array range: + + "When the vertex array range is valid, changes to element array data used by + the DrawElementArrayAPPLE, DrawRangeElementArrayAPPLE, + MultiDrawElementArrayAPPLE, and MultiDrawRangeElementArrayAPPLE commands + need to be synchronized in the same manner as other vertex array data. + + Undefined vertices maybe generated by DrawElementArrayAPPLE, + DrawRangeElementArrayAPPLE, MultiDrawElementArrayAPPLE, or + MultiDrawRangeElementArrayAPPLE when the vertex array range is enabled if + any element required by the element array falls outside of the vertex array + range." + + +Additions to Chapter 3 of the 1.3 Specification (Rasterization) + + None + + +Additions to Chapter 4 of the 1.3 Specification (Per-Fragment +Operations and the Frame Buffer) + + None + + +Additions to Chapter 5 of the 1.3 Specification (Special Functions) + + In section 5.4, Display Lists, change the last sentence of the first + paragraph to read: + + "(Vertex array and element array pointers are de-referenced when the + commands ArrayElement, DrawArrays, DrawElements, DrawRangeElements, + DrawElementArrayAPPLE, or DrawRangeElementArrayAPPLE are accumulated into a + display list.) + + In section 5.4, Display Lists, add ElementArrayAPPLE to the list of commands + that are not compiled into display lists but are executed immediately. In + additional add to the end of the section: + + "If a display list is compiled while VERTEX_ARRAY_RANGE_APPLE is enabled, + the commands ArrayElement, DrawArrays, DrawElements, + DrawRangeElements, DrawElementArrayAPPLE, DrawRangeElementArrayAPPLE, + MultiDrawElementArrayAPPLE, and MultiDrawRangeElementArrayAPPLE are + accumulated into a display list as if VERTEX_ARRAY_RANGE_APPLE is + disabled." + + +Additions to Chapter 6 of the 1.3 Specification (State and State +Requests) + + In "Pointer and String Queries", section 6.1.11, add + ELEMENT_ARRAY_POINTER_APPLE to the list of possible values for the + parameter of GetPointerv. + + +Additions to the specification of APPLE_vertex_array_range + + The element array is included in the vertex array data that is expected + to reside fully within the specified vertex array range, if enabled. If + elements in the array lie outside the current vertex array range the + result is undefined. + + +Errors + + The error INVALID_OPERATION is generated if DrawElementArrayAPPLE, + DrawRangeElementArrayAPPLE, MultiDrawElementArrayAPPLE, or + MultiDrawRangeElementArrayAPPLE is called between the execution of Begin and + the corresponding execution of End. + + The error INVALID_VALUE is generated if DrawElementArrayAPPLE or + DrawRangeElementArrayAPPLE is called where either or is + negative. + + The error INVALID_VALUE is generated if MultiDrawElementArrayAPPLE or + MultiDrawRangeElementArrayAPPLE is called where is negative. + + The error INVALID_VALUE is generated if DrawRangeElementArrayAPPLE or + MultiDrawRangeElementArrayAPPLE is called where is greater than + . + + INVALID_ENUM is generated if the parameter of ElementPointerAPPLE is + not UNSIGNED_BYTE, UNSIGNED_SHORT, or UNSIGNED_INT. + + INVALID_OPERATION is generated if a DrawElementArrayAPPLE, + DrawRangeElementArrayAPPLE, MultiDrawElementArrayAPPLE or + MultiDrawRangeElementArrayAPPLE command is issued when there is no currently + enabled element array. + + +New State + + Added to table 6.6, Vertex Array Data + + Get Value Get Command Type Initial Value Attrib + --------- ----------- ---- ------------- ------ + ELEMENT_ARRAY_APPLE IsEnabled B False client + ELEMENT_ARRAY_TYPE_APPLE GetIntegerv Z4 UNSIGNED_INT client + ELEMENT_ARRAY_POINTER_APPLE GetPointerv Z+ 0 client + + +Implementation Notes + + For maximum performance, applications should use + UNSIGNED_SHORT or UNSIGNED_INT indices. + diff --git a/opengles/extensions/APPLE/APPLE_fence.txt b/opengles/extensions/APPLE/APPLE_fence.txt new file mode 100644 index 0000000000..8047e82c51 --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_fence.txt @@ -0,0 +1,311 @@ +Name + + APPLE_fence + +Name Strings + + GL_APPLE_fence + +Contact + + Geoff Stahl, Apple (gstahl 'at' apple.com) + +Status + + Shipping as of August 24, 2002 (Mac OS X v10.2) + +Version + + $Date: 2002/08/23 00:31:45 $ $Revision: 1.3 $ + +Number + + 272 + +Dependencies + + None + +Overview + + This extension is provided a finer granularity of synchronizing GL command + completion than offered by standard OpenGL, which currently offers only two + mechanisms for synchronization: Flush and Finish. Since Flush merely assures + the user that the commands complete in a finite (though undetermined) amount + of time, it is, thus, of only modest utility. Finish, on the other hand, + stalls CPU execution until all pending GL commands have completed forcing + completely synchronous operation, which most often not the desired result. + This extension offers a middle ground - the ability to "finish" a subset of + the command stream, and the ability to determine whether a given command has + completed or not. + + This extension introduces the concept of a "fence" to the OpenGL command + stream with SetFenceAPPLE. Once the fence is inserted into the command + stream, it can be tested for its completion with TestFenceAPPLE. Moreover, + the application may also request a partial Finish up to a particular "fence" + using the FinishFenceAPPLE command -- that is, all commands prior to the + fence will be forced to complete until control is returned to the calling + process. These new mechanisms allow for synchronization between the host + CPU and the GPU, which may be accessing the same resources (typically + memory). + + Fences are created and deleted, as are other objects in OpenGL, specifically + with GenFencesAPPLE and DeleteFencesAPPLE. The former returns a list of + unused fence names and the later deletes the provided list of fence names. + + In addition to being able to test or finish a fence this extension allows + testing for other types of completion, including texture objects, vertex + array objects, and draw pixels. This allows the client to use + TestObjectAPPLE or FinishObjectAPPLE with FENCE_APPLE, TEXTURE, + VERTEX_ARRAY, or DRAW_PIXELS_APPLE with the same type of results as + TestFenceAPPLE and FinishFenceAPPLE. Specifically, using the FENCE_APPLE + type is equivalent to calling TestFenceAPPLE or FinishFenceAPPLE with the + particular fence name. Using TEXTURE as the object type tests or waits for + completion of a specific texture, meaning when there are no pending + rendering commands which use that texture object. Using the VERTEX_ARRAY + type will test or wait for drawing commands using that particular vertex + array object name. Finally, DRAW_PIXELS_APPLE will wait or test for + completion of all pending DrawPixels commands. These tests and finishes + operate with the same limitations and results as test and finish fence. + + One use of this extension is in conjunction with APPLE_vertex_array_range to + determine when graphics hardware has completed accessing vertex data from a + vertex array range. Once a fence has been tested TRUE or finished, all + vertex indices issued before the fence must have completed being accessed. + This ensures that the vertex data memory corresponding to the issued vertex + indices can be safely modified (assuming no other outstanding vertex indices + are issued subsequent to the fence). + +Issues + + How is TestObjectAPPLE or FinishObjectAPPLE used with DRAW_PIXELS_APPLE? + + Resolution: Currently there is no support DrawPixels with storage using + the APPLE_client_storage extension and thus this option has no utility, + due to implementation specifics, which always copy the DrawPixels + buffer, thus allowing the client to immediately modify the data used by + DrawPixels. Once the APPLE_client_storage extension is supported, + DrawPixels modification synchronization will be required after drawing + with a buffer, which resides in client space. + + Do we need an IsFenceAPPLE command? + + RESOLUTION: Yes. IsFenceAPPLE makes APPLE_fence's API orthogonal to + other OpenGL object interfaces, and can be used as any other Is... + command would be. + + Are the fences sharable between multiple contexts? + + RESOLUTION: No. + + What is the relative performance of the calls? + + Execution of a SetFenceAPPLE is not free. In the initial + implementation, a Flush is generated. This will likely change for + future implementations and should not be depended on. A Finish will not + be generated in any case. + + Is the TestFenceAPPLE call really necessary? How often would this be used + compared to the FinishFenceAPPLE call (which also flushes to ensure this + happens in finite time)? + + TestFenceAPPLE allows clients to provide logic to handle + synchronization issues rather than forcing completely synchronous + operation at the point of testing or finishing. + + Should we allow these commands to be compiled within display list? + Which ones? How about within Begin/End pairs? + + RESOLUTION: DeleteFencesAPPLE, GenFencesAPPLE, TestFenceAPPLE, + TestObjectAPPLE, and IsFenceAPPLE are executed immediately while + FinishFenceAPPLE, FinishObjectAPPLE and SetFenceAPPLE are compiled. + None of these commands are allowed within Begin/End pairs. + +New Procedures and Functions + + void GenFencesAPPLE(sizei n, uint *fences); + + void DeleteFencesAPPLE(sizei n, const uint *fences); + + void SetFenceAPPLE(uint fence); + + boolean IsFenceAPPLE(uint fence); + + boolean TestFenceAPPLE(uint fence); + + void FinishFenceAPPLE(uint fence); + + boolean TestObjectAPPLE(enum object, uint name); + + void FinishObjectAPPLE(enum object, int name); + +New Tokens + + Accepted by the parameter of TestObjectAPPLE and FinishObjectAPPLE: + + DRAW_PIXELS_APPLE 0x8A0A + FENCE_APPLE 0x8A0B + +Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) + + Add to the end of Section 5.4 "Display Lists" + + "DeleteFencesAPPLE, GenFencesAPPLE, TestFenceAPPLE, IsFenceAPPLE, and + TestObjectAPPLE are not complied into display lists but are executed + immediately." + + After the discussion of Flush and Finish (Section 5.5) add a + description of the fence operations: + + "5.X Fences + + The command + + void SetFenceAPPLE(uint fence); + + sets a fence within the GL command stream and assigns the fence a status of + FALSE. No other state is affected by execution of the fence command. A + fence's state can be queried by calling the command + + boolean TestFenceAPPLE(uint fence); + + The command + + void FinishFenceAPPLE(uint fence); + + forces all GL commands prior to the fence to complete. FinishFenceAPPLE does + not return until all effects from these commands on GL client and server + state and the frame buffer are fully realized. + + The fence must first be created before it can be used. The command + + void GenFencesAPPLE(sizei n, uint *fences); + + returns n previously unused fence names in fences. These names are marked + as used for the purposes of GenFencesAPPLE only and acquire boolean state + only when they have been set. + + Fences are deleted by calling + + void DeleteFencesAPPLE(sizei n, const uint *fences); + + fences contains n names of fences to be deleted. After a fence is deleted, + it has no state, and its name is again unused. Unused names in fences are + silently ignored. + + If the fence passed to TestFenceAPPLE or FinishFenceAPPLE is not the name of + a fence, the error INVALID_OPERATION is generated. In this case, + TestFenceAPPLE will return TRUE, for the sake of consistency. Note, fences + that have note been set prior to calling TestFenceAPPLE or FinishFenceAPPLE + act as if the state is TRUE and the fence command has already been + completed. In other words TestFenceAPPLE returns TRUE and FinishFenceAPPLE + will not block on fences that have not been set. + + State must be maintained to indicate which fence integers are currently used + or set. In the initial state, no indices are in use. When a fence integer + is set, status of the fence is also maintained. The status is a boolean. + + Once the status of a fence has been finished (via FinishFenceAPPLE) or + tested and the returned status is TRUE (via TestFenceAPPLE), the status + remains TRUE until the next SetFenceAPPLE of the fence. + + The command + + boolean TestObjectAPPLE(enum object, uint name); + + and the command + + void FinishObjectAPPLE(enum object, int name); + + work in a similar fashion to TestFenceAPPLE and FinishFenceAPPLE but on + other types of "objects". Both of these commands take an object, which can + be FENCE_APPLE, TEXTURE, VERTEX_ARRAY, or DRAW_PIXELS_APPLE and an object + name. These commands are useful for synchronizing the update of buffers for + textures, draw pixels, or vertex arrays, especially when using extensions + such as Apple's vertex array range or client storage. + + If the object parameter for TestObjectAPPLE or FinishObjectAPPLE is + FENCE_APPLE then these commands work in exactly the same manner as + TestFenceAPPLE and FinishFenceAPPLE, respectively. If the object parameter + is TEXTURE then these routines test or finish the use of a texture object, + thus FinishObjectAPPLE will block and TestFenceAPPLE will return FALSE while + there are pending rendering commands utilizing the texture object in + question. If the object parameter is VERTEX_ARRAY, FinishObjectAPPLE will + block and TestFenceAPPLE will return FALSE while there are pending rendering + commands utilizing the vertex array object in question. Note, in both these + cases object name 0 will work as expected, thus testing or finishing the + default texture or vertex array object. If the object parameter is + DRAW_PIXELS_APPLE, FinishObjectAPPLE will block and TestFenceAPPLE will + return FALSE while there are pending DrawPixels commands. For all other + cases, assuming a valid object type and name are used, FinishObjectAPPLE + will return immediately and TestFenceAPPLE will return TRUE. + + INVALID_OPERATION error is generated if FinishObjectAPPLE or TestFenceAPPLE + is called with either an invalid object type enumeration or a name, which is + not the name of a valid object of the type specified in the object + parameter. + +Additions to Chapter 6 of the OpenGL 1.2.1 Specification (State and State Requests) + + Insert new section after Section 6.1.10 "Minmax Query" + + "6.1.11 Fence Query + + The command + + boolean IsFenceAPPLE(uint fence); + + returns TRUE if texture is the name of a fence. If fence is not the name of + a fence, or if an error condition occurs, IsFenceAPPLE returns FALSE. A + name returned by GenFencesAPPLE, but not yet set via SetFenceAPPLE, is not + the name of a fence. + +Additions to the GLX Specification + + None + +GLX Protocol + + None + +Errors + + INVALID_VALUE is generated if GenFencesAPPLE parameter is negative. + + INVALID_VALUE is generated if DeleteFencesAPPLE parameter is negative. + + INVALID_OPERATION is generated if the fence used in TestFenceAPPLE or + FinishFenceAPPLE is not the name of a fence. + + INVALID_OPERATION is generated if the object name used in TestObjectAPPLE or + FinishObjectAPPLE is not the name of an object of the type requested in the + object parameter. + + INVALID_OPERATION is generated if any of the commands defined in + this extension is executed between the execution of Begin and the + corresponding execution of End. + + INVALID_VALUE is generated if DeleteFencesAPPLE or GenFencesAPPLE are + called where n is negative. + +New State + + None + +New Implementation Dependent State + + None + +Implementation Details + + This section describes implementation-defined limits: + + SetFenceAPPLE calls are not free. They should be used prudently, and a + "good number" of commands should be sent between calls to SetFenceAPPLE. + Testing or finishing a fence may cause a Flush if commands up to the + fence being tested have not been submitted to the hardware. + +Revision History + + None + diff --git a/opengles/extensions/APPLE/APPLE_float_pixels.txt b/opengles/extensions/APPLE/APPLE_float_pixels.txt new file mode 100644 index 0000000000..0ce98b3baa --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_float_pixels.txt @@ -0,0 +1,797 @@ +Name + + APPLE_float_pixels + +Name Strings + + GL_APPLE_float_pixels + +Contact + + Geoff Stahl, Apple (gstahl 'at' apple.com) + Jeremy Sandmel, Apple (jsandmel 'at' apple.com) + +Status + + Shipping Mac OS X v10.2.3 (version 1.0) + +Version + + 1.0 + +Number + + 368 + +Dependencies + + Written based on the wording of the OpenGL 2.0 specification. + + Depends on (but does not require) ARB_texture_float + + Depends on (but does not require) ARB_color_buffer_float + + Depends on (but does not require) ARB_half_float_pixel + + Interacts with APPLEX_texture_float_16_filter. + + Interacts with APPLEX_color_buffer_float_16_blend. + +Overview + + This extensions adds texture types, texture internal formats and + color buffers composed of both 32 bit and 16 floating point numbers. + 16 bit floats (half float) are very similar to the IEEE + single-precision floating-point standard, except that it has only 5 + exponent bits and 10 mantissa bits. All floating point numbers are + clamped to the limits of the range representable by their respective + format. + + Specifically, APPLE_float_pixels adds four pieces of functionality + to OpenGL. First, it provides an HALF_APPLE texture type allowing + clients to pass textures in the half float format. Second, it adds + 12 additional sized internal formats to allow OpenGL to process and + maintain texture data in the requested format if possible. Next, it + provides the COLOR_FLOAT_APPLE pixel format to allow creation of + floating point and half float color buffers. Lastly, it provides an + additional query to allow clients to verify that they have a + floating point color buffer. + + The HALF_APPLE texture type allows clients to use source textures + composed of half float color components. This constant is use in + the type parameter in DrawPixels, ReadPixels and texturing commands + with a corresponding GL half data type, which corresponds to a 16 + bit half float, and has no special interpretation. + + Clients can use the 12 additional (6 floating point and 6 half + float) sized internal texture formats to specify the mapping of R, + G, B and A values to texture components, as they would with any + other sized internal texture format. Note, as is the standard + practice with OpenGL, implementations should map the sized internal + texture R, G, B and A values to internal components with memory + allocations as close as possible to those specified in the sized + internal format. + + Floating point color buffers are created by specifying the + appropriate color floating point pixel format attribute for the + windowing system API in use by the client. Both 128 bit and 64 bit + floating point color buffers can be supported, the former with full + 32 bit floating point components and the latter with 16 bit half + float components. + + Additionally, clients can query to see if they have a floating point + color buffer using GetBooleanv with COLOR_FLOAT_APPLE as the get + value. The number of bits per color buffer component can be + determined in the usual manner. + +Issues: + + 1. How is this extension different from the ARB floating point extensions? + + Conceptually, this extension can be considered the union of the + feature sets from the following extensions: + + ARB_texture_float + ARB_color_buffer_float + ARB_half_float_pixel + + with the following EXCEPTIONS: + + * this extension does not support the the per-component + query of TEXTURE_*_TYPE from ARB_texture_float. + + * this extension only supports the half float pixel type + from ARB_half_float_pixel for {Draw|Read}|Pixels and + Tex{Sub}Image{1D|2D|3D}, and for color buffers as + described by ARB_color_buffer_float. (Note: unlike the + ARB_half_float extension, APPLE_float_pixels does not + support using 16 bit half float data with the imaging + subset routines that accept images, i.e., + ConvolutionFilter{1D|2D}, ColorTable, etc. + + * this extension does not include the ClampColorARB routine + from ARB_color_buffer_float. It does, however, use the + default clamping behavior specified in the + ARB_color_buffer_float extension. + + Note that this means the following in this extension: + + - vertex color outputs are always clamped, regardless of + color buffer format + - fragment color outputs are clamped when writing to a + fixed point color buffer and unclamped when writing to + a floating point color buffer, and + - the read color returned by + ReadPixels/CopyPixels/GetTexImage/etc. is clamped when + reading from a fixed point format and unclamped when + reading from a floating point format. + + * unlike ARB_texture_float, this extension only supports + GL_NEAREST filtering for float (and half float) textures. + + * unlike ARB_color_buffer_float, this extension does not + support src/dst alpha blending on float (and half float) + destination color buffers. + + 2. Since this extension is more limited than the ARB floating point + extensions, what is the appropriate (and "future-proof") method + for an application to use to query for floating point color + buffer and texture support? + + This extension and the related extensions + APPLEX_color_buffer_float_16_blend and + APPLEX_texture_float_16_filter, should be considered + "transitional" in nature. The limited functionality described by + these extensions is superseded by the more powerful ARB + extensions and as hardware becomes more capable, it is possible + that future revisions of OpenGL may deprecate or remove them + altogether. + + As such, to allow for ease of transition to support of the ARB + floating point extensions, applications are *strongly* + encouraged to use the following algorithm to query for floating + point texture and color buffer support: + + // any Floating Point Support at all? + bool supportsFloatColorBuffers = FALSE; + bool supportsFloatTextures = FALSE; + + // 16 bit/component Floating Point Blend/Filter Support? + bool supportsFloat16ColorBufferBlending = FALSE; + bool supportsFloat16TextureFiltering = FALSE; + + // 32 bit/component Floating Point Blend/Filter Support? + bool supportsFloat32ColorBufferBlending = FALSE; + bool supportsFloat32TextureFiltering = FALSE; + + // =============================================== + // Check for floating point texture support + // + // * First check for full ARB_texture_float + // extension and only then check for more + // limited APPLE and APPLEX texture extensions + // =============================================== + if (extensionSupported("ARB_texture_float")) + { + supportsFloatTextures = TRUE; + supportsFloat16TextureFiltering = TRUE; + supportsFloat32TextureFiltering = TRUE; + } + else if (extensionSupported("APPLE_float_pixels")) + { + supportsFloatTextures = TRUE; + + if (extensionSupported("APPLEX_texture_float_16_filter")) + { + supportsFloat16TextureFiltering = TRUE; + } + } + + // =============================================== + // Check for floating point color buffer support + // + // * First check for full ARB_color_buffer_float + // extension and only then check for more + // limited APPLE and APPLEX color buffer extensions + // =============================================== + if (extensionSupported("ARB_color_buffer_float")) + { + supportsFloatColorBuffers = TRUE; + supportsFloat16ColorBufferBlending = TRUE; + supportsFloat32ColorBufferBlending = TRUE; + } + else if (extensionSupported("APPLE_float_pixels")) + { + supportsFloatColorBuffers = TRUE; + + if (extensionSupported("APPLEX_color_buffer_float_16_blend")) + { + supportsFloat16ColorBufferBlending = TRUE; + } + } + + + 3. Why does this extension (and the related APPLEX_*_float_* + extensions) even exist, given the existence of the ARB, ATI, and + NVIDIA floating point extensions? + + A good question. This extension was developed contemporaneously + with the ATI and NVIDIA extensions and support for this + extension in Mac OS X's OpenGL implementation predates the + definition of the ARB extensions. In addition, this extension + specification attempts to document the behavior of the APPLE + extension to support use of floating point features on hardware + which may not support the full feature set described by the ARB + extensions. The behavior of the APPLE extension more closely + matches the feature set of this class of hardware and can be + used by applications to get a more accurate description of + native hardware support when falling back to software rendering + may not be appropriate. + + It is expected that as hardware renderers becomes more capable + the Mac OS X OpenGL implementation will transition to supporting + the ARB extensions and may deprecate and/or remove these APPLE + extensions from the API. Please see issue #2 for details on how + to query for floating point support in a "future-proof" manner. + + + 4. What will happen when the ARB floating point extensions are + supported? + + The APPLE_float_pixels and the related + APPLEX_texture_float_16_filter and + APPLEX_color_buffer_float_16_blend extensions are intended as a + strict subset of the functionality in ARB_texture_float, + ARB_color_buffer_float, and ARB_half_float_pixel. + + Consequently, an implementation could legally support all of + these extensions simulataneously, however once the ARB + extensions are supported there is no need to export the + APPLE{X}_* floating point extensions. + + Consequently, it's possible that implementations may deprecate + or remove the APPLE_float_pixels, + APPLEX_texture_float_16_filter, and + APPLEX_color_buffer_float_16_blend extensions when the + corresponding ARB extensions are supported by the underlying + hardware. Applications should pay attention to issue #2 above + to prepare for this possibility. + + +New Procedures and Functions + + None + +New Tokens + + Accepted by the parameters of DrawPixels, ReadPixels, TexImage1D, + TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and + GetTexImage: + + HALF_APPLE 0x140B // Same as HALF_FLOAT_NV/ARB + + Accepted by the GetBooleanv: + + COLOR_FLOAT_APPLE 0x8A0F + + Accepted by the parameter of TexImage1D, + TexImage2D, and TexImage3D: + + RGBA_FLOAT32_APPLE 0x8814 // Same as RGBA_FLOAT32_ATI/ARB + RGB_FLOAT32_APPLE 0x8815 // Same as RGB_FLOAT32_ATI/ARB + ALPHA_FLOAT32_APPLE 0x8816 // Same as ALPHA_FLOAT32_ATI/ARB + INTENSITY_FLOAT32_APPLE 0x8817 // Same as INTENSITY_FLOAT32_ATI/ARB + LUMINANCE_FLOAT32_APPLE 0x8818 // Same as LUMINANCE_FLOAT32_ATI/ARB + LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 // Same as LUMINANCE_ALPHA_FLOAT32_ATI/ARB + RGBA_FLOAT16_APPLE 0x881A // Same as RGBA_FLOAT16_ATI/ARB + RGB_FLOAT16_APPLE 0x881B // Same as RGB_FLOAT16_ATI/ARB + ALPHA_FLOAT16_APPLE 0x881C // Same as ALPHA_FLOAT16_ATI/ARB + INTENSITY_FLOAT16_APPLE 0x881D // Same as NTENSITY_FLOAT16_ATI/ARB + LUMINANCE_FLOAT16_APPLE 0x881E // Same as LUMINANCE_FLOAT16_ATI/ARB + LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F // Same as LUMINANCE_ALPHA_FLOAT16_ATI/ARB + +Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation) + + Add a new Section 2.1.2, (p. 6): + + 2.1.2 16-Bit Floating-Point Numbers + + A 16-bit floating-point number has a 1-bit sign (S), a 5-bit + exponent (E), and a 10-bit mantissa (M). The value of a 16-bit + floating-point number is determined by the following: + + (-1)^S * 0.0, if E == 0 and M == 0, + (-1)^S * 2^-14 * (M / 2^10), if E == 0 and M != 0, + (-1)^S * 2^(E-15) * (1 + M/2^10), if 0 < E < 31, + (-1)^S * INF, if E == 31 and M == 0, or + NaN, if E == 31 and M != 0, + + where + + S = floor((N mod 65536) / 32768), + E = floor((N mod 32768) / 1024), and + M = N mod 1024. + + Implementations are also allowed to use any of the following + alternative encodings: + + (-1)^S * 0.0, if E == 0 and M != 0, + (-1)^S * 2^(E-15) * (1 + M/2^10), if E == 31 and M == 0, or + (-1)^S * 2^(E-15) * (1 + M/2^10), if E == 31 and M != 0, + + Any representable 16-bit floating-point value is legal as input + to a GL command that accepts 16-bit floating-point data. The + result of providing a value that is not a floating-point number + (such as infinity or NaN) to such a command is unspecified, but + must not lead to GL interruption or termination. Providing a + denormalized number or negative zero to GL must yield predictable + results. + + (modify Table 2.2, p. 9) -- add new row + + Minimum + GL Type Bit Width Description + ------- --------- ----------------------------------- + half 16 half-precision floating-point value + encoded in an unsigned scalar + + Modify Section 2.14, (Colors and Coloring), p. 59 + + (modify Table 2.9, p. 59) Add new row to the table: + + GL Type Conversion + ------- ---------- + half c + + +Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) + + Modify Section 3.6.4 (Rasterization of Pixel Rectangles), p. 126 + + (modify next-to-last paragraph, p.136, "Final Conversion") ... For + RGBA components, if fragment color clamping is enabled, each element + is clamped to [0,1], and may be converted to fixed-point according + to the rules given in section 2.14.9 (Final Color Processing). If + fragment color clamping is disabled, RGBA components are unmodified. + For the purposes of this specification, fragment color clamping is + enabled implicitly if all enabled color buffers have fixed-point + components. + + Modify Section 3.8.1 (Texture Image Specification), p. 150 + + (modify second paragraph, p. 151) The selected groups are processed + exactly as for DrawPixels, stopping just before final conversion. + For R, G, B, and A, if the of the texture is + fixed-point, the components are clamped to [0, 1]. Otherwise, the + components are not modified. The depth value so generated is + clamped to [0, 1]. + + (modify the second paragraph, p. 152) The internal component resolution + is the number of bits allocated to each value in a texture image. If + is specified as a base internal format, the GL stores + the resulting texture with internal component resolutions of its own + choosing. If a sized internal format is specified, the mapping of the + R, G, B, A, and depth values to texture components is equivalent to the + mapping of the corresponding base internal format's components, as + specified in table 3.15, the type (unsigned int, float, etc.) is + assigned the same type specified by , and the memory + allocation per texture component is assigned by the GL to match the + allocations listed in table 3.16 as closely as possible. (The definition + of closely is left up to the implementation. Implementations are not + required to support more than one resolution of each type (unsigned int, + float, etc.) for each base internal format.) If a compressed internal + format is specified, the mapping of the R, G, B, A, and depth values to + texture components is equivalent to the mapping of the corresponding + base internal format's components, as specified in table 3.15. The + specified image is compressed using a (possibly lossy) compression + algorithm chosen by the GL. + + (add the following to table 3.16, p. 154) + + Sized Base R G B A L I + Internal Format Internal Format bits bits bits bits bits bits + --------------------------- --------------- ---- ---- ---- ---- ---- ---- + RGBA32F_ARB RGBA f32 f32 f32 f32 + RGB32F_ARB RGB f32 f32 f32 + ALPHA32F_ARB ALPHA f32 + INTENSITY32F_ARB INTENSITY f32 + LUMINANCE32F_ARB LUMINANCE f32 + LUMINANCE_ALPHA32F_ARB LUMINANCE_ALPHA f32 f32 + RGBA16F_ARB RGBA f16 f16 f16 f16 + RGB16F_ARB RGB f16 f16 f16 + ALPHA16F_ARB ALPHA f16 + INTENSITY16F_ARB INTENSITY f16 + LUMINANCE16F_ARB LUMINANCE f16 + LUMINANCE_ALPHA16F_ARB LUMINANCE_ALPHA f16 f16 + + Table 3.16: Correspondence of sized internal formats to base + internal formats, and desired component resolutions for each + sized internal format. The notation and imply + 16- and 32-bit floating-point, respectively. + + Modify Section 3.8.4 (Texture Parameters), p. 166 + + (remove TEXTURE_BORDER_COLOR from end of first paragraph, p. 166) + + ... If the value for TEXTURE_PRIORITY is specified as an integer, + the conversion for signed integers from table 2.9 is applied to + convert this value to floating-point, followed by clamping the + value to lie in [0, 1]. + + (modify last paragraph, p. 174) ... If the texture contains color + components, the values of TEXTURE BORDER COLOR are interpreted as + an RGBA color to match the texture's internal format in a manner + consistent with table 3.15. The border values for texture + components stored as fixed-point values are clamped to [0, 1] + before they are used. If the texture contains depth ... + + + Add a new section, after 3.8.9 and prior to section 3.8.10, p. 177 + + 3.8.9.5 Floating point formats and texture filters + + Due to limitations in current render hardware, textures with + floating point formats may not support minification or magnification + filters that require LINEAR filtering in the manner described above. + + Specifically, if the texture filter is neither GL_NEAREST nor + GL_NEAREST_MIPMAP_NEAREST, and *any* of following conditions are + true: + + * the of the texture is a 32-bit/component + floating point format and ARB_texture_float is not supported + by the implementation, *or* + + * the of the texture is a 16-bit/component + floating point format and APPLEX_texture_float_16_filter + extension is not supported by the implementation, + + then the GL will interpret texture minification and magnification filters + according to the table (xxx.1) listed below: + + specified filter will behave as: + ---------------- -------------- + LINEAR NEAREST + NEAREST_MIPMAP_LINEAR NEAREST_MIPMAP_NEAREST + LINEAR_MIPMAP_NEAREST NEAREST_MIPMAP_NEAREST + LINEAR_MIPMAP_LINEAR NEAREST_MIPMAP_NEAREST + ---------------------------------------------------- + Table xxx.1 - floating point texture filter behavior + + Otherwise, the texture minification and magnfication filters behave + as specified earlier in section 3.8.8 and 3.8.9. + + + Modify Section 3.8.13 (Texture Environments and Functions), p.182 + + (modify third paragraph, p. 183, removing clamping language) + ...TEXTURE_ENV_COLOR is set to an RGBA color by providing four + single-precision floating-point values. If integers are provided + for TEXTURE ENV COLOR, then they are converted to floating-point + as specified in table 2.9 for signed integers. + + (replace the sixth paragraph of p. 183) If fragment color clamping + is enabled, all of these color values, including the results, are + clamped to the range [0,1]. If fragment color clamping is + disabled, the values are not clamped. The texture functions are + specified in tables 3.22, 3.23, and 3.24. + + (modify seventh paragraph of p. 183) ... ALPHA_SCALE, respectively. + If fragment color clamping is enabled, the arguments and results + used in table 3.24 are clamped to [0,1]. Otherwise, the results + are unmodified. + + Modify Section 3.9 (Color Sum), p. 191 + + (modify second paragraph) ... the A component of c_sec is unused. + If color sum is disabled, then c_pri is assigned to c. The + components of c are then clamped to the range [0,1] if and only + if fragment color clamping is enabled. + + Modify Section 3.10 (Fog), p. 191 + + (modify fourth paragraph, p. 192, removing clamping language) ...If + these are not floating-point values, then they are converted to + floating-point using the conversion given in table 2.9 for signed + integers. If fragment color clamping is enabled, the components of + C_r and C_f and the result C are clamped to the range [0,1] before + the fog blend is performed. + + Modify Section 3.11.2 (Shader Execution), p. 194 + + (modify Shader Inputs, first paragraph, p. 196) The built-in + variables gl_Color and gl_SecondaryColor hold the R, G, B, and A + components, respectively, of the fragment color and secondary + color. If the primary color or the secondary color components are + represented by the GL as fixed-point values, they undergo an + implied conversion to floating-point. This conversion must leave + the values 0 and 1 invariant. Floating-point color components + (resulting from a disabled vertex color clamp) are unmodified. + + (modify Shader Outputs, first paragraph, p. 196) ... These are + gl_FragColor, gl_FragData[n], and gl_FragDepth. If fragment + clamping is enabled, the final fragment color values or the final + fragment data values written by a fragment shader are clamped to + the range [0, 1] and then may be converted to fixed-point as + described in section 2.14.9. If fragment clamping is disabled, + the final fragment color values or the final fragment data values + are not modified. The final fragment depth... + +Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment +Operations and the Frame Buffer) + + + Modify Chapter 4 Introduction, (p. 198) + + (modify third paragraph, p. 198) Color buffers consist of either + unsigned integer color indices, R, G, B and optionally A unsigned + integer values, or R, G, B, and optionally A floating-point values. + The number of bitplanes... + + Modify Section 4.1.3 (Multisample Fragment Operations), p. 200 + + (modify last paragraph, p. 200) ...and all 0's corresponding to all + alpha values being 0. The alpha values used to generate a coverage + value are clamped to the range [0,1]. It is also intended ... + + Modify Section 4.1.5 (Alpha Test), p. 201 + + (modify first paragraph of section, deleting clamping of + reference value) ... The test is controlled with + + void AlphaFunc(enum func, float ref); + + func is a symbolic constant indicating the alpha test function; + ref is a reference value. When performing the alpha test, the GL + will convert the reference value to the same representation as the + the fragment's alpha value (floating-point or fixed-point). + For fixed-point, the reference value is converted according to the + rules given for an A component in section 2.14.9 and the fragment's + alpha value is rounded to the nearest integer. The possible ... + + Modify Section 4.1.8 (Blending), p. 205 + + (modify first paragraph, p. 206) Source and destination values are + combined according to the blend equation, quadruplets of source and + destination weighting factors determined by the blend functions, and + a constant blend color to obtain a new set of R, G, B, and A values, + as described below. + + If the color buffer is fixed-point, the components of the source + and destination values and blend factors are clamped to [0, 1] + prior to evaluating the blend equation, the components of the + blending result are clamped to [0,1] and converted to fixed- + point values in the manner described in section 2.14.9. If the + color buffer is floating-point, no clamping occurs. The + resulting four values are sent to the next operation. + + Blending is dependent on the incoming fragment's alpha value and + that of the corresponding currently stored pixel. Blending applies + only in RGBA mode and only one of the following conditions is true: + + * the format of the current color buffer is fixed-point, *or* + + * the format of current color buffer(s) is 16 bit floating point + and the APPLEX_color_buffer_float_16_blend extension is + supported by the implementation, *or* + + * the format of the current color buffer is floating-point and + the ARB_color_buffer_float extension is supported by the + implementation. + + Otherwise, the blending stage is bypassed. Blending is enabled or + disabled using Enable or Disable with the symbolic constant BLEND. + If it is disabled (or bypassed), or if logical operation on color + values is enabled (section 4.1.10), proceed to the next operation. + + (modify fifth paragraph, p. 206) Fixed-point destination + (framebuffer) components are taken to be fixed-point values + represented according to the scheme given in section 2.14.9 + (Final Color Processing). Constant color components, floating- + point destination components, and source (fragment) components are + taken to be floating point values. If source components are + represented internally by the GL as either fixed-point values they + are also interepreted according to section 2.14.9. + + (modify Blend Color section removing the clamp, p. 209) The + constant color C_c to be used in blending is specified with the + command + + void BlendColor(float red, float green, float blue, float alpha); + + The constant color can be used in both the source and destination + blending functions. + + Replace Section 4.1.9 (Dithering), p. 209 + + Dithering selects between two representable color values or indices. + A representable value is a value that has an exact representation in + the color buffer. In RGBA mode dithering selects, for each color + component, either the most positive representable color value (for + that particular color component) that is less than or equal to the + incoming color component value, c, or the most negative + representable color value that is greater than or equal to c. The + selection may depend on the x_w and y_w coordinates of the pixel, as + well as on the exact value of c. If one of the two values does not + exist, then the selection defaults to the other value. + + In color index mode dithering selects either the largest + representable index that is less than or equal to the incoming + color value, c, or the smallest representable index that is greater + than or equal to c. If one of the two indices does not exist, then + the selection defaults to the other value. + + Many dithering selection algorithms are possible, but an individual + selection must depend only on the incoming color index or component + value and the fragment's x and y window coordinates. If dithering + is disabled, then each incoming color component c is replaced with + the most positive representable color value (for that particular + component) that is less than or equal to c, or by the most negative + representable value, if no representable value is less than or equal + to c; a color index is rounded to the nearest representable index + value. + + Dithering is enabled with Enable and disabled with Disable using the + symbolic constant DITHER. The state required is thus a single bit. + Initially dithering is enabled. + + Section 4.1.10 (Logical Operation), p. 210 + + (insert after the first sentence, p. 210) Logical operation has no + effect on a floating-point destination color buffer. However, if + COLOR_LOGIC_OP is enabled, blending is still disabled. + + Modify Section 4.2.3 (Clearing the Buffers), p. 215 + + (modify second paragraph, p. 216, removing clamp of clear color) + + void ClearColor(float r, float g, float b, float a); + + sets the clear value for the color buffers in RGBA mode. + + (add to the end of first partial paragraph, p. 217) ... then a + Clear directed at that buffer has no effect. Fixed-point RGBA + color buffers are cleared to a color values derived by taking the + clear color, clamping to [0,1], and converting to fixed-point + according to the rules of section 2.14.9. + + Modify Section 4.2.4 (The Accumulation Buffer), p. 217 + + (modify second paragraph in section, p. 217) ... Using ACCUM + obtains R, G, B, and A components from the color buffer currently + selected for reading (section 4.3.2). If the color buffer is + fixed-point, each component is considered as a fixed-point value + in [0,1] (see section 2.14.9) and is converted to floating-point. + Each result is then multiplied ... + + (modify second paragraph on p. 218) The RETURN operation takes + each color value from the accumulation buffer and multiplies each + of the R, G, B, and A components by . If fragment color + clamping is enabled, the results are then clamped to the range + [0,1]. ... + + Modify Section 4.3.2 (Reading Pixels), p. 219 + + (modify paragraph at top of page, p. 222) ... For a fixed-point + color buffer, each element is taken to be a fixed-point value in + [0, 1] with m bits, where m is the number of bits in the + corresponding color component of the selected buffer (see + section 2.14.9). For floating-point color buffer, the elements + are unmodified. + + (modify Final Conversion, p. 222) For an index, if the type is not + FLOAT or HALF_FLOAT_ARB, final conversion consists of masking the + index with the value given in Table 4.6; if the type is FLOAT or + HALF_FLOAT_ARB, then the integer index is converted to a GL float + or half data value. + + For an RGBA color, if is not FLOAT or HALF, or the selected + color buffer is a fixed-point buffer, each component is first + clamped to [0,1]. Then the appropriate conversion... + + (modify Table 4.7, p. 224 -- add new row) + + type Parameter GL Data Type Component Conversion Formula + -------------- ------------ ---------------------------- + HALF_APPLE half c = f + + + +Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions) + + None. + +Additions to Chapter 6 of the OpenGL 2.0 Specification (State and +State Requests) + + Modify Section 6.1.2, Data Conversions, p. 245 + + (add new paragraph at the end of the section, p. 245) If fragment + color clamping is enabled, querying of the texture border color, + texture environment color, fog color, alpha test reference value, + blend color, and RGBA clear color will clamp the corresponding + state values to [0,1] before returning them. This behavior + provides compatibility with previous versions of the GL that + clamped these values when specified. + + +Modifications to the AGL Specification + + Modify the values accepted by aglChoosePixelFormat and aglDescribePixelFormat. + + AGL_COLOR_FLOAT + If true, this pixel format supports using floating point + color buffers as the destination for rendering. + +Modifications to the CGL Specification + + Modify the values accepted by CGLChoosePixelFormat and CGLDescribePixelFormat. + + kCGLPFAColorFloat + If true, this pixel format supports using floating point + color buffers as the destination for rendering. + +Dependencies on ARB_fragment_program + + (modify 2nd paragraph of Section 3.11.4.4 language) If fragment + color clamping is enabled, the fragment's color components are first + clamped to the range [0,1] and are optionally converted to fixed + point as in section 2.14.9. If the fragment program does not write + result.color, the color will be undefined in subsequent stages. + +Dependencies on ARB_fragment_shader + + (modify 1st paragraph of Section 3.11.6 language) ... are + gl_FragColor and gl_FragDepth. If fragment color clamping is + enabled, the final fragment color values written by a fragment + shader are clamped to the range [0,1] and are optionally converted + to fixed-point as described in section 2.14.9, Final Color + Processing. ... + +Dependencies on APPLEX_texture_float_16_filter + + If APPLEX_texture_float_16_filter is not supported, then all + references to APPLEX_texture_float_16_filter should be removed from + this extension. In this case, 16 bit floating point textures will + behave as if the GL_MAG_FILTER is GL_NEAREST and as if GL_MIN_FILTER + is either GL_NEAREST_MIPMAP_NEAREST (if a mipmap min filter is + requested) or GL_NEAREST (if a non-mipmap min filter is requested). + +Dependencies on APPLEX_color_buffer_float_16_blend + + If APPLEX_color_buffer_float_16_blend is not supported, then all + references to APPLEX_texture_float_16_filter should be removed from + this extension. In this case, rendering to a 16 bit floating point + color buffer will behave as if the enable state for GL_BLEND is set + to FALSE. + +Errors + + None. + +New State + +(table 6.25, p. 215) + + Get value Type Get Cmnd Minimum Value Description Sec. Attribute + ----------------- ---- ----------- ------------- --------------------------- ---- --------- + COLOR_FLOAT_APPLE B GetBooleanv - True if color buffers store 2.7 - + floating point components + +Revision History + + + 0.1, 2003, gstahl@apple.com + * preliminary draft, documents shipping behavior as of 10.2.3 + + 0.2, 08/16/2005, jsandmel@apple.com + * rewritten to account for the fact that APPLE_float_pixels doesn't support: + - float 16/32 texture filtering + - float 16/32 color buffer blending + - controllable color clamping + - texture per-component float-versus-int type queries + - half float types with imaging subset routines + * added interactions with the shader extensions + * added interactions with the APPLEX_*_float_16_* extensions + * added updates to AGL and CGL + diff --git a/opengles/extensions/APPLE/APPLE_flush_buffer_range.txt b/opengles/extensions/APPLE/APPLE_flush_buffer_range.txt new file mode 100644 index 0000000000..d3467afb10 --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_flush_buffer_range.txt @@ -0,0 +1,280 @@ +Name + + APPLE_flush_buffer_range + +Name Strings + + GL_APPLE_flush_buffer_range + +Contact + + Chris Niederauer, Apple (ccn 'at' apple.com) + +Status + + Shipping on Mac OS X. + +Version + + Last Modified Date: 19 March 2008 + Author Revision: 1.1 + +Number + + 321 + +Dependencies + + Buffer Objects as per ARB_vertex_buffer_object or OpenGL 1.5 are required. + + If ARB_pixel_buffer_object is NOT supported and the OpenGL version is less + than 2.1, ignore references to PIXEL_UNPACK_BUFFER and PIXEL_PACK_BUFFER. + + If APPLE_fence or similar fencing mechanism is NOT suppported, Finish can + be used in place of TestObject, FinishObject, TestFence and FinishFence. + + Written based on the wording of the OpenGL 2.1 specification. + +Overview + + APPLE_flush_buffer_range expands the buffer object API to allow greater + performance when a client application only needs to write to a sub-range + of a buffer object. To that end, this extension introduces two new buffer + object features: non-serialized buffer modification and explicit sub-range + flushing for mapped buffer objects. + + OpenGL requires that commands occur in a FIFO manner meaning that any + changes to buffer objects either block until the data has been processed by + the OpenGL pipeline or else create extra copies to avoid such a block. By + providing a method to asynchronously modify buffer object data, an + application is then able to manage the synchronization points themselves + and modify ranges of data contained by a buffer object even though OpenGL + might still be using other parts of it. + + This extension also provides a method for explicitly flushing ranges of a + mapped buffer object so OpenGL does not have to assume that the entire + range may have been modified. + + Affects ARB_vertex_buffer_object, ARB_pixel_buffer_object and OpenGL 1.5 + Buffer Objects. + +Issues + + Should the ability to update other Buffer Object state such as BUFFER_SIZE + and BUFFER_USAGE be added to BufferParameteriAPPLE? + + RESOLVED: No. API already exists for setting this state and allowing + this new API to update this state would add more semantics that this + extension is not trying to address. Also as decided when working on + the ARB_vertex_buffer_object extension: "It is desirable for the + implementation to know the usage when the buffer is initialized, so + including it in the initialization command makes sense." + + Should a MapSubBuffer API be added to avoid having the application manually + flush memory which is not modified within a buffer object? + + RESOLVED: No. An application may still want to modify multiple + sections of a buffer object simultaneously such as for procedural data + and providing a range flushing routine allows an implementation to + effectively achieve the same performance benefits. + + Secondly, providing a MapSubBuffer routine might be confusing to + developers as one might think that MapSubBuffers could know which + sections need to block or provide temporary intermediary buffers and + in theory achieve the same benefits as adding a flag that states that + the application would like to asynchronously modify some buffer object + data; however, implementing a "smart" MapSubBuffer function would be + difficult to make efficient. + + When flushing ranges manually, should new API be added or should + BufferSubData be overloaded? + + RESOLVED: New API should be added specifically for this task. Trying + to override BufferSubData becomes cumbersome for many reasons. In + order to use BufferSubData, the behavior would need to change when + called inside of a MapBuffer/UnmapBuffer pair to not throw an error and + the parameter would then either not be used or cause a specific + behavior. It is much simpler to provide new API specifically targeted + at the task of manually flushing memory regions. This is also less + prone to errors in legacy applications that may incorrectly use + BufferSubData in situations that should cause invalid operation errors + prior to the introduction of this extension. + +New Procedures and Functions + + void BufferParameteriAPPLE(enum target, enum pname, int param); + + void FlushMappedBufferRangeAPPLE(enum target, intptr offset, + sizeiptr size); + +New Tokens + + Accepted by the parameter of BufferParameteriAPPLE and + GetBufferParameteriv: + + BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 + BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 + +Additions to Chapter 2 of the OpenGL 2.0 Specification (Buffer Objects) + + - (2.9, p. 33) Add new BufferParameter parameters: + + Add to Table 2.6 (p. 34): + + Name Type Initial Value Legal Values + ------------------------------ ------- ------------- ------------ + BUFFER_SERIALIZED_MODIFY_APPLE boolean TRUE TRUE, FALSE + BUFFER_FLUSHING_UNMAP_APPLE boolean TRUE TRUE, FALSE + + Change Table 2.7 (p. 36) caption to: + + Table 2.7: Buffer object state set by BufferData. + + Add to the end of Section 2.9 (p. 38): + + The serialized modification and flushing unmap parameters are specified by + calling + + void BufferParameteriAPPLE(enum target, enum pname, int param); + + with set to one of ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, + PIXEL_UNPACK_BUFFER, or PIXEL_PACK_BUFFER. is one of + BUFFER_SERIALIZED_MODIFY_APPLE or BUFFER_FLUSHING_UNMAP_APPLE and + specifies the new value for parameter . + By setting the value of the parameter BUFFER_SERIALIZED_MODIFY_APPLE to + FALSE, the client must then manually synchronize any modifcations to the + buffer object data and usage by OpenGL. In order to maintain coherency + when BUFFER_SERIALIZED_MODIFY_APPLE is disabled, synchronization must be + done after drawing with a buffer object prior to mapping its data for + modification using fences. A fence, such as the type of fence defined in + the APPLE_fence extension, allows selective synchronization. The client + can set a fence immediately after drawing with the data in question and + test or finish that fence prior to calling MapBuffer or BufferSubData. + This serialization relaxation also applies to all OpenGL commands which may + write to a buffer object such as ReadPixels and GetTexImage. + Setting the value of the parameter BUFFER_FLUSHING_UNMAP_APPLE to FALSE + allows the client to specify regions of a mapped buffer object that have + been modified by calling + + void FlushMappedBufferRangeAPPLE(enum target, intptr offset, + sizeiptr size); + + prior to unmapping. must be set to one of ARRAY_BUFFER, + ELEMENT_ARRAY_BUFFER, PIXEL_UNPACK_BUFFER, or PIXEL_PACK_BUFFER. + and indicate the range of data in the buffer object that has been + modified in terms of basic machine units. An INVALID_VALUE error is + generated if or is less than zero, or if + + is greater than the value of BUFFER_SIZE. When BUFFER_FLUSHING_UNMAP_APPLE + is set to FALSE, FlushMappedBufferRangeAPPLE must be called on all modified + ranges of a mapped buffer object after the data within each specified range + has been modified and prior to unmapping it, allowing OpenGL to flush only + the portions of the buffer object that have been modified. Any modified + ranges of a mapped buffer object that are not explicitly flushed prior to + unmapping when BUFFER_FLUSHING_UNMAP_APPLE is set to FALSE become + undefined. + +Errors + + INVALID_ENUM is generated if the parameter of + BufferParameteriAPPLE and FlushMappedBufferRangeAPPLE is not ARRAY_BUFFER, + ELEMENT_ARRAY_BUFFER, PIXEL_PACK_BUFFER or PIXEL_UNPACK_BUFFER. + + INVALID_ENUM is generated if the parameter of BufferParameteriAPPLE + is not BUFFER_SERIALIZED_MODIFY_APPLE or BUFFER_NON_FLUSHING_UNMAP_APPLE. + + INVALID_OPERATION is generated if BufferParameteriAPPLE or + FlushMappedBufferRangeAPPLE is executed while zero is bound to the + parameter. + + INVALID_OPERATION is generated if FlushMappedBufferRangeAPPLE is called + outside the execution of a MapBuffer and the corresponding execution of + UnmapBuffer. + + INVALID_OPERATION may be generated if any of the commands defined in this + extension is executed between the execution of Begin and the corresponding + execution of End. + + INVALID_VALUE is generated if the or parameters of + FlushMappedBufferRangeAPPLE are negative. + + INVALID_VALUE is generated if the and parameters of + FlushMappedBufferRangeAPPLE define a region of memory that extends beyond + that allocated by BufferData. + +New State + + Add to Table 6.9 (p. 274): + Initial + Get Value Type Get Command Value Description Sec Attrib + ------------------------------ ---- -------------------- ------- ------------------------------ --- ------ + BUFFER_SERIALIZED_MODIFY_APPLE B GetBufferParameteriv TRUE Buffer serialized modify param 2.9 - + BUFFER_FLUSHING_UNMAP_APPLE B GetBufferParameteriv TRUE Buffer flushing unmap param 2.9 - + +New Implementation Dependent State + + None + +Usage Examples + + This extension can be used in place of using multiple buffer objects for + applications that may have algorithms that can not efficiently use the + existing buffer object API. + + Convenient macro definition for specifying buffer offsets: + + #define BUFFER_OFFSET(i) ((char *)NULL + (i)) + + Example of updating small amounts of data in a large VBO: + + // setup time + glBindBuffer(GL_ARRAY_BUFFER, my_vbo); + glBufferData(GL_ARRAY_BUFFER, size, data, GL_DYNAMIC_DRAW); + glBufferParameteriAPPLE(GL_ARRAY_BUFFER, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE); + + // update/draw time + glBindBuffer(GL_ARRAY_BUFFER, my_vbo); + GLvoid *data = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); + for i to n { + if (need_to_change_region_i) { + // modify region i + glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER, BUFFER_OFFSET(region_i_offset), region_i_size); + } + } + glUnmapBuffer(GL_ARRAY_BUFFER); + // draw from vertex data in buffer object + + Example of updating sections of a VBO serializing with APPLE_fence: + + // setup time + glBindBuffer(GL_ARRAY_BUFFER, my_vbo); + glBufferData(GL_ARRAY_BUFFER, size, data, GL_DYNAMIC_DRAW); + glBufferParameteriAPPLE(GL_ARRAY_BUFFER, GL_BUFFER_SERIALIZING_MODIFY_APPLE, GL_FALSE); + glBufferParameteriAPPLE(GL_ARRAY_BUFFER, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE); + + // update/draw time + glBindBuffer(GL_ARRAY_BUFFER, my_vbo); + while(!glTestFenceAPPLE(current_regions_fence)) + { + // Do some more work if OpenGL is still using the + // portions of the VBO that we want to modify. + } + GLvoid *data = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); + for i to n in regions { + if (need_to_change_region_i) { + // modify region i + glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER, BUFFER_OFFSET(region_i_offset), region_i_size); + } + } + glUnmapBuffer(GL_ARRAY_BUFFER); + // draw from vertex data in region and set appropriate fence afterward + +Revision History + + 03/19/2008 1.1 + - Introduced errors when FlushMappedBufferRangeAPPLE is given bad + offset or size parameters. + - Clarified that FlushMappedBufferRangeAPPLE must be called after the + data in the mapped buffer object range has been modified. + + 10/04/2006 1.0 + - Initial public revision. diff --git a/opengles/extensions/APPLE/APPLE_framebuffer_multisample.txt b/opengles/extensions/APPLE/APPLE_framebuffer_multisample.txt new file mode 100644 index 0000000000..350545a3d7 --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_framebuffer_multisample.txt @@ -0,0 +1,448 @@ +Name + + APPLE_framebuffer_multisample + +Name Strings + + GL_APPLE_framebuffer_multisample + +Contributors + + Contributors to EXT_framebuffer_multisample and EXT_framebuffer_blit + desktop OpenGL extensions from which this extension borrows heavily. + +Contacts + + Benj Lipchak, Apple (lipchak 'at' apple.com) + +Status + + Complete + +Version + + Last Modified Date: February 24, 2011 + Revision: #4 + +Number + + OpenGL ES Extension #78 + +Dependencies + + Requires GL_OES_framebuffer_object or OpenGL ES 2.0. + + Written based on the wording of the OpenGL ES 2.0 specification. + + OpenGL ES 1.1 affects the definition of this extension. + + EXT_discard_framebuffer affects the definition of this extension. + +Overview + + This extension extends the framebuffer object framework to + enable multisample rendering. + + The new operation RenderbufferStorageMultisampleAPPLE() allocates + storage for a renderbuffer object that can be used as a multisample + buffer. A multisample render buffer image differs from a + single-sample render buffer image in that a multisample image has a + number of SAMPLES that is greater than zero. No method is provided + for creating multisample texture images. + + All of the framebuffer-attachable images attached to a framebuffer + object must have the same number of SAMPLES or else the framebuffer + object is not "framebuffer complete". If a framebuffer object with + multisample attachments is "framebuffer complete", then the + framebuffer object behaves as if SAMPLE_BUFFERS is one. + + The resolve operation is affected by calling + ResolveMultisampleFramebufferAPPLE where the source is a multisample + application-created framebuffer object and the destination is a + single-sample framebuffer object. Separate read and draw framebuffer + object binding points are established to facilitate the resolve. + + Scissoring may be used in conjunction with + ResolveMultisampleFramebufferAPPLE to resolve only a portion of the + framebuffer. + +IP Status + + No known IP claims. + +New Procedures and Functions + + void RenderbufferStorageMultisampleAPPLE( + enum target, sizei samples, + enum internalformat, + sizei width, sizei height); + + void ResolveMultisampleFramebufferAPPLE(void); + +New Tokens + + Accepted by the parameter of GetRenderbufferParameteriv: + + RENDERBUFFER_SAMPLES_APPLE 0x8CAB + + Returned by CheckFramebufferStatus: + + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 + + Accepted by the parameter of GetBooleanv, GetIntegerv, and + GetFloatv: + + MAX_SAMPLES_APPLE 0x8D57 + + Accepted by the parameter of BindFramebuffer, + CheckFramebufferStatus, FramebufferTexture2D, FramebufferRenderbuffer, and + GetFramebufferAttachmentParameteriv: + + READ_FRAMEBUFFER_APPLE 0x8CA8 + DRAW_FRAMEBUFFER_APPLE 0x8CA9 + + Accepted by the parameter of GetBooleanv, GetIntegerv, and + GetFloatv: + + DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 // FRAMEBUFFER_BINDING + READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA + +Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL ES Operation) + + None + +Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) + + None + +Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment +Operations and the Framebuffer) + + Change the first word of Chapter 4 from "The" to "A". + + Append to the introduction of Chapter 4: + + "Conceptually, the GL has two active framebuffers; the draw + framebuffer is the destination for rendering operations, and the + read framebuffer is the source for readback operations. The same + framebuffer may be used for both drawing and reading. Section + 4.4.1 describes the mechanism for controlling framebuffer usage." + + Modify the last paragraph of section 4.1.1 as follows: + + "While an application-created framebuffer object is bound to + DRAW_FRAMEBUFFER_APPLE, the pixel ownership test always passes." + + Add to 4.3.2 (Reading Pixels), right before the subsection titled + "Obtaining Pixels from the Framebuffer": + + "ReadPixels generates INVALID_FRAMEBUFFER_OPERATION if the object bound to + READ_FRAMEBUFFER_APPLE is not framebuffer complete (see section 4.4.5). + + ReadPixels generates INVALID_OPERATION if the object bound to + READ_FRAMEBUFFER_APPLE is framebuffer complete and the value of + SAMPLE_BUFFERS for the read framebuffer is greater than zero." + + Replace the first paragraph of the subsection titled "Obtaining Pixels + from the Framebuffer" with the following: + + "The buffer from which values are obtained is the color buffer used for + reading. If READ_FRAMEBUFFER_BINDING_APPLE is non-zero, pixel values are + read from the buffer attached as the COLOR_ATTACHMENT0 attachment to the + currently bound read framebuffer object." + + Modify the beginning of section 4.4.1 as follows: + + "The operations described in chapter 4 affect the images attached to the + framebuffer objects bound to targets READ_FRAMEBUFFER_APPLE and + DRAW_FRAMEBUFFER_APPLE. By default, the framebuffer bound to these + targets is zero, specifying the default implementation-dependent + framebuffer provided by the windowing system. When the framebuffers bound + to these targets is not zero, but instead names an application-created + framebuffer object, then the operations described in chapter 4 affect the + application-created framebuffer object rather than the default framebuffer. + + The namespace for framebuffer objects is the unsigned integers, with zero + reserved by OpenGL ES to refer to the default framebuffer. A framebuffer + object is created by binding an unused name to DRAW_FRAMEBUFFER_APPLE or + READ_FRAMEBUFFER_APPLE. The binding is effected by calling + + void BindFramebuffer(enum target, uint framebuffer); + + with set to the desired framebuffer target and + set to the unused name. The resulting framebuffer + object is a new state vector. There is one color attachment points, plus + one each for the depth and stencil attachment points. + + BindFramebuffer may also be used to bind an existing framebuffer object to + . If the bind is successful no change is made to the state of the + bound framebuffer object, and any previous binding to is broken. + The current DRAW_FRAMEBUFFER_APPLE and READ_FRAMEBUFFER_APPLE bindings can + be queried using GetIntegerv(DRAW_FRAMEBUFFER_BINDING_APPLE) and + GetIntegerv(READ_FRAMEBUFFER_BINDING_APPLE), respectively. + + If a framebuffer object is bound to DRAW_FRAMEBUFFER_APPLE or + READ_FRAMEBUFFER_APPLE, it becomes the destination of fragment operations + or the source of pixel reads, respectively, until it is deleted or another + framebuffer is bound to the corresponding bind point. Calling + BindFramebuffer with set to FRAMEBUFFER binds the + framebuffer to both DRAW_FRAMEBUFFER_APPLE and READ_FRAMEBUFFER_APPLE. + + While a framebuffer object is bound, OpenGL ES operations on the target + to which it is bound affect the images attached to the bound + framebuffer object, and queries of the target to which it is bound + return state from the bound object. In particular, queries of the values + specified in table 6.20 (Implementation Dependent Pixel Depths) are + derived from the framebuffer object bound to DRAW_FRAMEBUFFER_APPLE. + + In the initial state, the reserved name zero is bound to the targets + DRAW_FRAMEBUFFER_APPLE and READ_FRAMEBUFFER_APPLE. There is no application + created framebuffer object corresponding to the name zero. Instead, the + name zero refers to the window-system-provided framebuffer. All Queries + and operations on the framebuffer while the name zero is bound to target + DRAW_FRAMEBUFFER_APPLE or READ_FRAMEBUFFER_APPLE operate on this default + framebuffer..." + + Change the description of DeleteFramebuffers as follows: + + " contains names of framebuffer objects to be + deleted. After a framebuffer object is deleted, it has no + attachments, and its name is again unused. If a framebuffer that + is currently bound to one or more of the targets + DRAW_FRAMEBUFFER_APPLE or READ_FRAMEBUFFER_APPLE is deleted, it is as + though BindFramebuffer had been executed with the corresponding + and of zero. Unused names in + are silently ignored, as is the value zero." + + Add to section 4.4.3, just above the definition of RenderbufferStorage: + + "The command + + void RenderbufferStorageMultisampleAPPLE( + enum target, sizei samples, + enum internalformat, + sizei width, sizei height); + + establishes the data storage, format, dimensions, and number of + samples of a renderbuffer object's image. must be + RENDERBUFFER. must be one of the color-renderable, + depth-renderable, or stencil-renderable formats described in table 4.5. + and are the dimensions in pixels of the renderbuffer. If + either or is greater than the value of + MAX_RENDERBUFFER_SIZE, or if is greater than MAX_SAMPLES_APPLE, + then the error INVALID_VALUE is generated. If OpenGL ES is unable to + create a data store of the requested size, the error OUT_OF_MEMORY is + generated. RenderbufferStorageMultisampleAPPLE deletes any existing + data store for the renderbuffer and the contents of the data store after + calling RenderbufferStorageMultisampleAPPLE are undefined. + + If is zero, then RENDERBUFFER_SAMPLES_APPLE is set to zero. + Otherwise represents a request for a desired minimum + number of samples. Since different implementations may support + different sample counts for multisampled rendering, the actual + number of samples allocated for the renderbuffer image is + implementation dependent. However, the resulting value for + RENDERBUFFER_SAMPLES_APPLE is guaranteed to be greater than or equal + to and no more than the next larger sample count supported + by the implementation. + + An OpenGL ES implementation may vary its allocation of internal component + resolution based on any RenderbufferStorageMultisampleAPPLE parameter + (except target), but the allocation and chosen internal format must not be + a function of any other state and cannot be changed once they are + established. The actual resolution in bits of each component of the + allocated image can be queried with GetRenderbufferParameteriv." + + Modify the definiton of RenderbufferStorage in section 4.4.3 as follows: + + "The command + + void RenderbufferStorage( + enum target, enum internalformat, + sizei width, sizei height); + + is equivalent to calling RenderbufferStorageMultisampleAPPLE with + equal to zero." + + In section 4.4.3, modify the first two sentences of the + description of FramebufferRenderbuffer as follows: + + " must be DRAW_FRAMEBUFFER_APPLE, READ_FRAMEBUFFER_APPLE, or + FRAMEBUFFER. If is FRAMEBUFFER, it behaves as + though DRAW_FRAMEBUFFER_APPLE were specified. INVALID_OPERATION is + generated if the current value of the corresponding binding is zero + when FramebufferRenderbuffer is called." + + In section 4.4.3, modify the first two sentences of the + description of FramebufferTexture2D as follows: + + "The must be DRAW_FRAMEBUFFER_APPLE, READ_FRAMEBUFFER_APPLE, or + FRAMEBUFFER. If is FRAMEBUFFER, it behaves as though + DRAW_FRAMEBUFFER_APPLE were specified. INVALID_OPERATION is generated if + the current value of the corresponding binding is zero when + FramebufferTexture2D is called." + + In section 4.4.5, add an entry to the Framebuffer Completeness bullet list: + + "* All attached images have the same number of samples. + + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE" + + In section 4.4.5, modify the first sentence of the description + of CheckFramebufferStatus as follows: + + "If is not DRAW_FRAMEBUFFER_APPLE, READ_FRAMEBUFFER_APPLE, or + FRAMEBUFFER, INVALID_ENUM is generated. If is FRAMEBUFFER, it + behaves as though DRAW_FRAMEBUFFER_APPLE were specified." + + Modify the first sentence of the last paragraph of section 4.4.5 as + follows: + + "If the currently bound draw or read framebuffer is not framebuffer + complete, then it is an error to attempt to use the framebuffer for + writing or reading, respectively." + + In section 4.4.6, replace references to FRAMEBUFFER_BINDING with + DRAW_FRAMEBUFFER_BINDING_APPLE. + + Add new section titled "Multisample Resolves" to section 4.4: + + "The command + + void ResolveMultisampleFramebufferAPPLE(void); + + converts the samples corresponding to each pixel location in the + read framebuffer's color attachment to a single sample before writing + them to the draw framebuffer's color attachment. + + The pixel copy bypasses the fragment pipeline. The only fragment + operations which affect the resolve are the pixel ownership test, + the scissor test, and dithering. + + INVALID_OPERATION is generated if SAMPLE_BUFFERS for the read framebuffer + is zero, or if SAMPLE_BUFFERS for the draw framebuffer is greater than + zero, or if the read framebuffer or draw framebuffer does not have a color + attachment, or if the dimensions of the read and draw framebuffers + are not identical, or if the components in the format of the draw + framebuffer's color attachment are not present in the format of the read + framebuffer's color attachment. + + INVALID_FRAMEBUFFER_OPERATION is generated if the objects bound to + DRAW_FRAMEBUFFER_APPLE and READ_FRAMEBUFFER_APPLE are not framebuffer + complete (see section 4.4.5)." + +Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions) + + None + +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State +Requests) + + In section 6.1.3, modify the first sentence of the description of + GetFramebufferAttachmentParameteriv as follows: + + " must be DRAW_FRAMEBUFFER_APPLE, READ_FRAMEBUFFER_APPLE or + FRAMEBUFFER. If is FRAMEBUFFER, it behaves as though + DRAW_FRAMEBUFFER_APPLE were specified." + + In section 6.1.3, modify the third paragraph of the description of + GetRenderbufferParameteriv as follows: + + "Upon successful return from GetRenderbufferParameteriv, if + is RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT, + RENDERBUFFER_INTERNAL_FORMAT, or RENDERBUFFER_SAMPLES_APPLE, then + will contain the width in pixels, height in pixels, internal format, or + number of samples, respectively, of the image of the renderbuffer + currently bound to ." + + Move SAMPLES and SAMPLE_BUFFERS state to table 6.20. + +Dependencies on OpenGL ES 1.1 + + On an OpenGL ES 1.1 implementation, OES_framebuffer_object is required. + Include GetFixedv where GetBooleanv, GetIntegerv and GetFloatv appear. + Add OES suffixes to entrypoints and tokens introduced by + OES_framebuffer_object. + +Dependencies on EXT_discard_framebuffer + + In the presence of EXT_discard_framebuffer, DiscardFramebufferEXT is + modified to allow READ_FRAMEBUFFER_APPLE and DRAW_FRAMEBUFFER_APPLE + as acceptable targets. If is FRAMEBUFFER, DiscardFramebufferEXT + behaves as though DRAW_FRAMEBUFFER_APPLE were specified. + +Errors + + INVALID_FRAMEBUFFER_OPERATION is generated if DrawArrays, DrawElements, or + ResolveMultisampleFramebufferAPPLE is called while the draw framebuffer is + not framebuffer complete. + + INVALID_FRAMEBUFFER_OPERATION is generated if ReadPixels, + CopyTex{Sub}Image*, or ResolveMultisampleFramebufferAPPLE is called while + the read framebuffer is not framebuffer complete. + + INVALID_OPERATION is generated if ReadPixels, or CopyTex{Sub}Image* is + called while READ_FRAMEBUFFER_BINDING_APPLE is non-zero, the read + framebuffer is framebuffer complete, and the value of SAMPLE_BUFFERS for + the read framebuffer is greater than zero. + + INVALID_OPERATION is generated by ResolveMultisampleFramebufferAPPLE if + SAMPLE_BUFFERS for the read framebuffer is zero, or if SAMPLE_BUFFERS for + the draw framebuffer is greater than zero, or if the read framebuffer or + draw framebuffer does not have a color attachment, or if the dimensions of + the read and draw framebuffers are not identical, or if the components in + the format of the draw framebuffer's color attachment are not present in + the format of the read framebuffer's color attachment. + + OUT_OF_MEMORY is generated when RenderbufferStorageMultisampleAPPLE cannot + create storage of the specified size. + + INVALID_VALUE is generated if RenderbufferStorageMultisampleAPPLE is + called with a value of that is greater than MAX_SAMPLES_APPLE + or with a value of or that is greater than + MAX_RENDERBUFFER_SIZE. + +New State + + Add to table 6.19 (Implementation Dependent Values (cont.)): + + Get Value Type Get Command Minimum Value Description Section + --------- ---- ----------- ------------- ------------------- ------- + MAX_SAMPLES_APPLE Z+ GetIntegerv 1 Maximum number of 4.4.3 + samples supported + for multisampling + + Add to table 6.22 (Renderbuffer State): + + Get Value Type Get Command Initial Value Description Section + -------------------------- ---- -------------------------- ------------- -------------------- ------- + RENDERBUFFER_SAMPLES_APPLE Z+ GetRenderbufferParameteriv 0 Renderbuffer samples 4.4.3 + + + Remove reference to FRAMEBUFFER_BINDING from Table 6.23 (Framebuffer State) + and replace with the following: + + Get Value Type Get Command Initial Value Description Section + ------------------------------ ---- ----------- ------------- ------------------------- ------- + DRAW_FRAMEBUFFER_BINDING_APPLE Z+ GetIntegerv 0 Framebuffer object bound 4.4.1 + to DRAW_FRAMEBUFFER_APPLE + READ_FRAMEBUFFER_BINDING_APPLE Z+ GetIntegerv 0 Framebuffer object 4.4.1 + to READ_FRAMEBUFFER_APPLE + + + +Revision History + + #4, February 24, 2011: Benj Lipchak + - assign extension number + - clarify that dithering is still performed during resolve + - clarify that only format conversions that drop components are allowed + during resolve + #3, January 5, 2010: Benj Lipchak + - remove the error when read and draw color formats are not identical + - add an error when missing a color attachment to the read or draw FBO + #2, October 29, 2009: Benj Lipchak + - add interaction with EXT_discard_framebuffer + - mention that scissoring can be used for partial resolves + #1, October 28, 2009: Benj Lipchak + - first revision diff --git a/opengles/extensions/APPLE/APPLE_object_purgeable.txt b/opengles/extensions/APPLE/APPLE_object_purgeable.txt new file mode 100644 index 0000000000..aa50cd441c --- /dev/null +++ b/opengles/extensions/APPLE/APPLE_object_purgeable.txt @@ -0,0 +1,644 @@ +Name + + APPLE_object_purgeable + +Name Strings + + GL_APPLE_object_purgeable + +Contributors + + Andrew Barnes + Bob Beretta + Kenneth Dyke + Alex Eddy + John Harper + Charlie Lao + Jeremy Sandmel + +Contact + + Charlie Lao, Apple Computer Inc. (clao 'at' apple.com) + +Status + + TBD + +Version + + Last Modified Date: September 29, 2006 + +Number + + 371 + +Dependencies + + OpenGL 1.5 is required. + + The extension is written against the OpenGL 1.5 Specification. + +Overview + + This extension provides the ability to mark the storage of OpenGL + objects as "purgeable". + + Many of today's modern virtual memory systems include the concept of + purgeability in order to avoid unnecessary paging when the object + contents are no longer needed. In OpenGL, objects such as textures, + vertex buffers, pixel buffers, and renderbuffers all have + significant storage requirements. By default, the OpenGL is + required to preserve the contents of these objects regardless of + system resource stress, such as vram shortage or physical memory + shortage. Often this is accomplished by temporarily paging the + contents of objects that are not currently needed to some kind of + secondary storage area. This paging operation can be an unnecessary + computational expense in the cases where the data is not going to be + used again or where the content can be reproduced by the application + with less expense than the paging operation would require. + + This extension defines a mechanism for the application to mark the + storage of OpenGL objects as "purgeable" in order to influence these + paging operations. The application can further control the + semantics of making object storage "purgeable" with two options + ("volatile" and "released") and "unpurgeable" with two options + ("undefined" and "retained") + + Applications that use this extension will typically follow one of + two operational models. The typical model for most applications is + to mark an object storage as "purgeable" with the "volatile" option, + and then later mark the storage as "unpurgeable" with the "retained" + option. When this happens, the application may or may not need to + respecify the object contents, depending on the whether the object + storage was actually released. The application can find out whether + the storage was released by examining the return value of the + function which marks the storage as "unpurgeable". This model is + useful when the application does not know at the time it marks the + object storage as "purgeable" whether it will later need those + contents to be valid. + + Another operational model is for an application to mark the storage + for an object as "purgeable" with the "released" option, and then + later mark the object "unpurgeable" with the "undefined" option. In + this latter model, the application intends to unconditionally reload + the object contents later on, and so it tells the GL that it is okay + if the contents are "undefined" when the storage is re-allocated. + + Note that in both models, it is possible for the contents to become + undefined since they could have actually been purged from the system + in either case. The various options are still useful, however, + since they give more information to the GL about what the + application expects to happen and the GL can use this information to + make better predictions about which paging choices will be more + efficient. + +IP Status + + No known IP claims. + +Issues + + 1. Why use two functions rather than just one? + + The reason we chose two functions is that switching between the + two possible object states - purgeable and unpurgeable - might + be expensive. In addition, the return values of the operation + may be different depending on what state the object storage is + in and whether it has been purged or not. Therefore, we want to + enforce that the state is changed in matching pairs of function + calls, similar to Begin/End. In order to enforce this behavior, + we require two functions. + + Applications are required to call ObjectPurgeable and + ObjectUnpurgeable in matched pairs, otherwise INVALID_OPERATION + is generated. + + 2. What does calling ObjectUnpurgeable with