diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e59aa7ec0bb..03d2ae3c11d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,6 @@ files: | .github| cobalt| docker| - glimp| internal| precommit_hooks| starboard| @@ -25,8 +24,8 @@ exclude: | (?x)^( ( cobalt/updater| - glimp/include| internal/kokoro/third-party| + internal/starboard/shared/glimp/include| internal/starboard/shared/playstation/glimp/shaders| )/ | @@ -147,7 +146,7 @@ repos: cobalt/websocket/| components/crx_file/| content/| - glimp/| + internal/starboard/shared/glimp/| nb/| starboard/android/apk/gradlew| starboard/android/apk/app/src/main/java/dev/cobalt/media/MediaDrmBridge.java$| diff --git a/cobalt/renderer/backend/egl/graphics_system.cc b/cobalt/renderer/backend/egl/graphics_system.cc index 07444ade6cee..664750c924b8 100644 --- a/cobalt/renderer/backend/egl/graphics_system.cc +++ b/cobalt/renderer/backend/egl/graphics_system.cc @@ -28,7 +28,7 @@ #include "cobalt/renderer/backend/egl/texture.h" #include "cobalt/renderer/backend/egl/utils.h" #if defined(ENABLE_GLIMP_TRACING) -#include "glimp/tracing/tracing.h" // nogncheck +#include "internal/starboard/shared/glimp/tracing/tracing.h" #endif #include "cobalt/renderer/egl_and_gles.h" diff --git a/glimp/.gitattributes b/glimp/.gitattributes deleted file mode 100644 index 10dbe12fc08e..000000000000 --- a/glimp/.gitattributes +++ /dev/null @@ -1,29 +0,0 @@ -# These files are text and should be normalized (convert crlf > lf). -*.bat text eol=lf -*.cc text eol=lf -*.cg text eol=lf -*.cpp text eol=lf -*.css text eol=lf -*.gyp text eol=lf -*.gypi text eol=lf -*.h text eol=lf -*.html text eol=lf -*.idl text eol=lf -*.js text eol=lf -*.pump text eol=lf -*.py text eol=lf -*.sublime-project text eol=lf -*.sublime-workspace text eol=lf -*.template text eol=lf -*.txt text eol=lf -*.y text eol=lf -.clang-format text eol=lf -codereview.settings text eol=lf - -# Images should be treated as binary files. -*.exe binary -*.jpg binary -*.mp4 binary -*.png binary -*.pyc binary -*.ttf binary diff --git a/glimp/.gitignore b/glimp/.gitignore deleted file mode 100644 index 5b69378606da..000000000000 --- a/glimp/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.pyc -*.sublime-workspace -*.swp -*.tmp -.DS_Store diff --git a/glimp/BUILD.gn b/glimp/BUILD.gn deleted file mode 100644 index bc8f348c6f37..000000000000 --- a/glimp/BUILD.gn +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 2021 The Cobalt Authors. All Rights Reserved. -# -# 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. - -import("//starboard/build/platform_path.gni") - -config("glimp_config") { - include_dirs = [ "include" ] - defines = [ - # There doesn't appear to be any way to use the C preprocessor to do - # string concatenation with the / character. This prevents us from using - # the preprocessor to assemble an include file path, so we have to do - # the concatenation here in GYP. - # http://stackoverflow.com/questions/29601786/c-preprocessor-building-a-path-string - "GLIMP_EGLPLATFORM_INCLUDE=\"../../../$starboard_path/glimp/eglplatform_public.h\"", - "GLIMP_KHRPLATFORM_INCLUDE=\"../../../$starboard_path/glimp/khrplatform_public.h\"", - - # Uncomment the define below to enable and use tracing inside glimp. - # "ENABLE_GLIMP_TRACING", - ] -} - -group("glimp") { - public_configs = [ ":glimp_config" ] - deps = [ "//$starboard_path/glimp:glimp_platform" ] -} - -config("glimp_common_sources_public_config") { - configs = [ ":glimp_config" ] - include_dirs = [ "//$starboard_path/glimp/platform" ] -} - -source_set("glimp_common_sources") { - check_includes = false - sources = [ - "egl/attrib_map.cc", - "egl/attrib_map.h", - "egl/config.cc", - "egl/config.h", - "egl/display.cc", - "egl/display.h", - "egl/display_impl.h", - "egl/display_registry.cc", - "egl/display_registry.h", - "egl/error.cc", - "egl/error.h", - "egl/get_proc_address_impl.h", - "egl/scoped_egl_lock.cc", - "egl/scoped_egl_lock.h", - "egl/surface.cc", - "egl/surface.h", - "egl/surface_impl.h", - "entry_points/egl.cc", - "entry_points/egl_ext.cc", - "entry_points/gles_2_0.cc", - "entry_points/gles_2_0_ext.cc", - "entry_points/gles_3_0.cc", - "gles/blend_state.h", - "gles/buffer.cc", - "gles/buffer.h", - "gles/buffer_impl.h", - "gles/context.cc", - "gles/context.h", - "gles/context_impl.h", - "gles/convert_pixel_data.cc", - "gles/convert_pixel_data.h", - "gles/cull_face_state.h", - "gles/draw_mode.h", - "gles/draw_state.cc", - "gles/draw_state.h", - "gles/framebuffer.cc", - "gles/framebuffer.h", - "gles/index_data_type.h", - "gles/pixel_format.cc", - "gles/pixel_format.h", - "gles/program.cc", - "gles/program.h", - "gles/program_impl.h", - "gles/ref_counted_resource_map.h", - "gles/renderbuffer.cc", - "gles/renderbuffer.h", - "gles/resource_manager.cc", - "gles/resource_manager.h", - "gles/sampler.h", - "gles/shader.cc", - "gles/shader.h", - "gles/shader_impl.h", - "gles/texture.cc", - "gles/texture.h", - "gles/texture_impl.h", - "gles/uniform_info.h", - "gles/unique_id_generator.cc", - "gles/unique_id_generator.h", - "gles/vertex_attribute.h", - "polymorphic_downcast.h", - "rect.h", - "ref_counted.cc", - "ref_counted.h", - "shaders/glsl_shader_map_helpers.h", - "shaders/hash_glsl_source.cc", - "shaders/hash_glsl_source.h", - "thread_collision_warner.cc", - "thread_collision_warner.h", - ] - public_configs = [ ":glimp_common_sources_public_config" ] - deps = [ - "//glimp/tracing", - "//starboard:starboard_headers_only", - ] -} diff --git a/glimp/LICENSE b/glimp/LICENSE deleted file mode 100644 index d64569567334..000000000000 --- a/glimp/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/glimp/egl/attrib_map.cc b/glimp/egl/attrib_map.cc deleted file mode 100644 index 97af8865eade..000000000000 --- a/glimp/egl/attrib_map.cc +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/egl/attrib_map.h" - -namespace glimp { -namespace egl { - -AttribMap ParseRawAttribList(const EGLint* attrib_list) { - AttribMap ret; - if (!attrib_list) { - return ret; - } - - const int* current_attrib = attrib_list; - while (*current_attrib != EGL_NONE) { - int key = *current_attrib++; - int value = *current_attrib++; - - ret[key] = value; - } - - return ret; -} - -} // namespace egl -} // namespace glimp diff --git a/glimp/egl/attrib_map.h b/glimp/egl/attrib_map.h deleted file mode 100644 index 62fe5acb88df..000000000000 --- a/glimp/egl/attrib_map.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_ATTRIB_MAP_H_ -#define GLIMP_EGL_ATTRIB_MAP_H_ - -#include - -#include - -namespace glimp { -namespace egl { - -typedef std::map AttribMap; - -// Many EGL functions take an "attribute list" as a parameter that all share a -// similar format: A list of integer key/value pairs and concluded with the -// value EGL_NONE (like a null terminated C string). This function parses -// that attribute list into a map and returns it. -AttribMap ParseRawAttribList(const EGLint* attrib_list); - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_ATTRIB_MAP_H_ diff --git a/glimp/egl/config.cc b/glimp/egl/config.cc deleted file mode 100644 index 33a30a688bc9..000000000000 --- a/glimp/egl/config.cc +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/egl/config.h" - -#include - -#include "starboard/common/log.h" - -namespace glimp { -namespace egl { - -namespace { -bool AttributeKeyAndValueAreValid(int key, int value) { - switch (key) { - // Deal with the size keys where all values are valid. - case EGL_RED_SIZE: - case EGL_GREEN_SIZE: - case EGL_BLUE_SIZE: - case EGL_ALPHA_SIZE: - case EGL_BUFFER_SIZE: - case EGL_LUMINANCE_SIZE: - case EGL_STENCIL_SIZE: { - return true; - } - - // Deal with the mask keys where all values are valid. - case EGL_CONFORMANT: - case EGL_RENDERABLE_TYPE: - case EGL_SURFACE_TYPE: { - return true; - } - - // Deal with boolean values. - case EGL_BIND_TO_TEXTURE_RGBA: { - switch (value) { - case EGL_DONT_CARE: - case EGL_TRUE: - case EGL_FALSE: { - return true; - } - } - return false; - } - - case EGL_COLOR_BUFFER_TYPE: { - switch (value) { - case EGL_RGB_BUFFER: - case EGL_LUMINANCE_BUFFER: { - return true; - } - } - return false; - } - } - - // If the switch statement didn't catch the key, this is an unknown - // key values. - // TODO: glimp doesn't support all values yet, and will return false for keys - // that it doesn't support. - return false; -} -} // namespace - -bool ValidateConfigAttribList(const AttribMap& attribs) { - for (AttribMap::const_iterator iter = attribs.begin(); iter != attribs.end(); - ++iter) { - if (!AttributeKeyAndValueAreValid(iter->first, iter->second)) { - return false; - } - } - return true; -} - -namespace { -// Returns whether or not a single attribute (the parameters |key| and |value|) -// matches a config or not. -bool ConfigMatchesAttribute(const Config& config, int key, int value) { - SB_DCHECK(AttributeKeyAndValueAreValid(key, value)); - SB_DCHECK(value != EGL_DONT_CARE); - - switch (key) { - case EGL_RED_SIZE: - case EGL_GREEN_SIZE: - case EGL_BLUE_SIZE: - case EGL_ALPHA_SIZE: - case EGL_BUFFER_SIZE: - case EGL_LUMINANCE_SIZE: - case EGL_STENCIL_SIZE: { - // We match if our config's bit depth is greater than or equal to the - // requested value. - return config.find(key)->second >= value; - } - - case EGL_CONFORMANT: - case EGL_RENDERABLE_TYPE: - case EGL_SURFACE_TYPE: { - // We match if our config's bit mask includes the requested bit mask. - return (config.find(key)->second & value) == value; - } - - case EGL_BIND_TO_TEXTURE_RGBA: { - // Our config matches booleans if the requested boolean is not true, or - // else if the config's corresponding boolean is also true. - return value != EGL_TRUE || config.find(key)->second == EGL_TRUE; - } - - case EGL_COLOR_BUFFER_TYPE: { - // We match if our config value matches the requested value exactly. - return config.find(key)->second == value; - } - } - - // The attributes should have been validated when this function is called, - // so if we reach this point, then there is an inconsistency between - // this function and AttributeKeyAndValueAreValid(). - SB_NOTREACHED(); - return false; -} - -bool ConfigMatchesAttributes(const Config& config, - const AttribMap& attrib_list) { - for (AttribMap::const_iterator iter = attrib_list.begin(); - iter != attrib_list.end(); ++iter) { - if (iter->second != EGL_DONT_CARE) { - if (!ConfigMatchesAttribute(config, iter->first, iter->second)) { - return false; - } - } - } - return true; -} -} // namespace - -std::vector FilterConfigs(const std::set& configs, - const AttribMap& attrib_list) { - std::vector ret; - - for (std::set::const_iterator iter = configs.begin(); - iter != configs.end(); ++iter) { - if (ConfigMatchesAttributes(**iter, attrib_list)) { - ret.push_back(*iter); - } - } - - return ret; -} - -namespace { - -class ConfigSorter { - public: - explicit ConfigSorter(const AttribMap& attrib_list) - : attrib_list_(attrib_list) {} - - // We define this such that it sorts in decreasing order of preference. - bool operator()(const Config* lhs, const Config* rhs) const { - // Bit depth must be sorted in ascending order as a total over all - // channels that are specified by the config. - if (GetTotalBitDepth(*lhs) > GetTotalBitDepth(*rhs)) { - return true; - } - return false; - } - - private: - // Returns the bit depth for a given channel, or 0 if we don't care about - // it's value (e.g. it is not in the specified attribute list). - int GetTotalBitDepthForChannel(const Config& config, int key) const { - AttribMap::const_iterator found = attrib_list_.find(key); - if (found == attrib_list_.end() || found->second == EGL_DONT_CARE) { - return 0; - } else { - return found->second; - } - } - - // Gets the total depth for all color channels, to be used to decide the - // sort order. - int GetTotalBitDepth(const Config& config) const { - int total_bit_depth = 0; - total_bit_depth += GetTotalBitDepthForChannel(config, EGL_RED_SIZE); - total_bit_depth += GetTotalBitDepthForChannel(config, EGL_GREEN_SIZE); - total_bit_depth += GetTotalBitDepthForChannel(config, EGL_BLUE_SIZE); - total_bit_depth += GetTotalBitDepthForChannel(config, EGL_ALPHA_SIZE); - return total_bit_depth; - } - - const AttribMap& attrib_list_; -}; -} // namespace - -void SortConfigs(const AttribMap& attrib_list, - std::vector* in_out_configs) { - ConfigSorter config_sorter(attrib_list); - std::sort(in_out_configs->begin(), in_out_configs->end(), config_sorter); -} - -EGLConfig ToEGLConfig(Config* config) { - return reinterpret_cast(config); -} - -} // namespace egl -} // namespace glimp diff --git a/glimp/egl/config.h b/glimp/egl/config.h deleted file mode 100644 index 5ac18fdfe7f7..000000000000 --- a/glimp/egl/config.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_CONFIG_H_ -#define GLIMP_EGL_CONFIG_H_ - -#include - -#include -#include -#include - -#include "glimp/egl/attrib_map.h" - -namespace glimp { -namespace egl { - -// Our underlying EGLConfig structure is just a mapping from config key to -// value. -typedef std::map Config; - -// Examines the |attribs| list of attributes passed in to eglGetConfig(), and -// checks if the attributes are invalid, in which case false is returned, -// otherwise true is returned. -bool ValidateConfigAttribList(const AttribMap& attribs); - -// Filters the input configs such that only those that match the specified -// |attrib_list| are returned. -std::vector FilterConfigs(const std::set& configs, - const AttribMap& attrib_list); - -// Sorts the input list in place according to what best metches the specified -// |attrib_list|. |in_out_configs| will be sorted after this function returns. -void SortConfigs(const AttribMap& attrib_list, - std::vector* in_out_configs); - -// Convert our internal Config pointer type into a public EGLConfig type. -EGLConfig ToEGLConfig(Config* config); - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_CONFIG_H_ diff --git a/glimp/egl/display.cc b/glimp/egl/display.cc deleted file mode 100644 index d8541bec0d8f..000000000000 --- a/glimp/egl/display.cc +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Copyright 2015 The Cobalt Authors. All Rights Reserved. - * - * 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. - */ - -#include "glimp/egl/display.h" - -#include -#include -#include - -#include "glimp/egl/config.h" -#include "glimp/egl/error.h" -#include "starboard/common/log.h" -#include "starboard/event.h" - -namespace glimp { -namespace egl { - -const int64_t kSubmitDoneDelay = 1000000 / 60; // 1/60 seconds, in microseconds - -// Don't repeat the submitDone callback during suspension -// until specified by eglTerminate. -bool Display::repeat_submit_done_during_suspend = false; - -namespace { -void ScheduleSubmitDoneCallback(void* context) { - if (Display::repeat_submit_done_during_suspend) { - SB_DCHECK(true) << "Suspend mode is disabled. ScheduleSubmitDoneCallback " - "shouldn't be triggered."; - DisplayImpl::CallSubmitDone(); - Display::RepeatSubmitDoneDuringSuspend(); - } -} -} // namespace - -void Display::RepeatSubmitDoneDuringSuspend() { - static SbEventId submit_done_repeating_callback_event = kSbEventIdInvalid; - if (Display::repeat_submit_done_during_suspend) { - submit_done_repeating_callback_event = - SbEventSchedule(&ScheduleSubmitDoneCallback, NULL, kSubmitDoneDelay); - } else { - if (submit_done_repeating_callback_event != kSbEventIdInvalid) { - SbEventCancel(submit_done_repeating_callback_event); - } - } -} - -Display::Display(std::unique_ptr display_impl) - : impl_(std::move(display_impl)) {} - -Display::~Display() { - SB_DCHECK(active_surfaces_.empty()); -} - -void Display::GetVersionInfo(EGLint* major, EGLint* minor) { - DisplayImpl::VersionInfo version_info = impl_->GetVersionInfo(); - if (major) { - *major = version_info.major; - } - if (minor) { - *minor = version_info.minor; - } -} - -bool Display::ChooseConfig(const EGLint* attrib_list, - EGLConfig* configs, - EGLint config_size, - EGLint* num_config) { - if (!num_config) { - SetError(EGL_BAD_PARAMETER); - return false; - } - AttribMap attribs = ParseRawAttribList(attrib_list); - if (!ValidateConfigAttribList(attribs)) { - SetError(EGL_BAD_ATTRIBUTE); - return false; - } - - std::vector configs_vector = - FilterConfigs(impl_->GetSupportedConfigs(), attribs); - SortConfigs(attribs, &configs_vector); - - if (configs) { - *num_config = - std::min(config_size, static_cast(configs_vector.size())); - for (int i = 0; i < *num_config; ++i) { - configs[i] = ToEGLConfig(configs_vector[i]); - } - } else { - *num_config = static_cast(configs_vector.size()); - } - - return true; -} - -bool Display::ConfigIsValid(EGLConfig config) { - const DisplayImpl::ConfigSet& supported_configs = - impl_->GetSupportedConfigs(); - - return supported_configs.find(reinterpret_cast(config)) != - supported_configs.end(); -} - -EGLSurface Display::CreateWindowSurface(EGLConfig config, - EGLNativeWindowType win, - const EGLint* attrib_list) { - AttribMap attribs = ParseRawAttribList(attrib_list); - if (!ValidateSurfaceAttribList(attribs)) { - SetError(EGL_BAD_ATTRIBUTE); - return EGL_NO_SURFACE; - } - - if (!ConfigIsValid(config)) { - SetError(EGL_BAD_CONFIG); - return EGL_NO_SURFACE; - } - - if (!((*reinterpret_cast(config))[EGL_SURFACE_TYPE] | - EGL_WINDOW_BIT)) { - // The config used must have the EGL_WINDOW_BIT set in order for us to - // be able to create windows. - SetError(EGL_BAD_MATCH); - return EGL_NO_SURFACE; - } - - std::unique_ptr surface_impl = impl_->CreateWindowSurface( - reinterpret_cast(config), win, attribs); - if (!surface_impl) { - return EGL_NO_SURFACE; - } - - Surface* surface = new Surface(std::move(surface_impl)); - active_surfaces_.insert(surface); - - return ToEGLSurface(surface); -} - -EGLSurface Display::CreatePbufferSurface(EGLConfig config, - const EGLint* attrib_list) { - AttribMap attribs = ParseRawAttribList(attrib_list); - if (!ValidateSurfaceAttribList(attribs)) { - SetError(EGL_BAD_ATTRIBUTE); - return EGL_NO_SURFACE; - } - - if (!ConfigIsValid(config)) { - SetError(EGL_BAD_CONFIG); - return EGL_NO_SURFACE; - } - - if (!((*reinterpret_cast(config))[EGL_SURFACE_TYPE] | - EGL_PBUFFER_BIT)) { - // The config used must have the EGL_PBUFFER_BIT set in order for us to - // be able to create pbuffers. - SetError(EGL_BAD_MATCH); - return EGL_NO_SURFACE; - } - - std::unique_ptr surface_impl = - impl_->CreatePbufferSurface(reinterpret_cast(config), attribs); - if (!surface_impl) { - return EGL_NO_SURFACE; - } - - Surface* surface = new Surface(std::move(surface_impl)); - active_surfaces_.insert(surface); - - return ToEGLSurface(surface); -} - -bool Display::SurfaceIsValid(EGLSurface surface) { - return active_surfaces_.find(FromEGLSurface(surface)) != - active_surfaces_.end(); -} - -bool Display::DestroySurface(EGLSurface surface) { - if (!SurfaceIsValid(surface)) { - SetError(EGL_BAD_SURFACE); - return false; - } - - Surface* surf = FromEGLSurface(surface); - active_surfaces_.erase(surf); - delete surf; - return true; -} - -namespace { -// Returns -1 if the context attributes are invalid. -int GetContextVersion(const EGLint* attrib_list) { - AttribMap attribs = ParseRawAttribList(attrib_list); - - // According to - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglCreateContext.xhtml, - // the default version of the GL ES context is 1. - if (attribs.empty()) { - return 1; - } - - // EGL_CONTEXT_CLIENT_VERSION is the only valid attribute for CreateContext. - AttribMap::const_iterator found = attribs.find(EGL_CONTEXT_CLIENT_VERSION); - if (found == attribs.end()) { - // If we didn't find it, and the attribute list is not empty (checked above) - // then this is an invalid attribute list. - return -1; - } else { - return found->second; - } -} -} // namespace - -EGLContext Display::CreateContext(EGLConfig config, - EGLContext share_context, - const EGLint* attrib_list) { - // glimp only supports GL ES versions 2 and 3. - int context_version = GetContextVersion(attrib_list); - if (context_version != 2 && context_version != 3) { - SetError(EGL_BAD_ATTRIBUTE); - return EGL_NO_CONTEXT; - } - - if (!ConfigIsValid(config)) { - SetError(EGL_BAD_CONFIG); - return EGL_NO_CONTEXT; - } - - // Ensure that |share_context| is either unspecified, or valid. - gles::Context* share = NULL; - if (share_context != EGL_NO_CONTEXT) { - if (!ContextIsValid(share_context)) { - SetError(EGL_BAD_CONTEXT); - return EGL_NO_CONTEXT; - } - share = reinterpret_cast(share_context); - } - - std::unique_ptr context_impl = - impl_->CreateContext(reinterpret_cast(config), context_version); - if (!context_impl) { - return EGL_NO_CONTEXT; - } - - gles::Context* context = new gles::Context(std::move(context_impl), share); - active_contexts_.insert(context); - - return reinterpret_cast(context); -} - -bool Display::ContextIsValid(EGLContext context) { - return active_contexts_.find(reinterpret_cast(context)) != - active_contexts_.end(); -} - -bool Display::DestroyContext(EGLContext ctx) { - if (!ContextIsValid(ctx)) { - SetError(EGL_BAD_CONTEXT); - return false; - } - - gles::Context* context = reinterpret_cast(ctx); - active_contexts_.erase(context); - delete context; - return true; -} - -bool Display::MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx) { - if (draw == EGL_NO_SURFACE && read == EGL_NO_SURFACE && - ctx == EGL_NO_CONTEXT) { - if (!ContextIsValid(reinterpret_cast( - gles::Context::GetTLSCurrentContext()))) { - SB_DLOG(WARNING) - << "Attempted to release a context not owned by this display."; - SetError(EGL_BAD_CONTEXT); - return false; - } - gles::Context::ReleaseTLSCurrentContext(); - return true; - } - - if (!ContextIsValid(ctx)) { - SetError(EGL_BAD_CONTEXT); - return false; - } - - if (!SurfaceIsValid(draw)) { - SetError(EGL_BAD_SURFACE); - return false; - } - - if (!SurfaceIsValid(read)) { - SetError(EGL_BAD_SURFACE); - return false; - } - - return gles::Context::SetTLSCurrentContext( - reinterpret_cast(ctx), FromEGLSurface(draw), - FromEGLSurface(read)); -} - -bool Display::SwapBuffers(EGLSurface surface) { - if (!SurfaceIsValid(surface)) { - SetError(EGL_BAD_SURFACE); - return false; - } - Surface* surface_object = FromEGLSurface(surface); - - gles::Context* current_context = gles::Context::GetTLSCurrentContext(); - if (!ContextIsValid(reinterpret_cast(current_context))) { - // The specification for eglSwapBuffers() does not explicitly state that - // the surface's context needs to be current when eglSwapBuffers() is - // called, but we enforce this in glimp as it is a very typical use-case and - // it considerably simplifies the process. - SB_DLOG(WARNING) - << "eglSwapBuffers() called when no or an invalid context was current."; - SetError(EGL_BAD_SURFACE); - return false; - } - - if (current_context->draw_surface() != surface_object) { - SB_DLOG(WARNING) - << "eglSwapBuffers() called on a surface that is not the draw surface " - << "of the current context."; - SetError(EGL_BAD_SURFACE); - return false; - } - - current_context->SwapBuffers(); - return true; -} - -bool Display::SwapInterval(EGLint interval) { - return impl_->SetSwapInterval(interval); -} - -} // namespace egl -} // namespace glimp diff --git a/glimp/egl/display.h b/glimp/egl/display.h deleted file mode 100644 index 090806f26aa7..000000000000 --- a/glimp/egl/display.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2015 The Cobalt Authors. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_DISPLAY_H_ -#define GLIMP_EGL_DISPLAY_H_ - -#include - -#include -#include "glimp/egl/config.h" -#include "glimp/egl/display_impl.h" -#include "glimp/gles/context.h" - -namespace glimp { -namespace egl { - -// Encapsulates the concept of an EGL display. There is usually only one of -// these per process, and it represents the entire graphics system. It is -// the highest level object, and the "factory" responsible for generating -// graphics contexts. It is a platform-independent object that wraps a -// platform-dependent DisplayImpl object which must be injected into the Display -// upon construction. -class Display { - public: - static void RepeatSubmitDoneDuringSuspend(); - static bool repeat_submit_done_during_suspend; - - // In order to create a display, it must have a platform-specific - // implementation injected into it, where many methods will forward to. - explicit Display(std::unique_ptr display_impl); - ~Display(); - - void GetVersionInfo(EGLint* major, EGLint* minor); - - bool ChooseConfig(const EGLint* attrib_list, - EGLConfig* configs, - EGLint config_size, - EGLint* num_config); - bool ConfigIsValid(EGLConfig config); - - EGLSurface CreateWindowSurface(EGLConfig config, - EGLNativeWindowType win, - const EGLint* attrib_list); - EGLSurface CreatePbufferSurface(EGLConfig config, const EGLint* attrib_list); - - bool SurfaceIsValid(EGLSurface surface); - bool DestroySurface(EGLSurface surface); - - EGLContext CreateContext(EGLConfig config, - EGLContext share_context, - const EGLint* attrib_list); - bool ContextIsValid(EGLContext context); - bool DestroyContext(EGLContext ctx); - - bool MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx); - bool SwapBuffers(EGLSurface surface); - bool SwapInterval(EGLint interval); - - DisplayImpl* impl() const { return impl_.get(); } - - private: - std::unique_ptr impl_; - - // Keeps track of all created but not destroyed surfaces. - std::set active_surfaces_; - - // Keeps track of all created but not destroyed contexts. - std::set active_contexts_; -}; - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_DISPLAY_H_ diff --git a/glimp/egl/display_impl.h b/glimp/egl/display_impl.h deleted file mode 100644 index 9583859e9025..000000000000 --- a/glimp/egl/display_impl.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2015 The Cobalt Authors. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_DISPLAY_IMPL_H_ -#define GLIMP_EGL_DISPLAY_IMPL_H_ - -#include - -#include - -#include -#include "glimp/egl/attrib_map.h" -#include "glimp/egl/config.h" -#include "glimp/egl/surface.h" -#include "glimp/gles/context_impl.h" - -namespace glimp { -namespace egl { - -// All platform-specific aspects of a EGL Display are implemented within -// subclasses of DisplayImpl. Platforms must also implement -// DisplayImpl::Create(), declared below, in order to define how -// platform-specific DisplayImpls are to be created. -class DisplayImpl { - public: - // Return value type for the method GetVersionInfo(). - struct VersionInfo { - int major; - int minor; - }; - - typedef std::set ConfigSet; - - virtual ~DisplayImpl() {} - - // Returns true if the given |native_display| is a valid display ID that can - // be subsequently passed into Create(). - // To be implemented by each implementing platform. - static bool IsValidNativeDisplayType(EGLNativeDisplayType display_id); - // Creates and returns a new DisplayImpl object. - // To be implemented by each implementing platform. - static std::unique_ptr Create(EGLNativeDisplayType display_id); - // Submit done call. - static void CallSubmitDone(); - - // Returns the EGL major and minor versions, if they are not NULL. - // Called by eglInitialize(): - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglInitialize.xhtml - virtual VersionInfo GetVersionInfo() = 0; - - // Returns *all* configs for this display that may be chosen via a call to - // eglChooseConfig(). - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglChooseConfig.xhtml - virtual const ConfigSet& GetSupportedConfigs() const = 0; - - // Creates and returns a SurfaceImpl object that represents the surface of a - // window and is compatible with this DisplayImpl object. This will be called - // when eglCreateWindowSurface() is called. - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglCreateWindowSurface.xhtml - virtual std::unique_ptr CreateWindowSurface( - const Config* config, - EGLNativeWindowType win, - const AttribMap& attributes) = 0; - - // Creates and returns a SurfaceImpl object that represents the surface of a - // Pbuffer and is compatible with this DisplayImpl object. This will be - // called when eglCreatePbufferSurface() is called. - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglCreatePbufferSurface.xhtml - virtual std::unique_ptr CreatePbufferSurface( - const Config* config, - const AttribMap& attributes) = 0; - - // Creates and returns a gles::ContextImpl object that contains the platform - // specific implementation of a GL ES Context, of the specified version that - // is compatible with the specified config. - virtual std::unique_ptr CreateContext( - const Config* config, - int gles_version) = 0; - - // Sets the swap behavior for this display. This will be called when - // eglSwapInterval() is called. Returns true on success and false on failure. - // https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglSwapInterval.xhtml - virtual bool SetSwapInterval(int interval) = 0; - - private: -}; - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_DISPLAY_IMPL_H_ diff --git a/glimp/egl/display_registry.cc b/glimp/egl/display_registry.cc deleted file mode 100644 index 88bc338210f3..000000000000 --- a/glimp/egl/display_registry.cc +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/egl/display_registry.h" - -#include -#include - -#include "glimp/egl/display_impl.h" -#include "glimp/egl/error.h" - -namespace glimp { -namespace egl { - -int DisplayRegistry::num_connections_ = 0; -DisplayRegistry::Connection - DisplayRegistry::connections_[DisplayRegistry::kMaxDisplays]; - -EGLDisplay DisplayRegistry::GetDisplay(EGLNativeDisplayType native_display) { - // Check to see if a display already exists for this native_display. If so, - // return it, otherwise create a new one and return that. - for (int i = 0; i < num_connections_; ++i) { - if (connections_[i].native_display == native_display) { - return reinterpret_cast(&connections_[i]); - } - } - - // If the platform-specific implementation does not accept the specified - // |native_display|, return in error. - if (!DisplayImpl::IsValidNativeDisplayType(native_display)) { - return EGL_NO_DISPLAY; - } else { - // Create a new display connection (i.e. EGLDisplay), add it to our - // display mapping so it can be looked up later, and then return it. - SB_CHECK(num_connections_ < kMaxDisplays); - connections_[num_connections_].native_display = native_display; - connections_[num_connections_].display = NULL; - ++num_connections_; - return reinterpret_cast(&connections_[num_connections_ - 1]); - } -} - -bool DisplayRegistry::InitializeDisplay(EGLDisplay display) { - SB_DCHECK(Valid(display)); - Connection* connection = reinterpret_cast(display); - if (!connection->display) { - std::unique_ptr display_impl = - DisplayImpl::Create(connection->native_display); - // If the platform-specific glimp implementation rejected the native - // display, then we return false to indicate failure. - if (!display_impl) { - return false; - } - - connection->display = new Display(std::move(display_impl)); - } - - return true; -} - -void DisplayRegistry::TerminateDisplay(EGLDisplay display) { - SB_DCHECK(Valid(display)); - Connection* connection = reinterpret_cast(display); - - if (connection->display) { - delete connection->display; - connection->display = NULL; - } -} - -bool DisplayRegistry::Valid(EGLDisplay display) { - Connection* connection = reinterpret_cast(display); - for (int i = 0; i < num_connections_; ++i) { - if (connection == &connections_[i]) { - return true; - } - } - return false; -} - -// This function will either return the Display object associated with the -// given EGLDisplay, or else set the appropriate EGL error and then return -// NULL. -egl::Display* GetDisplayOrSetError(EGLDisplay egl_display) { - if (!egl::DisplayRegistry::Valid(egl_display)) { - egl::SetError(EGL_BAD_DISPLAY); - return NULL; - } - egl::Display* display = egl::DisplayRegistry::ToDisplay(egl_display); - if (!display) { - egl::SetError(EGL_NOT_INITIALIZED); - return NULL; - } - - return display; -} - -} // namespace egl -} // namespace glimp diff --git a/glimp/egl/display_registry.h b/glimp/egl/display_registry.h deleted file mode 100644 index 160365ea5d8e..000000000000 --- a/glimp/egl/display_registry.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_DISPLAY_REGISTRY_H_ -#define GLIMP_EGL_DISPLAY_REGISTRY_H_ - -#include "glimp/egl/display.h" -#include "starboard/common/log.h" - -namespace glimp { -namespace egl { - -// Maintains a registry of EGLDisplays as well as mappings from -// EGLNativeDisplayType to those EGLDisplays. Internally, an EGLDisplay is -// represented as a DisplayRegistry::Connection object that has a possibly null -// pointer to a Display object. The Display object will be initialized when -// DisplayRegistry::InitializeDisplay() is called, after which it may be -// retrieved and have methods called on it. -class DisplayRegistry { - public: - // Looks up the mapping from EGLNativeDisplayType to EGLDisplay, or creates - // one if it doesn't already exist, and returns the EGLDisplay associated - // with it. No failures will be reported by this method, it is - // InitializeDisplay() that will ultimately have the platform check - // whether the native display is valid or not. - static EGLDisplay GetDisplay(EGLNativeDisplayType native_display); - - // Construct the Display object, if it has not yet been initialized already. - // This method can fail if the native display associated with the EGLDisplay - // is rejected by the platform. Returns true if the display is already - // initialized or successfully initialized, otherwise returns false. - static bool InitializeDisplay(EGLDisplay display); - - // Terminates the display if it is initialized, otherwise it does nothing. - static void TerminateDisplay(EGLDisplay display); - - // Returns true if the given |display| is valid, which will be true if it - // was at some point previously returned by GetDisplay() and false otherwise. - static bool Valid(EGLDisplay display); - - // Returns the Display object associated with the given [valid] EGLDisplay - // object, or NULL if it is not initialized. - static Display* ToDisplay(EGLDisplay display) { - SB_DCHECK(Valid(display)); - return reinterpret_cast(display)->display; - } - - private: - // A Connection is the internal type of a EGLDisplay handle. It - // maintains a mapping from EGLNativeDisplayType to a (possibly null if it - // hasn't yet been eglInitialize()d) Display object. - struct Connection { - EGLNativeDisplayType native_display; - Display* display; - }; - - static const int kMaxDisplays = 10; - - // The number of display connections currently active. - static int num_connections_; - - // The mapping from native type to possibly initialized connection. - static Connection connections_[kMaxDisplays]; -}; - -// This function will either return the Display object associated with the -// given EGLDisplay, or else set the appropriate EGL error and then return -// NULL. -egl::Display* GetDisplayOrSetError(EGLDisplay egl_display); - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_DISPLAY_REGISTRY_H_ diff --git a/glimp/egl/error.cc b/glimp/egl/error.cc deleted file mode 100644 index 4f88dd979820..000000000000 --- a/glimp/egl/error.cc +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/egl/error.h" - -#include - -#include "starboard/thread.h" - -namespace glimp { -namespace egl { - -namespace { -pthread_once_t s_error_once_control = PTHREAD_ONCE_INIT; -pthread_key_t s_error_tls_key = 0; - -void InitializeError() { - pthread_key_create(&s_error_tls_key, NULL); -} -} // namespace - -EGLint GetError() { - pthread_once(&s_error_once_control, &InitializeError); - void* local_value = pthread_getspecific(s_error_tls_key); - if (local_value == NULL) { - // The EGL error has never been set. In this case, return EGL_SUCCESS as - // that is the initial value for eglGetError(). - // Note that NULL or 0 are not valid EGL error codes. - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglGetError.xhtml - return EGL_SUCCESS; - } - return static_cast(reinterpret_cast(local_value)); -} - -void SetError(EGLint error) { - pthread_once(&s_error_once_control, &InitializeError); - pthread_setspecific(s_error_tls_key, reinterpret_cast(error)); -} - -} // namespace egl -} // namespace glimp diff --git a/glimp/egl/error.h b/glimp/egl/error.h deleted file mode 100644 index 51df12261be7..000000000000 --- a/glimp/egl/error.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_ERROR_H_ -#define GLIMP_EGL_ERROR_H_ - -#include - -namespace glimp { -namespace egl { - -// Implements support for getting and setting the thread local EGL error -// value. -// https://www.khronos.org/registry/egl/sdk/docs/man/html/eglGetError.xhtml - -// Returns the current thread local error code. -EGLint GetError(); - -// Sets the current thread local error code. -void SetError(EGLint error); - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_ERROR_H_ diff --git a/glimp/egl/get_proc_address_impl.h b/glimp/egl/get_proc_address_impl.h deleted file mode 100644 index 5ff61c6f4363..000000000000 --- a/glimp/egl/get_proc_address_impl.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_GET_PROC_ADDRESS_IMPL_H_ -#define GLIMP_EGL_GET_PROC_ADDRESS_IMPL_H_ - -namespace glimp { -namespace egl { - -typedef void (*MustCastToProperFunctionPointerType)(void); - -// Calls to eglGetProcAddress() that are unhandled by platform-independent -// glimp code are forwarded to this platform-specific call, so that different -// platforms can implement custom extensions. This function should return -// a function pointer to the requested function upon success, and return NULL -// if the requested function is not available. -MustCastToProperFunctionPointerType GetProcAddressImpl(const char* procname); - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_GET_PROC_ADDRESS_IMPL_H_ diff --git a/glimp/egl/scoped_egl_lock.cc b/glimp/egl/scoped_egl_lock.cc deleted file mode 100644 index 572dfb8ba380..000000000000 --- a/glimp/egl/scoped_egl_lock.cc +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/egl/scoped_egl_lock.h" - -namespace glimp { -namespace egl { - -pthread_mutex_t ScopedEGLLock::mutex_ = PTHREAD_MUTEX_INITIALIZER; - -} // namespace egl -} // namespace glimp diff --git a/glimp/egl/scoped_egl_lock.h b/glimp/egl/scoped_egl_lock.h deleted file mode 100644 index 442b2c3fd294..000000000000 --- a/glimp/egl/scoped_egl_lock.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_SCOPED_EGL_LOCK_H_ -#define GLIMP_EGL_SCOPED_EGL_LOCK_H_ - -#include - -namespace glimp { -namespace egl { - -// A helper class to enable easy locking of the glimp EGL global mutex. -class ScopedEGLLock { - public: - ScopedEGLLock() { pthread_mutex_lock(&mutex_); } - ~ScopedEGLLock() { pthread_mutex_unlock(&mutex_); } - - private: - static pthread_mutex_t mutex_; -}; - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_SCOPED_EGL_LOCK_H_ diff --git a/glimp/egl/surface.cc b/glimp/egl/surface.cc deleted file mode 100644 index 4a33437e4d21..000000000000 --- a/glimp/egl/surface.cc +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/egl/surface.h" - -#include - -#include "glimp/egl/error.h" -#include "glimp/gles/context.h" -#include "starboard/common/log.h" - -namespace glimp { -namespace egl { - -Surface::Surface(std::unique_ptr surface_impl) - : surface_impl_(std::move(surface_impl)), is_bound_to_texture_(false) {} - -int Surface::GetWidth() const { - return surface_impl_->GetWidth(); -} - -int Surface::GetHeight() const { - return surface_impl_->GetHeight(); -} - -EGLint Surface::GetTextureFormat() const { - return EGL_TEXTURE_RGBA; -} - -EGLint Surface::GetTextureTarget() const { - return EGL_TEXTURE_2D; -} - -EGLBoolean Surface::QuerySurface(EGLint attribute, EGLint* value) { - switch (attribute) { - case EGL_HEIGHT: { - *value = GetHeight(); - return true; - } - - case EGL_WIDTH: { - *value = GetWidth(); - return true; - } - - case EGL_TEXTURE_FORMAT: { - // glimp only supports EGL_TEXTURE_RGBA. - *value = GetTextureFormat(); - return true; - } - - case EGL_TEXTURE_TARGET: { - // glimp only supports EGL_TEXTURE_2D. - *value = GetTextureTarget(); - } - - case EGL_CONFIG_ID: - case EGL_HORIZONTAL_RESOLUTION: - case EGL_LARGEST_PBUFFER: - case EGL_MIPMAP_LEVEL: - case EGL_MIPMAP_TEXTURE: - case EGL_MULTISAMPLE_RESOLVE: - case EGL_PIXEL_ASPECT_RATIO: - case EGL_RENDER_BUFFER: - case EGL_SWAP_BEHAVIOR: - case EGL_VERTICAL_RESOLUTION: { - SB_NOTIMPLEMENTED(); - } // Fall through to default on purpose. - - default: - SetError(EGL_BAD_ATTRIBUTE); - return false; - } - - return true; -} - -EGLBoolean Surface::BindTexImage(EGLint buffer) { - if (buffer != EGL_BACK_BUFFER) { - SetError(EGL_BAD_MATCH); - return false; - } - - if (is_bound_to_texture_) { - SetError(EGL_BAD_ACCESS); - return false; - } - - if (GetTextureTarget() == EGL_NO_TEXTURE) { - SetError(EGL_BAD_MATCH); - return false; - } - if (GetTextureTarget() != EGL_TEXTURE_2D) { - SB_NOTIMPLEMENTED() << "glimp does not support binding anything other than " - "EGL_TEXTURE_2D."; - SetError(EGL_BAD_MATCH); - return false; - } - - // When this method is called, we should bind to the currently bound active - // texture in the current GL context. - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglBindTexImage.xhtml - gles::Context* current_context = gles::Context::GetTLSCurrentContext(); - if (current_context == NULL) { - SB_DLOG(WARNING) - << "No GL ES context current during call to eglBindTexImage()."; - // This error is non-specified behavior, but seems reasonable. - SetError(EGL_BAD_CONTEXT); - return false; - } - - is_bound_to_texture_ = current_context->BindTextureToEGLSurface(this); - return is_bound_to_texture_; -} - -EGLBoolean Surface::ReleaseTexImage(EGLint buffer) { - if (buffer != EGL_BACK_BUFFER) { - SetError(EGL_BAD_MATCH); - return false; - } - - if (!is_bound_to_texture_) { - // Nothing to do if the surface is not already bound. - return true; - } - - gles::Context* current_context = gles::Context::GetTLSCurrentContext(); - if (current_context == NULL) { - SB_DLOG(WARNING) - << "No GL ES context current during call to eglReleaseTexImage()."; - // This error is non-specified behavior, but seems reasonable. - SetError(EGL_BAD_CONTEXT); - return false; - } - - if (current_context->ReleaseTextureFromEGLSurface(this)) { - is_bound_to_texture_ = false; - return true; - } else { - return false; - } -} - -namespace { -bool AttributeKeyAndValueAreValid(int key, int value) { - switch (key) { - // First deal with the trivial keys where all values are valid. - case EGL_WIDTH: - case EGL_HEIGHT: { - return true; - } - - case EGL_TEXTURE_TARGET: { - return value == EGL_TEXTURE_2D; - } - - case EGL_TEXTURE_FORMAT: { - return value == EGL_TEXTURE_RGBA; - } - } - - // If the switch statement didn't catch the key, this is an unknown - // key. - // TODO: glimp doesn't support all values yet, and will return false for keys - // that it doesn't support. - return false; -} -} // namespace - -bool ValidateSurfaceAttribList(const AttribMap& attribs) { - for (AttribMap::const_iterator iter = attribs.begin(); iter != attribs.end(); - ++iter) { - if (!AttributeKeyAndValueAreValid(iter->first, iter->second)) { - return false; - } - } - return true; -} - -EGLSurface ToEGLSurface(Surface* surface) { - return reinterpret_cast(surface); -} - -Surface* FromEGLSurface(EGLSurface surface) { - return reinterpret_cast(surface); -} - -} // namespace egl -} // namespace glimp diff --git a/glimp/egl/surface.h b/glimp/egl/surface.h deleted file mode 100644 index 1139796b1568..000000000000 --- a/glimp/egl/surface.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_SURFACE_H_ -#define GLIMP_EGL_SURFACE_H_ - -#include - -#include - -#include -#include "glimp/egl/attrib_map.h" -#include "glimp/egl/surface_impl.h" - -namespace glimp { -namespace egl { - -class Surface { - public: - explicit Surface(std::unique_ptr surface_impl); - - int GetWidth() const; - int GetHeight() const; - - EGLint GetTextureFormat() const; - EGLint GetTextureTarget() const; - - EGLBoolean QuerySurface(EGLint attribute, EGLint* value); - EGLBoolean BindTexImage(EGLint buffer); - EGLBoolean ReleaseTexImage(EGLint buffer); - - bool is_bound_to_texture() const { return is_bound_to_texture_; } - - SurfaceImpl* impl() const { return surface_impl_.get(); } - - private: - std::unique_ptr surface_impl_; - - // True if this surface is currently bound to a GL ES texture via - // eglBindTexImage(). - bool is_bound_to_texture_; -}; - -bool ValidateSurfaceAttribList(const AttribMap& attribs); - -EGLSurface ToEGLSurface(Surface* surface); -Surface* FromEGLSurface(EGLSurface surface); - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_SURFACE_H_ diff --git a/glimp/egl/surface_impl.h b/glimp/egl/surface_impl.h deleted file mode 100644 index fc026c31c66a..000000000000 --- a/glimp/egl/surface_impl.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_EGL_SURFACE_IMPL_H_ -#define GLIMP_EGL_SURFACE_IMPL_H_ - -#include - -namespace glimp { -namespace egl { - -class SurfaceImpl { - public: - virtual ~SurfaceImpl() {} - - // Returns a description of the underlying surface. This method will be - // referenced when functions like eglQuerySurface() are called. - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglQuerySurface.xhtml - virtual int GetWidth() const = 0; - virtual int GetHeight() const = 0; - - // Returns true if the surface is a window surface, false if the surface is a - // pixel buffer or a pixmap. - virtual bool IsWindowSurface() const = 0; - - private: -}; - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_EGL_SURFACE_IMPL_H_ diff --git a/glimp/entry_points/egl.cc b/glimp/entry_points/egl.cc deleted file mode 100644 index 71ad8bee8bd4..000000000000 --- a/glimp/entry_points/egl.cc +++ /dev/null @@ -1,462 +0,0 @@ -/* - * Copyright 2015 The Cobalt Authors. All Rights Reserved. - * - * 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. - */ - -#include - -#include "glimp/egl/config.h" -#include "glimp/egl/display.h" -#include "glimp/egl/display_registry.h" -#include "glimp/egl/error.h" -#include "glimp/egl/get_proc_address_impl.h" -#include "glimp/egl/scoped_egl_lock.h" -#include "starboard/common/log.h" - -namespace egl = glimp::egl; - -namespace { -egl::Surface* GetSurfaceOrSetError(EGLDisplay egl_display, - EGLSurface egl_surface) { - egl::Display* display = egl::GetDisplayOrSetError(egl_display); - if (!display) { - return NULL; - } - - if (!display->SurfaceIsValid(egl_surface)) { - egl::SetError(EGL_BAD_SURFACE); - return NULL; - } - - return egl::FromEGLSurface(egl_surface); -} -} // namespace - -extern "C" { - -EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, - const EGLint* attrib_list, - EGLConfig* configs, - EGLint config_size, - EGLint* num_config) { - egl::ScopedEGLLock egl_lock; - - egl::Display* display = egl::GetDisplayOrSetError(dpy); - if (!display) { - return false; - } - - return display->ChooseConfig(attrib_list, configs, config_size, num_config); -} - -EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, - EGLSurface surface, - EGLNativePixmapType target) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, - EGLConfig config, - EGLContext share_context, - const EGLint* attrib_list) { - egl::ScopedEGLLock egl_lock; - - egl::Display* display = egl::GetDisplayOrSetError(dpy); - if (!display) { - return EGL_NO_CONTEXT; - } - - return display->CreateContext(config, share_context, attrib_list); -} - -EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, - EGLConfig config, - const EGLint* attrib_list) { - egl::ScopedEGLLock egl_lock; - - egl::Display* display = egl::GetDisplayOrSetError(dpy); - if (!display) { - return EGL_NO_SURFACE; - } - - return display->CreatePbufferSurface(config, attrib_list); -} - -EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, - EGLConfig config, - EGLNativePixmapType pixmap, - const EGLint* attrib_list) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return EGL_NO_SURFACE; -} - -EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, - EGLConfig config, - EGLNativeWindowType win, - const EGLint* attrib_list) { - egl::ScopedEGLLock egl_lock; - - egl::Display* display = egl::GetDisplayOrSetError(dpy); - if (!display) { - return EGL_NO_SURFACE; - } - - return display->CreateWindowSurface(config, win, attrib_list); -} - -EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx) { - egl::ScopedEGLLock egl_lock; - - egl::Display* display = egl::GetDisplayOrSetError(dpy); - if (!display) { - return false; - } - - return display->DestroyContext(ctx); -} - -EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { - egl::ScopedEGLLock egl_lock; - - egl::Display* display = egl::GetDisplayOrSetError(dpy); - if (!display) { - return false; - } - - return display->DestroySurface(surface); -} - -EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, - EGLConfig config, - EGLint attribute, - EGLint* value) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, - EGLConfig* configs, - EGLint config_size, - EGLint* num_config) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return EGL_NO_DISPLAY; -} - -EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return EGL_NO_SURFACE; -} - -EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id) { - egl::ScopedEGLLock egl_lock; - return egl::DisplayRegistry::GetDisplay(display_id); -} - -EGLint EGLAPIENTRY eglGetError(void) { - // No lock needed as this function accesses only thread local data. - return egl::GetError(); -} - -EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, - EGLint* major, - EGLint* minor) { - egl::ScopedEGLLock egl_lock; - if (!egl::DisplayRegistry::Valid(dpy)) { - egl::SetError(EGL_BAD_DISPLAY); - return false; - } - if (!egl::DisplayRegistry::InitializeDisplay(dpy)) { - egl::SetError(EGL_NOT_INITIALIZED); - return false; - } - - egl::Display* display = egl::DisplayRegistry::ToDisplay(dpy); - display->GetVersionInfo(major, minor); - - egl::SetError(EGL_SUCCESS); - egl::Display::repeat_submit_done_during_suspend = false; - egl::Display::RepeatSubmitDoneDuringSuspend(); - return true; -} - -EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, - EGLSurface draw, - EGLSurface read, - EGLContext ctx) { - egl::ScopedEGLLock egl_lock; - - egl::Display* display = egl::GetDisplayOrSetError(dpy); - if (!display) { - return false; - } - - return display->MakeCurrent(draw, read, ctx); -} - -EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, - EGLContext ctx, - EGLint attribute, - EGLint* value) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -const char* EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return NULL; -} - -EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, - EGLSurface surface, - EGLint attribute, - EGLint* value) { - egl::ScopedEGLLock egl_lock; - - egl::Surface* surf = GetSurfaceOrSetError(dpy, surface); - if (!surf) { - return false; - } - - return surf->QuerySurface(attribute, value); -} - -EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) { - egl::ScopedEGLLock egl_lock; - - egl::Display* display = egl::GetDisplayOrSetError(dpy); - if (!display) { - return false; - } - - return display->SwapBuffers(surface); -} - -EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy) { - egl::ScopedEGLLock egl_lock; - if (!egl::DisplayRegistry::Valid(dpy)) { - egl::SetError(EGL_BAD_DISPLAY); - return false; - } - - egl::DisplayRegistry::TerminateDisplay(dpy); - - egl::SetError(EGL_SUCCESS); - egl::Display::repeat_submit_done_during_suspend = true; - egl::Display::RepeatSubmitDoneDuringSuspend(); - return true; -} - -EGLBoolean EGLAPIENTRY eglWaitGL(void) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, - EGLSurface surface, - EGLint buffer) { - egl::ScopedEGLLock egl_lock; - - egl::Surface* surf = GetSurfaceOrSetError(dpy, surface); - if (!surf) { - return false; - } - - return surf->BindTexImage(buffer); -} - -EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, - EGLSurface surface, - EGLint buffer) { - egl::ScopedEGLLock egl_lock; - - egl::Surface* surf = GetSurfaceOrSetError(dpy, surface); - if (!surf) { - return false; - } - - return surf->ReleaseTexImage(buffer); -} - -EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, - EGLSurface surface, - EGLint attribute, - EGLint value) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval) { - egl::ScopedEGLLock egl_lock; - egl::Display* display = egl::GetDisplayOrSetError(dpy); - if (!display) { - return false; - } - - return display->SwapInterval(interval); -} - -EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLenum EGLAPIENTRY eglQueryAPI(void) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return 0; -} - -EGLSurface EGLAPIENTRY -eglCreatePbufferFromClientBuffer(EGLDisplay dpy, - EGLenum buftype, - EGLClientBuffer buffer, - EGLConfig config, - const EGLint* attrib_list) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return EGL_NO_SURFACE; -} - -EGLBoolean EGLAPIENTRY eglReleaseThread(void) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLBoolean EGLAPIENTRY eglWaitClient(void) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLContext EGLAPIENTRY eglGetCurrentContext(void) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return EGL_NO_CONTEXT; -} - -EGLSync EGLAPIENTRY eglCreateSync(EGLDisplay dpy, - EGLenum type, - const EGLAttrib* attrib_list) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return 0; -} - -EGLBoolean EGLAPIENTRY eglDestroySync(EGLDisplay dpy, EGLSync sync) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLint EGLAPIENTRY eglClientWaitSync(EGLDisplay dpy, - EGLSync sync, - EGLint flags, - EGLTime timeout) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return 0; -} - -EGLBoolean EGLAPIENTRY eglGetSyncAttrib(EGLDisplay dpy, - EGLSync sync, - EGLint attribute, - EGLAttrib* value) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLImage EGLAPIENTRY eglCreateImage(EGLDisplay dpy, - EGLContext ctx, - EGLenum target, - EGLClientBuffer buffer, - const EGLAttrib* attrib_list) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return 0; -} - -EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(EGLenum platform, - void* native_display, - const EGLAttrib* attrib_list) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return EGL_NO_DISPLAY; -} - -EGLSurface EGLAPIENTRY -eglCreatePlatformWindowSurface(EGLDisplay dpy, - EGLConfig config, - void* native_window, - const EGLAttrib* attrib_list) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return EGL_NO_SURFACE; -} - -EGLSurface EGLAPIENTRY -eglCreatePlatformPixmapSurface(EGLDisplay dpy, - EGLConfig config, - void* native_pixmap, - const EGLAttrib* attrib_list) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return EGL_NO_SURFACE; -} - -EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) { - egl::ScopedEGLLock egl_lock; - SB_NOTIMPLEMENTED(); - return false; -} - -__eglMustCastToProperFunctionPointerType EGLAPIENTRY -eglGetProcAddress(const char* procname) { - egl::ScopedEGLLock egl_lock; - - // Forward the call on to platform-specific code to possibly handle. - return egl::GetProcAddressImpl(procname); -} - -} // extern "C" diff --git a/glimp/entry_points/egl_ext.cc b/glimp/entry_points/egl_ext.cc deleted file mode 100644 index 944bc700e799..000000000000 --- a/glimp/entry_points/egl_ext.cc +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include -#include - -#include "starboard/common/log.h" - -extern "C" { - -EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE(EGLDisplay dpy, - EGLSurface surface, - EGLint attribute, - void** value) { - SB_NOTIMPLEMENTED(); - return false; -} - -EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy, - EGLSurface surface, - EGLint x, - EGLint y, - EGLint width, - EGLint height) { - SB_NOTIMPLEMENTED(); - return false; -} - -EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform, - void* native_display, - const EGLint* attrib_list) { - SB_NOTIMPLEMENTED(); - return EGL_NO_DISPLAY; -} - -EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT(EGLDisplay dpy, - EGLint attribute, - EGLAttrib* value) { - SB_NOTIMPLEMENTED(); - return false; -} - -EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT(EGLDeviceEXT device, - EGLint attribute, - EGLAttrib* value) { - SB_NOTIMPLEMENTED(); - return false; -} - -const char* EGLAPIENTRY eglQueryDeviceStringEXT(EGLDeviceEXT device, - EGLint name) { - SB_NOTIMPLEMENTED(); - return NULL; -} - -EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, - EGLContext ctx, - EGLenum target, - EGLClientBuffer buffer, - const EGLint* attrib_list) { - SB_NOTIMPLEMENTED(); - return 0; -} - -EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) { - SB_NOTIMPLEMENTED(); - return false; -} - -EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE(EGLint device_type, - void* native_device, - const EGLAttrib* attrib_list) { - SB_NOTIMPLEMENTED(); - return 0; -} - -EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device) { - SB_NOTIMPLEMENTED(); - return false; -} - -} // extern "C" diff --git a/glimp/entry_points/gles_2_0.cc b/glimp/entry_points/gles_2_0.cc deleted file mode 100644 index cd6b5148f3e3..000000000000 --- a/glimp/entry_points/gles_2_0.cc +++ /dev/null @@ -1,1284 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include - -#include "glimp/gles/context.h" -#include "starboard/common/log.h" - -namespace gles = glimp::gles; - -namespace { -gles::Context* GetCurrentContext() { - gles::Context* context = gles::Context::GetTLSCurrentContext(); - SB_DCHECK(context) << "GL ES command issued while no context was current."; - return context; -} -} // namespace - -extern "C" { - -void GL_APIENTRY glActiveTexture(GLenum texture) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->ActiveTexture(texture); -} - -void GL_APIENTRY glAttachShader(GLuint program, GLuint shader) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->AttachShader(program, shader); -} - -void GL_APIENTRY glBindAttribLocation(GLuint program, - GLuint index, - const GLchar* name) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->BindAttribLocation(program, index, name); -} - -void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->BindBuffer(target, buffer); -} - -void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->BindFramebuffer(target, framebuffer); -} - -void GL_APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->BindRenderbuffer(target, renderbuffer); -} - -void GL_APIENTRY glBindTexture(GLenum target, GLuint texture) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->BindTexture(target, texture); -} - -void GL_APIENTRY glBlendColor(GLfloat red, - GLfloat green, - GLfloat blue, - GLfloat alpha) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBlendEquation(GLenum mode) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->BlendEquation(mode); -} - -void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->BlendFunc(sfactor, dfactor); -} - -void GL_APIENTRY glBlendFuncSeparate(GLenum srcRGB, - GLenum dstRGB, - GLenum srcAlpha, - GLenum dstAlpha) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBufferData(GLenum target, - GLsizeiptr size, - const GLvoid* data, - GLenum usage) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->BufferData(target, size, data, usage); -} - -void GL_APIENTRY glBufferSubData(GLenum target, - GLintptr offset, - GLsizeiptr size, - const GLvoid* data) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->BufferSubData(target, offset, size, data); -} - -GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return 0; - } - - return context->CheckFramebufferStatus(target); -} - -void GL_APIENTRY glClear(GLbitfield mask) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Clear(mask); -} - -void GL_APIENTRY glClearColor(GLfloat red, - GLfloat green, - GLfloat blue, - GLfloat alpha) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->ClearColor(red, green, blue, alpha); -} - -void GL_APIENTRY glClearDepthf(GLfloat depth) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glClearStencil(GLint s) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->ClearStencil(s); -} - -void GL_APIENTRY glColorMask(GLboolean red, - GLboolean green, - GLboolean blue, - GLboolean alpha) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->ColorMask(red, green, blue, alpha); -} - -void GL_APIENTRY glCompileShader(GLuint shader) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->CompileShader(shader); -} - -void GL_APIENTRY glCompressedTexImage2D(GLenum target, - GLint level, - GLenum internalformat, - GLsizei width, - GLsizei height, - GLint border, - GLsizei imageSize, - const GLvoid* data) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLsizei imageSize, - const GLvoid* data) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glCopyTexImage2D(GLenum target, - GLint level, - GLenum internalformat, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLint border) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glCopyTexSubImage2D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint x, - GLint y, - GLsizei width, - GLsizei height) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, - width, height); -} - -GLuint GL_APIENTRY glCreateProgram(void) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return 0; - } - - return context->CreateProgram(); -} - -GLuint GL_APIENTRY glCreateShader(GLenum type) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return 0; - } - - return context->CreateShader(type); -} - -void GL_APIENTRY glCullFace(GLenum mode) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->CullFace(mode); -} - -void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->DeleteBuffers(n, buffers); -} - -void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->DeleteFramebuffers(n, framebuffers); -} - -void GL_APIENTRY glDeleteProgram(GLuint program) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->DeleteProgram(program); -} - -void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->DeleteRenderbuffers(n, renderbuffers); -} - -void GL_APIENTRY glDeleteShader(GLuint shader) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->DeleteShader(shader); -} - -void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->DeleteTextures(n, textures); -} - -void GL_APIENTRY glDepthFunc(GLenum func) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDepthMask(GLboolean flag) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->DepthMask(flag); -} - -void GL_APIENTRY glDepthRangef(GLfloat n, GLfloat f) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDetachShader(GLuint program, GLuint shader) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDisable(GLenum cap) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Disable(cap); -} - -void GL_APIENTRY glDisableVertexAttribArray(GLuint index) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->DisableVertexAttribArray(index); -} - -void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->DrawArrays(mode, first, count); -} - -void GL_APIENTRY glDrawElements(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid* indices) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->DrawElements(mode, count, type, indices); -} - -void GL_APIENTRY glEnable(GLenum cap) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Enable(cap); -} - -void GL_APIENTRY glEnableVertexAttribArray(GLuint index) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->EnableVertexAttribArray(index); -} - -void GL_APIENTRY glFinish(void) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->Finish(); -} - -void GL_APIENTRY glFlush(void) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->Flush(); -} - -void GL_APIENTRY glFramebufferRenderbuffer(GLenum target, - GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->FramebufferRenderbuffer(target, attachment, - renderbuffertarget, renderbuffer); -} - -void GL_APIENTRY glFramebufferTexture2D(GLenum target, - GLenum attachment, - GLenum textarget, - GLuint texture, - GLint level) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->FramebufferTexture2D(target, attachment, textarget, texture, - level); -} - -void GL_APIENTRY glFrontFace(GLenum face) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->FrontFace(face); -} - -void GL_APIENTRY glGenBuffersForVideoFrame(GLsizei n, GLuint* buffers) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->GenBuffersForVideoFrame(n, buffers); -} - -void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->GenBuffers(n, buffers); -} - -void GL_APIENTRY glGenerateMipmap(GLenum target) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint* framebuffers) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->GenFramebuffers(n, framebuffers); -} - -void GL_APIENTRY glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->GenRenderbuffers(n, renderbuffers); -} - -void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->GenTextures(n, textures); -} - -void GL_APIENTRY glGetActiveAttrib(GLuint program, - GLuint index, - GLsizei bufsize, - GLsizei* length, - GLint* size, - GLenum* type, - GLchar* name) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetActiveUniform(GLuint program, - GLuint index, - GLsizei bufsize, - GLsizei* length, - GLint* size, - GLenum* type, - GLchar* name) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetAttachedShaders(GLuint program, - GLsizei maxcount, - GLsizei* count, - GLuint* shaders) { - SB_NOTIMPLEMENTED(); -} - -GLint GL_APIENTRY glGetAttribLocation(GLuint program, const GLchar* name) { - SB_NOTIMPLEMENTED(); - return 0; -} - -void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetBufferParameteriv(GLenum target, - GLenum pname, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -GLenum GL_APIENTRY glGetError(void) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return GL_NO_ERROR; - } - - return context->GetError(); -} - -void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, - GLenum attachment, - GLenum pname, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->GetIntegerv(pname, params); -} - -void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->GetProgramiv(program, pname, params); -} - -void GL_APIENTRY glGetProgramInfoLog(GLuint program, - GLsizei bufsize, - GLsizei* length, - GLchar* infolog) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->GetProgramInfoLog(program, bufsize, length, infolog); -} - -void GL_APIENTRY glGetRenderbufferParameteriv(GLenum target, - GLenum pname, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->GetShaderiv(shader, pname, params); -} - -void GL_APIENTRY glGetShaderInfoLog(GLuint shader, - GLsizei bufsize, - GLsizei* length, - GLchar* infolog) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->GetShaderInfoLog(shader, bufsize, length, infolog); -} - -void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, - GLenum precisiontype, - GLint* range, - GLint* precision) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetShaderSource(GLuint shader, - GLsizei bufsize, - GLsizei* length, - GLchar* source) { - SB_NOTIMPLEMENTED(); -} - -const GLubyte* GL_APIENTRY glGetString(GLenum name) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return NULL; - } - - return context->GetString(name); -} - -void GL_APIENTRY glGetTexParameterfv(GLenum target, - GLenum pname, - GLfloat* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetTexParameteriv(GLenum target, - GLenum pname, - GLint* params) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->GetTexParameteriv(target, pname, params); -} - -void GL_APIENTRY glGetUniformfv(GLuint program, - GLint location, - GLfloat* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params) { - SB_NOTIMPLEMENTED(); -} - -GLint GL_APIENTRY glGetUniformLocation(GLuint program, const GLchar* name) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return -1; - } - - return context->GetUniformLocation(program, name); -} - -void GL_APIENTRY glGetVertexAttribfv(GLuint index, - GLenum pname, - GLfloat* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetVertexAttribiv(GLuint index, - GLenum pname, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetVertexAttribPointerv(GLuint index, - GLenum pname, - GLvoid** pointer) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glHint(GLenum target, GLenum mode) { - SB_NOTIMPLEMENTED(); -} - -GLboolean GL_APIENTRY glIsBuffer(GLuint buffer) { - SB_NOTIMPLEMENTED(); - return false; -} - -GLboolean GL_APIENTRY glIsEnabled(GLenum cap) { - SB_NOTIMPLEMENTED(); - return false; -} - -GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer) { - SB_NOTIMPLEMENTED(); - return false; -} - -GLboolean GL_APIENTRY glIsProgram(GLuint program) { - SB_NOTIMPLEMENTED(); - return false; -} - -GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer) { - SB_NOTIMPLEMENTED(); - return false; -} - -GLboolean GL_APIENTRY glIsShader(GLuint shader) { - SB_NOTIMPLEMENTED(); - return false; -} - -GLboolean GL_APIENTRY glIsTexture(GLuint texture) { - SB_NOTIMPLEMENTED(); - return false; -} - -void GL_APIENTRY glLineWidth(GLfloat width) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->LineWidth(width); -} - -void GL_APIENTRY glLinkProgram(GLuint program) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->LinkProgram(program); -} - -void GL_APIENTRY glPixelStorei(GLenum pname, GLint param) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->PixelStorei(pname, param); -} - -void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glReadPixels(GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLvoid* pixels) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->ReadPixels(x, y, width, height, format, type, pixels); -} - -void GL_APIENTRY glReleaseShaderCompiler(void) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glRenderbufferStorage(GLenum target, - GLenum internalformat, - GLsizei width, - GLsizei height) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->RenderbufferStorage(target, internalformat, width, height); -} - -void GL_APIENTRY glSampleCoverage(GLfloat value, GLboolean invert) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->Scissor(x, y, width, height); -} - -void GL_APIENTRY glShaderBinary(GLsizei n, - const GLuint* shaders, - GLenum binaryformat, - const GLvoid* binary, - GLsizei length) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glShaderSource(GLuint shader, - GLsizei count, - const GLchar* const* string, - const GLint* length) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->ShaderSource(shader, count, string, length); -} - -void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glStencilFuncSeparate(GLenum face, - GLenum func, - GLint ref, - GLuint mask) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glStencilMask(GLuint mask) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->StencilMask(mask); -} - -void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glStencilOpSeparate(GLenum face, - GLenum fail, - GLenum zfail, - GLenum zpass) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTexImage2D(GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLint border, - GLenum format, - GLenum type, - const GLvoid* pixels) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->TexImage2D(target, level, internalformat, width, height, - border, format, type, pixels); -} - -void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTexParameterfv(GLenum target, - GLenum pname, - const GLfloat* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->TexParameteri(target, pname, param); -} - -void GL_APIENTRY glTexParameteriv(GLenum target, - GLenum pname, - const GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTexSubImage2D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - const GLvoid* pixels) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->TexSubImage2D(target, level, xoffset, yoffset, width, height, - format, type, pixels); -} - -void GL_APIENTRY glUniform1f(GLint location, GLfloat x) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformfv(location, 1, 1, &x); -} - -void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformfv(location, count, 1, v); -} - -void GL_APIENTRY glUniform1i(GLint location, GLint x) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformiv(location, 1, 1, &x); -} - -void GL_APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint* v) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformiv(location, count, 1, v); -} - -void GL_APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - float v[2]; - v[0] = x; - v[1] = y; - context->Uniformfv(location, 1, 2, v); -} - -void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformfv(location, count, 2, v); -} - -void GL_APIENTRY glUniform2i(GLint location, GLint x, GLint y) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - int v[2]; - v[0] = x; - v[1] = y; - context->Uniformiv(location, 1, 2, v); -} - -void GL_APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint* v) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformiv(location, count, 2, v); -} - -void GL_APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - float v[3]; - v[0] = x; - v[1] = y; - v[2] = z; - context->Uniformfv(location, 1, 3, v); -} - -void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformfv(location, count, 3, v); -} - -void GL_APIENTRY glUniform3i(GLint location, GLint x, GLint y, GLint z) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - int v[3]; - v[0] = x; - v[1] = y; - v[2] = z; - context->Uniformiv(location, 1, 3, v); -} - -void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformiv(location, count, 3, v); -} - -void GL_APIENTRY -glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - float v[4]; - v[0] = x; - v[1] = y; - v[2] = z; - v[3] = w; - context->Uniformfv(location, 1, 4, v); -} - -void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformfv(location, count, 4, v); -} - -void GL_APIENTRY -glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - int v[4]; - v[0] = x; - v[1] = y; - v[2] = z; - v[3] = w; - context->Uniformiv(location, 1, 4, v); -} - -void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->Uniformiv(location, count, 4, v); -} - -void GL_APIENTRY glUniformMatrix2fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat* value) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->UniformMatrixfv(location, count, transpose, 2, value); -} - -void GL_APIENTRY glUniformMatrix3fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat* value) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->UniformMatrixfv(location, count, transpose, 3, value); -} - -void GL_APIENTRY glUniformMatrix4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat* value) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - context->UniformMatrixfv(location, count, transpose, 4, value); -} - -void GL_APIENTRY glUseProgram(GLuint program) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->UseProgram(program); -} - -void GL_APIENTRY glValidateProgram(GLuint program) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glVertexAttrib1f(GLuint indx, GLfloat x) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->VertexAttribfv(indx, 1, &x); -} - -void GL_APIENTRY glVertexAttrib1fv(GLuint indx, const GLfloat* values) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->VertexAttribfv(indx, 1, values); -} - -void GL_APIENTRY glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - GLfloat values[2] = {x, y}; - return context->VertexAttribfv(indx, 2, values); -} - -void GL_APIENTRY glVertexAttrib2fv(GLuint indx, const GLfloat* values) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->VertexAttribfv(indx, 2, values); -} - -void GL_APIENTRY glVertexAttrib3f(GLuint indx, - GLfloat x, - GLfloat y, - GLfloat z) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - GLfloat values[3] = {x, y, z}; - return context->VertexAttribfv(indx, 3, values); -} - -void GL_APIENTRY glVertexAttrib3fv(GLuint indx, const GLfloat* values) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->VertexAttribfv(indx, 3, values); -} - -void GL_APIENTRY -glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - GLfloat values[4] = {x, y, z, w}; - return context->VertexAttribfv(indx, 4, values); -} - -void GL_APIENTRY glVertexAttrib4fv(GLuint indx, const GLfloat* values) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->VertexAttribfv(indx, 4, values); -} - -void GL_APIENTRY glVertexAttribPointer(GLuint indx, - GLint size, - GLenum type, - GLboolean normalized, - GLsizei stride, - const GLvoid* ptr) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->VertexAttribPointer(indx, size, type, normalized, stride, - ptr); -} - -void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return; - } - - return context->Viewport(x, y, width, height); -} - -} // extern "C" diff --git a/glimp/entry_points/gles_2_0_ext.cc b/glimp/entry_points/gles_2_0_ext.cc deleted file mode 100644 index bc1e01dbacda..000000000000 --- a/glimp/entry_points/gles_2_0_ext.cc +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include -#include - -#include "starboard/common/log.h" - -extern "C" { - -void GL_APIENTRY glBlitFramebufferANGLE(GLint srcX0, - GLint srcY0, - GLint srcX1, - GLint srcY1, - GLint dstX0, - GLint dstY0, - GLint dstX1, - GLint dstY1, - GLbitfield mask, - GLenum filter) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glRenderbufferStorageMultisampleANGLE(GLenum target, - GLsizei samples, - GLenum internalformat, - GLsizei width, - GLsizei height) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDiscardFramebufferEXT(GLenum target, - GLsizei numAttachments, - const GLenum* attachments) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDeleteFencesNV(GLsizei n, const GLuint* fences) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGenFencesNV(GLsizei n, GLuint* fences) { - SB_NOTIMPLEMENTED(); -} - -GLboolean GL_APIENTRY glIsFenceNV(GLuint fence) { - SB_NOTIMPLEMENTED(); - return false; -} - -GLboolean GL_APIENTRY glTestFenceNV(GLuint fence) { - SB_NOTIMPLEMENTED(); - return false; -} - -void GL_APIENTRY glGetFenceivNV(GLuint fence, GLenum pname, GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glFinishFenceNV(GLuint fence) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glSetFenceNV(GLuint fence, GLenum condition) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetTranslatedShaderSourceANGLE(GLuint shader, - GLsizei bufsize, - GLsizei* length, - GLchar* source) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTexStorage2DEXT(GLenum target, - GLsizei levels, - GLenum internalformat, - GLsizei width, - GLsizei height) { - SB_NOTIMPLEMENTED(); -} - -GLenum GL_APIENTRY glGetGraphicsResetStatusEXT(void) { - SB_NOTIMPLEMENTED(); - return 0; -} - -void GL_APIENTRY glReadnPixelsEXT(GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - void* data) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetnUniformfvEXT(GLuint program, - GLint location, - GLsizei bufSize, - float* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetnUniformivEXT(GLuint program, - GLint location, - GLsizei bufSize, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint* ids) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDeleteQueriesEXT(GLsizei n, const GLuint* ids) { - SB_NOTIMPLEMENTED(); -} - -GLboolean GL_APIENTRY glIsQueryEXT(GLuint id) { - SB_NOTIMPLEMENTED(); - return false; -} - -void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint id) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glEndQueryEXT(GLenum target) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetQueryObjectuivEXT(GLuint id, - GLenum pname, - GLuint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDrawBuffersEXT(GLsizei n, const GLenum* bufs) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, - GLint first, - GLsizei count, - GLsizei primcount) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, - GLsizei count, - GLenum type, - const void* indices, - GLsizei primcount) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetProgramBinaryOES(GLuint program, - GLsizei bufSize, - GLsizei* length, - GLenum* binaryFormat, - GLvoid* binary) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glProgramBinaryOES(GLuint program, - GLenum binaryFormat, - const GLvoid* binary, - GLint length) { - SB_NOTIMPLEMENTED(); -} - -void* GL_APIENTRY glMapBufferOES(GLenum target, GLenum access) { - SB_NOTIMPLEMENTED(); - return NULL; -} - -GLboolean GL_APIENTRY glUnmapBufferOES(GLenum target) { - SB_NOTIMPLEMENTED(); - return false; -} - -void GL_APIENTRY glGetBufferPointervOES(GLenum target, - GLenum pname, - GLvoid** params) { - SB_NOTIMPLEMENTED(); -} - -void* GL_APIENTRY glMapBufferRangeEXT(GLenum target, - GLintptr offset, - GLsizeiptr length, - GLbitfield access) { - SB_NOTIMPLEMENTED(); - return NULL; -} - -void GL_APIENTRY glFlushMappedBufferRangeEXT(GLenum target, - GLintptr offset, - GLsizeiptr length) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glInsertEventMarkerEXT(GLsizei length, const char* marker) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glPushGroupMarkerEXT(GLsizei length, const char* marker) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glPopGroupMarkerEXT() { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, - GLeglImageOES image) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, - GLeglImageOES image) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBindVertexArrayOES(GLuint array) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGenVertexArraysOES(GLsizei n, GLuint* arrays) { - SB_NOTIMPLEMENTED(); -} - -GLboolean GL_APIENTRY glIsVertexArrayOES(GLuint array) { - SB_NOTIMPLEMENTED(); - return false; -} - -} // extern "C" diff --git a/glimp/entry_points/gles_3_0.cc b/glimp/entry_points/gles_3_0.cc deleted file mode 100644 index 66f8c271544f..000000000000 --- a/glimp/entry_points/gles_3_0.cc +++ /dev/null @@ -1,685 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include - -#include "glimp/gles/context.h" -#include "starboard/common/log.h" - -namespace gles = glimp::gles; - -namespace { -gles::Context* GetCurrentContext() { - gles::Context* context = gles::Context::GetTLSCurrentContext(); - if (!context) { - SB_DLOG(WARNING) << "GL ES command issued while no context was current."; - } - return context; -} -} // namespace - -extern "C" { - -void GL_APIENTRY glReadBuffer(GLenum mode) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDrawRangeElements(GLenum mode, - GLuint start, - GLuint end, - GLsizei count, - GLenum type, - const GLvoid* indices) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTexImage3D(GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLint border, - GLenum format, - GLenum type, - const GLvoid* pixels) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTexSubImage3D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint zoffset, - GLsizei width, - GLsizei height, - GLsizei depth, - GLenum format, - GLenum type, - const GLvoid* pixels) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glCopyTexSubImage3D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint zoffset, - GLint x, - GLint y, - GLsizei width, - GLsizei height) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glCompressedTexImage3D(GLenum target, - GLint level, - GLenum internalformat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLint border, - GLsizei imageSize, - const GLvoid* data) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glCompressedTexSubImage3D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint zoffset, - GLsizei width, - GLsizei height, - GLsizei depth, - GLenum format, - GLsizei imageSize, - const GLvoid* data) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGenQueries(GLsizei n, GLuint* ids) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDeleteQueries(GLsizei n, const GLuint* ids) { - SB_NOTIMPLEMENTED(); -} - -GLboolean GL_APIENTRY glIsQuery(GLuint id) { - SB_NOTIMPLEMENTED(); - return false; -} - -void GL_APIENTRY glBeginQuery(GLenum target, GLuint id) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glEndQuery(GLenum target) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetQueryiv(GLenum target, GLenum pname, GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) { - SB_NOTIMPLEMENTED(); -} - -GLboolean GL_APIENTRY glUnmapBuffer(GLenum target) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return GL_FALSE; - } - - return context->UnmapBuffer(target); -} - -void GL_APIENTRY glGetBufferPointerv(GLenum target, - GLenum pname, - GLvoid** params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDrawBuffers(GLsizei n, const GLenum* bufs) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniformMatrix2x3fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniformMatrix3x2fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniformMatrix2x4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniformMatrix4x2fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniformMatrix3x4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniformMatrix4x3fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBlitFramebuffer(GLint srcX0, - GLint srcY0, - GLint srcX1, - GLint srcY1, - GLint dstX0, - GLint dstY0, - GLint dstX1, - GLint dstY1, - GLbitfield mask, - GLenum filter) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glRenderbufferStorageMultisample(GLenum target, - GLsizei samples, - GLenum internalformat, - GLsizei width, - GLsizei height) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glFramebufferTextureLayer(GLenum target, - GLenum attachment, - GLuint texture, - GLint level, - GLint layer) { - SB_NOTIMPLEMENTED(); -} - -GLvoid* GL_APIENTRY glMapBufferRange(GLenum target, - GLintptr offset, - GLsizeiptr length, - GLbitfield access) { - gles::Context* context = GetCurrentContext(); - if (!context) { - return NULL; - } - - return context->MapBufferRange(target, offset, length, access); -} - -void GL_APIENTRY glFlushMappedBufferRange(GLenum target, - GLintptr offset, - GLsizeiptr length) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBindVertexArray(GLuint array) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint* arrays) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGenVertexArrays(GLsizei n, GLuint* arrays) { - SB_NOTIMPLEMENTED(); -} - -GLboolean GL_APIENTRY glIsVertexArray(GLuint array) { - SB_NOTIMPLEMENTED(); - return false; -} - -void GL_APIENTRY glGetIntegeri_v(GLenum target, GLuint index, GLint* data) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBeginTransformFeedback(GLenum primitiveMode) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glEndTransformFeedback(void) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBindBufferRange(GLenum target, - GLuint index, - GLuint buffer, - GLintptr offset, - GLsizeiptr size) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBindBufferBase(GLenum target, GLuint index, GLuint buffer) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTransformFeedbackVaryings(GLuint program, - GLsizei count, - const GLchar* const* varyings, - GLenum bufferMode) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetTransformFeedbackVarying(GLuint program, - GLuint index, - GLsizei bufSize, - GLsizei* length, - GLsizei* size, - GLenum* type, - GLchar* name) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glVertexAttribIPointer(GLuint index, - GLint size, - GLenum type, - GLsizei stride, - const GLvoid* pointer) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetVertexAttribIiv(GLuint index, - GLenum pname, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetVertexAttribIuiv(GLuint index, - GLenum pname, - GLuint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY -glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY -glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glVertexAttribI4iv(GLuint index, const GLint* v) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glVertexAttribI4uiv(GLuint index, const GLuint* v) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetUniformuiv(GLuint program, - GLint location, - GLuint* params) { - SB_NOTIMPLEMENTED(); -} - -GLint GL_APIENTRY glGetFragDataLocation(GLuint program, const GLchar* name) { - SB_NOTIMPLEMENTED(); - return 0; -} - -void GL_APIENTRY glUniform1ui(GLint location, GLuint v0) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniform2ui(GLint location, GLuint v0, GLuint v1) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY -glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniform1uiv(GLint location, - GLsizei count, - const GLuint* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniform2uiv(GLint location, - GLsizei count, - const GLuint* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniform3uiv(GLint location, - GLsizei count, - const GLuint* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniform4uiv(GLint location, - GLsizei count, - const GLuint* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glClearBufferiv(GLenum buffer, - GLint drawbuffer, - const GLint* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glClearBufferuiv(GLenum buffer, - GLint drawbuffer, - const GLuint* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glClearBufferfv(GLenum buffer, - GLint drawbuffer, - const GLfloat* value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glClearBufferfi(GLenum buffer, - GLint drawbuffer, - GLfloat depth, - GLint stencil) { - SB_NOTIMPLEMENTED(); -} - -const GLubyte* GL_APIENTRY glGetStringi(GLenum name, GLuint index) { - SB_NOTIMPLEMENTED(); - return NULL; -} - -void GL_APIENTRY glCopyBufferSubData(GLenum readTarget, - GLenum writeTarget, - GLintptr readOffset, - GLintptr writeOffset, - GLsizeiptr size) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetUniformIndices(GLuint program, - GLsizei uniformCount, - const GLchar* const* uniformNames, - GLuint* uniformIndices) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetActiveUniformsiv(GLuint program, - GLsizei uniformCount, - const GLuint* uniformIndices, - GLenum pname, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -GLuint GL_APIENTRY glGetUniformBlockIndex(GLuint program, - const GLchar* uniformBlockName) { - SB_NOTIMPLEMENTED(); - return 0; -} - -void GL_APIENTRY glGetActiveUniformBlockiv(GLuint program, - GLuint uniformBlockIndex, - GLenum pname, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetActiveUniformBlockName(GLuint program, - GLuint uniformBlockIndex, - GLsizei bufSize, - GLsizei* length, - GLchar* uniformBlockName) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glUniformBlockBinding(GLuint program, - GLuint uniformBlockIndex, - GLuint uniformBlockBinding) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDrawArraysInstanced(GLenum mode, - GLint first, - GLsizei count, - GLsizei instanceCount) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDrawElementsInstanced(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid* indices, - GLsizei instanceCount) { - SB_NOTIMPLEMENTED(); -} - -GLsync GL_APIENTRY glFenceSync(GLenum condition, GLbitfield flags) { - SB_NOTIMPLEMENTED(); - return 0; -} - -GLboolean GL_APIENTRY glIsSync(GLsync sync) { - SB_NOTIMPLEMENTED(); - return false; -} - -void GL_APIENTRY glDeleteSync(GLsync sync) { - SB_NOTIMPLEMENTED(); -} - -GLenum GL_APIENTRY glClientWaitSync(GLsync sync, - GLbitfield flags, - GLuint64 timeout) { - SB_NOTIMPLEMENTED(); - return 0; -} - -void GL_APIENTRY glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetInteger64v(GLenum pname, GLint64* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetSynciv(GLsync sync, - GLenum pname, - GLsizei bufSize, - GLsizei* length, - GLint* values) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetBufferParameteri64v(GLenum target, - GLenum pname, - GLint64* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGenSamplers(GLsizei count, GLuint* samplers) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDeleteSamplers(GLsizei count, const GLuint* samplers) { - SB_NOTIMPLEMENTED(); -} - -GLboolean GL_APIENTRY glIsSampler(GLuint sampler) { - SB_NOTIMPLEMENTED(); - return false; -} - -void GL_APIENTRY glBindSampler(GLuint unit, GLuint sampler) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glSamplerParameteri(GLuint sampler, - GLenum pname, - GLint param) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glSamplerParameteriv(GLuint sampler, - GLenum pname, - const GLint* param) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glSamplerParameterf(GLuint sampler, - GLenum pname, - GLfloat param) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glSamplerParameterfv(GLuint sampler, - GLenum pname, - const GLfloat* param) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetSamplerParameteriv(GLuint sampler, - GLenum pname, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetSamplerParameterfv(GLuint sampler, - GLenum pname, - GLfloat* params) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glVertexAttribDivisor(GLuint index, GLuint divisor) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glBindTransformFeedback(GLenum target, GLuint id) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGenTransformFeedbacks(GLsizei n, GLuint* ids) { - SB_NOTIMPLEMENTED(); -} - -GLboolean GL_APIENTRY glIsTransformFeedback(GLuint id) { - SB_NOTIMPLEMENTED(); - return false; -} - -void GL_APIENTRY glPauseTransformFeedback(void) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glResumeTransformFeedback(void) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetProgramBinary(GLuint program, - GLsizei bufSize, - GLsizei* length, - GLenum* binaryFormat, - GLvoid* binary) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glProgramBinary(GLuint program, - GLenum binaryFormat, - const GLvoid* binary, - GLsizei length) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glProgramParameteri(GLuint program, - GLenum pname, - GLint value) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glInvalidateFramebuffer(GLenum target, - GLsizei numAttachments, - const GLenum* attachments) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glInvalidateSubFramebuffer(GLenum target, - GLsizei numAttachments, - const GLenum* attachments, - GLint x, - GLint y, - GLsizei width, - GLsizei height) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTexStorage2D(GLenum target, - GLsizei levels, - GLenum internalformat, - GLsizei width, - GLsizei height) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glTexStorage3D(GLenum target, - GLsizei levels, - GLenum internalformat, - GLsizei width, - GLsizei height, - GLsizei depth) { - SB_NOTIMPLEMENTED(); -} - -void GL_APIENTRY glGetInternalformativ(GLenum target, - GLenum internalformat, - GLenum pname, - GLsizei bufSize, - GLint* params) { - SB_NOTIMPLEMENTED(); -} - -} // extern "C" diff --git a/glimp/gles/blend_state.h b/glimp/gles/blend_state.h deleted file mode 100644 index e04f8b7b1e52..000000000000 --- a/glimp/gles/blend_state.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_BLEND_STATE_H_ -#define GLIMP_GLES_BLEND_STATE_H_ - -namespace glimp { -namespace gles { - -// Describes GL blend state, which can be modified via commands like -// glBlendFunc(). -// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBlendFunc.xml -struct BlendState { - enum Factor { - kFactorZero, - kFactorOne, - kFactorSrcColor, - kFactorOneMinusSrcColor, - kFactorDstColor, - kFactorOneMinusDstColor, - kFactorSrcAlpha, - kFactorOneMinusSrcAlpha, - kFactorDstAlpha, - kFactorOneMinusDstAlpha, - kFactorConstantColor, - kFactorOneMinusConstantColor, - kFactorConstantAlpha, - kFactorOneMinusConstantAlpha, - kFactorSrcAlphaSaturate, - kFactorInvalid, - }; - - // https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glBlendEquation.xml - enum Equation { - kEquationFuncAdd, - kEquationFuncSubtract, - kEquationFuncReverseSubtract, - kEquationFuncInvalid, - }; - - // Setup the blend state with initial values specified by the specification. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBlendFunc.xml - BlendState() - : src_factor(kFactorOne), - dst_factor(kFactorZero), - enabled(false), - equation(kEquationFuncAdd) {} - - Factor src_factor; - Factor dst_factor; - - Equation equation; - - bool enabled; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_BLEND_STATE_H_ diff --git a/glimp/gles/buffer.cc b/glimp/gles/buffer.cc deleted file mode 100644 index eabd4ae904b3..000000000000 --- a/glimp/gles/buffer.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/buffer.h" - -#include - -namespace glimp { -namespace gles { - -namespace { - -BufferImpl::Usage GLUsageEnumToUsage(GLenum usage) { - switch (usage) { - case GL_STREAM_DRAW: - return BufferImpl::kStreamDraw; - case GL_STATIC_DRAW: - return BufferImpl::kStaticDraw; - case GL_DYNAMIC_DRAW: - return BufferImpl::kDynamicDraw; - } - - SB_NOTREACHED(); - return BufferImpl::kStaticDraw; -} - -} // namespace - -Buffer::Buffer(std::unique_ptr impl) - : impl_(std::move(impl)), size_in_bytes_(0) {} - -bool Buffer::Allocate(GLenum usage, size_t size) { - size_in_bytes_ = size; - return impl_->Allocate(GLUsageEnumToUsage(usage), size); -} - -bool Buffer::SetData(GLintptr offset, GLsizeiptr size, const GLvoid* data) { - SB_DCHECK(size_in_bytes_ >= offset + size); - SB_DCHECK(offset >= 0); - SB_DCHECK(size >= 0); - SB_DCHECK(!is_mapped_); - - if (size > 0) { - return impl_->SetData(offset, static_cast(size), data); - } else { - return true; - } -} - -void* Buffer::Map() { - SB_DCHECK(!is_mapped_); - is_mapped_ = true; - - return impl_->Map(); -} - -bool Buffer::Unmap() { - SB_DCHECK(is_mapped_); - is_mapped_ = false; - - return impl_->Unmap(); -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/buffer.h b/glimp/gles/buffer.h deleted file mode 100644 index 8391442e42f6..000000000000 --- a/glimp/gles/buffer.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_BUFFER_H_ -#define GLIMP_GLES_BUFFER_H_ - -#include - -#include -#include "glimp/gles/buffer_impl.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -class Buffer : public nb::RefCountedThreadSafe { - public: - explicit Buffer(std::unique_ptr impl); - - // Allocates memory within this Buffer object. Returns false if there - // was an allocation failure. - bool Allocate(GLenum usage, size_t size); - - // Implements support for glBufferData() on this buffer object. Returns - // false if there was an allocation failure. - bool SetData(GLintptr offset, GLsizeiptr size, const GLvoid* data); - - // Maps the buffer's memory to a CPU-accessible pointer and returns it, or - // NULL on failure. - void* Map(); - bool Unmap(); - - // Returns true if the buffer is currently mapped to the CPU address space. - bool is_mapped() const { return is_mapped_; } - - GLsizeiptr size_in_bytes() const { return size_in_bytes_; } - - BufferImpl* impl() const { return impl_.get(); } - - private: - friend class nb::RefCountedThreadSafe; - ~Buffer() {} - - std::unique_ptr impl_; - - // The size of the allocated memory used by this buffer. - GLsizeiptr size_in_bytes_; - - // Is the buffer's data currently mapped to CPU address space? - bool is_mapped_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_BUFFER_H_ diff --git a/glimp/gles/buffer_impl.h b/glimp/gles/buffer_impl.h deleted file mode 100644 index 2845a02221cc..000000000000 --- a/glimp/gles/buffer_impl.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_BUFFER_IMPL_H_ -#define GLIMP_GLES_BUFFER_IMPL_H_ - -#include - -namespace glimp { -namespace gles { - -// Implements functionality required to support GL memory buffers. These -// buffers are typically used to store vertex data and vertex index data, -// however it can also be used to store texture data that can later be used -// to create a texture. -class BufferImpl { - public: - // Corresponds to the |usage| GLenum passed into glBufferData(). - enum Usage { - kStreamDraw, - kStaticDraw, - kDynamicDraw, - }; - - virtual ~BufferImpl() {} - - // Sets the size and usage of allocated memory for the buffer. - // Since no data is available at this point, implementations are free to - // delay the actual allocation of memory until data is provided. Called from - // glBufferData(). Returns true on success and false on failure. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBufferData.xml - virtual bool Allocate(Usage usage, size_t size) = 0; - - // Upload the specified data into this buffer. Allocate() must have - // previously been called for a call to SetData() to be valid. - // This method is called by glBufferData() (when data is not NULL) and - // glBufferSubData(). Returns true on success and false on an allocation - // failure. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBufferData.xml - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBufferSubData.xml - virtual bool SetData(intptr_t offset, size_t size, const void* data) = 0; - - // Maps the buffer's data to a CPU-addressible memory location and then - // returns a pointer to that location. This method is called when - // glMapBufferRange() is called. glimp only supports calls to - // glMapBufferRange() with the flag GL_MAP_INVALIDATE_BUFFER_BIT set, - // therefore this method is free to throw away any existing memory when - // this method is called. - // https://www.khronos.org/opengles/sdk/docs/man3/html/glMapBufferRange.xhtml - virtual void* Map() = 0; - - // Unmaps the data previously mapped to a CPU-addressible memory location - // through a call to Map(). This method will be called when - // glUnmapBuffer() is called. This command should return false if the - // underlying buffer resource has become invalid while the memory was mapped. - // Otherwise, it should return true. - // https://www.khronos.org/opengles/sdk/docs/man3/html/glMapBufferRange.xhtml - virtual bool Unmap() = 0; - - private: -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_BUFFER_IMPL_H_ diff --git a/glimp/gles/context.cc b/glimp/gles/context.cc deleted file mode 100644 index 33bda203b0aa..000000000000 --- a/glimp/gles/context.cc +++ /dev/null @@ -1,2551 +0,0 @@ -/* - * Copyright 2015 The Cobalt Authors. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/context.h" - -#include - -#include -#include - -#include "glimp/egl/error.h" -#include "glimp/egl/surface.h" -#include "glimp/gles/blend_state.h" -#include "glimp/gles/cull_face_state.h" -#include "glimp/gles/draw_mode.h" -#include "glimp/gles/index_data_type.h" -#include "glimp/gles/pixel_format.h" -#include "glimp/tracing/tracing.h" -#include "starboard/common/log.h" -#include "starboard/common/once.h" -#include "starboard/common/pointer_arithmetic.h" -#include "starboard/memory.h" - -namespace glimp { -namespace gles { - -namespace { - -std::atomic_int s_context_id_counter_(0); -pthread_once_t s_tls_current_context_key_once_control = PTHREAD_ONCE_INIT; -pthread_key_t s_tls_current_context_key = 0; - -void InitializeThreadLocalKey() { - pthread_key_create(&s_tls_current_context_key, NULL); -} - -pthread_key_t GetThreadLocalKey() { - pthread_once(&s_tls_current_context_key_once_control, - &InitializeThreadLocalKey); - return s_tls_current_context_key; -} - -} // namespace - -Context::Context(std::unique_ptr context_impl, - Context* share_context) - : impl_(std::move(context_impl)), - context_id_(s_context_id_counter_++), - current_thread_(kSbThreadInvalid), - has_been_current_(false), - active_texture_(GL_TEXTURE0), - enabled_textures_dirty_(true), - enabled_vertex_attribs_dirty_(true), - pack_alignment_(4), - unpack_alignment_(4), - unpack_row_length_(0), - error_(GL_NO_ERROR) { - SbAtomicRelease_Store(&has_swapped_buffers_, 0); - if (share_context != NULL) { - resource_manager_ = share_context->resource_manager_; - } else { - resource_manager_ = new ResourceManager(); - } - - SetupExtensionsString(); - - texture_units_.reset( - new nb::scoped_refptr[impl_->GetMaxFragmentTextureUnits()]); -} - -Context* Context::GetTLSCurrentContext() { - return reinterpret_cast(pthread_getspecific(GetThreadLocalKey())); -} - -bool Context::SetTLSCurrentContext(Context* context, - egl::Surface* draw, - egl::Surface* read) { - SB_DCHECK(context); - SB_DCHECK(draw); - SB_DCHECK(read); - - if (context->current_thread() != kSbThreadInvalid && - context->current_thread() != SbThreadGetCurrent()) { - SB_DLOG(WARNING) << "Another thread holds current the context that is to " - "be made current on this thread."; - egl::SetError(EGL_BAD_ACCESS); - return false; - } - - // If this thread currently has another context current, release that one - // before we continue. - Context* existing_context = GetTLSCurrentContext(); - if (existing_context != context) { - if (existing_context) { - existing_context->ReleaseContext(); - } - pthread_setspecific(GetThreadLocalKey(), reinterpret_cast(context)); - } - - context->MakeCurrent(draw, read); - return true; -} - -void Context::ReleaseTLSCurrentContext() { - Context* existing_context = GetTLSCurrentContext(); - if (existing_context) { - existing_context->ReleaseContext(); - pthread_setspecific(GetThreadLocalKey(), NULL); - } -} - -GLenum Context::GetError() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - GLenum error = error_; - error_ = GL_NO_ERROR; - return error; -} - -const GLubyte* Context::GetString(GLenum name) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - switch (name) { - case GL_EXTENSIONS: - return reinterpret_cast(extensions_string_.c_str()); - case GL_VERSION: - return reinterpret_cast("OpenGL ES 2.0 (glimp)"); - case GL_VENDOR: - return reinterpret_cast("Google Inc."); - case GL_RENDERER: - return reinterpret_cast("glimp"); - case GL_SHADING_LANGUAGE_VERSION: - return reinterpret_cast("OpenGL ES GLSL ES 1.00"); - - default: { - SetError(GL_INVALID_ENUM); - return NULL; - } - } -} - -void Context::GetIntegerv(GLenum pname, GLint* params) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - switch (pname) { - case GL_MAX_TEXTURE_SIZE: - *params = impl_->GetMaxTextureSize(); - break; - case GL_ACTIVE_TEXTURE: - *params = static_cast(active_texture_); - break; - case GL_MAX_RENDERBUFFER_SIZE: - *params = impl_->GetMaxRenderbufferSize(); - break; - case GL_NUM_COMPRESSED_TEXTURE_FORMATS: - // We don't currently support compressed textures. - *params = 0; - break; - case GL_MAX_VERTEX_ATTRIBS: - *params = impl_->GetMaxVertexAttribs(); - break; - case GL_MAX_TEXTURE_IMAGE_UNITS: - *params = impl_->GetMaxFragmentTextureUnits(); - break; - case GL_MAX_FRAGMENT_UNIFORM_VECTORS: - *params = impl_->GetMaxFragmentUniformVectors(); - break; - case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS: - *params = impl_->GetMaxVertexTextureImageUnits(); - break; - case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: - *params = impl_->GetMaxCombinedTextureImageUnits(); - break; - case GL_UNPACK_ALIGNMENT: - *params = unpack_alignment_; - break; - default: { - SB_NOTIMPLEMENTED(); - SetError(GL_INVALID_ENUM); - } - } -} - -void Context::GetShaderiv(GLuint shader, GLenum pname, GLint* params) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - nb::scoped_refptr shader_object = - resource_manager_->GetShader(shader); - if (!shader_object) { - SetError(GL_INVALID_VALUE); - return; - } - - GLenum result = shader_object->GetShaderiv(pname, params); - if (result != GL_NO_ERROR) { - SetError(result); - } -} - -void Context::GetShaderInfoLog(GLuint shader, - GLsizei bufsize, - GLsizei* length, - GLchar* infolog) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (bufsize < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - nb::scoped_refptr shader_object = - resource_manager_->GetShader(shader); - if (!shader_object) { - SetError(GL_INVALID_VALUE); - return; - } - - shader_object->GetShaderInfoLog(bufsize, length, infolog); -} - -void Context::GetProgramiv(GLuint program, GLenum pname, GLint* params) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - nb::scoped_refptr program_object = - resource_manager_->GetProgram(program); - if (!program_object) { - SetError(GL_INVALID_VALUE); - return; - } - - GLenum result = program_object->GetProgramiv(pname, params); - if (result != GL_NO_ERROR) { - SetError(result); - } -} - -void Context::GetProgramInfoLog(GLuint program, - GLsizei bufsize, - GLsizei* length, - GLchar* infolog) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (bufsize < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - nb::scoped_refptr program_object = - resource_manager_->GetProgram(program); - if (!program_object) { - SetError(GL_INVALID_VALUE); - return; - } - - program_object->GetProgramInfoLog(bufsize, length, infolog); -} - -void Context::PixelStorei(GLenum pname, GLint param) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - switch (pname) { - case GL_PACK_ALIGNMENT: - case GL_UNPACK_ALIGNMENT: - if (param != 1 && param != 4 && param != 8) { - SetError(GL_INVALID_VALUE); - return; - } - break; - - default: - if (param < 0) { - SetError(GL_INVALID_VALUE); - return; - } - break; - } - - switch (pname) { - case GL_PACK_ALIGNMENT: - pack_alignment_ = param; - break; - case GL_UNPACK_ALIGNMENT: - unpack_alignment_ = param; - break; - case GL_UNPACK_ROW_LENGTH: - unpack_row_length_ = param; - break; - case GL_PACK_ROW_LENGTH: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SKIP_PIXELS: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_SKIP_IMAGES: - SB_NOTIMPLEMENTED(); - default: - SetError(GL_INVALID_ENUM); - break; - } -} - -void Context::Enable(GLenum cap) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - switch (cap) { - case GL_BLEND: - draw_state_.blend_state.enabled = true; - draw_state_dirty_flags_.blend_state_dirty = true; - break; - case GL_SCISSOR_TEST: - draw_state_.scissor.enabled = true; - draw_state_dirty_flags_.scissor_dirty = true; - break; - case GL_CULL_FACE: - draw_state_.cull_face_state.enabled = true; - draw_state_.cull_face_state.mode = CullFaceState::kBack; - draw_state_dirty_flags_.cull_face_dirty = true; - break; - case GL_DEPTH_TEST: - case GL_DITHER: - case GL_STENCIL_TEST: - case GL_POLYGON_OFFSET_FILL: - case GL_SAMPLE_ALPHA_TO_COVERAGE: - case GL_SAMPLE_COVERAGE: - SB_NOTIMPLEMENTED(); - default: - SetError(GL_INVALID_ENUM); - } -} - -void Context::Disable(GLenum cap) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - switch (cap) { - case GL_BLEND: - draw_state_.blend_state.enabled = false; - draw_state_dirty_flags_.blend_state_dirty = true; - break; - case GL_SCISSOR_TEST: - draw_state_.scissor.enabled = false; - draw_state_dirty_flags_.scissor_dirty = true; - break; - case GL_CULL_FACE: - draw_state_.cull_face_state.enabled = false; - draw_state_dirty_flags_.cull_face_dirty = true; - break; - case GL_DEPTH_TEST: - case GL_DITHER: - case GL_STENCIL_TEST: - case GL_POLYGON_OFFSET_FILL: - case GL_SAMPLE_ALPHA_TO_COVERAGE: - case GL_SAMPLE_COVERAGE: - // Since these are not implemented yet, it is not an error to do nothing - // when we ask for them to be disabled! - break; - default: - SetError(GL_INVALID_ENUM); - } -} - -void Context::ColorMask(GLboolean red, - GLboolean green, - GLboolean blue, - GLboolean alpha) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - draw_state_.color_mask = gles::ColorMask(red, green, blue, alpha); - draw_state_dirty_flags_.color_mask_dirty = true; -} - -void Context::DepthMask(GLboolean flag) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (flag == GL_TRUE) { - SB_NOTIMPLEMENTED() << "glimp currently does not support depth buffers."; - SetError(GL_INVALID_OPERATION); - } -} - -void Context::Clear(GLbitfield mask) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - impl_->Clear(mask & GL_COLOR_BUFFER_BIT, mask & GL_DEPTH_BUFFER_BIT, - mask & GL_STENCIL_BUFFER_BIT, draw_state_, - &draw_state_dirty_flags_); -} - -void Context::ClearColor(GLfloat red, - GLfloat green, - GLfloat blue, - GLfloat alpha) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - draw_state_.clear_color = gles::ClearColor(red, green, blue, alpha); - draw_state_dirty_flags_.clear_color_dirty = true; -} - -namespace { -BlendState::Factor BlendStateFactorFromGLenum(GLenum blend_factor) { - switch (blend_factor) { - case GL_ZERO: - return BlendState::kFactorZero; - case GL_ONE: - return BlendState::kFactorOne; - case GL_SRC_COLOR: - return BlendState::kFactorSrcColor; - case GL_ONE_MINUS_SRC_COLOR: - return BlendState::kFactorOneMinusSrcColor; - case GL_DST_COLOR: - return BlendState::kFactorDstColor; - case GL_ONE_MINUS_DST_COLOR: - return BlendState::kFactorOneMinusDstColor; - case GL_SRC_ALPHA: - return BlendState::kFactorSrcAlpha; - case GL_ONE_MINUS_SRC_ALPHA: - return BlendState::kFactorOneMinusSrcAlpha; - case GL_DST_ALPHA: - return BlendState::kFactorDstAlpha; - case GL_ONE_MINUS_DST_ALPHA: - return BlendState::kFactorOneMinusDstAlpha; - case GL_CONSTANT_COLOR: - return BlendState::kFactorConstantColor; - case GL_ONE_MINUS_CONSTANT_COLOR: - return BlendState::kFactorOneMinusConstantColor; - case GL_CONSTANT_ALPHA: - return BlendState::kFactorConstantAlpha; - case GL_ONE_MINUS_CONSTANT_ALPHA: - return BlendState::kFactorOneMinusConstantAlpha; - case GL_SRC_ALPHA_SATURATE: - return BlendState::kFactorSrcAlphaSaturate; - default: - return BlendState::kFactorInvalid; - } -} - -BlendState::Equation BlendStateEquationFromGLenum(GLenum equation) { - switch (equation) { - case GL_FUNC_ADD: - return BlendState::kEquationFuncAdd; - case GL_FUNC_SUBTRACT: - return BlendState::kEquationFuncSubtract; - case GL_FUNC_REVERSE_SUBTRACT: - return BlendState::kEquationFuncReverseSubtract; - default: - return BlendState::kEquationFuncInvalid; - } -} -} // namespace - -void Context::BlendFunc(GLenum sfactor, GLenum dfactor) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - BlendState::Factor src_factor = BlendStateFactorFromGLenum(sfactor); - BlendState::Factor dst_factor = BlendStateFactorFromGLenum(dfactor); - if (src_factor == BlendState::kFactorInvalid || - dst_factor == BlendState::kFactorInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - - draw_state_.blend_state.src_factor = src_factor; - draw_state_.blend_state.dst_factor = dst_factor; - draw_state_dirty_flags_.blend_state_dirty = true; -} - -void Context::BlendEquation(GLenum mode) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - BlendState::Equation equation = BlendStateEquationFromGLenum(mode); - if (equation == BlendState::kEquationFuncInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - - draw_state_.blend_state.equation = equation; - draw_state_dirty_flags_.blend_state_dirty = true; -} - -namespace { -CullFaceState::Mode CullFaceModeFromEnum(GLenum mode) { - switch (mode) { - case GL_FRONT: - return CullFaceState::kFront; - case GL_BACK: - return CullFaceState::kBack; - case GL_FRONT_AND_BACK: - return CullFaceState::kFrontAndBack; - default: - return CullFaceState::kModeInvalid; - } -} -} // namespace - -void Context::CullFace(GLenum mode) { - CullFaceState::Mode cull_face_mode = CullFaceModeFromEnum(mode); - if (cull_face_mode == CullFaceState::kModeInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - draw_state_.cull_face_state.mode = cull_face_mode; - draw_state_dirty_flags_.cull_face_dirty = true; -} - -GLuint Context::CreateProgram() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - std::unique_ptr program_impl = impl_->CreateProgram(); - SB_DCHECK(program_impl); - - nb::scoped_refptr program(new Program(std::move(program_impl))); - - return resource_manager_->RegisterProgram(program); -} - -void Context::DeleteProgram(GLuint program) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - // As indicated by the specification for glDeleteProgram(), - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteProgram.xml - // values of 0 will be silently ignored. - if (program == 0) { - return; - } - - nb::scoped_refptr program_object = - resource_manager_->DeregisterProgram(program); - - if (!program_object) { - SetError(GL_INVALID_VALUE); - } -} - -void Context::AttachShader(GLuint program, GLuint shader) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - nb::scoped_refptr program_object = - resource_manager_->GetProgram(program); - if (!program_object) { - SetError(GL_INVALID_VALUE); - return; - } - - nb::scoped_refptr shader_object = - resource_manager_->GetShader(shader); - if (!shader_object) { - SetError(GL_INVALID_VALUE); - return; - } - - if (!program_object->AttachShader(shader_object)) { - // A shader of the given type was already attached. - SetError(GL_INVALID_OPERATION); - } -} - -void Context::LinkProgram(GLuint program) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - nb::scoped_refptr program_object = - resource_manager_->GetProgram(program); - if (!program_object) { - SetError(GL_INVALID_VALUE); - return; - } - - program_object->Link(); - - if (program_object.get() == draw_state_.used_program.get()) { - MarkUsedProgramDirty(); - } -} - -void Context::BindAttribLocation(GLuint program, - GLuint index, - const GLchar* name) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (index >= GL_MAX_VERTEX_ATTRIBS) { - SetError(GL_INVALID_VALUE); - return; - } - - if (name[0] == 'g' && name[1] == 'l' && name[2] == '_') { - // |name| is not allowed to begin with the reserved prefix, "gl_". - SetError(GL_INVALID_OPERATION); - return; - } - nb::scoped_refptr program_object = - resource_manager_->GetProgram(program); - if (!program_object) { - SetError(GL_INVALID_VALUE); - return; - } - - program_object->BindAttribLocation(index, name); - - if (program_object.get() == draw_state_.used_program.get()) { - draw_state_dirty_flags_.vertex_attributes_dirty = true; - } -} - -void Context::UseProgram(GLuint program) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (program == 0) { - draw_state_.used_program = NULL; - MarkUsedProgramDirty(); - return; - } - - nb::scoped_refptr program_object = - resource_manager_->GetProgram(program); - if (!program_object) { - SetError(GL_INVALID_VALUE); - return; - } - - if (!program_object->linked()) { - // Only linked programs can be used. - SetError(GL_INVALID_OPERATION); - return; - } - - if (program_object.get() != draw_state_.used_program.get()) { - draw_state_.used_program = program_object; - MarkUsedProgramDirty(); - } -} - -GLuint Context::CreateShader(GLenum type) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - std::unique_ptr shader_impl; - if (type == GL_VERTEX_SHADER) { - shader_impl = impl_->CreateVertexShader(); - } else if (type == GL_FRAGMENT_SHADER) { - shader_impl = impl_->CreateFragmentShader(); - } else { - SetError(GL_INVALID_ENUM); - return 0; - } - SB_DCHECK(shader_impl); - - nb::scoped_refptr shader(new Shader(std::move(shader_impl), type)); - - return resource_manager_->RegisterShader(shader); -} - -void Context::DeleteShader(GLuint shader) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - // As indicated by the specification for glDeleteShader(), - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteShader.xml - // values of 0 will be silently ignored. - if (shader == 0) { - return; - } - - nb::scoped_refptr shader_object = - resource_manager_->DeregisterShader(shader); - - if (!shader_object) { - SetError(GL_INVALID_VALUE); - } -} - -void Context::ShaderSource(GLuint shader, - GLsizei count, - const GLchar* const* string, - const GLint* length) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (count < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - nb::scoped_refptr shader_object = - resource_manager_->GetShader(shader); - - if (!shader_object) { - SetError(GL_INVALID_VALUE); - return; - } - - shader_object->ShaderSource(count, string, length); -} - -void Context::CompileShader(GLuint shader) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - nb::scoped_refptr shader_object = - resource_manager_->GetShader(shader); - - if (!shader_object) { - SetError(GL_INVALID_VALUE); - return; - } - - shader_object->CompileShader(); -} - -void Context::GenBuffers(GLsizei n, GLuint* buffers) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (n < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - for (GLsizei i = 0; i < n; ++i) { - std::unique_ptr buffer_impl = impl_->CreateBuffer(); - SB_DCHECK(buffer_impl); - - nb::scoped_refptr buffer(new Buffer(std::move(buffer_impl))); - - buffers[i] = resource_manager_->RegisterBuffer(buffer); - } -} - -void Context::GenBuffersForVideoFrame(GLsizei n, GLuint* buffers) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (n < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - for (GLsizei i = 0; i < n; ++i) { - std::unique_ptr buffer_impl = - impl_->CreateBufferForVideoFrame(); - SB_DCHECK(buffer_impl); - - buffers[i] = resource_manager_->RegisterBuffer( - nb::make_scoped_refptr(new Buffer(std::move(buffer_impl)))); - } -} - -void Context::FrontFace(GLenum mode) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if ((mode != GL_CW) && (mode != GL_CCW)) { - SetError(GL_INVALID_VALUE); - return; - } - - // The default face is GL_CCW, per documentation at: - // https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glFrontFace.xml - if (mode != GL_CCW) { - SB_NOTIMPLEMENTED(); - } -} - -void Context::DeleteBuffers(GLsizei n, const GLuint* buffers) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (n < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - for (GLsizei i = 0; i < n; ++i) { - if (buffers[i] == 0) { - // Silently ignore 0 buffers. - continue; - } - - nb::scoped_refptr buffer_object = - resource_manager_->DeregisterBuffer(buffers[i]); - - if (!buffer_object) { - // The specification does not indicate that any error should be set - // in the case that there was an error deleting a specific buffer. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteBuffers.xml - return; - } - - if (buffer_object->is_mapped()) { - // Buffer objects should be unmapped if they are deleted. - // https://www.khronos.org/opengles/sdk/docs/man3/html/glMapBufferRange.xhtml - buffer_object->Unmap(); - } - - // If a bound buffer is deleted, set the bound buffer to NULL. The buffer - // may be bound to any target, therefore we must scan them all. - const GLenum buffer_targets[3] = {GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER, - GL_PIXEL_UNPACK_BUFFER}; - for (int target_index = 0; target_index < SB_ARRAY_SIZE(buffer_targets); - ++target_index) { - GLenum target = buffer_targets[target_index]; - nb::scoped_refptr* bound_buffer = GetBoundBufferForTarget(target); - SB_DCHECK(bound_buffer); - if ((*bound_buffer).get() == buffer_object.get()) { - *bound_buffer = NULL; - } - } - } -} - -namespace { -bool IsValidBufferTarget(GLenum target) { - switch (target) { - case GL_ARRAY_BUFFER: - case GL_ELEMENT_ARRAY_BUFFER: - case GL_PIXEL_UNPACK_BUFFER: - return true; - break; - case GL_COPY_READ_BUFFER: - case GL_COPY_WRITE_BUFFER: - case GL_PIXEL_PACK_BUFFER: - case GL_TRANSFORM_FEEDBACK_BUFFER: - case GL_UNIFORM_BUFFER: - SB_NOTIMPLEMENTED() << "Buffer target " << target - << " is not supported " - "in glimp."; - default: - return false; - } -} -} // namespace - -void Context::BindBuffer(GLenum target, GLuint buffer) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (!IsValidBufferTarget(target)) { - SetError(GL_INVALID_ENUM); - return; - } - - nb::scoped_refptr* bound_buffer = GetBoundBufferForTarget(target); - SB_DCHECK(bound_buffer); - nb::scoped_refptr buffer_object; - if (buffer != 0) { - buffer_object = resource_manager_->GetBuffer(buffer); - if (!buffer_object) { - // The buffer to be bound is invalid. - SB_NOTIMPLEMENTED() - << "Creating buffers with glBindBuffer () not supported"; - return; - } - } - - *bound_buffer = buffer_object; -} - -void Context::BufferData(GLenum target, - GLsizeiptr size, - const GLvoid* data, - GLenum usage) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (size < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - if (usage != GL_STREAM_DRAW && usage != GL_STATIC_DRAW && - usage != GL_DYNAMIC_DRAW) { - SetError(GL_INVALID_ENUM); - return; - } - - if (!IsValidBufferTarget(target)) { - SetError(GL_INVALID_ENUM); - return; - } - - nb::scoped_refptr bound_buffer = *GetBoundBufferForTarget(target); - if (bound_buffer == 0) { - SetError(GL_INVALID_OPERATION); - return; - } - - if (bound_buffer->is_mapped()) { - // According to the specification, we must unmap the buffer if its data - // store is recreated with glBufferData. - // https://www.khronos.org/opengles/sdk/docs/man3/html/glMapBufferRange.xhtml - bound_buffer->Unmap(); - } - - if (!bound_buffer->Allocate(usage, size)) { - SetError(GL_OUT_OF_MEMORY); - return; - } - - if (data) { - if (!bound_buffer->SetData(0, size, data)) { - SetError(GL_OUT_OF_MEMORY); - return; - } - } -} - -void Context::BufferSubData(GLenum target, - GLintptr offset, - GLsizeiptr size, - const GLvoid* data) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (size < 0 || offset < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - if (!IsValidBufferTarget(target)) { - SetError(GL_INVALID_ENUM); - return; - } - - nb::scoped_refptr bound_buffer = *GetBoundBufferForTarget(target); - if (bound_buffer == 0) { - SetError(GL_INVALID_OPERATION); - return; - } - - if (offset + size > bound_buffer->size_in_bytes()) { - SetError(GL_INVALID_VALUE); - return; - } - - if (bound_buffer->is_mapped()) { - // According to the specification, we must unmap the buffer if its data - // store is recreated with glBufferData. - // https://www.khronos.org/opengles/sdk/docs/man3/html/glMapBufferRange.xhtml - bound_buffer->Unmap(); - } - - // Nothing in the specification says there should be an error if data - // is NULL. - if (data) { - if (!bound_buffer->SetData(offset, size, data)) { - SetError(GL_OUT_OF_MEMORY); - return; - } - } -} - -namespace { -// This function is based off of the logic described in the "Errors" section -// of the specification: -// https://www.khronos.org/opengles/sdk/docs/man3/html/glMapBufferRange.xhtml -bool MapBufferRangeAccessFlagsAreValid(GLbitfield access) { - if (access & ~(GL_MAP_READ_BIT | GL_MAP_WRITE_BIT | - GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT | - GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_UNSYNCHRONIZED_BIT)) { - return false; - } - - if (!(access & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT))) { - return false; - } - - if ((access & GL_MAP_READ_BIT) && - (access & (GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | - GL_MAP_UNSYNCHRONIZED_BIT))) { - return false; - } - - if ((access & GL_MAP_FLUSH_EXPLICIT_BIT) && !(access & GL_MAP_WRITE_BIT)) { - return false; - } - - return true; -} -} // namespace - -void* Context::MapBufferRange(GLenum target, - GLintptr offset, - GLsizeiptr length, - GLbitfield access) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (!IsValidBufferTarget(target)) { - SetError(GL_INVALID_ENUM); - return NULL; - } - - nb::scoped_refptr bound_buffer = *GetBoundBufferForTarget(target); - if (bound_buffer == 0) { - SetError(GL_INVALID_OPERATION); - return NULL; - } - - if (offset < 0 || length < 0 || - offset + length > bound_buffer->size_in_bytes()) { - SetError(GL_INVALID_VALUE); - return NULL; - } - - if (bound_buffer->is_mapped()) { - SetError(GL_INVALID_OPERATION); - return NULL; - } - - if (!MapBufferRangeAccessFlagsAreValid(access)) { - SetError(GL_INVALID_OPERATION); - return NULL; - } - - SB_DCHECK(access & GL_MAP_INVALIDATE_BUFFER_BIT) - << "glimp requires the GL_MAP_INVALIDATE_BUFFER_BIT flag to be set."; - SB_DCHECK(access & GL_MAP_UNSYNCHRONIZED_BIT) - << "glimp requires the GL_MAP_UNSYNCHRONIZED_BIT flag to be set."; - SB_DCHECK(!(access & GL_MAP_FLUSH_EXPLICIT_BIT)) - << "glimp does not support the GL_MAP_FLUSH_EXPLICIT_BIT flag."; - SB_DCHECK(length == bound_buffer->size_in_bytes()) - << "glimp only supports mapping the entire buffer."; - - void* mapped = bound_buffer->Map(); - if (!mapped) { - SetError(GL_OUT_OF_MEMORY); - } - - return mapped; -} - -bool Context::UnmapBuffer(GLenum target) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (!IsValidBufferTarget(target)) { - SetError(GL_INVALID_ENUM); - return GL_FALSE; - } - - nb::scoped_refptr bound_buffer = *GetBoundBufferForTarget(target); - if (bound_buffer == 0) { - SetError(GL_INVALID_OPERATION); - return GL_FALSE; - } - - if (bound_buffer->is_mapped()) { - return bound_buffer->Unmap(); - } else { - // The specification is unclear on what to do in the case where the buffer - // was not mapped to begin with, so we return GL_FALSE in this case. - // https://www.khronos.org/opengles/sdk/docs/man3/html/glMapBufferRange.xhtml - return GL_FALSE; - } -} - -void Context::LineWidth(GLfloat width) { - if (width <= 0) { - SetError(GL_INVALID_VALUE); - return; - } - const GLfloat kDefaultLineWidth = 1.0f; - if (fabs(width - kDefaultLineWidth) > 0.01f * kDefaultLineWidth) { - SB_NOTIMPLEMENTED(); - } -} - -void Context::MakeCurrent(egl::Surface* draw, egl::Surface* read) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - SB_DCHECK(current_thread_ == kSbThreadInvalid || - current_thread_ == SbThreadGetCurrent()); - - current_thread_ = SbThreadGetCurrent(); - - if (!has_been_current_) { - // According to the documentation for eglMakeCurrent(), - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglMakeCurrent.xhtml - // we should set the scissor and viewport to the draw surface the first - // time this context is made current. - Scissor(0, 0, draw->impl()->GetWidth(), draw->impl()->GetHeight()); - Viewport(0, 0, draw->impl()->GetWidth(), draw->impl()->GetHeight()); - - // Setup the default framebuffers and bind them. - SB_DCHECK(!default_draw_framebuffer_); - SB_DCHECK(!default_read_framebuffer_); - SB_DCHECK(!draw_state_.framebuffer); - default_draw_framebuffer_ = new Framebuffer(draw); - default_read_framebuffer_ = new Framebuffer(read); - draw_state_.framebuffer = default_draw_framebuffer_; - read_framebuffer_ = default_read_framebuffer_; - - has_been_current_ = true; - } - - // Update our draw and read framebuffers, marking the framebuffer dirty - // flag if the default framebuffer is the one that is currently bound. - if (default_draw_framebuffer_->color_attachment_surface() != draw) { - default_draw_framebuffer_->UpdateColorSurface(draw); - if (draw_state_.framebuffer == default_draw_framebuffer_) { - draw_state_dirty_flags_.framebuffer_dirty = true; - } - } - if (default_read_framebuffer_->color_attachment_surface() != read) { - default_read_framebuffer_->UpdateColorSurface(read); - } -} - -void Context::ReleaseContext() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - SB_DCHECK(current_thread_ != kSbThreadInvalid); - SB_DCHECK(current_thread_ == SbThreadGetCurrent()); - SB_DCHECK(has_been_current_); - - current_thread_ = kSbThreadInvalid; -} - -nb::scoped_refptr* Context::GetBoundBufferForTarget(GLenum target) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - switch (target) { - case GL_ARRAY_BUFFER: - draw_state_dirty_flags_.array_buffer_dirty = true; - return &draw_state_.array_buffer; - case GL_ELEMENT_ARRAY_BUFFER: - draw_state_dirty_flags_.element_array_buffer_dirty = true; - return &draw_state_.element_array_buffer; - case GL_PIXEL_UNPACK_BUFFER: - return &bound_pixel_unpack_buffer_; - } - - SB_NOTREACHED(); - return NULL; -} - -nb::scoped_refptr* Context::GetBoundTextureForTarget(GLenum target, - GLenum texture) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - switch (target) { - case GL_TEXTURE_2D: - return &(texture_units_[texture - GL_TEXTURE0]); - case GL_TEXTURE_CUBE_MAP: - SB_NOTREACHED() << "Currently unimplemented in glimp."; - return NULL; - } - - SB_NOTREACHED(); - return NULL; -} - -void Context::SetupExtensionsString() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - // Extract the list of extensions from the platform-specific implementation - // and then turn them into a string. - ContextImpl::ExtensionList impl_extensions = impl_->GetExtensions(); - - extensions_string_ = ""; - for (int i = 0; i < impl_extensions.size(); ++i) { - if (i > 0) { - extensions_string_ += " "; - } - extensions_string_ += impl_extensions[i]; - } - - // Since extensions_string_ will eventually be returned as an array of - // unsigned chars, make sure that none of the characters in it are negative. - for (int i = 0; i < extensions_string_.size(); ++i) { - SB_DCHECK(extensions_string_[i] > 0); - } -} - -void Context::GenTextures(GLsizei n, GLuint* textures) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (n < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - for (GLsizei i = 0; i < n; ++i) { - std::unique_ptr texture_impl = impl_->CreateTexture(); - SB_DCHECK(texture_impl); - - nb::scoped_refptr texture(new Texture(std::move(texture_impl))); - - textures[i] = resource_manager_->RegisterTexture(texture); - } -} - -void Context::DeleteTextures(GLsizei n, const GLuint* textures) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (n < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - for (GLsizei i = 0; i < n; ++i) { - if (textures[i] == 0) { - // Silently ignore 0 textures. - continue; - } - nb::scoped_refptr texture_object = - resource_manager_->DeregisterTexture(textures[i]); - - if (!texture_object) { - // The specification does not indicate that any error should be set - // in the case that there was an error deleting a specific texture. - // https://www.khronos.org/opengles/sdk/1.1/docs/man/glDeleteTextures.xml - return; - } - - // If a bound texture is deleted, set the bound texture to NULL. The texture - // may be bound to multiple texture units, including texture units that are - // not active, therefore we must scan them all. - for (int texture_index = 0; - texture_index < impl_->GetMaxFragmentTextureUnits(); ++texture_index) { - GLenum texture_unit = texture_index + GL_TEXTURE0; - nb::scoped_refptr* bound_texture = - GetBoundTextureForTarget(GL_TEXTURE_2D, texture_unit); - if ((*bound_texture).get() == texture_object.get()) { - enabled_textures_dirty_ = true; - *bound_texture = NULL; - } - } - } -} - -void Context::ActiveTexture(GLenum texture) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (texture < GL_TEXTURE0 || - texture >= GL_TEXTURE0 + impl_->GetMaxFragmentTextureUnits()) { - SetError(GL_INVALID_ENUM); - return; - } - - active_texture_ = texture; -} - -void Context::BindTexture(GLenum target, GLuint texture) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_TEXTURE_2D && target != GL_TEXTURE_CUBE_MAP) { - SetError(GL_INVALID_ENUM); - return; - } - - nb::scoped_refptr* bound_texture = - GetBoundTextureForTarget(target, active_texture_); - SB_DCHECK(bound_texture); - nb::scoped_refptr texture_object; - if (texture != 0) { - texture_object = resource_manager_->GetTexture(texture); - if (!texture_object) { - // The texture to be bound is invalid. - SB_NOTIMPLEMENTED() - << "Creating textures with glBindTexture() not supported"; - return; - } - } - - if ((*bound_texture).get() == texture_object.get()) { - // The new texture being bound is the same as the already the bound - // texture. - return; - } - *bound_texture = texture_object; - enabled_textures_dirty_ = true; -} - -namespace { -Sampler::MinFilter MinFilterFromGLEnum(GLenum min_filter) { - switch (min_filter) { - case GL_NEAREST: - return Sampler::kMinFilterNearest; - case GL_LINEAR: - return Sampler::kMinFilterLinear; - case GL_NEAREST_MIPMAP_NEAREST: - return Sampler::kMinFilterNearestMipMapNearest; - case GL_NEAREST_MIPMAP_LINEAR: - return Sampler::kMinFilterNearestMipMapLinear; - case GL_LINEAR_MIPMAP_NEAREST: - return Sampler::kMinFilterLinearMipMapNearest; - case GL_LINEAR_MIPMAP_LINEAR: - return Sampler::kMinFilterLinearMipMapLinear; - default: - return Sampler::kMinFilterInvalid; - } -} - -Sampler::MagFilter MagFilterFromGLEnum(GLenum mag_filter) { - switch (mag_filter) { - case GL_NEAREST: - return Sampler::kMagFilterNearest; - case GL_LINEAR: - return Sampler::kMagFilterLinear; - default: - return Sampler::kMagFilterInvalid; - } -} - -Sampler::WrapMode WrapModeFromGLEnum(GLenum wrap_mode) { - switch (wrap_mode) { - case GL_CLAMP_TO_EDGE: - return Sampler::kWrapModeClampToEdge; - case GL_MIRRORED_REPEAT: - return Sampler::kWrapModeMirroredRepeat; - case GL_REPEAT: - return Sampler::kWrapModeRepeat; - default: - return Sampler::kWrapModeInvalid; - } -} - -GLenum GLEnumFromMinFilter(Sampler::MinFilter min_filter) { - switch (min_filter) { - case Sampler::kMinFilterNearest: - return GL_NEAREST; - case Sampler::kMinFilterLinear: - return GL_LINEAR; - case Sampler::kMinFilterNearestMipMapNearest: - return GL_NEAREST_MIPMAP_NEAREST; - case Sampler::kMinFilterNearestMipMapLinear: - return GL_NEAREST_MIPMAP_LINEAR; - case Sampler::kMinFilterLinearMipMapNearest: - return GL_LINEAR_MIPMAP_NEAREST; - case Sampler::kMinFilterLinearMipMapLinear: - return GL_LINEAR_MIPMAP_LINEAR; - default: { - SB_NOTREACHED(); - return GL_LINEAR; - } - } -} - -GLenum GLEnumFromMagFilter(Sampler::MagFilter mag_filter) { - switch (mag_filter) { - case Sampler::kMagFilterNearest: - return GL_NEAREST; - case Sampler::kMagFilterLinear: - return GL_LINEAR; - default: { - SB_NOTREACHED(); - return GL_LINEAR; - } - } -} - -GLenum GLEnumFromWrapMode(Sampler::WrapMode wrap_mode) { - switch (wrap_mode) { - case Sampler::kWrapModeClampToEdge: - return GL_CLAMP_TO_EDGE; - case Sampler::kWrapModeMirroredRepeat: - return GL_MIRRORED_REPEAT; - case Sampler::kWrapModeRepeat: - return GL_REPEAT; - default: { - SB_NOTREACHED(); - return GL_REPEAT; - } - } -} -} // namespace - -void Context::GetTexParameteriv(GLenum target, GLenum pname, GLint* params) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - Sampler* active_sampler = (*GetBoundTextureForTarget(target, active_texture_)) - ->sampler_parameters(); - switch (pname) { - case GL_TEXTURE_MAG_FILTER: { - *params = GLEnumFromMagFilter(active_sampler->mag_filter); - } break; - case GL_TEXTURE_MIN_FILTER: { - *params = GLEnumFromMinFilter(active_sampler->min_filter); - } break; - case GL_TEXTURE_WRAP_S: { - *params = GLEnumFromWrapMode(active_sampler->wrap_s); - } break; - case GL_TEXTURE_WRAP_T: { - *params = GLEnumFromWrapMode(active_sampler->wrap_t); - } break; - - default: { - SetError(GL_INVALID_ENUM); - return; - } - } -} - -void Context::TexParameteri(GLenum target, GLenum pname, GLint param) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - Sampler* active_sampler = (*GetBoundTextureForTarget(target, active_texture_)) - ->sampler_parameters(); - - switch (pname) { - case GL_TEXTURE_MAG_FILTER: { - Sampler::MagFilter mag_filter = MagFilterFromGLEnum(param); - if (mag_filter == Sampler::kMagFilterInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - active_sampler->mag_filter = mag_filter; - } break; - case GL_TEXTURE_MIN_FILTER: { - Sampler::MinFilter min_filter = MinFilterFromGLEnum(param); - if (min_filter == Sampler::kMinFilterInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - active_sampler->min_filter = min_filter; - } break; - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: { - Sampler::WrapMode wrap_mode = WrapModeFromGLEnum(param); - if (wrap_mode == Sampler::kWrapModeInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - - if (pname == GL_TEXTURE_WRAP_S) { - active_sampler->wrap_s = wrap_mode; - } else { - SB_DCHECK(pname == GL_TEXTURE_WRAP_T); - active_sampler->wrap_t = wrap_mode; - } - } break; - - default: { - SetError(GL_INVALID_ENUM); - return; - } - } - - enabled_textures_dirty_ = true; -} - -namespace { - -bool TextureFormatIsValid(GLenum format) { - switch (format) { - case GL_ALPHA: - case GL_RGB: - case GL_RGBA: - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_RED_INTEGER: - return true; - default: - return false; - } -} - -bool TextureTypeIsValid(GLenum type) { - switch (type) { - case GL_UNSIGNED_BYTE: - case GL_UNSIGNED_SHORT: - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_5_5_5_1: - return true; - default: - return false; - } -} - -// Converts a GL type and format to a glimp PixelFormat. Information about -// the different possible values for type and format can be found here: -// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml -// Note that glimp may not support all possible formats described above. -PixelFormat PixelFormatFromGLTypeAndFormat(GLenum format, GLenum type) { - if (type == GL_UNSIGNED_BYTE) { - switch (format) { - case GL_RGBA: - return kPixelFormatRGBA8; - case GL_ALPHA: - return kPixelFormatA8; - case GL_LUMINANCE_ALPHA: - return kPixelFormatBA8; - } - } else if (type == GL_UNSIGNED_SHORT && format == GL_RED_INTEGER) { - return kPixelFormatA16; - } - return kPixelFormatInvalid; -} - -} // namespace - -void Context::TexImage2D(GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLint border, - GLenum format, - GLenum type, - const GLvoid* pixels) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_TEXTURE_2D) { - SB_NOTREACHED() << "Only target=GL_TEXTURE_2D is supported in glimp."; - SetError(GL_INVALID_ENUM); - return; - } - - if (width < 0 || height < 0 || level < 0 || border != 0) { - SetError(GL_INVALID_VALUE); - return; - } - - int max_texture_size = impl_->GetMaxTextureSize(); - if (width > max_texture_size || height > max_texture_size) { - SetError(GL_INVALID_VALUE); - return; - } - - if (format != internalformat) { - SetError(GL_INVALID_OPERATION); - return; - } - - if (!TextureFormatIsValid(format)) { - SetError(GL_INVALID_ENUM); - return; - } - - if (!TextureTypeIsValid(type)) { - SetError(GL_INVALID_ENUM); - return; - } - - // Fold format and type together to determine a single glimp PixelFormat - // value for the incoming data. - PixelFormat pixel_format = PixelFormatFromGLTypeAndFormat(format, type); - SB_DCHECK(pixel_format != kPixelFormatInvalid) - << "Pixel format not supported by glimp."; - - nb::scoped_refptr texture_object = - *GetBoundTextureForTarget(target, active_texture_); - if (!texture_object) { - // According to the specification, no error is generated if no texture - // is bound. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml - return; - } - - // The incoming pixel data should be aligned as the client has specified - // that it will be. - SB_DCHECK(starboard::common::IsAligned( - pixels, static_cast(unpack_alignment_))); - - // Determine pitch taking into account glPixelStorei() settings. - int pitch_in_bytes = GetPitchForTextureData(width, pixel_format); - - texture_object->Initialize(level, pixel_format, width, height); - - if (bound_pixel_unpack_buffer_) { - if (bound_pixel_unpack_buffer_->is_mapped() || - height * pitch_in_bytes > bound_pixel_unpack_buffer_->size_in_bytes()) { - SetError(GL_INVALID_OPERATION); - return; - } - - texture_object->UpdateDataFromBuffer( - level, 0, 0, width, height, pitch_in_bytes, bound_pixel_unpack_buffer_, - starboard::common::AsInteger(pixels)); - } else if (pixels) { - if (!texture_object->UpdateData(level, 0, 0, width, height, pitch_in_bytes, - pixels)) { - SetError(GL_OUT_OF_MEMORY); - } - } -} - -void Context::TexSubImage2D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - const GLvoid* pixels) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_TEXTURE_2D) { - SB_NOTREACHED() << "Only target=GL_TEXTURE_2D is supported in glimp."; - SetError(GL_INVALID_ENUM); - return; - } - - if (width < 0 || height < 0 || level < 0 || xoffset < 0 || yoffset < 0) { - SetError(GL_INVALID_VALUE); - } - - if (!TextureFormatIsValid(format)) { - SetError(GL_INVALID_ENUM); - return; - } - - if (!TextureTypeIsValid(type)) { - SetError(GL_INVALID_ENUM); - return; - } - - PixelFormat pixel_format = PixelFormatFromGLTypeAndFormat(format, type); - SB_DCHECK(pixel_format != kPixelFormatInvalid) - << "Pixel format not supported by glimp."; - - nb::scoped_refptr texture_object = - *GetBoundTextureForTarget(target, active_texture_); - if (!texture_object) { - // According to the specification, no error is generated if no texture - // is bound. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexSubImage2D.xml - return; - } - - if (!texture_object->texture_allocated() || - pixel_format != texture_object->pixel_format()) { - SetError(GL_INVALID_OPERATION); - return; - } - - if (xoffset + width > texture_object->width() || - yoffset + height > texture_object->height()) { - SetError(GL_INVALID_VALUE); - return; - } - - // The incoming pixel data should be aligned as the client has specified - // that it will be. - SB_DCHECK(starboard::common::IsAligned( - pixels, static_cast(unpack_alignment_))); - - // Determine pitch taking into account glPixelStorei() settings. - int pitch_in_bytes = GetPitchForTextureData(width, pixel_format); - - if (bound_pixel_unpack_buffer_) { - if (bound_pixel_unpack_buffer_->is_mapped() || - height * pitch_in_bytes > bound_pixel_unpack_buffer_->size_in_bytes()) { - SetError(GL_INVALID_OPERATION); - return; - } - - texture_object->UpdateDataFromBuffer( - level, xoffset, yoffset, width, height, pitch_in_bytes, - bound_pixel_unpack_buffer_, starboard::common::AsInteger(pixels)); - } else { - if (!texture_object->UpdateData(level, xoffset, yoffset, width, height, - pitch_in_bytes, pixels)) { - SetError(GL_OUT_OF_MEMORY); - } - } -} - -void Context::CopyTexSubImage2D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint x, - GLint y, - GLsizei width, - GLsizei height) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_TEXTURE_2D) { - SB_NOTREACHED() << "Only target=GL_TEXTURE_2D is supported in glimp."; - SetError(GL_INVALID_ENUM); - return; - } - - if (width < 0 || height < 0 || level < 0 || xoffset < 0 || yoffset < 0) { - SetError(GL_INVALID_VALUE); - } - - nb::scoped_refptr texture_object = - *GetBoundTextureForTarget(target, active_texture_); - if (!texture_object) { - // According to the specification, no error is generated if no texture - // is bound. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexSubImage2D.xml - return; - } - - if (!texture_object->texture_allocated()) { - SetError(GL_INVALID_OPERATION); - return; - } - - if (xoffset + width > texture_object->width() || - yoffset + height > texture_object->height()) { - SetError(GL_INVALID_VALUE); - return; - } - - if (read_framebuffer_->CheckFramebufferStatus() != GL_FRAMEBUFFER_COMPLETE) { - SetError(GL_INVALID_FRAMEBUFFER_OPERATION); - return; - } - - // The pixels in the rectangle are processed exactly as if glReadPixels had - // been called with format set to GL_RGBA, but the process stops just after - // conversion of RGBA values. Subsequent processing is identical to that - // described for glTexSubImage2D. - uint8_t pixels[read_framebuffer_->GetWidth() * - read_framebuffer_->GetHeight() * - BytesPerPixel(kPixelFormatRGBA8)]; - ReadPixels(0, 0, read_framebuffer_->GetWidth(), - read_framebuffer_->GetHeight(), GL_RGBA, GL_UNSIGNED_BYTE, - &pixels); - - // If any of the pixels within the specified rectangle are outside the - // framebuffer associated with the current rendering context, then the values - // obtained for those pixels are undefined. Make sure that we only access - // pixels within a valid range. - x = std::max(0, x); - y = std::max(0, y); - width = std::min(read_framebuffer_->GetWidth() - x, width); - height = std::min(read_framebuffer_->GetHeight() - y, height); - int pitch_in_bytes = - read_framebuffer_->GetWidth() * BytesPerPixel(kPixelFormatRGBA8); - if (!texture_object->UpdateData( - level, xoffset, yoffset, width, height, pitch_in_bytes, - &pixels[y * pitch_in_bytes + x * BytesPerPixel(kPixelFormatRGBA8)])) { - SetError(GL_OUT_OF_MEMORY); - } -} - -void Context::GenFramebuffers(GLsizei n, GLuint* framebuffers) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (n < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - for (GLsizei i = 0; i < n; ++i) { - nb::scoped_refptr framebuffer(new Framebuffer()); - - framebuffers[i] = resource_manager_->RegisterFramebuffer(framebuffer); - } -} - -void Context::DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (n < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - for (GLsizei i = 0; i < n; ++i) { - if (framebuffers[i] == 0) { - // Silently ignore 0 framebuffers. - continue; - } - - nb::scoped_refptr framebuffer_object = - resource_manager_->DeregisterFramebuffer(framebuffers[i]); - - if (!framebuffer_object) { - // The specification does not indicate that any error should be set - // in the case that there was an error deleting a specific framebuffer. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteFramebuffers.xml - return; - } - - // If a bound framebuffer is deleted, set the bound framebuffer back to - // the default framebuffer. - if (framebuffer_object == draw_state_.framebuffer) { - SetBoundDrawFramebufferToDefault(); - } - if (framebuffer_object == read_framebuffer_) { - SetBoundReadFramebufferToDefault(); - } - } -} - -void Context::BindFramebuffer(GLenum target, GLuint framebuffer) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_FRAMEBUFFER) { - SetError(GL_INVALID_ENUM); - return; - } - - if (framebuffer == 0) { - SetBoundDrawFramebufferToDefault(); - SetBoundReadFramebufferToDefault(); - return; - } - - nb::scoped_refptr framebuffer_object = - resource_manager_->GetFramebuffer(framebuffer); - - if (!framebuffer_object) { - // According to the specification, no error is generated if the buffer is - // invalid. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBindFramebuffer.xml - SB_DLOG(WARNING) << "Could not glBindFramebuffer() to invalid framebuffer."; - return; - } - - draw_state_.framebuffer = framebuffer_object; - draw_state_dirty_flags_.framebuffer_dirty = true; - - read_framebuffer_ = framebuffer_object; -} - -void Context::FramebufferTexture2D(GLenum target, - GLenum attachment, - GLenum textarget, - GLuint texture, - GLint level) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_FRAMEBUFFER) { - SetError(GL_INVALID_ENUM); - return; - } - - if (IsDefaultDrawFramebufferBound() || IsDefaultReadFramebufferBound()) { - SetError(GL_INVALID_OPERATION); - return; - } - - if (textarget != GL_TEXTURE_2D) { - SB_NOTREACHED() << "Only textarget=GL_TEXTURE_2D is supported in glimp."; - SetError(GL_INVALID_ENUM); - return; - } - - if (attachment != GL_COLOR_ATTACHMENT0) { - SB_NOTREACHED() - << "Only attachment=GL_COLOR_ATTACHMENT0 is supported in glimp."; - SetError(GL_INVALID_ENUM); - return; - } - - nb::scoped_refptr texture_object; - if (texture != 0) { - texture_object = resource_manager_->GetTexture(texture); - if (!texture_object) { - SetError(GL_INVALID_OPERATION); - return; - } - } - - draw_state_.framebuffer->AttachTexture2D(texture_object, level); -} - -GLenum Context::CheckFramebufferStatus(GLenum target) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_FRAMEBUFFER) { - SetError(GL_INVALID_ENUM); - return 0; - } - - return draw_state_.framebuffer->CheckFramebufferStatus(); -} - -void Context::FramebufferRenderbuffer(GLenum target, - GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_FRAMEBUFFER || renderbuffertarget != GL_RENDERBUFFER) { - SetError(GL_INVALID_ENUM); - return; - } - - SB_DCHECK(attachment != GL_COLOR_ATTACHMENT0) - << "glimp does not support attaching color renderbuffers to " - "framebuffers."; - - if (IsDefaultDrawFramebufferBound()) { - SetError(GL_INVALID_OPERATION); - return; - } - - nb::scoped_refptr renderbuffer_object = nullptr; - - // Resolve the actual render buffer object to bind if we are not binding - // render buffer 0, in which case we leave the value to set as NULL. - if (renderbuffer != 0) { - renderbuffer_object = resource_manager_->GetRenderbuffer(renderbuffer); - - if (!renderbuffer_object) { - SetError(GL_INVALID_OPERATION); - return; - } - } - - switch (attachment) { - case GL_DEPTH_ATTACHMENT: - draw_state_.framebuffer->SetDepthAttachment(renderbuffer_object); - break; - case GL_STENCIL_ATTACHMENT: - draw_state_.framebuffer->SetStencilAttachment(renderbuffer_object); - break; - default: - SetError(GL_INVALID_ENUM); - } -} - -void Context::GenRenderbuffers(GLsizei n, GLuint* renderbuffers) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (n < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - for (GLsizei i = 0; i < n; ++i) { - nb::scoped_refptr renderbuffer(new Renderbuffer()); - - renderbuffers[i] = resource_manager_->RegisterRenderbuffer(renderbuffer); - } -} - -void Context::DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (n < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - for (GLsizei i = 0; i < n; ++i) { - if (renderbuffers[i] == 0) { - // Silently ignore 0 renderbuffers. - continue; - } - - nb::scoped_refptr renderbuffer_object = - resource_manager_->DeregisterRenderbuffer(renderbuffers[i]); - - if (!renderbuffer_object) { - // The specification does not indicate that any error should be set - // in the case that there was an error deleting a specific renderbuffer. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteRenderbuffers.xml - return; - } - - // If we're deleting the currently bound renderbuffer, set the currently - // bound render buffer to NULL. - if (renderbuffer_object == bound_renderbuffer_) { - bound_renderbuffer_ = NULL; - } - } -} - -void Context::BindRenderbuffer(GLenum target, GLuint renderbuffer) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_RENDERBUFFER) { - SetError(GL_INVALID_ENUM); - return; - } - - if (renderbuffer == 0) { - bound_renderbuffer_ = NULL; - return; - } - - nb::scoped_refptr renderbuffer_object = - resource_manager_->GetRenderbuffer(renderbuffer); - - if (!renderbuffer_object) { - // According to the specification, no error is generated if the buffer is - // invalid. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBindRenderbuffer.xml - SB_DLOG(WARNING) - << "Could not glBindRenderbuffer() to invalid renderbuffer."; - return; - } - - bound_renderbuffer_ = renderbuffer_object; -} - -namespace { -// Valid formats as listed here: -// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glRenderbufferStorage.xml -bool RenderbufferStorageFormatIsValid(GLenum internalformat) { - switch (internalformat) { - case GL_RGBA4: - case GL_RGB565: - case GL_RGB5_A1: - case GL_DEPTH_COMPONENT16: - case GL_STENCIL_INDEX8: - return true; - default: - return false; - } -} -} // namespace - -void Context::RenderbufferStorage(GLenum target, - GLenum internalformat, - GLsizei width, - GLsizei height) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (target != GL_RENDERBUFFER) { - SetError(GL_INVALID_ENUM); - return; - } - - if (!RenderbufferStorageFormatIsValid(internalformat)) { - SetError(GL_INVALID_ENUM); - return; - } - - if (width < 0 || height < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - if (bound_renderbuffer_ == 0) { - SetError(GL_INVALID_OPERATION); - return; - } - - bound_renderbuffer_->Initialize(internalformat, width, height); -} - -void Context::StencilMask(GLuint mask) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (mask != 0xFFFFFFFF) { - // If we are not setting stencil mask to its initial value then indicate - // that our implementation is lacking. - SB_NOTIMPLEMENTED(); - } -} - -void Context::ClearStencil(GLint s) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (s != 0) { - // If we are not setting stencil clear to its initial value then indicate - // that our implementation is lacking. - SB_NOTIMPLEMENTED(); - } -} - -void Context::Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - draw_state_.viewport.rect = nb::Rect(x, y, width, height); - draw_state_dirty_flags_.viewport_dirty = true; -} - -void Context::Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (x < 0) { - SB_DLOG(WARNING) << "glScissor() x coordinate is set to negative."; - } - if (y < 0) { - SB_DLOG(WARNING) << "glScissor() y coordinate is set to negative."; - } - draw_state_.scissor.rect = nb::Rect(x, y, width, height); - draw_state_dirty_flags_.scissor_dirty = true; -} - -namespace { -// Converts from the GLenum passed into glVertexAttribPointer() to the enum -// defined in VertexAttribute. -static VertexAttributeType VertexAttributeTypeFromGLEnum(GLenum type) { - switch (type) { - case GL_BYTE: - return kVertexAttributeTypeByte; - case GL_UNSIGNED_BYTE: - return kVertexAttributeTypeUnsignedByte; - case GL_SHORT: - return kVertexAttributeTypeShort; - case GL_UNSIGNED_SHORT: - return kVertexAttributeTypeUnsignedShort; - case GL_FIXED: - return kVertexAttributeTypeFixed; - case GL_FLOAT: - return kVertexAttributeTypeFloat; - case GL_HALF_FLOAT: - return kVertexAttributeTypeHalfFloat; - default: - return kVertexAttributeTypeInvalid; - } -} -} // namespace - -void Context::VertexAttribPointer(GLuint indx, - GLint size, - GLenum type, - GLboolean normalized, - GLsizei stride, - const GLvoid* ptr) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (indx >= GL_MAX_VERTEX_ATTRIBS) { - SetError(GL_INVALID_VALUE); - return; - } - if (size < 1 || size > 4) { - SetError(GL_INVALID_VALUE); - return; - } - if (stride < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - VertexAttributeType vertex_attribute_type = - VertexAttributeTypeFromGLEnum(type); - if (vertex_attribute_type == kVertexAttributeTypeInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - - vertex_attrib_map_[indx] = - VertexAttributeArray(size, vertex_attribute_type, normalized, stride, - static_cast(reinterpret_cast(ptr))); - if (enabled_vertex_attribs_.find(indx) != enabled_vertex_attribs_.end()) { - enabled_vertex_attribs_dirty_ = true; - } -} - -void Context::EnableVertexAttribArray(GLuint index) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (index >= GL_MAX_VERTEX_ATTRIBS) { - SetError(GL_INVALID_VALUE); - return; - } - - enabled_vertex_attribs_.insert(index); - enabled_vertex_attribs_dirty_ = true; -} - -void Context::DisableVertexAttribArray(GLuint index) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (index >= GL_MAX_VERTEX_ATTRIBS) { - SetError(GL_INVALID_VALUE); - return; - } - - enabled_vertex_attribs_.erase(index); - enabled_vertex_attribs_dirty_ = true; -} - -void Context::VertexAttribfv(GLuint indx, - int elem_size, - const GLfloat* values) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - SB_DCHECK(elem_size > 0); - SB_DCHECK(elem_size <= 4); - - VertexAttributeConstant* value = &const_vertex_attrib_map_[indx]; - memset(value, 0, sizeof(*value)); - for (int i = 0; i < elem_size; ++i) { - value->data[i] = values[i]; - } - value->size = elem_size; - value->type = kVertexAttributeTypeFloat; - - enabled_vertex_attribs_dirty_ = true; -} - -GLint Context::GetUniformLocation(GLuint program, const GLchar* name) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (name[0] == 'g' && name[1] == 'l' && name[2] == '_') { - // |name| is not allowed to begin with the reserved prefix, "gl_". - return -1; - } - - nb::scoped_refptr program_object = - resource_manager_->GetProgram(program); - if (!program_object) { - SetError(GL_INVALID_VALUE); - return -1; - } - - if (!program_object->linked()) { - SetError(GL_INVALID_OPERATION); - return -1; - } - - return program_object->GetUniformLocation(name); -} - -void Context::Uniformiv(GLint location, - GLsizei count, - GLsizei elem_size, - const GLint* v) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - SB_DCHECK(elem_size >= 1 && elem_size <= 4); - - if (count < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - if (!draw_state_.used_program) { - SetError(GL_INVALID_VALUE); - return; - } - - GLenum result = - draw_state_.used_program->Uniformiv(location, count, elem_size, v); - if (result == GL_NO_ERROR) { - draw_state_dirty_flags_.uniforms_dirty.Mark(location); - } else { - SetError(result); - } -} - -void Context::Uniformfv(GLint location, - GLsizei count, - GLsizei elem_size, - const GLfloat* v) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - SB_DCHECK(elem_size >= 1 && elem_size <= 4); - - if (count < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - if (!draw_state_.used_program) { - SetError(GL_INVALID_VALUE); - return; - } - - GLenum result = - draw_state_.used_program->Uniformfv(location, count, elem_size, v); - if (result == GL_NO_ERROR) { - draw_state_dirty_flags_.uniforms_dirty.Mark(location); - } else { - SetError(result); - } -} - -void Context::UniformMatrixfv(GLint location, - GLsizei count, - GLboolean transpose, - GLsizei dim_size, - const GLfloat* value) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - SB_DCHECK(dim_size >= 2 && dim_size <= 4); - - if (transpose != GL_FALSE) { - SetError(GL_INVALID_VALUE); - return; - } - - if (!draw_state_.used_program) { - SetError(GL_INVALID_VALUE); - return; - } - - GLenum result = draw_state_.used_program->UniformMatrixfv(location, count, - dim_size, value); - if (result == GL_NO_ERROR) { - draw_state_dirty_flags_.uniforms_dirty.Mark(location); - } else { - SetError(result); - } -} - -namespace { -DrawMode DrawModeFromGLEnum(GLenum mode) { - switch (mode) { - case GL_POINTS: - return kDrawModePoints; - case GL_LINE_STRIP: - return kDrawModeLineStrip; - case GL_LINE_LOOP: - return kDrawModeLineLoop; - case GL_LINES: - return kDrawModeLines; - case GL_TRIANGLE_STRIP: - return kDrawModeTriangleStrip; - case GL_TRIANGLE_FAN: - return kDrawModeTriangleFan; - case GL_TRIANGLES: - return kDrawModeTriangles; - default: - return kDrawModeInvalid; - } -} -} // namespace - -void Context::DrawArrays(GLenum mode, GLint first, GLsizei count) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (count < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - if (draw_state_.framebuffer->CheckFramebufferStatus() != - GL_FRAMEBUFFER_COMPLETE) { - SetError(GL_INVALID_FRAMEBUFFER_OPERATION); - return; - } - - DrawMode draw_mode = DrawModeFromGLEnum(mode); - if (draw_mode == kDrawModeInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - - SB_DCHECK(draw_state_.array_buffer) - << "glimp only supports vertices from vertex buffers."; - - CompressDrawStateForDrawCall(); - - impl_->DrawArrays(draw_mode, first, count, draw_state_, - &draw_state_dirty_flags_); -} - -namespace { -IndexDataType IndexDataTypeFromGLenum(GLenum type) { - switch (type) { - case GL_UNSIGNED_BYTE: - return kIndexDataTypeUnsignedByte; - case GL_UNSIGNED_SHORT: - return kIndexDataTypeUnsignedShort; - default: - return kIndexDataTypeInvalid; - } -} -} // namespace - -void Context::DrawElements(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid* indices) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (count < 0) { - SetError(GL_INVALID_VALUE); - return; - } - - if (draw_state_.framebuffer->CheckFramebufferStatus() != - GL_FRAMEBUFFER_COMPLETE) { - SetError(GL_INVALID_FRAMEBUFFER_OPERATION); - return; - } - - DrawMode draw_mode = DrawModeFromGLEnum(mode); - if (draw_mode == kDrawModeInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - - IndexDataType index_data_type = IndexDataTypeFromGLenum(type); - if (type == kIndexDataTypeInvalid) { - SetError(GL_INVALID_ENUM); - return; - } - - SB_DCHECK(draw_state_.array_buffer) - << "glimp only supports vertices from vertex buffers."; - SB_DCHECK(draw_state_.element_array_buffer) - << "glimp only supports indices from element vertex buffers."; - - CompressDrawStateForDrawCall(); - - impl_->DrawElements(draw_mode, count, index_data_type, - reinterpret_cast(indices), draw_state_, - &draw_state_dirty_flags_); -} - -namespace { -bool ValidReadPixelsFormat(GLenum format) { - switch (format) { - case GL_RGBA: - case GL_RGBA_INTEGER: - case GL_RED_INTEGER: - return true; - break; - default: - return false; - break; - } -} - -bool ValidReadPixelsType(GLenum type) { - switch (type) { - case GL_UNSIGNED_BYTE: - case GL_UNSIGNED_INT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_FLOAT: - return true; - break; - default: - return false; - break; - } -} -} // namespace - -void Context::ReadPixels(GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLvoid* pixels) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (!ValidReadPixelsFormat(format) || !ValidReadPixelsType(type)) { - SetError(GL_INVALID_ENUM); - return; - } - - SB_DCHECK(format == GL_RGBA) << "glimp only supports format=GL_RGBA."; - SB_DCHECK(type == GL_UNSIGNED_BYTE) - << "glimp only supports type=GL_UNSIGNED_BYTE."; - - SB_DCHECK(read_framebuffer_->color_attachment_texture()) - << "glimp only supports glReadPixels() calls on non-default " - "framebuffers."; - - if (x < 0 || y < 0 || width < 0 || height < 0 || - x + width > read_framebuffer_->GetWidth() || - y + height > read_framebuffer_->GetHeight()) { - SetError(GL_INVALID_VALUE); - return; - } - - // Ensure that all GPU activity (in particular, texture writes) complete - // before we attempt to read pixel data from the texture. - Finish(); - - read_framebuffer_->color_attachment_texture()->ReadPixelsAsRGBA8( - x, y, width, height, width * BytesPerPixel(kPixelFormatRGBA8), pixels); -} - -void Context::Flush() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - impl_->Flush(); -} - -void Context::Finish() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - impl_->Finish(); -} - -void Context::SwapBuffers() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - egl::Surface* surface = default_draw_framebuffer_->color_attachment_surface(); - // If surface is a pixel buffer or a pixmap, eglSwapBuffers has no effect, and - // no error is generated. - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglSwapBuffers.xhtml - if (surface->impl()->IsWindowSurface()) { - Flush(); - impl_->SwapBuffers(surface); - if (!has_swapped_buffers()) { - SbAtomicBarrier_Increment(&has_swapped_buffers_, 1); - } - } -} - -bool Context::BindTextureToEGLSurface(egl::Surface* surface) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - SB_DCHECK(surface->GetTextureTarget() == EGL_TEXTURE_2D); - - const nb::scoped_refptr& current_texture = - *GetBoundTextureForTarget(GL_TEXTURE_2D, active_texture_); - - if (!current_texture) { - SB_DLOG(WARNING) << "No texture is currently bound during call to " - "eglBindTexImage()."; - return false; - } - - SB_DCHECK(bound_egl_surfaces_.find(surface) == bound_egl_surfaces_.end()); - - bool success = current_texture->BindToEGLSurface(surface); - if (success) { - bound_egl_surfaces_[surface] = current_texture; - } - - return success; -} - -bool Context::ReleaseTextureFromEGLSurface(egl::Surface* surface) { - GLIMP_TRACE_EVENT0(__FUNCTION__); - std::map >::iterator found = - bound_egl_surfaces_.find(surface); - if (found == bound_egl_surfaces_.end()) { - SB_LOG(WARNING) << "Releasing EGLSurface was never bound to a texture in " - "this context."; - return false; - } - - bool success = found->second->ReleaseFromEGLSurface(surface); - if (success) { - bound_egl_surfaces_.erase(found); - } - return success; -} - -void Context::UpdateVertexAttribsInDrawState() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - // Setup the dense list of enabled vertex attributes. - draw_state_.vertex_attributes.clear(); - for (std::set::const_iterator iter = - enabled_vertex_attribs_.begin(); - iter != enabled_vertex_attribs_.end(); ++iter) { - draw_state_.vertex_attributes.push_back( - std::make_pair(*iter, &vertex_attrib_map_[*iter])); - } - - draw_state_.constant_vertex_attributes.clear(); - for (std::map::iterator iter = - const_vertex_attrib_map_.begin(); - iter != const_vertex_attrib_map_.end(); ++iter) { - // Add constant vertex attributes only if they do not have a vertex - // attribute array enabled for them. - if (enabled_vertex_attribs_.find(iter->first) == - enabled_vertex_attribs_.end()) { - draw_state_.constant_vertex_attributes.push_back( - std::make_pair(iter->first, &iter->second)); - } - } - - draw_state_dirty_flags_.vertex_attributes_dirty = true; - enabled_vertex_attribs_dirty_ = false; -} - -void Context::UpdateSamplersInDrawState() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - // Setup the list of enabled samplers. - draw_state_.textures.clear(); - int max_active_textures = impl_->GetMaxFragmentTextureUnits(); - for (int i = 0; i < max_active_textures; ++i) { - if (texture_units_[i]) { - draw_state_.textures.push_back(std::make_pair( - static_cast(i), texture_units_[i].get())); - } - } - - draw_state_dirty_flags_.textures_dirty = true; - enabled_textures_dirty_ = false; -} - -void Context::CompressDrawStateForDrawCall() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (enabled_vertex_attribs_dirty_) { - UpdateVertexAttribsInDrawState(); - SB_DCHECK(enabled_vertex_attribs_dirty_ == false); - } - - if (enabled_textures_dirty_) { - UpdateSamplersInDrawState(); - SB_DCHECK(enabled_textures_dirty_ == false); - } -} - -void Context::MarkUsedProgramDirty() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - draw_state_dirty_flags_.MarkUsedProgram(); -} - -void Context::SetBoundDrawFramebufferToDefault() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (draw_state_.framebuffer != default_draw_framebuffer_) { - draw_state_.framebuffer = default_draw_framebuffer_; - draw_state_dirty_flags_.framebuffer_dirty = true; - } -} - -void Context::SetBoundReadFramebufferToDefault() { - GLIMP_TRACE_EVENT0(__FUNCTION__); - if (read_framebuffer_ != default_read_framebuffer_) { - read_framebuffer_ = default_read_framebuffer_; - } -} - -bool Context::IsDefaultDrawFramebufferBound() const { - GLIMP_TRACE_EVENT0(__FUNCTION__); - return draw_state_.framebuffer == default_draw_framebuffer_; -} - -bool Context::IsDefaultReadFramebufferBound() const { - GLIMP_TRACE_EVENT0(__FUNCTION__); - return read_framebuffer_ == default_read_framebuffer_; -} - -int Context::GetPitchForTextureData(int width, PixelFormat pixel_format) const { - GLIMP_TRACE_EVENT0(__FUNCTION__); - // The equations for determining the pitch are described here: - // https://www.khronos.org/opengles/sdk/docs/man3/html/glPixelStorei.xhtml - int n = BytesPerPixel(pixel_format); - int s = 1; - int len = unpack_row_length_ > 0 ? unpack_row_length_ : width; - int a = unpack_alignment_; - - if (s >= a) { - return n * len; - } else { - return starboard::common::AlignUp(s * n * len, a) / s; - } -} - -SbAtomic32 Context::has_swapped_buffers_ = 0; - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/context.h b/glimp/gles/context.h deleted file mode 100644 index 66f5fb589240..000000000000 --- a/glimp/gles/context.h +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright 2015 The Cobalt Authors. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_CONTEXT_H_ -#define GLIMP_GLES_CONTEXT_H_ - -#include - -#include -#include -#include -#include -#include - -#include -#include "glimp/egl/surface.h" -#include "glimp/gles/context_impl.h" -#include "glimp/gles/draw_state.h" -#include "glimp/gles/framebuffer.h" -#include "glimp/gles/resource_manager.h" -#include "glimp/gles/sampler.h" -#include "glimp/gles/vertex_attribute.h" -#include "glimp/ref_counted.h" -#include "starboard/atomic.h" -#include "starboard/thread.h" - -namespace glimp { -namespace gles { - -class Context { - public: - Context(std::unique_ptr context_impl, Context* share_context); - - ~Context() { SbAtomicRelease_Store(&has_swapped_buffers_, 0); } - - // Returns current thread's current context, or NULL if nothing is current. - static Context* GetTLSCurrentContext(); - - // Sets the current thread's current context. None of the parameters can - // be NULL (use ReleaseTLSCurrentContext() if you wish to release the current - // context). - static bool SetTLSCurrentContext(Context* context, - egl::Surface* draw, - egl::Surface* read); - - // Releases the current thread's current context. - static void ReleaseTLSCurrentContext(); - - // Returns the unique id of the context instance. - int context_id() const { return context_id_; } - - egl::Surface* draw_surface() { - return default_draw_framebuffer_->color_attachment_surface(); - } - - // Returns the thread that currently holds this Context, or kSbThreadInvalid - // if no thread currently holds the context. - SbThread current_thread() const { return current_thread_; } - - // Return the last error generated and reset the error flag to GL_NO_ERROR. - GLenum GetError(); - - const GLubyte* GetString(GLenum name); - void GetIntegerv(GLenum pname, GLint* params); - void GetShaderiv(GLuint shader, GLenum pname, GLint* params); - void GetShaderInfoLog(GLuint shader, - GLsizei bufsize, - GLsizei* length, - GLchar* infolog); - void GetProgramiv(GLuint program, GLenum pname, GLint* params); - void GetProgramInfoLog(GLuint program, - GLsizei bufsize, - GLsizei* length, - GLchar* infolog); - - void PixelStorei(GLenum pname, GLint param); - - void Enable(GLenum cap); - void Disable(GLenum cap); - - void ColorMask(GLboolean red, - GLboolean green, - GLboolean blue, - GLboolean alpha); - void DepthMask(GLboolean flag); - - void Clear(GLbitfield mask); - void ClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); - - void BlendFunc(GLenum sfactor, GLenum dfactor); - void BlendEquation(GLenum mode); - - void CullFace(GLenum mode); - void FrontFace(GLenum mode); - - GLuint CreateProgram(); - void DeleteProgram(GLuint program); - void AttachShader(GLuint program, GLuint shader); - void LinkProgram(GLuint program); - void BindAttribLocation(GLuint program, GLuint index, const GLchar* name); - void UseProgram(GLuint program); - - GLuint CreateShader(GLenum type); - void DeleteShader(GLuint shader); - void ShaderSource(GLuint shader, - GLsizei count, - const GLchar* const* string, - const GLint* length); - void CompileShader(GLuint shader); - - void GenBuffers(GLsizei n, GLuint* buffers); - void GenBuffersForVideoFrame(GLsizei n, GLuint* buffers); - void DeleteBuffers(GLsizei n, const GLuint* buffers); - void BindBuffer(GLenum target, GLuint buffer); - void BufferData(GLenum target, - GLsizeiptr size, - const GLvoid* data, - GLenum usage); - void BufferSubData(GLenum target, - GLintptr offset, - GLsizeiptr size, - const GLvoid* data); - void* MapBufferRange(GLenum target, - GLintptr offset, - GLsizeiptr length, - GLbitfield access); - bool UnmapBuffer(GLenum target); - - void LineWidth(GLfloat width); - - void GenTextures(GLsizei n, GLuint* textures); - void DeleteTextures(GLsizei n, const GLuint* textures); - void ActiveTexture(GLenum texture); - void BindTexture(GLenum target, GLuint texture); - void GetTexParameteriv(GLenum target, GLenum pname, GLint* params); - void TexParameteri(GLenum target, GLenum pname, GLint param); - void TexImage2D(GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLint border, - GLenum format, - GLenum type, - const GLvoid* pixels); - void TexSubImage2D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - const GLvoid* pixels); - void CopyTexSubImage2D(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint x, - GLint y, - GLsizei width, - GLsizei height); - - void GenFramebuffers(GLsizei n, GLuint* framebuffers); - void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers); - void BindFramebuffer(GLenum target, GLuint framebuffer); - void FramebufferTexture2D(GLenum target, - GLenum attachment, - GLenum textarget, - GLuint texture, - GLint level); - GLenum CheckFramebufferStatus(GLenum target); - void FramebufferRenderbuffer(GLenum target, - GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer); - - void GenRenderbuffers(GLsizei n, GLuint* renderbuffers); - void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers); - void BindRenderbuffer(GLenum target, GLuint renderbuffer); - void RenderbufferStorage(GLenum target, - GLenum internalformat, - GLsizei width, - GLsizei height); - - void StencilMask(GLuint mask); - void ClearStencil(GLint s); - - void Viewport(GLint x, GLint y, GLsizei width, GLsizei height); - void Scissor(GLint x, GLint y, GLsizei width, GLsizei height); - - void VertexAttribPointer(GLuint indx, - GLint size, - GLenum type, - GLboolean normalized, - GLsizei stride, - const GLvoid* ptr); - void EnableVertexAttribArray(GLuint index); - void DisableVertexAttribArray(GLuint index); - void VertexAttribfv(GLuint indx, int elem_size, const GLfloat* values); - - GLint GetUniformLocation(GLuint program, const GLchar* name); - void Uniformiv(GLint location, - GLsizei count, - GLsizei elem_size, - const GLint* v); - void Uniformfv(GLint location, - GLsizei count, - GLsizei elem_size, - const GLfloat* v); - void UniformMatrixfv(GLint location, - GLsizei count, - GLboolean transpose, - GLsizei dim_size, - const GLfloat* value); - - void DrawArrays(GLenum mode, GLint first, GLsizei count); - void DrawElements(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid* indices); - - void ReadPixels(GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLvoid* pixels); - - void Flush(); - void Finish(); - void SwapBuffers(); - - // Called when eglBindTexImage() is called. - bool BindTextureToEGLSurface(egl::Surface* surface); - // Called when eglReleaseTexImage() is called. - bool ReleaseTextureFromEGLSurface(egl::Surface* surface); - - // Utility functions for use by other modules. - nb::scoped_refptr GetTexture(uint32_t id) { - return resource_manager_->GetTexture(id); - } - - DrawStateDirtyFlags* GetDrawStateDirtyFlags() { - return &draw_state_dirty_flags_; - } - - static bool has_swapped_buffers() { - return SbAtomicAcquire_Load(&has_swapped_buffers_) != 0; - } - - private: - void MakeCurrent(egl::Surface* draw, egl::Surface* read); - void ReleaseContext(); - void SetError(GLenum error) { error_ = error; } - - // Returns the bound buffer for the specific specified target. - // This returns a pointer because it is used by glBindBuffer() which modifies - // what the returned scoped_refptr points to. - nb::scoped_refptr* GetBoundBufferForTarget(GLenum target); - - // Returns the bound texture for the specific specified target and slot. - // This returns a pointer because it is used by glBindTexture() which modifies - // what the returned scoped_refptr points to. - nb::scoped_refptr* GetBoundTextureForTarget(GLenum target, - GLenum texture); - - void SetupExtensionsString(); - - void UpdateVertexAttribsInDrawState(); - void UpdateSamplersInDrawState(); - - // Packs enabled vertex attributes and samplers into dense lists in the - // |draw_state_| if they have been modified. - void CompressDrawStateForDrawCall(); - - // Marks the used program as being dirty, but this may also imply the marking - // of attributes and uniforms as being dirty as well. - void MarkUsedProgramDirty(); - - // Sets the bound framebuffer to the default framebuffer (e.g. when - // glBindFramebuffer(GL_FRAMEBUFFER, 0) is called). - void SetBoundDrawFramebufferToDefault(); - void SetBoundReadFramebufferToDefault(); - bool IsDefaultDrawFramebufferBound() const; - bool IsDefaultReadFramebufferBound() const; - - // Takes settings like GL_UNPACK_ROW_LENGTH and GL_UNPACK_ALIGNMENT into - // account to determine the pitch of incoming pixel data. - int GetPitchForTextureData(int width, PixelFormat pixel_format) const; - - // A reference to the platform-specific implementation aspects of the context. - std::unique_ptr impl_; - - // The unique id of context instance. It might be queried from different - // threads. - std::atomic_int context_id_; - - // The thread that currently holds this context as its current context. - SbThread current_thread_; - - // Has this context ever been made current before? - bool has_been_current_; - - // The value to be returned when GetString(GL_EXTENSIONS) is called. - std::string extensions_string_; - - // The resource manager containing all referenced resources. - nb::scoped_refptr resource_manager_; - - // Sets the active texture, which can be thought of more intuitively as - // the active "sampler". Set using glActiveTexture(). - GLenum active_texture_; - - // The set of sampler units, of which |active_texture_| indexes. - std::unique_ptr[]> texture_units_; - bool enabled_textures_dirty_; - - // A mapping from an integer index (specified by the index parameter of - // glBindAttribLocation(), glVertexAttribPointer(), and others) to vertex - // attribute information structure. - std::map vertex_attrib_map_; - - // This map is populated by calls to glVertexAttribXfv() and contains - // attribute values that, when used, should apply to ALL vertices in a draw - // call. These attribute values will be used instead of those set by - // glVertexAttribPointer() whenever the corresponding vertex attribute id - // (the key of this map) attribute array is disabled through a call to - // glDisableVertexAttribArray(). - std::map const_vertex_attrib_map_; - - // Keeps track of which vertex attributes are enabled. This set is modified - // through calls to glEnableVertexAttribArray() and - // glDisableVertexAttribArray(). - std::set enabled_vertex_attribs_; - bool enabled_vertex_attribs_dirty_; - - // The default draw and read framebuffer are those whose surfaces are set by - // calls to eglMakeCurrent(). The default draw framebuffer is the initial - // framebuffer target for draw commands, and can be selected by calling - // glBindFramebuffer(0). - nb::scoped_refptr default_draw_framebuffer_; - nb::scoped_refptr default_read_framebuffer_; - - // The currently bound read framebuffer. If this is set to the default read - // framebuffer, then it will be equal to |default_read_framebuffer_|. - nb::scoped_refptr read_framebuffer_; - - // Tracks all GL draw state. It is updated by making various GL calls, - // and it is read when a draw (or clear) call is made. It is modified - // by this Context object and read from the ContextImpl object. - DrawState draw_state_; - - // Tracks which members of |draw_state_| have been modified since the last - // draw (or clear) command issued to the ContextImpl object. This - // allows implementations to determine whether it is necessary to re-setup - // certain context information. It is expected that implementations will - // set these dirty flags to false after they have processed the corresponding - // draw state. - DrawStateDirtyFlags draw_state_dirty_flags_; - - // The pack/unpack alignments are used when transferring pixel data to/from - // client CPU memory, respectively. For example, calls to glTexImage2D() - // will refer to the unpack alignment to determine the expected alignment - // of each row of pixel data. These values are set through glPixelStorei(). - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml - int pack_alignment_; - int unpack_alignment_; - - // Allows the pitch of texture data to be explicitly specified. This value - // can be modified by calling glPixelStorei(GL_UNPACK_ALIGNMENT, x). - // https://www.khronos.org/opengles/sdk/docs/man3/html/glPixelStorei.xhtml - int unpack_row_length_; - - // Tracks the currently bound pixel unpack buffer object, or NULL if none - // are bound. - nb::scoped_refptr bound_pixel_unpack_buffer_; - - // Keeps track of the set of EGLSurfaces that are bound to textures - // currently. - std::map > bound_egl_surfaces_; - - // The currently bound renderbuffer, specified through a call to - // glBindRenderbuffer(). - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBindRenderbuffer.xml - nb::scoped_refptr bound_renderbuffer_; - - // The last GL ES error raised. - GLenum error_; - - // Track if SwapBuffers() has been called. Stores 0 if SwapBuffers() has not - // been called, and 1 if SwapBuffers() has been called. - static SbAtomic32 has_swapped_buffers_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_CONTEXT_H_ diff --git a/glimp/gles/context_impl.h b/glimp/gles/context_impl.h deleted file mode 100644 index 4c9792a603d5..000000000000 --- a/glimp/gles/context_impl.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_CONTEXT_IMPL_H_ -#define GLIMP_GLES_CONTEXT_IMPL_H_ - -#include -#include -#include - -#include -#include "glimp/egl/surface.h" -#include "glimp/gles/buffer.h" -#include "glimp/gles/buffer_impl.h" -#include "glimp/gles/draw_mode.h" -#include "glimp/gles/draw_state.h" -#include "glimp/gles/index_data_type.h" -#include "glimp/gles/program.h" -#include "glimp/gles/program_impl.h" -#include "glimp/gles/sampler.h" -#include "glimp/gles/shader_impl.h" -#include "glimp/gles/texture_impl.h" -#include "glimp/gles/vertex_attribute.h" - -namespace glimp { -namespace gles { - -// The ContextImpl class is the interface to the platform-specific backend -// implementation of GL ES Context calls. Many GL ES methods will ultimately -// end up calling a method on this class. This class is also responsible for -// acting as a factory for the generation of resource Impl objects as well, -// such as textures or shaders. -class ContextImpl { - public: - // Type returned from GetExtensions() in response to - // glGetString(GL_EXTENSIONS). - typedef std::vector ExtensionList; - - virtual ~ContextImpl() {} - - // Called via glGetString(GL_EXTENSIONS). - // Note that glimp common code may append its own extensions to the list - // provided by the implementation. - // https://www.khronos.org/opengles/sdk/1.1/docs/man/glGetString.xml - virtual ExtensionList GetExtensions() const = 0; - - // Called via glGetIntegerv(GL_MAX_VERTEX_ATTRIBS). - // Returns the maximum supported number of enabled vertex attributes. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml - virtual int GetMaxVertexAttribs() const = 0; - - // Called via glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS). - // Returns the maximum supported number of textures per fragment shader. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml - virtual int GetMaxFragmentTextureUnits() const = 0; - - // Called via glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS). - // Returns the maximum supported number of textures per vertex shader. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml - virtual int GetMaxVertexTextureImageUnits() const = 0; - - // Called via glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS). - // Returns the maximum supported number of textures that can be used - // to access textures from both vertex and fragment shaders combined. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml - virtual int GetMaxCombinedTextureImageUnits() const = 0; - - // Called via glGetIntegerv(GL_MAX_TEXTURE_SIZE). - // Returns the maximum width and height of a texture, in pixels. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml - virtual int GetMaxTextureSize() const = 0; - - // Called via glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE). - // Returns the maximum width and height of a render buffer, in pixels. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml - virtual int GetMaxRenderbufferSize() const = 0; - - // Called via glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS). - // Returns the maximum number of uniforms that can be bound to a fragment - // shader. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml - virtual int GetMaxFragmentUniformVectors() const = 0; - - // Called via glCreateProgram. Must create and return a platform-specific - // ProgramImpl implementation. If a NULL scoped_ptr is returned, it is - // treated as an error. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCreateProgram.xml - virtual std::unique_ptr CreateProgram() = 0; - - // Called via glCreateShader(GL_VERTEX_SHADER). Must create a - // platform-specific ShaderImpl object representing a vertex shader. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCreateShader.xml - virtual std::unique_ptr CreateVertexShader() = 0; - - // Called via glCreateShader(GL_FRAGMENT_SHADER). Must create a - // platform-specific ShaderImpl object representing a fragment shader. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCreateShader.xml - virtual std::unique_ptr CreateFragmentShader() = 0; - - // Called via glGenBuffers(). Must create a platform-specific BufferImpl - // object representing a buffer. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGenBuffers.xml - virtual std::unique_ptr CreateBuffer() = 0; - - // Called via glGenBuffersForVideoFrame(). Must create a platform-specific - // BufferImpl object representing a buffer for compressed textures. - virtual std::unique_ptr CreateBufferForVideoFrame() = 0; - - // Called via glGenTextures(). Must create a platform-specific TextureImpl - // object representing a texture. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGenTextures.xml - virtual std::unique_ptr CreateTexture() = 0; - - // Called when glFlush() is called. After this method is called, client - // code may assume that all previously issued graphics commands will - // eventually be executed by the GPU. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glFlush.xml - virtual void Flush() = 0; - - // Called when glFinish() is called. After this method is called, client - // code can assume that all previously issued GL commands have been submitted - // and also have finished being processed by the GPU. - // https://www.khronos.org/opengles/sdk/docs/man3/html/glFinish.xhtml - virtual void Finish() = 0; - - // Called when glClear() is called. Clears all of the three buffers that have - // their |clear_*| parameters set. - // |draw_state| represents the current GL ES draw state at the time of this - // call. - // |dirty_flags| represents which members of the |draw_state| have been - // modified since the last draw (or clear) call. This can - // be leveraged to avoid reconfiguring unchanged state. - // It is expected that implementations will manually set - // these flags to false after they have processed the - // corresponding draw state member. - // https://www.opengl.org/sdk/docs/man2/xhtml/glClear.xml - virtual void Clear(bool clear_color, - bool clear_depth, - bool clear_stencil, - const DrawState& draw_state, - DrawStateDirtyFlags* dirty_flags) = 0; - - // Called when glDrawArrays() is called. This method must generate GPU - // commands to render the passed in |draw_state.array_buffer| whose structure - // is defined by |draw_state.attributes|. The vertex program - // |draw_state.used_program| should be used to render the vertices, and - // |draw_state.samplers| defines the set of textures to be bound for - // the draw call. - // |draw_state| represents the current GL ES draw state at the time of this - // call. - // |dirty_flags| represents which members of the |draw_state| have been - // modified since the last draw (or clear) call. This can - // be leveraged to avoid reconfiguring unchanged state. - // It is expected that implementations will manually set - // these flags to false after they have processed the - // corresponding draw state member. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawArrays.xml - virtual void DrawArrays(DrawMode mode, - int first_vertex, - int num_vertices, - const DrawState& draw_state, - DrawStateDirtyFlags* dirty_flags) = 0; - - // Called when glDrawElements() is called. This method must generate GPU - // commands to render the passed in |draw_state.array_buffer| whose structure - // is defined by |draw_state.attributes|. The particular vertices rendered - // are chosen by the indices defined within |draw_state.element_array_buffer| - // + |intptr_t index_offset_in_bytes|. The vertex program - // |draw_state.used_program| should be used to render the vertices, and - // |draw_state.samplers| defines the set of textures to be bound for the draw - // call. - // |draw_state| represents the current GL ES draw state at the time of this - // call. - // |dirty_flags| represents which members of the |draw_state| have been - // modified since the last draw (or clear) call. This can - // be leveraged to avoid reconfiguring unchanged state. - // It is expected that implementations will manually set - // these flags to false after they have processed the - // corresponding draw state member. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawElements.xml - virtual void DrawElements(DrawMode mode, - int num_vertices, - IndexDataType index_data_type, - intptr_t index_offset_in_bytes, - const DrawState& draw_state, - DrawStateDirtyFlags* dirty_flags) = 0; - - // Called when eglSwapBuffers() is called. This method is responsible for - // submitting a command to the GPU to indicate that we are done rendering this - // frame and that the current draw surface should be swapped to the display. - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglSwapBuffers.xhtml - virtual void SwapBuffers(egl::Surface* surface) = 0; - - private: -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_CONTEXT_IMPL_H_ diff --git a/glimp/gles/convert_pixel_data.cc b/glimp/gles/convert_pixel_data.cc deleted file mode 100644 index ca59f8f56f6a..000000000000 --- a/glimp/gles/convert_pixel_data.cc +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/convert_pixel_data.h" - -#include "starboard/common/log.h" -#include "starboard/memory.h" - -namespace glimp { -namespace gles { - -namespace { - -// Helper method to properly copy pixel data from a source to destination -// pixel data, taking into account source and destination pitch. -void CopyPixelData(uint8_t* destination, - int destination_pitch, - const uint8_t* source, - int source_pitch, - int bytes_per_row, - int num_rows) { - if (destination_pitch == source_pitch) { - // If the pitches are equal, we can do the entire copy in one memcpy(). - memcpy(destination, source, destination_pitch * num_rows); - } else { - // If the pitches are not equal, we must memcpy each row separately. - for (int i = 0; i < num_rows; ++i) { - memcpy(destination + i * destination_pitch, source + i * source_pitch, - bytes_per_row); - } - } -} - -typedef void (*ConvertRowFunction)(int, uint8_t*, const uint8_t*, int); - -// Remaps input pixel channels such that 4-byte destination color values will -// have byte X set from source color value's channel_X_source byte. If -// any value for channel_X_source is set to -1, a 0 is instead set for that -// destination channel. -template -void RemapPixelChannels(int source_bytes_per_pixel, - uint8_t* destination, - const uint8_t* source, - int num_pixels) { - for (int i = 0; i < num_pixels; ++i) { - uint8_t channel_0 = channel_0_source == -1 ? 0 : source[channel_0_source]; - uint8_t channel_1 = channel_1_source == -1 ? 0 : source[channel_1_source]; - uint8_t channel_2 = channel_2_source == -1 ? 0 : source[channel_2_source]; - uint8_t channel_3 = channel_3_source == -1 ? 0 : source[channel_3_source]; - destination[0] = channel_0; - destination[1] = channel_1; - destination[2] = channel_2; - destination[3] = channel_3; - - destination += 4; - source += source_bytes_per_pixel; - } -} - -// Given a destination and source format, returns a function that will convert -// a row of pixels in a source buffer to a row of pixels in a destination -// buffer that contains a different format. This function may not implement -// every conversion, it is expected that conversion implementations will be -// added as they are needed. -ConvertRowFunction SelectConvertRowFunction(PixelFormat destination_format, - PixelFormat source_format) { - if (destination_format == source_format) { - return &RemapPixelChannels<0, 1, 2, 3>; - } else if (destination_format == kPixelFormatRGBA8 && - source_format == kPixelFormatARGB8) { - return &RemapPixelChannels<1, 2, 3, 0>; - } else if (destination_format == kPixelFormatRGBA8 && - source_format == kPixelFormatBGRA8) { - return &RemapPixelChannels<2, 1, 0, 3>; - } - - // Only what is currently needed by dependent libraries is supported, so - // feel free to add support for more pixel formats here as the need arises. - - return NULL; -} - -} // namespace - -void ConvertPixelDataInplace(uint8_t* pixels, - int pitch_in_bytes, - PixelFormat destination_format, - PixelFormat source_format, - int width, - int height) { - if (destination_format == source_format) { - return; - } - SB_DCHECK(BytesPerPixel(destination_format) == BytesPerPixel(source_format)); - // The destination format is different from the source format, so we must - // perform a conversion between pixels. - - // First select the function that will reformat the pixels, based on - // the destination and source pixel formats. - ConvertRowFunction convert_row_function = - SelectConvertRowFunction(destination_format, source_format); - SB_DCHECK(convert_row_function) - << "The requested pixel conversion is not yet implemented."; - - // Now, iterate through each row running the selected conversion function on - // each one. - uint8_t* pixel_row = pixels; - for (int row = 0; row < height; ++row) { - convert_row_function(BytesPerPixel(source_format), pixel_row, pixel_row, - width); - pixel_row += pitch_in_bytes; - } -} - -void ConvertPixelData(uint8_t* destination, - int destination_pitch_in_bytes, - PixelFormat destination_format, - const uint8_t* source, - int source_pitch_in_bytes, - PixelFormat source_format, - int width, - int height, - bool flip_y) { - if (destination_format == source_format && !flip_y) { - CopyPixelData(destination, destination_pitch_in_bytes, source, - source_pitch_in_bytes, BytesPerPixel(source_format) * width, - height); - } else { - // The destination format is different from the source format, so we must - // perform a conversion between pixels. - - // First select the function that will reformat the pixels, based on - // the destination and source pixel formats. - ConvertRowFunction convert_row_function = - SelectConvertRowFunction(destination_format, source_format); - SB_DCHECK(convert_row_function) - << "The requested pixel conversion is not yet implemented."; - - // Now, iterate through each row running the selected conversion function on - // each one. - for (int dest_row = 0; dest_row < height; ++dest_row) { - int source_row = flip_y ? height - dest_row - 1 : dest_row; - convert_row_function(BytesPerPixel(source_format), - destination + dest_row * destination_pitch_in_bytes, - source + source_row * source_pitch_in_bytes, width); - } - } -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/convert_pixel_data.h b/glimp/gles/convert_pixel_data.h deleted file mode 100644 index c11721b28fe3..000000000000 --- a/glimp/gles/convert_pixel_data.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_CONVERT_PIXEL_DATA_H_ -#define GLIMP_GLES_CONVERT_PIXEL_DATA_H_ - -#include "glimp/gles/pixel_format.h" - -namespace glimp { -namespace gles { - -enum PixelDataEndian { - kPixelDataLittleEndian, - kPixelDataBigEndian, -}; - -// Converts pixel data in pixel buffer from the source format into the -// destination format, swizzeling the pixel color components if necessary. -void ConvertPixelDataInplace(uint8_t* pixels, - int pitch_in_bytes, - PixelFormat destination_format, - PixelFormat source_format, - int width, - int height); - -// Copies pixel data from the source buffer and format into the destination -// buffer and format, swizzeling the pixel color components if necessary. -void ConvertPixelData(uint8_t* destination, - int destination_pitch_in_bytes, - PixelFormat destination_format, - const uint8_t* source, - int source_pitch_in_bytes, - PixelFormat source_format, - int width, - int height, - bool flip_y); - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_CONVERT_PIXEL_DATA_H_ diff --git a/glimp/gles/cull_face_state.h b/glimp/gles/cull_face_state.h deleted file mode 100644 index b68d6b0015e5..000000000000 --- a/glimp/gles/cull_face_state.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_CULL_FACE_STATE_H_ -#define GLIMP_GLES_CULL_FACE_STATE_H_ - -namespace glimp { -namespace gles { - -// Describes GL cull face state, which can be modified via commands like -// glCullFace(). -// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCullFace.xml -struct CullFaceState { - // When enabled, the initial face culling value should be kBack. - enum Mode { - kFront, - kBack, - kFrontAndBack, - kModeInvalid, - }; - - // Default state is face culling off. - CullFaceState() : enabled(false), mode(kBack) {} - - Mode mode; - bool enabled; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_CULL_FACE_STATE_H_ diff --git a/glimp/gles/draw_mode.h b/glimp/gles/draw_mode.h deleted file mode 100644 index 365f173ecba2..000000000000 --- a/glimp/gles/draw_mode.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_DRAW_MODE_H_ -#define GLIMP_GLES_DRAW_MODE_H_ - -namespace glimp { -namespace gles { - -// Defines the legal values for the draw mode parameter passed into -// glDrawArrays() and glDrawElements(). -enum DrawMode { - kDrawModePoints, - kDrawModeLines, - kDrawModeLineLoop, - kDrawModeLineStrip, - kDrawModeTriangles, - kDrawModeTriangleStrip, - kDrawModeTriangleFan, - kDrawModeInvalid, -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_DRAW_MODE_H_ diff --git a/glimp/gles/draw_state.cc b/glimp/gles/draw_state.cc deleted file mode 100644 index b1fa91d079e6..000000000000 --- a/glimp/gles/draw_state.cc +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/draw_state.h" - -namespace glimp { -namespace gles { - -DirtyUniforms::DirtyUniforms() : all_dirty_(true) {} - -bool DirtyUniforms::IsDirty(int location) const { - return all_dirty_ || std::find(uniforms_dirty_.begin(), uniforms_dirty_.end(), - location) != uniforms_dirty_.end(); -} - -bool DirtyUniforms::AnyDirty() const { - return all_dirty_ || !uniforms_dirty_.empty(); -} - -void DirtyUniforms::ClearAll() { - all_dirty_ = false; - uniforms_dirty_.clear(); -} - -void DirtyUniforms::MarkAll() { - all_dirty_ = true; -} - -void DirtyUniforms::Mark(int location) { - if (!IsDirty(location)) { - uniforms_dirty_.push_back(location); - } -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/draw_state.h b/glimp/gles/draw_state.h deleted file mode 100644 index 2af6c7176b2e..000000000000 --- a/glimp/gles/draw_state.h +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_DRAW_STATE_H_ -#define GLIMP_GLES_DRAW_STATE_H_ - -#include -#include -#include - -#include "glimp/egl/surface.h" -#include "glimp/gles/blend_state.h" -#include "glimp/gles/buffer.h" -#include "glimp/gles/cull_face_state.h" -#include "glimp/gles/framebuffer.h" -#include "glimp/gles/program.h" -#include "glimp/gles/sampler.h" -#include "glimp/gles/vertex_attribute.h" -#include "glimp/rect.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -// Types passed in as parameters to draw calls (like DrawArrays()) to -// describe the set of only enabled vertex attributes. -typedef std::vector > - EnabledVertexAttributeList; - -// If a vertex attribute constant is specified (e.g. through a call to -// glVertexAttribXfv()) for a location, and the vertex attribute array is -// disabled at that location, then this constant value will be included into -// the draw state. -typedef std::vector > - ConstantVertexAttributeList; - -// Similar to EnabledVertexAttributeList, but lists only texture units with -// textures bound to them. -typedef std::vector > EnabledTextureList; - -struct ViewportState { - ViewportState() : rect(-1, -1, -1, -1) {} - - nb::Rect rect; -}; - -struct ScissorState { - ScissorState() : rect(-1, -1, -1, -1), enabled(false) {} - - nb::Rect rect; - - bool enabled; -}; - -struct ClearColor { - // Setup initial values as defined in the specification. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glClearColor.xml - ClearColor() : red(0.0f), green(0.0f), blue(0.0f), alpha(0.0f) {} - ClearColor(float red, float green, float blue, float alpha) - : red(std::min(1.0f, std::max(0.0f, red))), - green(std::min(1.0f, std::max(0.0f, green))), - blue(std::min(1.0f, std::max(0.0f, blue))), - alpha(std::min(1.0f, std::max(0.0f, alpha))) {} - - // Clear color properties setup by calls to glClearColor(). - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glClearColor.xml - float red; - float green; - float blue; - float alpha; -}; - -// Represents the state set by glColorMask(). -// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glColorMask.xml -struct ColorMask { - // Setup initial values as defined in the specification. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glColorMask.xml - ColorMask() : red(true), green(true), blue(true), alpha(true) {} - ColorMask(bool red, bool green, bool blue, bool alpha) - : red(red), green(green), blue(blue), alpha(alpha) {} - - bool red; - bool green; - bool blue; - bool alpha; -}; - -// This class is used to keep track of which uniform locations are dirty, or -// whether all of them are. -class DirtyUniforms { - public: - DirtyUniforms(); - - // Returns true if the uniform at |location| is dirty. - bool IsDirty(int location) const; - - // Returns true if any uniform is dirty. - bool AnyDirty() const; - - // Clears the dirty flag from all uniforms. - void ClearAll(); - - // Marks all uniforms as being dirty. - void MarkAll(); - - // Marks the uniform at |location| as being dirty. - void Mark(int location); - - private: - std::vector uniforms_dirty_; - bool all_dirty_; -}; - -// The DrawState structure aggregates all GL state relevant to draw (or clear) -// commands. It will be modified as GL ES commands are issued, but it will -// only be propagated to the platform-specific implementations when draw (or -// clear) calls are made. A dirty flag is kept -struct DrawState { - // The color the next color buffer clear will clear to. - ClearColor clear_color; - - // Identifies which channels a draw (or clear) call is permitted to modify. - ColorMask color_mask; - - // The current surface that draw (or clear) commands will target. - egl::Surface* draw_surface; - - // The list of all active samplers that are available to the next draw call. - EnabledTextureList textures; - - // The list of vertex attribute binding information for the next draw call. - EnabledVertexAttributeList vertex_attributes; - ConstantVertexAttributeList constant_vertex_attributes; - - // The scissor rectangle. Draw calls should not modify pixels outside of - // this. - ScissorState scissor; - - // The viewport defines how normalized device coordinates should be - // transformed to screen pixel coordinates. - ViewportState viewport; - - // Defines how pixels produced by a draw call should be blended with the - // existing pixels in the output framebuffer. - BlendState blend_state; - - // Defines whether face culling is enabled, and upon which face if so. - CullFaceState cull_face_state; - - // The currently bound array buffer, set by calling - // glBindBuffer(GL_ARRAY_BUFFER). - nb::scoped_refptr array_buffer; - - // The currently bound element array buffer, set by calling - // glBindBuffer(GL_ELEMENT_ARRAY_BUFFER). - nb::scoped_refptr element_array_buffer; - - // The currently in-use Program object, set by a call to glUseProgram(). - nb::scoped_refptr used_program; - - // The currently bound framebuffer. This is never NULL, even if the - // default framebuffer is bound, in which case - // framebuffer->color_attachment_surface() will be non-NULL and point to - // the draw surface specified through eglMakeCurrent(). - nb::scoped_refptr framebuffer; -}; - -// The dirty flags structure tracks which draw state members have been modified -// since the last draw call was made. This can be leveraged by implementations -// to avoid re-configurating draw state that has not changed. Implementations -// should manually set these flags to false after they have been processed. -struct DrawStateDirtyFlags { - DrawStateDirtyFlags() { MarkAll(); } - - void MarkAll() { - clear_color_dirty = true; - color_mask_dirty = true; - draw_surface_dirty = true; - textures_dirty = true; - vertex_attributes_dirty = true; - scissor_dirty = true; - viewport_dirty = true; - blend_state_dirty = true; - cull_face_dirty = true; - array_buffer_dirty = true; - element_array_buffer_dirty = true; - used_program_dirty = true; - framebuffer_dirty = true; - uniforms_dirty.MarkAll(); - } - - void MarkUsedProgram() { - used_program_dirty = true; - // Switching programs marks all uniforms, samplers and vertex attributes - // as being dirty as well, since they are all properties of the program. - vertex_attributes_dirty = true; - textures_dirty = true; - uniforms_dirty.MarkAll(); - } - - bool clear_color_dirty; - bool color_mask_dirty; - bool draw_surface_dirty; - bool textures_dirty; - bool vertex_attributes_dirty; - bool scissor_dirty; - bool viewport_dirty; - bool blend_state_dirty; - bool cull_face_dirty; - bool array_buffer_dirty; - bool element_array_buffer_dirty; - bool used_program_dirty; - bool framebuffer_dirty; - - // A list of uniform locations (within DrawState::used_program->uniforms()) - // whose values are dirty. - DirtyUniforms uniforms_dirty; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_DRAW_STATE_H_ diff --git a/glimp/gles/framebuffer.cc b/glimp/gles/framebuffer.cc deleted file mode 100644 index d3bf696b20b8..000000000000 --- a/glimp/gles/framebuffer.cc +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/framebuffer.h" -#include "starboard/common/log.h" - -namespace glimp { -namespace gles { - -Framebuffer::Framebuffer() : color_attachment_surface_(NULL) {} - -Framebuffer::Framebuffer(egl::Surface* surface) - : color_attachment_surface_(surface) { - SB_DCHECK(surface != NULL); -} - -int Framebuffer::GetWidth() const { - if (color_attachment_surface_) { - return color_attachment_surface_->GetWidth(); - } else { - SB_DCHECK(color_attachment_texture_); - return color_attachment_texture_->width(); - } -} - -int Framebuffer::GetHeight() const { - if (color_attachment_surface_) { - return color_attachment_surface_->GetHeight(); - } else { - SB_DCHECK(color_attachment_texture_); - return color_attachment_texture_->height(); - } -} - -void Framebuffer::AttachTexture2D(const nb::scoped_refptr& texture, - int level) { - SB_DCHECK(!color_attachment_surface_); - - SB_DCHECK(level == 0) << "Only level=0 is supported in glimp."; - - color_attachment_texture_ = texture; -} - -GLenum Framebuffer::CheckFramebufferStatus() const { - // If the default framebuffer is bound, then the framebuffer is guaranteed - // to be complete. - if (color_attachment_surface_) { - return GL_FRAMEBUFFER_COMPLETE; - } - - if (!color_attachment_texture_) { - return GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT; - } - - if (!color_attachment_texture_->CanBeAttachedToFramebuffer()) { - return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT; - } - - if (depth_attachment_) { - if (depth_attachment_->format() != GL_DEPTH_COMPONENT16) { - return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT; - } - - if (GetWidth() != depth_attachment_->width() || - GetHeight() != depth_attachment_->height()) { - return GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS; - } - } - - if (stencil_attachment_) { - if (stencil_attachment_->format() != GL_STENCIL_INDEX8) { - return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT; - } - - if (GetWidth() != stencil_attachment_->width() || - GetHeight() != stencil_attachment_->height()) { - return GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS; - } - } - - return GL_FRAMEBUFFER_COMPLETE; -} - -void Framebuffer::UpdateColorSurface(egl::Surface* surface) { - SB_DCHECK(!color_attachment_texture_); - SB_DCHECK(color_attachment_surface_); - color_attachment_surface_ = surface; -} - -void Framebuffer::SetDepthAttachment( - const nb::scoped_refptr& depth_attachment) { - depth_attachment_ = depth_attachment; -} - -void Framebuffer::SetStencilAttachment( - const nb::scoped_refptr& stencil_attachment) { - stencil_attachment_ = stencil_attachment; -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/framebuffer.h b/glimp/gles/framebuffer.h deleted file mode 100644 index b59301cdd884..000000000000 --- a/glimp/gles/framebuffer.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_FRAMEBUFFER_H_ -#define GLIMP_GLES_FRAMEBUFFER_H_ - -#include "glimp/egl/surface.h" -#include "glimp/gles/renderbuffer.h" -#include "glimp/gles/texture.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -// Framebuffers represent GL framebuffer objects. They are generated via -// calls to glGenFramebuffers(). Framebuffers represent the collection of -// components required for draw calls to direct their output towards. These -// components are called "attachments" and include the color buffer, -// depth buffer and stencil buffer. These different buffers can be attached -// by various GL calls. For example, to attach a color buffer, one should -// call glFramebufferTexture2D() and pass in a GL texture object. -// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGenFramebuffers.xml -class Framebuffer : public nb::RefCountedThreadSafe { - public: - Framebuffer(); - - // This constructor can be used to initialize the default Framebuffer. This - // framebuffer cannot later have separate attachments made to it. - explicit Framebuffer(egl::Surface* surface); - - // Returns the attached color buffer's width and height. - int GetWidth() const; - int GetHeight() const; - - // Called when glFramebufferTexture2D() is called. Will attach the specified - // texture to this framebuffer. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glFramebufferTexture2D.xml - void AttachTexture2D(const nb::scoped_refptr& texture, int level); - - // Called when glCheckFramebufferStatus() is called. This will check that - // that there are not no components attached, and that all attached components - // are consistent with each other and valid. If everything checks out, - // GL_FRAMEBUFFER_COMPLETE is returned. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCheckFramebufferStatus.xml - GLenum CheckFramebufferStatus() const; - - // Called by eglMakeCurrent() on the default framebuffer in order to update - // the egl::Surface* on the color attachment. This can only be called on - // a surface constructed with a egl::Surface* parameter (e.g. the default - // framebuffer). - void UpdateColorSurface(egl::Surface* surface); - - void SetDepthAttachment(const nb::scoped_refptr& depth_buffer); - void SetStencilAttachment( - const nb::scoped_refptr& stencil_buffer); - - const nb::scoped_refptr& color_attachment_texture() const { - return color_attachment_texture_; - } - - egl::Surface* color_attachment_surface() const { - return color_attachment_surface_; - } - - const nb::scoped_refptr& depth_attachment() const { - return depth_attachment_; - } - - const nb::scoped_refptr& stencil_attachment() const { - return stencil_attachment_; - } - - private: - friend class nb::RefCountedThreadSafe; - ~Framebuffer() {} - - // Only one of |color_attachment_texture_| or |color_attachment_surface_| - // can be non-NULL. If |color_attachment_surface_| is non-NULL, then this - // is the default framebuffer. - nb::scoped_refptr color_attachment_texture_; - egl::Surface* color_attachment_surface_; - - nb::scoped_refptr depth_attachment_; - nb::scoped_refptr stencil_attachment_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_FRAMEBUFFER_H_ diff --git a/glimp/gles/index_data_type.h b/glimp/gles/index_data_type.h deleted file mode 100644 index 595cadc58066..000000000000 --- a/glimp/gles/index_data_type.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_INDEX_DATA_TYPE_H_ -#define GLIMP_GLES_INDEX_DATA_TYPE_H_ - -namespace glimp { -namespace gles { - -// Defines the data type of each index element stored in an index buffer. This -// will be passed into calls to DrawElements(). -enum IndexDataType { - kIndexDataTypeUnsignedByte, - kIndexDataTypeUnsignedShort, - kIndexDataTypeInvalid, -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_INDEX_DATA_TYPE_H_ diff --git a/glimp/gles/pixel_format.cc b/glimp/gles/pixel_format.cc deleted file mode 100644 index 48ed1355da00..000000000000 --- a/glimp/gles/pixel_format.cc +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/pixel_format.h" - -namespace glimp { -namespace gles { - -namespace { - -// Must match the ordering of the PixelFormat enum defined in pixel_format.h. -const int kBytesPerPixel[] = { - 4, // kPixelFormatRGBA8 - 4, // kPixelFormatARGB8 - 4, // kPixelFormatBGRA8 - 2, // kPixelFormatRGB565 - 2, // kPixelFormatBA8 - 1, // kPixelFormatA8 - 2, // kPixelFormatA16 -}; - -} // namespace - -int BytesPerPixel(PixelFormat format) { - SB_COMPILE_ASSERT(SB_ARRAY_SIZE(kBytesPerPixel) == kPixelFormatNumFormats, - kBytesPerPixel_has_entries_for_each_enum_PixelFormat); - if (kPixelFormatInvalid == format) { - return 0; // Invalid formats have 0 bytes per pixel. - } - - if (format < 0 || format >= kPixelFormatNumFormats) { - SB_DCHECK(false) << "Invalid PixelFormat: " << format; - return 0; - } - return kBytesPerPixel[format]; -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/pixel_format.h b/glimp/gles/pixel_format.h deleted file mode 100644 index 0a781486fd9d..000000000000 --- a/glimp/gles/pixel_format.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_PIXEL_FORMAT_H_ -#define GLIMP_GLES_PIXEL_FORMAT_H_ - -#include -#include "glimp/gles/buffer_impl.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -// An internal structure which maintains information on a limited number of -// glimp-supported pixel formats for both textures and render targets. -enum PixelFormat { - kPixelFormatRGBA8, - kPixelFormatARGB8, - kPixelFormatBGRA8, - kPixelFormatRGB565, - kPixelFormatBA8, - kPixelFormatA8, - kPixelFormatA16, - kPixelFormatInvalid, - kPixelFormatNumFormats = kPixelFormatInvalid -}; - -// Returns the number of bytes per pixel for a given PixelFormat. -int BytesPerPixel(PixelFormat format); - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_PIXEL_FORMAT_H_ diff --git a/glimp/gles/program.cc b/glimp/gles/program.cc deleted file mode 100644 index d58ba385ea4a..000000000000 --- a/glimp/gles/program.cc +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/program.h" - -#include - -#include "starboard/common/string.h" -#include "starboard/memory.h" - -namespace glimp { -namespace gles { - -Program::Program(std::unique_ptr impl) - : impl_(std::move(impl)), link_results_(false) {} - -bool Program::AttachShader(const nb::scoped_refptr& shader) { - if (shader->type() == GL_VERTEX_SHADER) { - if (vertex_shader_) { - return false; - } - vertex_shader_ = shader; - } else if (shader->type() == GL_FRAGMENT_SHADER) { - if (fragment_shader_) { - return false; - } - fragment_shader_ = shader; - } else { - SB_DLOG(FATAL) << "Invalid shader type."; - } - - return true; -} - -void Program::Link() { - if (!vertex_shader_ || !fragment_shader_) { - // We cannot successfully link if both a vertex and fragment shader - // have not yet been attached. - link_results_ = ProgramImpl::LinkResults( - false, "A fragment or vertex shader is not attached."); - return; - } - - link_results_ = impl_->Link(vertex_shader_, fragment_shader_); - if (link_results_.success) { - linked_vertex_shader_ = vertex_shader_; - linked_fragment_shader_ = fragment_shader_; - - ClearUniforms(); - - // Re-issue any binding attributes that are defined for this program. - for (BoundAttributes::const_iterator iter = bound_attrib_locations_.begin(); - iter != bound_attrib_locations_.end(); ++iter) { - impl_->BindAttribLocation(iter->first, iter->second.c_str()); - } - } -} - -void Program::BindAttribLocation(GLuint index, const GLchar* name) { - bound_attrib_locations_[index] = std::string(name); - - if (linked()) { - // If we are linked, then immediately pass this new binding information - // on to the platform-specific implementation. Otherwise, this information - // will all be communicated upon linking. - impl_->BindAttribLocation(index, name); - } -} - -GLenum Program::GetProgramiv(GLenum pname, GLint* params) { - switch (pname) { - case GL_LINK_STATUS: - *params = (link_results_.success ? 1 : 0); - break; - case GL_INFO_LOG_LENGTH: - *params = link_results_.info_log.size(); - break; - case GL_DELETE_STATUS: - case GL_VALIDATE_STATUS: - case GL_ATTACHED_SHADERS: - case GL_ACTIVE_ATTRIBUTES: - case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: - case GL_ACTIVE_UNIFORMS: - case GL_ACTIVE_UNIFORM_MAX_LENGTH: - SB_NOTIMPLEMENTED(); - break; - default: - return GL_INVALID_ENUM; - } - - return GL_NO_ERROR; -} - -void Program::GetProgramInfoLog(GLsizei bufsize, - GLsizei* length, - GLchar* infolog) { - *length = - starboard::strlcpy(infolog, link_results_.info_log.c_str(), bufsize); -} - -GLint Program::GetUniformLocation(const GLchar* name) { - SB_DCHECK(linked()); - int location = impl_->GetUniformLocation(name); - if (location != -1) { - if (std::find(active_uniform_locations_.begin(), - active_uniform_locations_.end(), - location) == active_uniform_locations_.end()) { - active_uniform_locations_.push_back(location); - } - } - return location; -} - -GLenum Program::Uniformiv(GLint location, - GLsizei count, - GLsizei elem_size, - const GLint* v) { - return UpdateUniform(location, count, elem_size, v, - UniformInfo::kTypeInteger); -} - -GLenum Program::Uniformfv(GLint location, - GLsizei count, - GLsizei elem_size, - const GLfloat* v) { - return UpdateUniform(location, count, elem_size, v, UniformInfo::kTypeFloat); -} - -GLenum Program::UniformMatrixfv(GLint location, - GLsizei count, - GLsizei dim_size, - const GLfloat* value) { - return UpdateUniform(location, count, dim_size, value, - UniformInfo::kTypeMatrix); -} - -Program::Uniform* Program::FindOrMakeUniform(int location) { - if (std::find(active_uniform_locations_.begin(), - active_uniform_locations_.end(), - location) == active_uniform_locations_.end()) { - return NULL; - } - - for (size_t i = 0; i < uniforms_.size(); ++i) { - if (uniforms_[i].location == location) { - return &uniforms_[i]; - } - } - uniforms_.push_back(Uniform()); - uniforms_.back().location = location; - return &uniforms_.back(); -} - -// Clear all stored uniform information and values. -void Program::ClearUniforms() { - for (size_t i = 0; i < uniforms_.size(); ++i) { - free(uniforms_[i].data); - } - uniforms_.clear(); - active_uniform_locations_.clear(); -} - -namespace { -int DataSizeForType(GLsizei count, GLsizei elem_size, UniformInfo::Type type) { - switch (type) { - case UniformInfo::kTypeInteger: - return sizeof(int) * count * elem_size; - case UniformInfo::kTypeFloat: - return sizeof(float) * count * elem_size; - case UniformInfo::kTypeMatrix: - return sizeof(float) * count * elem_size * elem_size; - default: - SB_NOTREACHED(); - return NULL; - } -} -} // namespace - -// Assign the specified data to the specified uniform, so that it is available -// to the next draw call. -GLenum Program::UpdateUniform(GLint location, - GLsizei count, - GLsizei elem_size, - const void* v, - UniformInfo::Type type) { - // TODO: It would be nice to be able to query the ProgramImpl object for - // UniformInfo information so that we can check it against incoming - // glUniform() calls to ensure consistency. As it is currently, we are - // defining this information through these glUniform() calls. - Uniform* uniform = FindOrMakeUniform(location); - if (uniform == NULL) { - return GL_INVALID_OPERATION; - } - - UniformInfo new_info = UniformInfo(type, count, elem_size); - if (new_info != uniform->info) { - // We need to reallocate data if the information has changed. - uniform->info = new_info; - - free(uniform->data); - uniform->data = malloc(DataSizeForType(count, elem_size, type)); - } - memcpy(uniform->data, v, DataSizeForType(count, elem_size, type)); - - return GL_NO_ERROR; -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/program.h b/glimp/gles/program.h deleted file mode 100644 index c643620778d9..000000000000 --- a/glimp/gles/program.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_PROGRAM_H_ -#define GLIMP_GLES_PROGRAM_H_ - -#include - -#include -#include -#include - -#include -#include "glimp/gles/program_impl.h" -#include "glimp/gles/shader.h" -#include "glimp/gles/uniform_info.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -class Program : public nb::RefCountedThreadSafe { - public: - // Represents a Uniform entry in this program, including type information - // about it and the actual data as it was last set via a call to - // UniformXv(). - struct Uniform { - Uniform() : location(-1), data(NULL) {} - - int location; - UniformInfo info; - void* data; - }; - - explicit Program(std::unique_ptr impl); - - // Attaches the specified shader to either this program's vertex or fragment - // shader slot, depending on the shader type. If a shader of the given - // type is already attached, this method does nothing and returns false, - // otherwise the shader is attached and true is returned. - bool AttachShader(const nb::scoped_refptr& shader); - - // Links the vertex and fragment shaders, making the shader usable. - void Link(); - - bool linked() const { return link_results_.success; } - - void BindAttribLocation(GLuint index, const GLchar* name); - - ProgramImpl* impl() const { return impl_.get(); } - - GLenum GetProgramiv(GLenum pname, GLint* params); - void GetProgramInfoLog(GLsizei bufsize, GLsizei* length, GLchar* infolog); - - GLint GetUniformLocation(const GLchar* name); - GLenum Uniformiv(GLint location, - GLsizei count, - GLsizei elem_size, - const GLint* v); - GLenum Uniformfv(GLint location, - GLsizei count, - GLsizei elem_size, - const GLfloat* v); - GLenum UniformMatrixfv(GLint location, - GLsizei count, - GLsizei dim_size, - const GLfloat* value); - - // Returns the current list of all uniforms that have been targeted by - // UniformXv() calls since the last call to Link(). - const std::vector uniforms() const { return uniforms_; } - - private: - typedef std::map BoundAttributes; - friend class nb::RefCountedThreadSafe; - ~Program() {} - - // Returns a U - Uniform* FindOrMakeUniform(int location); - void ClearUniforms(); - GLenum UpdateUniform(GLint location, - GLsizei count, - GLsizei elem_size, - const void* v, - UniformInfo::Type type); - - std::unique_ptr impl_; - - nb::scoped_refptr vertex_shader_; - nb::scoped_refptr fragment_shader_; - - // We explicitly reference the last-linked vertex and fragment shaders to - // ensure that they stay valid as long as they're linked. - nb::scoped_refptr linked_vertex_shader_; - nb::scoped_refptr linked_fragment_shader_; - - // Stores the value that will be returned when glGetProgramiv(GL_LINK_STATUS) - // or glGetProgramiv(GL_INFO_LOG_LENGTH) is called. - ProgramImpl::LinkResults link_results_; - - // Constructed by glBindAttribLocation(), this maps generic vertex attribute - // indices to attribute names, and applies when and after a program is linked. - BoundAttributes bound_attrib_locations_; - - // The list of all uniforms that have been assigned values through - // the UniformXv() methods. - std::vector uniforms_; - - // Keeps track of all uniform locations that have been returned by a call - // to GetUniformLocation() above. These may or may not have had values - // assigned to them since a Link(). - std::vector active_uniform_locations_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_PROGRAM_H_ diff --git a/glimp/gles/program_impl.h b/glimp/gles/program_impl.h deleted file mode 100644 index 2cdad926ec0a..000000000000 --- a/glimp/gles/program_impl.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_PROGRAM_IMPL_H_ -#define GLIMP_GLES_PROGRAM_IMPL_H_ - -#include - -#include "glimp/gles/shader.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -class ProgramImpl { - public: - // Return value from the Link() method. Can be used to communicate an - // error message to the client. - struct LinkResults { - explicit LinkResults(bool success) : success(success) {} - LinkResults(bool success, const std::string& info_log) - : success(success), info_log(info_log) {} - bool success; - std::string info_log; - }; - - virtual ~ProgramImpl() {} - - // Ultimately called by glLinkProgram(), this marks the end of the program's - // setup phase and the beginning of the program's ability to be used. - // This method should return true on success and false on failure, along - // with an information message if desired. - // Upon successful linking, BindAttribLocation() will be called for each - // existing attribute binding, so any exiting bindings should be cleared - // within Link(). - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glLinkProgram.xml - virtual LinkResults Link( - const nb::scoped_refptr& vertex_shader, - const nb::scoped_refptr& fragment_shader) = 0; - - // Binds the attribute with the specified |name| to the specified index. - // Implementations can take this opportunity to resolve |name| to a - // platform-specific attribute identifier so that a by-name lookup does not - // need to occur when a draw command is issued. This function will only - // be called after Link() is called. If a re-link is performed, this command - // is re-issued by Program for all existing bindings. - // Returns true on success and false if the attribute name could not be found. - // This method will be called when glBindAttribLocation() is called. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBindAttribLocation.xml - virtual bool BindAttribLocation(unsigned int index, const char* name) = 0; - - // Returns the location of the specified uniform within the shader. Texture - // samplers are included in this definition of "uniform". This will later - // be used to reference the uniform, and will be eventually set in the - // DrawState that is passed into draw calls. This method should return - // -1 if there is no uniform by the given |name|. - // This method will be called when glGetUniformLocation() is called. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetUniformLocation.xml - virtual int GetUniformLocation(const char* name) = 0; - - private: -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_PROGRAM_IMPL_H_ diff --git a/glimp/gles/ref_counted_resource_map.h b/glimp/gles/ref_counted_resource_map.h deleted file mode 100644 index f08be9d5f6fd..000000000000 --- a/glimp/gles/ref_counted_resource_map.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_REF_COUNTED_RESOURCE_MAP_H_ -#define GLIMP_GLES_REF_COUNTED_RESOURCE_MAP_H_ - -#include -#include - -#include "glimp/gles/unique_id_generator.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -// This class manages a mapping between an integer Id value and a reference -// counted object. It allocates Ids to resources upon registration, maintains -// a reference to the objects while registered, and facilitates retrieving -// objects by Id. -template -class RefCountedResourceMap { - public: - // Registers a resource into the map, and returns the id value that it is - // assigned. - uint32_t RegisterResource(const nb::scoped_refptr& resource) { - uint32_t id = id_generator_.AcquireId(); - resources_.insert(std::make_pair(id, resource)); - return id; - } - - // Returns a reference to the resource specified by id. If the resource - // does not exist in the map, scoped_refptr() is returned. - nb::scoped_refptr GetResource(uint32_t id) { - typename InternalResourceMap::iterator found = resources_.find(id); - return found == resources_.end() ? nb::scoped_refptr() : found->second; - } - - // Removes the resource with the specified id from the map and returns it. - // If the resource is not in the map, scoped_refptr() is returned. - nb::scoped_refptr DeregisterResource(uint32_t id) { - typename InternalResourceMap::iterator found = resources_.find(id); - if (found == resources_.end()) { - return nb::scoped_refptr(); - } - - id_generator_.ReleaseId(found->first); - nb::scoped_refptr resource(found->second); - - resources_.erase(found); - - return resource; - } - - // Returns whether the map contains any entries or not. - bool empty() const { return resources_.empty(); } - - private: - UniqueIdGenerator id_generator_; - typedef std::map > InternalResourceMap; - InternalResourceMap resources_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_REF_COUNTED_RESOURCE_MAP_H_ diff --git a/glimp/gles/renderbuffer.cc b/glimp/gles/renderbuffer.cc deleted file mode 100644 index 603aa64c989c..000000000000 --- a/glimp/gles/renderbuffer.cc +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/renderbuffer.h" - -namespace glimp { -namespace gles { - -Renderbuffer::Renderbuffer() { - format_ = GL_INVALID_ENUM; - width_ = -1; - height_ = -1; -} - -void Renderbuffer::Initialize(GLenum format, GLsizei width, GLsizei height) { - format_ = format; - width_ = width; - height_ = height; -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/renderbuffer.h b/glimp/gles/renderbuffer.h deleted file mode 100644 index aed999bc2178..000000000000 --- a/glimp/gles/renderbuffer.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_RENDERBUFFER_H_ -#define GLIMP_GLES_RENDERBUFFER_H_ - -#include - -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -// Renderbuffers are objects used to represent non-texture surfaces, such -// as depth buffers or stencil buffers. They can also be used as color -// render targets but this is not supported by glimp. Renderbuffers must be -// attached to framebuffer objects via glFramebufferRenderbuffer() in order for -// them to be used. -// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGenRenderbuffers.xml -class Renderbuffer : public nb::RefCountedThreadSafe { - public: - Renderbuffer(); - void Initialize(GLenum format, GLsizei width, GLsizei height); - - GLenum format() const { return format_; } - int width() const { return width_; } - int height() const { return height_; } - - private: - friend class nb::RefCountedThreadSafe; - ~Renderbuffer() {} - - GLenum format_; - int width_; - int height_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_RENDERBUFFER_H_ diff --git a/glimp/gles/resource_manager.cc b/glimp/gles/resource_manager.cc deleted file mode 100644 index 6ab6401d617c..000000000000 --- a/glimp/gles/resource_manager.cc +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/resource_manager.h" - -namespace glimp { -namespace gles { - -ResourceManager::~ResourceManager() { - if (!programs_.empty()) { - SB_DLOG(WARNING) << "Un-deleted gl programs exist upon shutdown."; - } - - if (!shaders_.empty()) { - SB_DLOG(WARNING) << "Un-deleted gl shaders exist upon shutdown."; - } - - if (!buffers_.empty()) { - SB_DLOG(WARNING) << "Un-deleted gl buffers exist upon shutdown."; - } - - if (!textures_.empty()) { - SB_DLOG(WARNING) << "Un-deleted gl textures exist upon shutdown."; - } - - if (!framebuffers_.empty()) { - SB_DLOG(WARNING) << "Un-deleted gl framebuffers exist upon shutdown."; - } - - if (!renderbuffers_.empty()) { - SB_DLOG(WARNING) << "Un-deleted gl renderbuffers exist upon shutdown."; - } -} - -uint32_t ResourceManager::RegisterProgram( - const nb::scoped_refptr& program) { - starboard::ScopedLock lock(mutex_); - return programs_.RegisterResource(program); -} - -nb::scoped_refptr ResourceManager::GetProgram(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return programs_.GetResource(id); -} - -nb::scoped_refptr ResourceManager::DeregisterProgram(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return programs_.DeregisterResource(id); -} - -uint32_t ResourceManager::RegisterShader( - const nb::scoped_refptr& shader) { - starboard::ScopedLock lock(mutex_); - return shaders_.RegisterResource(shader); -} - -nb::scoped_refptr ResourceManager::GetShader(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return shaders_.GetResource(id); -} - -nb::scoped_refptr ResourceManager::DeregisterShader(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return shaders_.DeregisterResource(id); -} - -uint32_t ResourceManager::RegisterBuffer( - const nb::scoped_refptr& buffer) { - starboard::ScopedLock lock(mutex_); - return buffers_.RegisterResource(buffer); -} - -nb::scoped_refptr ResourceManager::GetBuffer(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return buffers_.GetResource(id); -} - -nb::scoped_refptr ResourceManager::DeregisterBuffer(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return buffers_.DeregisterResource(id); -} - -uint32_t ResourceManager::RegisterTexture( - const nb::scoped_refptr& texture) { - starboard::ScopedLock lock(mutex_); - return textures_.RegisterResource(texture); -} - -nb::scoped_refptr ResourceManager::GetTexture(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return textures_.GetResource(id); -} - -nb::scoped_refptr ResourceManager::DeregisterTexture(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return textures_.DeregisterResource(id); -} - -uint32_t ResourceManager::RegisterFramebuffer( - const nb::scoped_refptr& framebuffer) { - starboard::ScopedLock lock(mutex_); - return framebuffers_.RegisterResource(framebuffer); -} - -nb::scoped_refptr ResourceManager::GetFramebuffer(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return framebuffers_.GetResource(id); -} - -nb::scoped_refptr ResourceManager::DeregisterFramebuffer( - uint32_t id) { - starboard::ScopedLock lock(mutex_); - return framebuffers_.DeregisterResource(id); -} - -uint32_t ResourceManager::RegisterRenderbuffer( - const nb::scoped_refptr& renderbuffer) { - starboard::ScopedLock lock(mutex_); - return renderbuffers_.RegisterResource(renderbuffer); -} - -nb::scoped_refptr ResourceManager::GetRenderbuffer(uint32_t id) { - starboard::ScopedLock lock(mutex_); - return renderbuffers_.GetResource(id); -} - -nb::scoped_refptr ResourceManager::DeregisterRenderbuffer( - uint32_t id) { - starboard::ScopedLock lock(mutex_); - return renderbuffers_.DeregisterResource(id); -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/resource_manager.h b/glimp/gles/resource_manager.h deleted file mode 100644 index fa72e4743487..000000000000 --- a/glimp/gles/resource_manager.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_RESOURCE_MANAGER_H_ -#define GLIMP_GLES_RESOURCE_MANAGER_H_ - -#include "glimp/gles/buffer.h" -#include "glimp/gles/framebuffer.h" -#include "glimp/gles/program.h" -#include "glimp/gles/ref_counted_resource_map.h" -#include "glimp/gles/renderbuffer.h" -#include "glimp/gles/shader.h" -#include "glimp/gles/texture.h" -#include "glimp/ref_counted.h" -#include "starboard/common/mutex.h" - -namespace glimp { -namespace gles { - -// The ResourceManager is responsible for managing the set of all GL ES -// resources used by contexts. It manages the assignment of IDs to resources -// like textures, buffers, shaders, programs and so on. When it is specified -// that a context should share resources with another upon construction, it is -// this ResourceManager object that is shared between them, and thus it must -// also be thread-safe. -class ResourceManager : public nb::RefCountedThreadSafe { - public: - ~ResourceManager(); - - uint32_t RegisterProgram(const nb::scoped_refptr& program); - nb::scoped_refptr GetProgram(uint32_t id); - nb::scoped_refptr DeregisterProgram(uint32_t id); - - uint32_t RegisterShader(const nb::scoped_refptr& shader); - nb::scoped_refptr GetShader(uint32_t id); - nb::scoped_refptr DeregisterShader(uint32_t id); - - uint32_t RegisterBuffer(const nb::scoped_refptr& buffer); - nb::scoped_refptr GetBuffer(uint32_t id); - nb::scoped_refptr DeregisterBuffer(uint32_t id); - - uint32_t RegisterTexture(const nb::scoped_refptr& texture); - nb::scoped_refptr GetTexture(uint32_t id); - nb::scoped_refptr DeregisterTexture(uint32_t id); - - uint32_t RegisterFramebuffer( - const nb::scoped_refptr& framebuffer); - nb::scoped_refptr GetFramebuffer(uint32_t id); - nb::scoped_refptr DeregisterFramebuffer(uint32_t id); - - uint32_t RegisterRenderbuffer( - const nb::scoped_refptr& renderbuffer); - nb::scoped_refptr GetRenderbuffer(uint32_t id); - nb::scoped_refptr DeregisterRenderbuffer(uint32_t id); - - private: - starboard::Mutex mutex_; - - RefCountedResourceMap programs_; - RefCountedResourceMap shaders_; - RefCountedResourceMap buffers_; - RefCountedResourceMap textures_; - RefCountedResourceMap framebuffers_; - RefCountedResourceMap renderbuffers_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_RESOURCE_MANAGER_H_ diff --git a/glimp/gles/sampler.h b/glimp/gles/sampler.h deleted file mode 100644 index f0faf7a638e1..000000000000 --- a/glimp/gles/sampler.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_SAMPLER_H_ -#define GLIMP_GLES_SAMPLER_H_ - -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -// Helper function to represent what GL ES texture parameters. -struct Sampler { - enum MinFilter { - kMinFilterNearest, - kMinFilterLinear, - kMinFilterNearestMipMapNearest, - kMinFilterLinearMipMapNearest, - kMinFilterNearestMipMapLinear, - kMinFilterLinearMipMapLinear, - kMinFilterInvalid, - }; - enum MagFilter { - kMagFilterNearest, - kMagFilterLinear, - kMagFilterInvalid, - }; - enum WrapMode { - kWrapModeRepeat, - kWrapModeClampToEdge, - kWrapModeMirroredRepeat, - kWrapModeInvalid, - }; - - // Initialize the sampler with default values defined by the GL ES - // specification: - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexParameter.xml - Sampler() - : mag_filter(kMagFilterLinear), - min_filter(kMinFilterNearestMipMapLinear), - wrap_s(kWrapModeRepeat), - wrap_t(kWrapModeRepeat) {} - - // Parameters that are modifiable via glTexParameter() functions. - MagFilter mag_filter; - MinFilter min_filter; - WrapMode wrap_s; - WrapMode wrap_t; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_SAMPLER_H_ diff --git a/glimp/gles/shader.cc b/glimp/gles/shader.cc deleted file mode 100644 index 34d70ca0acc0..000000000000 --- a/glimp/gles/shader.cc +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/shader.h" - -#include - -#include "starboard/common/string.h" - -namespace glimp { -namespace gles { - -Shader::Shader(std::unique_ptr impl, GLenum type) - : impl_(std::move(impl)), type_(type), compile_results_(false) {} - -void Shader::ShaderSource(GLsizei count, - const GLchar* const* string, - const GLint* length) { - source_.clear(); - - // Concatenate the input strings into one long string. - for (size_t i = 0; i < count; ++i) { - if (!length) { - // If length is NULL, all strings are assumed to be null-terminated. - source_.append(string[i]); - } else { - source_.append(string[i], length[i]); - } - } -} - -void Shader::CompileShader() { - compile_results_ = impl_->Compile(source_); -} - -GLenum Shader::GetShaderiv(GLenum pname, GLint* params) { - switch (pname) { - case GL_COMPILE_STATUS: - *params = compile_results_.success ? 1 : 0; - break; - case GL_SHADER_SOURCE_LENGTH: - *params = source_.size(); - break; - case GL_SHADER_TYPE: - *params = type_; - break; - case GL_INFO_LOG_LENGTH: - *params = compile_results_.info_log.size(); - break; - case GL_DELETE_STATUS: - SB_NOTIMPLEMENTED(); - break; - default: - return GL_INVALID_ENUM; - } - - return GL_NO_ERROR; -} - -void Shader::GetShaderInfoLog(GLsizei bufsize, - GLsizei* length, - GLchar* infolog) { - *length = - starboard::strlcpy(infolog, compile_results_.info_log.c_str(), bufsize); -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/shader.h b/glimp/gles/shader.h deleted file mode 100644 index 150c65324abb..000000000000 --- a/glimp/gles/shader.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_SHADER_H_ -#define GLIMP_GLES_SHADER_H_ - -#include - -#include - -#include -#include "glimp/gles/shader_impl.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -class Shader : public nb::RefCountedThreadSafe { - public: - Shader(std::unique_ptr impl, GLenum type); - - GLenum type() const { return type_; } - - // Called when glShaderSource() is called. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glShaderSource.xml - void ShaderSource(GLsizei count, - const GLchar* const* string, - const GLint* length); - - // Called when glCompileShader() is called. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCompileShader.xml - void CompileShader(); - - // Called when glGetShaderiv() is called. Returns GL_NO_ERROR if the query - // was successful, otherwise returns the error GLenum that should be returned - // to the caller. - GLenum GetShaderiv(GLenum pname, GLint* params); - void GetShaderInfoLog(GLsizei bufsize, GLsizei* length, GLchar* infolog); - - bool compiled() const { return compile_results_.success; } - - ShaderImpl* impl() const { return impl_.get(); } - - private: - friend class nb::RefCountedThreadSafe; - ~Shader() {} - - std::unique_ptr impl_; - - GLenum type_; - - std::string source_; - - // Keeps track of the success of the last CompileShader() call. Can be - // queried via glGetShaderiv() with the parameter GL_COMPILE_STATUS or - // GL_INFO_LOG_LENGTH. - ShaderImpl::CompileResults compile_results_; - - GLint compile_status_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_SHADER_H_ diff --git a/glimp/gles/shader_impl.h b/glimp/gles/shader_impl.h deleted file mode 100644 index 250a6f00d179..000000000000 --- a/glimp/gles/shader_impl.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_SHADER_IMPL_H_ -#define GLIMP_GLES_SHADER_IMPL_H_ - -#include - -namespace glimp { -namespace gles { - -class ShaderImpl { - public: - // Return value from the Compile() method. Can be used to communicate an - // error message to the client. - struct CompileResults { - explicit CompileResults(bool success) : success(success) {} - CompileResults(bool success, const std::string& info_log) - : success(success), info_log(info_log) {} - bool success; - std::string info_log; - }; - - virtual ~ShaderImpl() {} - - // Called when glCompileShader() is called. The source passed in is whatever - // source was last set by glShaderSource(). This method should return true - // on success and false on failure, along with an information message if - // desired. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCompileShader.xml - virtual CompileResults Compile(const std::string& source) = 0; - - private: -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_SHADER_IMPL_H_ diff --git a/glimp/gles/texture.cc b/glimp/gles/texture.cc deleted file mode 100644 index 7071a082095c..000000000000 --- a/glimp/gles/texture.cc +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/texture.h" - -#include - -#include "glimp/rect.h" -#include "starboard/common/pointer_arithmetic.h" - -namespace glimp { -namespace gles { - -Texture::Texture(std::unique_ptr impl) - : impl_(std::move(impl)), - texture_allocated_(false), - bound_to_surface_(NULL) {} - -void Texture::Initialize(GLint level, - PixelFormat pixel_format, - GLsizei width, - GLsizei height) { - width_ = static_cast(width); - height_ = static_cast(height); - pixel_format_ = pixel_format; - - impl_->Initialize(level, pixel_format_, width_, height_); - - texture_allocated_ = true; -} - -bool Texture::UpdateData(GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - int pitch_in_bytes, - const GLvoid* pixels) { - SB_DCHECK(pixels != NULL); - return impl_->UpdateData(level, - nb::Rect(xoffset, yoffset, width, height), - pitch_in_bytes, pixels); -} - -void Texture::UpdateDataFromBuffer( - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - int pitch_in_bytes, - const nb::scoped_refptr& pixel_unpack_buffer, - uintptr_t buffer_offset) { - SB_DCHECK(pixel_unpack_buffer); - impl_->UpdateDataFromBuffer( - level, nb::Rect(xoffset, yoffset, width, height), pitch_in_bytes, - pixel_unpack_buffer, buffer_offset); -} - -bool Texture::BindToEGLSurface(egl::Surface* surface) { - if (bound_to_surface_ != NULL) { - SB_DLOG(WARNING) << "A EGLSurface is already bound to this texture."; - return false; - } - - width_ = surface->GetWidth(); - height_ = surface->GetHeight(); - - SB_DCHECK(surface->GetTextureFormat() == EGL_TEXTURE_RGBA); - pixel_format_ = kPixelFormatRGBA8; - texture_allocated_ = true; - - impl_->BindToEGLSurface(surface); - bound_to_surface_ = surface; - - return true; -} - -bool Texture::ReleaseFromEGLSurface(egl::Surface* surface) { - if (bound_to_surface_ != surface) { - SB_DLOG(WARNING) << "Attempting to release a surface that this texture was " - "not bound to."; - return false; - } - - width_ = 0; - height_ = 0; - pixel_format_ = kPixelFormatInvalid; - texture_allocated_ = false; - bound_to_surface_ = NULL; - - impl_->Initialize(0, kPixelFormatInvalid, 0, 0); - - return true; -} - -void Texture::ReadPixelsAsRGBA8(GLint x, - GLint y, - GLsizei width, - GLsizei height, - int pitch_in_bytes, - GLvoid* pixels) { - impl_->ReadPixelsAsRGBA8(nb::Rect(x, y, width, height), pitch_in_bytes, - pixels); -} - -bool Texture::CanBeAttachedToFramebuffer() const { - return impl_->CanBeAttachedToFramebuffer(); -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/texture.h b/glimp/gles/texture.h deleted file mode 100644 index e2a203403173..000000000000 --- a/glimp/gles/texture.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_TEXTURE_H_ -#define GLIMP_GLES_TEXTURE_H_ - -#include - -#include -#include "glimp/egl/surface.h" -#include "glimp/gles/buffer.h" -#include "glimp/gles/pixel_format.h" -#include "glimp/gles/sampler.h" -#include "glimp/gles/texture_impl.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -class Texture : public nb::RefCountedThreadSafe { - public: - explicit Texture(std::unique_ptr impl); - - void Initialize(GLint level, - PixelFormat pixel_format, - GLsizei width, - GLsizei height); - - // Implements support for glTexSubImage2D() and glCopyTexSubImage2D(). - // This function will return true if successful, false if memory allocation - // failed. - bool UpdateData(GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - int pitch_in_bytes, - const GLvoid* pixels); - - // Implements support for glTexSubImage2D() when data is supplied by a - // GL_PIXEL_UNPACK_BUFFER. - void UpdateDataFromBuffer( - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - int pitch_in_bytes, - const nb::scoped_refptr& pixel_unpack_buffer, - uintptr_t buffer_offset); - - // These methods will be called when eglBindTexImage() and - // eglReleaseTexImage() are called. - bool BindToEGLSurface(egl::Surface* surface); - bool ReleaseFromEGLSurface(egl::Surface* surface); - - // Write a copy of the texture data into a window within the pointer specified - // by |pixels|. - void ReadPixelsAsRGBA8(GLint x, - GLint y, - GLsizei width, - GLsizei height, - int pitch_in_bytes, - GLvoid* pixels); - - // Returns true if this texture can be used as a framebuffer component. - // Essentially, this function is asking whether we can render to the texture - // or not. - bool CanBeAttachedToFramebuffer() const; - - TextureImpl* impl() const { return impl_.get(); } - - // Returns whether the data has been set yet or not. - bool texture_allocated() const { return texture_allocated_; } - - int width() const { - SB_DCHECK(texture_allocated_); - return width_; - } - - int height() const { - SB_DCHECK(texture_allocated_); - return height_; - } - - PixelFormat pixel_format() const { - SB_DCHECK(texture_allocated_); - return pixel_format_; - } - - Sampler* sampler_parameters() { return &sampler_parameters_; } - const Sampler* sampler_parameters() const { return &sampler_parameters_; } - - private: - friend class nb::RefCountedThreadSafe; - ~Texture() {} - - std::unique_ptr impl_; - - // True if underlying texture data has been allocated yet or not (e.g. - // will be true after glTexImage2D() is called.) - bool texture_allocated_; - - // The width and height of the texture, in pixels. - int width_; - int height_; - - // The pixel format of the set data. - PixelFormat pixel_format_; - - // Non-null if we are currently bound to an egl::Surface (e.g. from a - // call to eglBindTexImage()). - egl::Surface* bound_to_surface_; - - // Sampler parameters that are associated with this texture. - Sampler sampler_parameters_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_TEXTURE_H_ diff --git a/glimp/gles/texture_impl.h b/glimp/gles/texture_impl.h deleted file mode 100644 index cdf654e7fbdc..000000000000 --- a/glimp/gles/texture_impl.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_TEXTURE_IMPL_H_ -#define GLIMP_GLES_TEXTURE_IMPL_H_ - -#include "glimp/egl/surface.h" -#include "glimp/gles/buffer.h" -#include "glimp/gles/pixel_format.h" -#include "glimp/gles/shader.h" -#include "glimp/rect.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -class TextureImpl { - public: - virtual ~TextureImpl() {} - - // Specifies texture parameters necessary to allocate texture data within - // this texture. This method must be called before pixel data can be - // provided to the texture via UpdateData*() methods. If |width| == 0, - // the texture should be placed in an uninitialized state where UpdateData*() - // methods are invalid. - // This method is called when glTexImage2D() is called. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml - virtual void Initialize(int level, - PixelFormat pixel_format, - int width, - int height) = 0; - - // Called when glTexImage2D() is called with non-null pixels, or when - // glTexSubImage2D() or glCopyTexSubImage2D() is called. Updates an already - // allocated texture with new texture data provided by the client. The - // parameters of this method define a window within the existing texture - // data of which should be updated with the provided (non-NULL) |pixels|. - // The provided |pitch_in_bytes| refers to the input data pixel rows. - // This function will return true if successful, false if memory allocation - // failed. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexSubImage2D.xml - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexSubImage2D.xml - virtual bool UpdateData(int level, - const nb::Rect& window, - int pitch_in_bytes, - const void* pixels) = 0; - - // Similar to UpdateData() above, however the source of pixels in this case - // is a buffer object, and an offset into it. This method will be called - // when glTexImage2D() or glTexSubImage2D() is called while a buffer is bound - // to the GL_PIXEL_UNPACK_BUFFER target. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexSubImage2D.xml - virtual void UpdateDataFromBuffer( - int level, - const nb::Rect& window, - int pitch_in_bytes, - const nb::scoped_refptr& pixel_unpack_buffer, - uintptr_t buffer_offset) = 0; - - // Called when eglBindTexImage() is called. When this occurs, the texture - // should configure itself to point at the same data as the passed in - // egl::Surface is pointing to, so that the egl::Surface can effectively be - // referenced as a texture. This method should clear out any existing image - // data in the texture when it is called. When eglReleaseTexImage() is - // called, TextureImpl::Initialize() will be called with |width| = 0 to reset - // this texture. - // https://www.khronos.org/registry/egl/sdk/docs/man/html/eglBindTexImage.xhtml - virtual void BindToEGLSurface(egl::Surface* surface) = 0; - - // This is called when glReadPixels() is called. The - virtual void ReadPixelsAsRGBA8(const nb::Rect& window, - int pitch_in_bytes, - void* pixels) = 0; - - // Returns true if this texture is valid for use as a Framebuffer color - // attachment. In other words, this should return true if the texture can - // be used as a render target. This method is called when the function - // glCheckFramebufferStatus() is called on a framebuffer that has this - // texture attached to it. - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCheckFramebufferStatus.xml - virtual bool CanBeAttachedToFramebuffer() const = 0; - - private: -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_TEXTURE_IMPL_H_ diff --git a/glimp/gles/uniform_info.h b/glimp/gles/uniform_info.h deleted file mode 100644 index 44f9bca1fa80..000000000000 --- a/glimp/gles/uniform_info.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_UNIFORM_INFO_H_ -#define GLIMP_GLES_UNIFORM_INFO_H_ - -namespace glimp { -namespace gles { - -// Maintains information about a shader program uniform. In particular, it -// tracks the type, count and element size of a uniform. For example, -// an array of 8 vec2s would be described by -// UniformInfo(UniformInfo::kTypeFloat, 8, 2) -struct UniformInfo { - enum Type { - kTypeFloat, - kTypeInteger, - kTypeMatrix, - kTypeUnknown, - }; - - UniformInfo() : type(kTypeUnknown), count(-1), element_size(-1) {} - UniformInfo(Type type, int count, int element_size) - : type(type), count(count), element_size(element_size) {} - bool operator==(const UniformInfo& rhs) const { - return type == rhs.type && count == rhs.count && - element_size == rhs.element_size; - } - bool operator!=(const UniformInfo& rhs) const { return !operator==(rhs); } - - // Data type of this uniform. - Type type; - // Number of uniforms in an array. - int count; - // The "vector size" of the uniform. - int element_size; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_UNIFORM_INFO_H_ diff --git a/glimp/gles/unique_id_generator.cc b/glimp/gles/unique_id_generator.cc deleted file mode 100644 index 7e6589f230eb..000000000000 --- a/glimp/gles/unique_id_generator.cc +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/gles/unique_id_generator.h" - -#include - -#include "starboard/common/log.h" - -namespace glimp { -namespace gles { - -UniqueIdGenerator::UniqueIdGenerator() : largest_id_(0) {} - -uint32_t UniqueIdGenerator::AcquireId() { - if (reusable_ids_.empty()) { - ++largest_id_; - SB_DCHECK(largest_id_ != 0) - << "An Id overflow occurred, too many Ids allocated."; - return largest_id_; - } else { - uint32_t id = reusable_ids_.back(); - reusable_ids_.pop_back(); - return id; - } -} - -void UniqueIdGenerator::ReleaseId(uint32_t id) { - SB_DCHECK(id <= largest_id_); - SB_DCHECK(std::find(reusable_ids_.begin(), reusable_ids_.end(), id) == - reusable_ids_.end()); - reusable_ids_.push_back(id); -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/gles/unique_id_generator.h b/glimp/gles/unique_id_generator.h deleted file mode 100644 index c6527b5c1e88..000000000000 --- a/glimp/gles/unique_id_generator.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_UNIQUE_ID_GENERATOR_H_ -#define GLIMP_GLES_UNIQUE_ID_GENERATOR_H_ - -#include - -#include - -namespace glimp { -namespace gles { - -// A helper class to make it easy to obtain a unique Id (that we can assign -// to GL resources). In order to aid with debugging, it will never return -// 0 as a valid Id. -class UniqueIdGenerator { - public: - UniqueIdGenerator(); - uint32_t AcquireId(); - void ReleaseId(uint32_t id); - - private: - std::vector reusable_ids_; - uint32_t largest_id_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_UNIQUE_ID_GENERATOR_H_ diff --git a/glimp/gles/vertex_attribute.h b/glimp/gles/vertex_attribute.h deleted file mode 100644 index 7a9d82a512d0..000000000000 --- a/glimp/gles/vertex_attribute.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_GLES_VERTEX_ATTRIBUTE_H_ -#define GLIMP_GLES_VERTEX_ATTRIBUTE_H_ - -namespace glimp { -namespace gles { - -// An enum for the type of data stored for a specific vertex attribute. -enum VertexAttributeType { - kVertexAttributeTypeByte, - kVertexAttributeTypeUnsignedByte, - kVertexAttributeTypeShort, - kVertexAttributeTypeUnsignedShort, - kVertexAttributeTypeHalfFloat, - kVertexAttributeTypeFloat, - kVertexAttributeTypeFixed, - kVertexAttributeTypeInvalid, -}; - -// Stores all information that can be set about a vertex attribute through -// a call to VertexAttribPointer(). -// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glVertexAttribPointer.xml -struct VertexAttributeArray { - // Initialize with default values defined by the specification for - // glVertexAttribPointer(). - VertexAttributeArray() - : size(4), - type(kVertexAttributeTypeFloat), - normalized(false), - stride_in_bytes(0), - offset(0) {} - - VertexAttributeArray(int size, - VertexAttributeType type, - bool normalized, - int stride_in_bytes, - int offset) - : size(size), - type(type), - normalized(normalized), - stride_in_bytes(stride_in_bytes), - offset(offset) {} - - // Number of components per vertex - int size; - - // The data type of each component. - VertexAttributeType type; - - // Whether each component should be normalized from their type's min/max range - // to the range [-1, 1] for signed values and [0, 1] for unsigned values. - bool normalized; - - // Number of bytes between subsequent vertices. - int stride_in_bytes; - - // Derived from the void* ptr parameter of glVertexAttribPointer(), but stored - // as an integer as only offsets into array buffers are supported in glimp. - int offset; -}; - -// Constant vertex attributes are specified through the glVertexAttribXfv() -// functions. When set for a specific attribute location, all vertices will -// be passed this constant attribute value. Constant vertex attributes are -// enabled whenever vertex attribute arrays are disabled. -struct VertexAttributeConstant { - VertexAttributeConstant() : type(kVertexAttributeTypeInvalid), size(0) {} - - VertexAttributeType type; - int size; - - // We currently only support floating point constant vertex attributes, - // but if needed this can be modified to be an arbitrary data store, and - // methods added to convert to the specified type. - float data[4]; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_GLES_VERTEX_ATTRIBUTE_H_ diff --git a/glimp/include/EGL/egl.h b/glimp/include/EGL/egl.h deleted file mode 100644 index 50f29397232b..000000000000 --- a/glimp/include/EGL/egl.h +++ /dev/null @@ -1,379 +0,0 @@ -#ifndef __egl_h_ -#define __egl_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun -*2015) $ -*/ - -#include - -/* Generated on date 20150623 */ - -/* Generated C header for: - * API: egl - * Versions considered: .* - * Versions emitted: .* - * Default extensions included: None - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef EGL_VERSION_1_0 -#define EGL_VERSION_1_0 1 -typedef unsigned int EGLBoolean; -typedef void* EGLDisplay; -#include -#include -typedef void* EGLConfig; -typedef void* EGLSurface; -typedef void* EGLContext; -typedef void (*__eglMustCastToProperFunctionPointerType)(void); -#define EGL_ALPHA_SIZE 0x3021 -#define EGL_BAD_ACCESS 0x3002 -#define EGL_BAD_ALLOC 0x3003 -#define EGL_BAD_ATTRIBUTE 0x3004 -#define EGL_BAD_CONFIG 0x3005 -#define EGL_BAD_CONTEXT 0x3006 -#define EGL_BAD_CURRENT_SURFACE 0x3007 -#define EGL_BAD_DISPLAY 0x3008 -#define EGL_BAD_MATCH 0x3009 -#define EGL_BAD_NATIVE_PIXMAP 0x300A -#define EGL_BAD_NATIVE_WINDOW 0x300B -#define EGL_BAD_PARAMETER 0x300C -#define EGL_BAD_SURFACE 0x300D -#define EGL_BLUE_SIZE 0x3022 -#define EGL_BUFFER_SIZE 0x3020 -#define EGL_CONFIG_CAVEAT 0x3027 -#define EGL_CONFIG_ID 0x3028 -#define EGL_CORE_NATIVE_ENGINE 0x305B -#define EGL_DEPTH_SIZE 0x3025 -#define EGL_DONT_CARE ((EGLint)-1) -#define EGL_DRAW 0x3059 -#define EGL_EXTENSIONS 0x3055 -#define EGL_FALSE 0 -#define EGL_GREEN_SIZE 0x3023 -#define EGL_HEIGHT 0x3056 -#define EGL_LARGEST_PBUFFER 0x3058 -#define EGL_LEVEL 0x3029 -#define EGL_MAX_PBUFFER_HEIGHT 0x302A -#define EGL_MAX_PBUFFER_PIXELS 0x302B -#define EGL_MAX_PBUFFER_WIDTH 0x302C -#define EGL_NATIVE_RENDERABLE 0x302D -#define EGL_NATIVE_VISUAL_ID 0x302E -#define EGL_NATIVE_VISUAL_TYPE 0x302F -#define EGL_NONE 0x3038 -#define EGL_NON_CONFORMANT_CONFIG 0x3051 -#define EGL_NOT_INITIALIZED 0x3001 -#define EGL_NO_CONTEXT ((EGLContext)0) -#define EGL_NO_DISPLAY ((EGLDisplay)0) -#define EGL_NO_SURFACE ((EGLSurface)0) -#define EGL_PBUFFER_BIT 0x0001 -#define EGL_PIXMAP_BIT 0x0002 -#define EGL_READ 0x305A -#define EGL_RED_SIZE 0x3024 -#define EGL_SAMPLES 0x3031 -#define EGL_SAMPLE_BUFFERS 0x3032 -#define EGL_SLOW_CONFIG 0x3050 -#define EGL_STENCIL_SIZE 0x3026 -#define EGL_SUCCESS 0x3000 -#define EGL_SURFACE_TYPE 0x3033 -#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 -#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 -#define EGL_TRANSPARENT_RED_VALUE 0x3037 -#define EGL_TRANSPARENT_RGB 0x3052 -#define EGL_TRANSPARENT_TYPE 0x3034 -#define EGL_TRUE 1 -#define EGL_VENDOR 0x3053 -#define EGL_VERSION 0x3054 -#define EGL_WIDTH 0x3057 -#define EGL_WINDOW_BIT 0x0004 -EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, - const EGLint* attrib_list, - EGLConfig* configs, - EGLint config_size, - EGLint* num_config); -EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, - EGLSurface surface, - EGLNativePixmapType target); -EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, - EGLConfig config, - EGLContext share_context, - const EGLint* attrib_list); -EGLAPI EGLSurface EGLAPIENTRY -eglCreatePbufferSurface(EGLDisplay dpy, - EGLConfig config, - const EGLint* attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, - EGLConfig config, - EGLNativePixmapType pixmap, - const EGLint* attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, - EGLConfig config, - EGLNativeWindowType win, - const EGLint* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, - EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, - EGLConfig config, - EGLint attribute, - EGLint* value); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, - EGLConfig* configs, - EGLint config_size, - EGLint* num_config); -EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void); -EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw); -EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id); -EGLAPI EGLint EGLAPIENTRY eglGetError(void); -EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY -eglGetProcAddress(const char* procname); -EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, - EGLint* major, - EGLint* minor); -EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, - EGLSurface draw, - EGLSurface read, - EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, - EGLContext ctx, - EGLint attribute, - EGLint* value); -EGLAPI const char* EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, - EGLSurface surface, - EGLint attribute, - EGLint* value); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, - EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine); -#endif /* EGL_VERSION_1_0 */ - -#ifndef EGL_VERSION_1_1 -#define EGL_VERSION_1_1 1 -#define EGL_BACK_BUFFER 0x3084 -#define EGL_BIND_TO_TEXTURE_RGB 0x3039 -#define EGL_BIND_TO_TEXTURE_RGBA 0x303A -#define EGL_CONTEXT_LOST 0x300E -#define EGL_MIN_SWAP_INTERVAL 0x303B -#define EGL_MAX_SWAP_INTERVAL 0x303C -#define EGL_MIPMAP_TEXTURE 0x3082 -#define EGL_MIPMAP_LEVEL 0x3083 -#define EGL_NO_TEXTURE 0x305C -#define EGL_TEXTURE_2D 0x305F -#define EGL_TEXTURE_FORMAT 0x3080 -#define EGL_TEXTURE_RGB 0x305D -#define EGL_TEXTURE_RGBA 0x305E -#define EGL_TEXTURE_TARGET 0x3081 -EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, - EGLSurface surface, - EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, - EGLSurface surface, - EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, - EGLSurface surface, - EGLint attribute, - EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval); -#endif /* EGL_VERSION_1_1 */ - -#ifndef EGL_VERSION_1_2 -#define EGL_VERSION_1_2 1 -typedef unsigned int EGLenum; -typedef void* EGLClientBuffer; -#define EGL_ALPHA_FORMAT 0x3088 -#define EGL_ALPHA_FORMAT_NONPRE 0x308B -#define EGL_ALPHA_FORMAT_PRE 0x308C -#define EGL_ALPHA_MASK_SIZE 0x303E -#define EGL_BUFFER_PRESERVED 0x3094 -#define EGL_BUFFER_DESTROYED 0x3095 -#define EGL_CLIENT_APIS 0x308D -#define EGL_COLORSPACE 0x3087 -#define EGL_COLORSPACE_sRGB 0x3089 -#define EGL_COLORSPACE_LINEAR 0x308A -#define EGL_COLOR_BUFFER_TYPE 0x303F -#define EGL_CONTEXT_CLIENT_TYPE 0x3097 -#define EGL_DISPLAY_SCALING 10000 -#define EGL_HORIZONTAL_RESOLUTION 0x3090 -#define EGL_LUMINANCE_BUFFER 0x308F -#define EGL_LUMINANCE_SIZE 0x303D -#define EGL_OPENGL_ES_BIT 0x0001 -#define EGL_OPENVG_BIT 0x0002 -#define EGL_OPENGL_ES_API 0x30A0 -#define EGL_OPENVG_API 0x30A1 -#define EGL_OPENVG_IMAGE 0x3096 -#define EGL_PIXEL_ASPECT_RATIO 0x3092 -#define EGL_RENDERABLE_TYPE 0x3040 -#define EGL_RENDER_BUFFER 0x3086 -#define EGL_RGB_BUFFER 0x308E -#define EGL_SINGLE_BUFFER 0x3085 -#define EGL_SWAP_BEHAVIOR 0x3093 -#define EGL_UNKNOWN ((EGLint)-1) -#define EGL_VERTICAL_RESOLUTION 0x3091 -EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api); -EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void); -EGLAPI EGLSurface EGLAPIENTRY -eglCreatePbufferFromClientBuffer(EGLDisplay dpy, - EGLenum buftype, - EGLClientBuffer buffer, - EGLConfig config, - const EGLint* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void); -#endif /* EGL_VERSION_1_2 */ - -#ifndef EGL_VERSION_1_3 -#define EGL_VERSION_1_3 1 -#define EGL_CONFORMANT 0x3042 -#define EGL_CONTEXT_CLIENT_VERSION 0x3098 -#define EGL_MATCH_NATIVE_PIXMAP 0x3041 -#define EGL_OPENGL_ES2_BIT 0x0004 -#define EGL_VG_ALPHA_FORMAT 0x3088 -#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B -#define EGL_VG_ALPHA_FORMAT_PRE 0x308C -#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 -#define EGL_VG_COLORSPACE 0x3087 -#define EGL_VG_COLORSPACE_sRGB 0x3089 -#define EGL_VG_COLORSPACE_LINEAR 0x308A -#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 -#endif /* EGL_VERSION_1_3 */ - -#ifndef EGL_VERSION_1_4 -#define EGL_VERSION_1_4 1 -#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) -#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 -#define EGL_MULTISAMPLE_RESOLVE 0x3099 -#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A -#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B -#define EGL_OPENGL_API 0x30A2 -#define EGL_OPENGL_BIT 0x0008 -#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 -EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void); -#endif /* EGL_VERSION_1_4 */ - -#ifndef EGL_VERSION_1_5 -#define EGL_VERSION_1_5 1 -typedef void* EGLSync; -typedef intptr_t EGLAttrib; -typedef khronos_utime_nanoseconds_t EGLTime; -typedef void* EGLImage; -#define EGL_CONTEXT_MAJOR_VERSION 0x3098 -#define EGL_CONTEXT_MINOR_VERSION 0x30FB -#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD -#define EGL_NO_RESET_NOTIFICATION 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001 -#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0 -#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2 -#define EGL_OPENGL_ES3_BIT 0x00000040 -#define EGL_CL_EVENT_HANDLE 0x309C -#define EGL_SYNC_CL_EVENT 0x30FE -#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0 -#define EGL_SYNC_TYPE 0x30F7 -#define EGL_SYNC_STATUS 0x30F1 -#define EGL_SYNC_CONDITION 0x30F8 -#define EGL_SIGNALED 0x30F2 -#define EGL_UNSIGNALED 0x30F3 -#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001 -#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull -#define EGL_TIMEOUT_EXPIRED 0x30F5 -#define EGL_CONDITION_SATISFIED 0x30F6 -#define EGL_NO_SYNC ((EGLSync)0) -#define EGL_SYNC_FENCE 0x30F9 -#define EGL_GL_COLORSPACE 0x309D -#define EGL_GL_COLORSPACE_SRGB 0x3089 -#define EGL_GL_COLORSPACE_LINEAR 0x308A -#define EGL_GL_RENDERBUFFER 0x30B9 -#define EGL_GL_TEXTURE_2D 0x30B1 -#define EGL_GL_TEXTURE_LEVEL 0x30BC -#define EGL_GL_TEXTURE_3D 0x30B2 -#define EGL_GL_TEXTURE_ZOFFSET 0x30BD -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 -#define EGL_IMAGE_PRESERVED 0x30D2 -#define EGL_NO_IMAGE ((EGLImage)0) -EGLAPI EGLSync EGLAPIENTRY eglCreateSync(EGLDisplay dpy, - EGLenum type, - const EGLAttrib* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync(EGLDisplay dpy, EGLSync sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSync(EGLDisplay dpy, - EGLSync sync, - EGLint flags, - EGLTime timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib(EGLDisplay dpy, - EGLSync sync, - EGLint attribute, - EGLAttrib* value); -EGLAPI EGLImage EGLAPIENTRY eglCreateImage(EGLDisplay dpy, - EGLContext ctx, - EGLenum target, - EGLClientBuffer buffer, - const EGLAttrib* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image); -EGLAPI EGLDisplay EGLAPIENTRY -eglGetPlatformDisplay(EGLenum platform, - void* native_display, - const EGLAttrib* attrib_list); -EGLAPI EGLSurface EGLAPIENTRY -eglCreatePlatformWindowSurface(EGLDisplay dpy, - EGLConfig config, - void* native_window, - const EGLAttrib* attrib_list); -EGLAPI EGLSurface EGLAPIENTRY -eglCreatePlatformPixmapSurface(EGLDisplay dpy, - EGLConfig config, - void* native_pixmap, - const EGLAttrib* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, - EGLSync sync, - EGLint flags); -#endif /* EGL_VERSION_1_5 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/glimp/include/EGL/eglext.h b/glimp/include/EGL/eglext.h deleted file mode 100644 index 80f4d452ac7a..000000000000 --- a/glimp/include/EGL/eglext.h +++ /dev/null @@ -1,1306 +0,0 @@ -#ifndef __eglext_h_ -#define __eglext_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun -*2015) $ -*/ - -#include - -#define EGL_EGLEXT_VERSION 20150623 - -/* Generated C header for: - * API: egl - * Versions considered: .* - * Versions emitted: _nomatch_^ - * Default extensions included: egl - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef EGL_KHR_cl_event -#define EGL_KHR_cl_event 1 -#define EGL_CL_EVENT_HANDLE_KHR 0x309C -#define EGL_SYNC_CL_EVENT_KHR 0x30FE -#define EGL_SYNC_CL_EVENT_COMPLETE_KHR 0x30FF -#endif /* EGL_KHR_cl_event */ - -#ifndef EGL_KHR_cl_event2 -#define EGL_KHR_cl_event2 1 -typedef void* EGLSyncKHR; -typedef intptr_t EGLAttribKHR; -typedef EGLSyncKHR(EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC)( - EGLDisplay dpy, - EGLenum type, - const EGLAttribKHR* attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY -eglCreateSync64KHR(EGLDisplay dpy, - EGLenum type, - const EGLAttribKHR* attrib_list); -#endif -#endif /* EGL_KHR_cl_event2 */ - -#ifndef EGL_KHR_client_get_all_proc_addresses -#define EGL_KHR_client_get_all_proc_addresses 1 -#endif /* EGL_KHR_client_get_all_proc_addresses */ - -#ifndef EGL_KHR_config_attribs -#define EGL_KHR_config_attribs 1 -#define EGL_CONFORMANT_KHR 0x3042 -#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 -#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 -#endif /* EGL_KHR_config_attribs */ - -#ifndef EGL_KHR_create_context -#define EGL_KHR_create_context 1 -#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098 -#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB -#define EGL_CONTEXT_FLAGS_KHR 0x30FC -#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD -#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF -#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 -#define EGL_OPENGL_ES3_BIT_KHR 0x00000040 -#endif /* EGL_KHR_create_context */ - -#ifndef EGL_KHR_create_context_no_error -#define EGL_KHR_create_context_no_error 1 -#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31B3 -#endif /* EGL_KHR_create_context_no_error */ - -#ifndef EGL_KHR_fence_sync -#define EGL_KHR_fence_sync 1 -typedef khronos_utime_nanoseconds_t EGLTimeKHR; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 -#define EGL_SYNC_CONDITION_KHR 0x30F8 -#define EGL_SYNC_FENCE_KHR 0x30F9 -typedef EGLSyncKHR(EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC)( - EGLDisplay dpy, - EGLenum type, - const EGLint* attrib_list); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC)(EGLDisplay dpy, - EGLSyncKHR sync); -typedef EGLint(EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC)(EGLDisplay dpy, - EGLSyncKHR sync, - EGLint flags, - EGLTimeKHR timeout); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC)(EGLDisplay dpy, - EGLSyncKHR sync, - EGLint attribute, - EGLint* value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, - EGLenum type, - const EGLint* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, - EGLSyncKHR sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, - EGLSyncKHR sync, - EGLint flags, - EGLTimeKHR timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, - EGLSyncKHR sync, - EGLint attribute, - EGLint* value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_fence_sync */ - -#ifndef EGL_KHR_get_all_proc_addresses -#define EGL_KHR_get_all_proc_addresses 1 -#endif /* EGL_KHR_get_all_proc_addresses */ - -#ifndef EGL_KHR_gl_colorspace -#define EGL_KHR_gl_colorspace 1 -#define EGL_GL_COLORSPACE_KHR 0x309D -#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089 -#define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A -#endif /* EGL_KHR_gl_colorspace */ - -#ifndef EGL_KHR_gl_renderbuffer_image -#define EGL_KHR_gl_renderbuffer_image 1 -#define EGL_GL_RENDERBUFFER_KHR 0x30B9 -#endif /* EGL_KHR_gl_renderbuffer_image */ - -#ifndef EGL_KHR_gl_texture_2D_image -#define EGL_KHR_gl_texture_2D_image 1 -#define EGL_GL_TEXTURE_2D_KHR 0x30B1 -#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC -#endif /* EGL_KHR_gl_texture_2D_image */ - -#ifndef EGL_KHR_gl_texture_3D_image -#define EGL_KHR_gl_texture_3D_image 1 -#define EGL_GL_TEXTURE_3D_KHR 0x30B2 -#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD -#endif /* EGL_KHR_gl_texture_3D_image */ - -#ifndef EGL_KHR_gl_texture_cubemap_image -#define EGL_KHR_gl_texture_cubemap_image 1 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 -#endif /* EGL_KHR_gl_texture_cubemap_image */ - -#ifndef EGL_KHR_image -#define EGL_KHR_image 1 -typedef void* EGLImageKHR; -#define EGL_NATIVE_PIXMAP_KHR 0x30B0 -#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) -typedef EGLImageKHR(EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC)( - EGLDisplay dpy, - EGLContext ctx, - EGLenum target, - EGLClientBuffer buffer, - const EGLint* attrib_list); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC)(EGLDisplay dpy, - EGLImageKHR image); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, - EGLContext ctx, - EGLenum target, - EGLClientBuffer buffer, - const EGLint* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, - EGLImageKHR image); -#endif -#endif /* EGL_KHR_image */ - -#ifndef EGL_KHR_image_base -#define EGL_KHR_image_base 1 -#define EGL_IMAGE_PRESERVED_KHR 0x30D2 -#endif /* EGL_KHR_image_base */ - -#ifndef EGL_KHR_image_pixmap -#define EGL_KHR_image_pixmap 1 -#endif /* EGL_KHR_image_pixmap */ - -#ifndef EGL_KHR_lock_surface -#define EGL_KHR_lock_surface 1 -#define EGL_READ_SURFACE_BIT_KHR 0x0001 -#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 -#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 -#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 -#define EGL_MATCH_FORMAT_KHR 0x3043 -#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 -#define EGL_FORMAT_RGB_565_KHR 0x30C1 -#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 -#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 -#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 -#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 -#define EGL_BITMAP_POINTER_KHR 0x30C6 -#define EGL_BITMAP_PITCH_KHR 0x30C7 -#define EGL_BITMAP_ORIGIN_KHR 0x30C8 -#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 -#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA -#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB -#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC -#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD -#define EGL_LOWER_LEFT_KHR 0x30CE -#define EGL_UPPER_LEFT_KHR 0x30CF -typedef EGLBoolean(EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC)( - EGLDisplay dpy, - EGLSurface surface, - const EGLint* attrib_list); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC)(EGLDisplay dpy, - EGLSurface surface); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR(EGLDisplay dpy, - EGLSurface surface, - const EGLint* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR(EGLDisplay dpy, - EGLSurface surface); -#endif -#endif /* EGL_KHR_lock_surface */ - -#ifndef EGL_KHR_lock_surface2 -#define EGL_KHR_lock_surface2 1 -#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 -#endif /* EGL_KHR_lock_surface2 */ - -#ifndef EGL_KHR_lock_surface3 -#define EGL_KHR_lock_surface3 1 -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC)( - EGLDisplay dpy, - EGLSurface surface, - EGLint attribute, - EGLAttribKHR* value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR(EGLDisplay dpy, - EGLSurface surface, - EGLint attribute, - EGLAttribKHR* value); -#endif -#endif /* EGL_KHR_lock_surface3 */ - -#ifndef EGL_KHR_partial_update -#define EGL_KHR_partial_update 1 -#define EGL_BUFFER_AGE_KHR 0x313D -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC)( - EGLDisplay dpy, - EGLSurface surface, - EGLint* rects, - EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR(EGLDisplay dpy, - EGLSurface surface, - EGLint* rects, - EGLint n_rects); -#endif -#endif /* EGL_KHR_partial_update */ - -#ifndef EGL_KHR_platform_android -#define EGL_KHR_platform_android 1 -#define EGL_PLATFORM_ANDROID_KHR 0x3141 -#endif /* EGL_KHR_platform_android */ - -#ifndef EGL_KHR_platform_gbm -#define EGL_KHR_platform_gbm 1 -#define EGL_PLATFORM_GBM_KHR 0x31D7 -#endif /* EGL_KHR_platform_gbm */ - -#ifndef EGL_KHR_platform_wayland -#define EGL_KHR_platform_wayland 1 -#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 -#endif /* EGL_KHR_platform_wayland */ - -#ifndef EGL_KHR_platform_x11 -#define EGL_KHR_platform_x11 1 -#define EGL_PLATFORM_X11_KHR 0x31D5 -#define EGL_PLATFORM_X11_SCREEN_KHR 0x31D6 -#endif /* EGL_KHR_platform_x11 */ - -#ifndef EGL_KHR_reusable_sync -#define EGL_KHR_reusable_sync 1 -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_STATUS_KHR 0x30F1 -#define EGL_SIGNALED_KHR 0x30F2 -#define EGL_UNSIGNALED_KHR 0x30F3 -#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 -#define EGL_CONDITION_SATISFIED_KHR 0x30F6 -#define EGL_SYNC_TYPE_KHR 0x30F7 -#define EGL_SYNC_REUSABLE_KHR 0x30FA -#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 -#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull -#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC)(EGLDisplay dpy, - EGLSyncKHR sync, - EGLenum mode); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, - EGLSyncKHR sync, - EGLenum mode); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_reusable_sync */ - -#ifndef EGL_KHR_stream -#define EGL_KHR_stream 1 -typedef void* EGLStreamKHR; -typedef khronos_uint64_t EGLuint64KHR; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0) -#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210 -#define EGL_PRODUCER_FRAME_KHR 0x3212 -#define EGL_CONSUMER_FRAME_KHR 0x3213 -#define EGL_STREAM_STATE_KHR 0x3214 -#define EGL_STREAM_STATE_CREATED_KHR 0x3215 -#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216 -#define EGL_STREAM_STATE_EMPTY_KHR 0x3217 -#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218 -#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219 -#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A -#define EGL_BAD_STREAM_KHR 0x321B -#define EGL_BAD_STATE_KHR 0x321C -typedef EGLStreamKHR(EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC)( - EGLDisplay dpy, - const EGLint* attrib_list); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC)( - EGLDisplay dpy, - EGLStreamKHR stream); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC)(EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum attribute, - EGLint value); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC)(EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum attribute, - EGLint* value); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC)( - EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum attribute, - EGLuint64KHR* value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, - const EGLint* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, - EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum attribute, - EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum attribute, - EGLint* value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum attribute, - EGLuint64KHR* value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_stream */ - -#ifndef EGL_KHR_stream_consumer_gltexture -#define EGL_KHR_stream_consumer_gltexture 1 -#ifdef EGL_KHR_stream -#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC)( - EGLDisplay dpy, - EGLStreamKHR stream); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC)( - EGLDisplay dpy, - EGLStreamKHR stream); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC)( - EGLDisplay dpy, - EGLStreamKHR stream); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY -eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, - EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, - EGLStreamKHR stream); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_consumer_gltexture */ - -#ifndef EGL_KHR_stream_cross_process_fd -#define EGL_KHR_stream_cross_process_fd 1 -typedef int EGLNativeFileDescriptorKHR; -#ifdef EGL_KHR_stream -#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1)) -typedef EGLNativeFileDescriptorKHR( - EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, - EGLStreamKHR stream); -typedef EGLStreamKHR(EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC)( - EGLDisplay dpy, - EGLNativeFileDescriptorKHR file_descriptor); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY -eglGetStreamFileDescriptorKHR(EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR( - EGLDisplay dpy, - EGLNativeFileDescriptorKHR file_descriptor); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_cross_process_fd */ - -#ifndef EGL_KHR_stream_fifo -#define EGL_KHR_stream_fifo 1 -#ifdef EGL_KHR_stream -#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC -#define EGL_STREAM_TIME_NOW_KHR 0x31FD -#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE -#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)( - EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum attribute, - EGLTimeKHR* value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR(EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum attribute, - EGLTimeKHR* value); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_fifo */ - -#ifndef EGL_KHR_stream_producer_aldatalocator -#define EGL_KHR_stream_producer_aldatalocator 1 -#ifdef EGL_KHR_stream -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_producer_aldatalocator */ - -#ifndef EGL_KHR_stream_producer_eglsurface -#define EGL_KHR_stream_producer_eglsurface 1 -#ifdef EGL_KHR_stream -#define EGL_STREAM_BIT_KHR 0x0800 -typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)( - EGLDisplay dpy, - EGLConfig config, - EGLStreamKHR stream, - const EGLint* attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY -eglCreateStreamProducerSurfaceKHR(EGLDisplay dpy, - EGLConfig config, - EGLStreamKHR stream, - const EGLint* attrib_list); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_producer_eglsurface */ - -#ifndef EGL_KHR_surfaceless_context -#define EGL_KHR_surfaceless_context 1 -#endif /* EGL_KHR_surfaceless_context */ - -#ifndef EGL_KHR_swap_buffers_with_damage -#define EGL_KHR_swap_buffers_with_damage 1 -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC)( - EGLDisplay dpy, - EGLSurface surface, - EGLint* rects, - EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR(EGLDisplay dpy, - EGLSurface surface, - EGLint* rects, - EGLint n_rects); -#endif -#endif /* EGL_KHR_swap_buffers_with_damage */ - -#ifndef EGL_KHR_vg_parent_image -#define EGL_KHR_vg_parent_image 1 -#define EGL_VG_PARENT_IMAGE_KHR 0x30BA -#endif /* EGL_KHR_vg_parent_image */ - -#ifndef EGL_KHR_wait_sync -#define EGL_KHR_wait_sync 1 -typedef EGLint(EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC)(EGLDisplay dpy, - EGLSyncKHR sync, - EGLint flags); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, - EGLSyncKHR sync, - EGLint flags); -#endif -#endif /* EGL_KHR_wait_sync */ - -#ifndef EGL_ANDROID_blob_cache -#define EGL_ANDROID_blob_cache 1 -typedef khronos_ssize_t EGLsizeiANDROID; -typedef void (*EGLSetBlobFuncANDROID)(const void* key, - EGLsizeiANDROID keySize, - const void* value, - EGLsizeiANDROID valueSize); -typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID)(const void* key, - EGLsizeiANDROID keySize, - void* value, - EGLsizeiANDROID valueSize); -typedef void(EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC)( - EGLDisplay dpy, - EGLSetBlobFuncANDROID set, - EGLGetBlobFuncANDROID get); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, - EGLSetBlobFuncANDROID set, - EGLGetBlobFuncANDROID get); -#endif -#endif /* EGL_ANDROID_blob_cache */ - -#ifndef EGL_ANDROID_framebuffer_target -#define EGL_ANDROID_framebuffer_target 1 -#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147 -#endif /* EGL_ANDROID_framebuffer_target */ - -#ifndef EGL_ANDROID_image_native_buffer -#define EGL_ANDROID_image_native_buffer 1 -#define EGL_NATIVE_BUFFER_ANDROID 0x3140 -#endif /* EGL_ANDROID_image_native_buffer */ - -#ifndef EGL_ANDROID_native_fence_sync -#define EGL_ANDROID_native_fence_sync 1 -#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 -#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 -#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 -#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 -typedef EGLint(EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy, - EGLSyncKHR sync); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, - EGLSyncKHR sync); -#endif -#endif /* EGL_ANDROID_native_fence_sync */ - -#ifndef EGL_ANDROID_recordable -#define EGL_ANDROID_recordable 1 -#define EGL_RECORDABLE_ANDROID 0x3142 -#endif /* EGL_ANDROID_recordable */ - -#ifndef EGL_ANGLE_d3d_share_handle_client_buffer -#define EGL_ANGLE_d3d_share_handle_client_buffer 1 -#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200 -#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */ - -#ifndef EGL_ANGLE_device_d3d -#define EGL_ANGLE_device_d3d 1 -#define EGL_D3D9_DEVICE_ANGLE 0x33A0 -#define EGL_D3D11_DEVICE_ANGLE 0x33A1 -#endif /* EGL_ANGLE_device_d3d */ - -#ifndef EGL_ANGLE_keyed_mutex -#define EGL_ANGLE_keyed_mutex 1 -#define EGL_DXGI_KEYED_MUTEX_ANGLE 0x33A2 -#endif /* EGL_ANGLE_keyed_mutex */ - -#ifndef EGL_ANGLE_query_surface_pointer -#define EGL_ANGLE_query_surface_pointer 1 -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC)( - EGLDisplay dpy, - EGLSurface surface, - EGLint attribute, - void** value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE(EGLDisplay dpy, - EGLSurface surface, - EGLint attribute, - void** value); -#endif -#endif /* EGL_ANGLE_query_surface_pointer */ - -#ifndef EGL_ANGLE_software_display -#define EGL_ANGLE_software_display 1 -#define EGL_SOFTWARE_DISPLAY_ANGLE ((EGLNativeDisplayType)-1) -#endif /* EGL_ANGLE_software_display */ - -#ifndef EGL_ANGLE_direct3d_display -#define EGL_ANGLE_direct3d_display 1 -#define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ((EGLNativeDisplayType)-2) -#define EGL_D3D11_ONLY_DISPLAY_ANGLE ((EGLNativeDisplayType)-3) -#endif /* EGL_ANGLE_direct3d_display */ - -#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle -#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 -#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */ - -#ifndef EGL_ANGLE_platform_angle -#define EGL_ANGLE_platform_angle 1 -#define EGL_PLATFORM_ANGLE_ANGLE 0x3202 -#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205 -#define EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3206 -#endif /* EGL_ANGLE_platform_angle */ - -#ifndef EGL_ANGLE_platform_angle_d3d -#define EGL_ANGLE_platform_angle_d3d 1 -#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207 -#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208 -#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209 -#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A -#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B -#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE 0x320C -#define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F -#endif /* EGL_ANGLE_platform_angle_d3d */ - -#ifndef EGL_ANGLE_platform_angle_opengl -#define EGL_ANGLE_platform_angle_opengl 1 -#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320D -#define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E -#endif /* EGL_ANGLE_platform_angle_opengl */ - -#ifndef EGL_ANGLE_window_fixed_size -#define EGL_ANGLE_window_fixed_size 1 -#define EGL_FIXED_SIZE_ANGLE 0x3201 -#endif /* EGL_ANGLE_window_fixed_size */ - -#ifndef EGL_ANGLE_x11_visual -#define EGL_ANGLE_x11_visual -#define EGL_X11_VISUAL_ID_ANGLE 0x33A3 -#endif /* EGL_ANGLE_x11_visual */ - -#ifndef EGL_ARM_pixmap_multisample_discard -#define EGL_ARM_pixmap_multisample_discard 1 -#define EGL_DISCARD_SAMPLES_ARM 0x3286 -#endif /* EGL_ARM_pixmap_multisample_discard */ - -#ifndef EGL_EXT_buffer_age -#define EGL_EXT_buffer_age 1 -#define EGL_BUFFER_AGE_EXT 0x313D -#endif /* EGL_EXT_buffer_age */ - -#ifndef EGL_EXT_client_extensions -#define EGL_EXT_client_extensions 1 -#endif /* EGL_EXT_client_extensions */ - -#ifndef EGL_EXT_create_context_robustness -#define EGL_EXT_create_context_robustness 1 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138 -#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF -#endif /* EGL_EXT_create_context_robustness */ - -#ifndef EGL_EXT_device_base -#define EGL_EXT_device_base 1 -typedef void* EGLDeviceEXT; -#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0)) -#define EGL_BAD_DEVICE_EXT 0x322B -#define EGL_DEVICE_EXT 0x322C -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC)( - EGLDeviceEXT device, - EGLint attribute, - EGLAttrib* value); -typedef const char*(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC)( - EGLDeviceEXT device, - EGLint name); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC)( - EGLint max_devices, - EGLDeviceEXT* devices, - EGLint* num_devices); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC)( - EGLDisplay dpy, - EGLint attribute, - EGLAttrib* value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT(EGLDeviceEXT device, - EGLint attribute, - EGLAttrib* value); -EGLAPI const char* EGLAPIENTRY eglQueryDeviceStringEXT(EGLDeviceEXT device, - EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT(EGLint max_devices, - EGLDeviceEXT* devices, - EGLint* num_devices); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT(EGLDisplay dpy, - EGLint attribute, - EGLAttrib* value); -#endif -#endif /* EGL_EXT_device_base */ - -#ifndef EGL_ANGLE_device_creation -#define EGL_ANGLE_device_creation 1 -typedef EGLDeviceEXT(EGLAPIENTRYP PFNEGLCREATEDEVICEANGLEPROC)( - EGLint device_type, - void* native_device, - const EGLAttrib* attrib_list); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLRELEASEDEVICEANGLEPROC)( - EGLDeviceEXT device); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLDeviceEXT EGLAPIENTRY -eglCreateDeviceANGLE(EGLint device_type, - void* native_device, - const EGLAttrib* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device); -#endif -#endif /* EGL_ANGLE_device_creation */ - -#ifndef EGL_EXT_device_drm -#define EGL_EXT_device_drm 1 -#define EGL_DRM_DEVICE_FILE_EXT 0x3233 -#endif /* EGL_EXT_device_drm */ - -#ifndef EGL_EXT_device_enumeration -#define EGL_EXT_device_enumeration 1 -#endif /* EGL_EXT_device_enumeration */ - -#ifndef EGL_EXT_device_openwf -#define EGL_EXT_device_openwf 1 -#define EGL_OPENWF_DEVICE_ID_EXT 0x3237 -#endif /* EGL_EXT_device_openwf */ - -#ifndef EGL_EXT_device_query -#define EGL_EXT_device_query 1 -#endif /* EGL_EXT_device_query */ - -#ifndef EGL_EXT_image_dma_buf_import -#define EGL_EXT_image_dma_buf_import 1 -#define EGL_LINUX_DMA_BUF_EXT 0x3270 -#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 -#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 -#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 -#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 -#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 -#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 -#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 -#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 -#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 -#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A -#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B -#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C -#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D -#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E -#define EGL_ITU_REC601_EXT 0x327F -#define EGL_ITU_REC709_EXT 0x3280 -#define EGL_ITU_REC2020_EXT 0x3281 -#define EGL_YUV_FULL_RANGE_EXT 0x3282 -#define EGL_YUV_NARROW_RANGE_EXT 0x3283 -#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 -#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 -#endif /* EGL_EXT_image_dma_buf_import */ - -#ifndef EGL_EXT_multiview_window -#define EGL_EXT_multiview_window 1 -#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134 -#endif /* EGL_EXT_multiview_window */ - -#ifndef EGL_EXT_output_base -#define EGL_EXT_output_base 1 -typedef void* EGLOutputLayerEXT; -typedef void* EGLOutputPortEXT; -#define EGL_NO_OUTPUT_LAYER_EXT ((EGLOutputLayerEXT)0) -#define EGL_NO_OUTPUT_PORT_EXT ((EGLOutputPortEXT)0) -#define EGL_BAD_OUTPUT_LAYER_EXT 0x322D -#define EGL_BAD_OUTPUT_PORT_EXT 0x322E -#define EGL_SWAP_INTERVAL_EXT 0x322F -typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC)( - EGLDisplay dpy, - const EGLAttrib* attrib_list, - EGLOutputLayerEXT* layers, - EGLint max_layers, - EGLint* num_layers); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC)( - EGLDisplay dpy, - const EGLAttrib* attrib_list, - EGLOutputPortEXT* ports, - EGLint max_ports, - EGLint* num_ports); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC)( - EGLDisplay dpy, - EGLOutputLayerEXT layer, - EGLint attribute, - EGLAttrib value); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC)( - EGLDisplay dpy, - EGLOutputLayerEXT layer, - EGLint attribute, - EGLAttrib* value); -typedef const char*(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC)( - EGLDisplay dpy, - EGLOutputLayerEXT layer, - EGLint name); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC)( - EGLDisplay dpy, - EGLOutputPortEXT port, - EGLint attribute, - EGLAttrib value); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC)( - EGLDisplay dpy, - EGLOutputPortEXT port, - EGLint attribute, - EGLAttrib* value); -typedef const char*(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC)( - EGLDisplay dpy, - EGLOutputPortEXT port, - EGLint name); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY -eglGetOutputLayersEXT(EGLDisplay dpy, - const EGLAttrib* attrib_list, - EGLOutputLayerEXT* layers, - EGLint max_layers, - EGLint* num_layers); -EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT(EGLDisplay dpy, - const EGLAttrib* attrib_list, - EGLOutputPortEXT* ports, - EGLint max_ports, - EGLint* num_ports); -EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT(EGLDisplay dpy, - EGLOutputLayerEXT layer, - EGLint attribute, - EGLAttrib value); -EGLAPI EGLBoolean EGLAPIENTRY -eglQueryOutputLayerAttribEXT(EGLDisplay dpy, - EGLOutputLayerEXT layer, - EGLint attribute, - EGLAttrib* value); -EGLAPI const char* EGLAPIENTRY -eglQueryOutputLayerStringEXT(EGLDisplay dpy, - EGLOutputLayerEXT layer, - EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT(EGLDisplay dpy, - EGLOutputPortEXT port, - EGLint attribute, - EGLAttrib value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT(EGLDisplay dpy, - EGLOutputPortEXT port, - EGLint attribute, - EGLAttrib* value); -EGLAPI const char* EGLAPIENTRY -eglQueryOutputPortStringEXT(EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); -#endif -#endif /* EGL_EXT_output_base */ - -#ifndef EGL_EXT_output_drm -#define EGL_EXT_output_drm 1 -#define EGL_DRM_CRTC_EXT 0x3234 -#define EGL_DRM_PLANE_EXT 0x3235 -#define EGL_DRM_CONNECTOR_EXT 0x3236 -#endif /* EGL_EXT_output_drm */ - -#ifndef EGL_EXT_output_openwf -#define EGL_EXT_output_openwf 1 -#define EGL_OPENWF_PIPELINE_ID_EXT 0x3238 -#define EGL_OPENWF_PORT_ID_EXT 0x3239 -#endif /* EGL_EXT_output_openwf */ - -#ifndef EGL_EXT_platform_base -#define EGL_EXT_platform_base 1 -typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)( - EGLenum platform, - void* native_display, - const EGLint* attrib_list); -typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)( - EGLDisplay dpy, - EGLConfig config, - void* native_window, - const EGLint* attrib_list); -typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC)( - EGLDisplay dpy, - EGLConfig config, - void* native_pixmap, - const EGLint* attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLDisplay EGLAPIENTRY -eglGetPlatformDisplayEXT(EGLenum platform, - void* native_display, - const EGLint* attrib_list); -EGLAPI EGLSurface EGLAPIENTRY -eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy, - EGLConfig config, - void* native_window, - const EGLint* attrib_list); -EGLAPI EGLSurface EGLAPIENTRY -eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, - EGLConfig config, - void* native_pixmap, - const EGLint* attrib_list); -#endif -#endif /* EGL_EXT_platform_base */ - -#ifndef EGL_EXT_platform_device -#define EGL_EXT_platform_device 1 -#define EGL_PLATFORM_DEVICE_EXT 0x313F -#endif /* EGL_EXT_platform_device */ - -#ifndef EGL_EXT_platform_wayland -#define EGL_EXT_platform_wayland 1 -#define EGL_PLATFORM_WAYLAND_EXT 0x31D8 -#endif /* EGL_EXT_platform_wayland */ - -#ifndef EGL_EXT_platform_x11 -#define EGL_EXT_platform_x11 1 -#define EGL_PLATFORM_X11_EXT 0x31D5 -#define EGL_PLATFORM_X11_SCREEN_EXT 0x31D6 -#endif /* EGL_EXT_platform_x11 */ - -#ifndef EGL_EXT_protected_surface -#define EGL_EXT_protected_surface 1 -#define EGL_PROTECTED_CONTENT_EXT 0x32C0 -#endif /* EGL_EXT_protected_surface */ - -#ifndef EGL_EXT_stream_consumer_egloutput -#define EGL_EXT_stream_consumer_egloutput 1 -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC)( - EGLDisplay dpy, - EGLStreamKHR stream, - EGLOutputLayerEXT layer); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY -eglStreamConsumerOutputEXT(EGLDisplay dpy, - EGLStreamKHR stream, - EGLOutputLayerEXT layer); -#endif -#endif /* EGL_EXT_stream_consumer_egloutput */ - -#ifndef EGL_EXT_swap_buffers_with_damage -#define EGL_EXT_swap_buffers_with_damage 1 -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)( - EGLDisplay dpy, - EGLSurface surface, - EGLint* rects, - EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT(EGLDisplay dpy, - EGLSurface surface, - EGLint* rects, - EGLint n_rects); -#endif -#endif /* EGL_EXT_swap_buffers_with_damage */ - -#ifndef EGL_EXT_yuv_surface -#define EGL_EXT_yuv_surface 1 -#define EGL_YUV_ORDER_EXT 0x3301 -#define EGL_YUV_NUMBER_OF_PLANES_EXT 0x3311 -#define EGL_YUV_SUBSAMPLE_EXT 0x3312 -#define EGL_YUV_DEPTH_RANGE_EXT 0x3317 -#define EGL_YUV_CSC_STANDARD_EXT 0x330A -#define EGL_YUV_PLANE_BPP_EXT 0x331A -#define EGL_YUV_BUFFER_EXT 0x3300 -#define EGL_YUV_ORDER_YUV_EXT 0x3302 -#define EGL_YUV_ORDER_YVU_EXT 0x3303 -#define EGL_YUV_ORDER_YUYV_EXT 0x3304 -#define EGL_YUV_ORDER_UYVY_EXT 0x3305 -#define EGL_YUV_ORDER_YVYU_EXT 0x3306 -#define EGL_YUV_ORDER_VYUY_EXT 0x3307 -#define EGL_YUV_ORDER_AYUV_EXT 0x3308 -#define EGL_YUV_SUBSAMPLE_4_2_0_EXT 0x3313 -#define EGL_YUV_SUBSAMPLE_4_2_2_EXT 0x3314 -#define EGL_YUV_SUBSAMPLE_4_4_4_EXT 0x3315 -#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT 0x3318 -#define EGL_YUV_DEPTH_RANGE_FULL_EXT 0x3319 -#define EGL_YUV_CSC_STANDARD_601_EXT 0x330B -#define EGL_YUV_CSC_STANDARD_709_EXT 0x330C -#define EGL_YUV_CSC_STANDARD_2020_EXT 0x330D -#define EGL_YUV_PLANE_BPP_0_EXT 0x331B -#define EGL_YUV_PLANE_BPP_8_EXT 0x331C -#define EGL_YUV_PLANE_BPP_10_EXT 0x331D -#endif /* EGL_EXT_yuv_surface */ - -#ifndef EGL_HI_clientpixmap -#define EGL_HI_clientpixmap 1 -struct EGLClientPixmapHI { - void* pData; - EGLint iWidth; - EGLint iHeight; - EGLint iStride; -}; -#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 -typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC)( - EGLDisplay dpy, - EGLConfig config, - struct EGLClientPixmapHI* pixmap); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY -eglCreatePixmapSurfaceHI(EGLDisplay dpy, - EGLConfig config, - struct EGLClientPixmapHI* pixmap); -#endif -#endif /* EGL_HI_clientpixmap */ - -#ifndef EGL_HI_colorformats -#define EGL_HI_colorformats 1 -#define EGL_COLOR_FORMAT_HI 0x8F70 -#define EGL_COLOR_RGB_HI 0x8F71 -#define EGL_COLOR_RGBA_HI 0x8F72 -#define EGL_COLOR_ARGB_HI 0x8F73 -#endif /* EGL_HI_colorformats */ - -#ifndef EGL_IMG_context_priority -#define EGL_IMG_context_priority 1 -#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 -#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 -#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 -#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 -#endif /* EGL_IMG_context_priority */ - -#ifndef EGL_MESA_drm_image -#define EGL_MESA_drm_image 1 -#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 -#define EGL_DRM_BUFFER_USE_MESA 0x31D1 -#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 -#define EGL_DRM_BUFFER_MESA 0x31D3 -#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 -#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 -#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 -typedef EGLImageKHR(EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC)( - EGLDisplay dpy, - const EGLint* attrib_list); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC)(EGLDisplay dpy, - EGLImageKHR image, - EGLint* name, - EGLint* handle, - EGLint* stride); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA(EGLDisplay dpy, - const EGLint* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA(EGLDisplay dpy, - EGLImageKHR image, - EGLint* name, - EGLint* handle, - EGLint* stride); -#endif -#endif /* EGL_MESA_drm_image */ - -#ifndef EGL_MESA_image_dma_buf_export -#define EGL_MESA_image_dma_buf_export 1 -typedef EGLBoolean(EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC)( - EGLDisplay dpy, - EGLImageKHR image, - int* fourcc, - int* num_planes, - EGLuint64KHR* modifiers); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC)( - EGLDisplay dpy, - EGLImageKHR image, - int* fds, - EGLint* strides, - EGLint* offsets); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY -eglExportDMABUFImageQueryMESA(EGLDisplay dpy, - EGLImageKHR image, - int* fourcc, - int* num_planes, - EGLuint64KHR* modifiers); -EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA(EGLDisplay dpy, - EGLImageKHR image, - int* fds, - EGLint* strides, - EGLint* offsets); -#endif -#endif /* EGL_MESA_image_dma_buf_export */ - -#ifndef EGL_MESA_platform_gbm -#define EGL_MESA_platform_gbm 1 -#define EGL_PLATFORM_GBM_MESA 0x31D7 -#endif /* EGL_MESA_platform_gbm */ - -#ifndef EGL_NOK_swap_region -#define EGL_NOK_swap_region 1 -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC)( - EGLDisplay dpy, - EGLSurface surface, - EGLint numRects, - const EGLint* rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, - EGLSurface surface, - EGLint numRects, - const EGLint* rects); -#endif -#endif /* EGL_NOK_swap_region */ - -#ifndef EGL_NOK_swap_region2 -#define EGL_NOK_swap_region2 1 -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC)( - EGLDisplay dpy, - EGLSurface surface, - EGLint numRects, - const EGLint* rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK(EGLDisplay dpy, - EGLSurface surface, - EGLint numRects, - const EGLint* rects); -#endif -#endif /* EGL_NOK_swap_region2 */ - -#ifndef EGL_NOK_texture_from_pixmap -#define EGL_NOK_texture_from_pixmap 1 -#define EGL_Y_INVERTED_NOK 0x307F -#endif /* EGL_NOK_texture_from_pixmap */ - -#ifndef EGL_NV_3dvision_surface -#define EGL_NV_3dvision_surface 1 -#define EGL_AUTO_STEREO_NV 0x3136 -#endif /* EGL_NV_3dvision_surface */ - -#ifndef EGL_NV_coverage_sample -#define EGL_NV_coverage_sample 1 -#define EGL_COVERAGE_BUFFERS_NV 0x30E0 -#define EGL_COVERAGE_SAMPLES_NV 0x30E1 -#endif /* EGL_NV_coverage_sample */ - -#ifndef EGL_NV_coverage_sample_resolve -#define EGL_NV_coverage_sample_resolve 1 -#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131 -#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132 -#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133 -#endif /* EGL_NV_coverage_sample_resolve */ - -#ifndef EGL_NV_cuda_event -#define EGL_NV_cuda_event 1 -#define EGL_CUDA_EVENT_HANDLE_NV 0x323B -#define EGL_SYNC_CUDA_EVENT_NV 0x323C -#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV 0x323D -#endif /* EGL_NV_cuda_event */ - -#ifndef EGL_NV_depth_nonlinear -#define EGL_NV_depth_nonlinear 1 -#define EGL_DEPTH_ENCODING_NV 0x30E2 -#define EGL_DEPTH_ENCODING_NONE_NV 0 -#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 -#endif /* EGL_NV_depth_nonlinear */ - -#ifndef EGL_NV_device_cuda -#define EGL_NV_device_cuda 1 -#define EGL_CUDA_DEVICE_NV 0x323A -#endif /* EGL_NV_device_cuda */ - -#ifndef EGL_NV_native_query -#define EGL_NV_native_query 1 -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC)( - EGLDisplay dpy, - EGLNativeDisplayType* display_id); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC)( - EGLDisplay dpy, - EGLSurface surf, - EGLNativeWindowType* window); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC)( - EGLDisplay dpy, - EGLSurface surf, - EGLNativePixmapType* pixmap); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY -eglQueryNativeDisplayNV(EGLDisplay dpy, EGLNativeDisplayType* display_id); -EGLAPI EGLBoolean EGLAPIENTRY -eglQueryNativeWindowNV(EGLDisplay dpy, - EGLSurface surf, - EGLNativeWindowType* window); -EGLAPI EGLBoolean EGLAPIENTRY -eglQueryNativePixmapNV(EGLDisplay dpy, - EGLSurface surf, - EGLNativePixmapType* pixmap); -#endif -#endif /* EGL_NV_native_query */ - -#ifndef EGL_NV_post_convert_rounding -#define EGL_NV_post_convert_rounding 1 -#endif /* EGL_NV_post_convert_rounding */ - -#ifndef EGL_NV_post_sub_buffer -#define EGL_NV_post_sub_buffer 1 -#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE -typedef EGLBoolean(EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC)(EGLDisplay dpy, - EGLSurface surface, - EGLint x, - EGLint y, - EGLint width, - EGLint height); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy, - EGLSurface surface, - EGLint x, - EGLint y, - EGLint width, - EGLint height); -#endif -#endif /* EGL_NV_post_sub_buffer */ - -#ifndef EGL_NV_stream_sync -#define EGL_NV_stream_sync 1 -#define EGL_SYNC_NEW_FRAME_NV 0x321F -typedef EGLSyncKHR(EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC)( - EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum type, - const EGLint* attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV(EGLDisplay dpy, - EGLStreamKHR stream, - EGLenum type, - const EGLint* attrib_list); -#endif -#endif /* EGL_NV_stream_sync */ - -#ifndef EGL_NV_sync -#define EGL_NV_sync 1 -typedef void* EGLSyncNV; -typedef khronos_utime_nanoseconds_t EGLTimeNV; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 -#define EGL_SYNC_STATUS_NV 0x30E7 -#define EGL_SIGNALED_NV 0x30E8 -#define EGL_UNSIGNALED_NV 0x30E9 -#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 -#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull -#define EGL_ALREADY_SIGNALED_NV 0x30EA -#define EGL_TIMEOUT_EXPIRED_NV 0x30EB -#define EGL_CONDITION_SATISFIED_NV 0x30EC -#define EGL_SYNC_TYPE_NV 0x30ED -#define EGL_SYNC_CONDITION_NV 0x30EE -#define EGL_SYNC_FENCE_NV 0x30EF -#define EGL_NO_SYNC_NV ((EGLSyncNV)0) -typedef EGLSyncNV(EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC)( - EGLDisplay dpy, - EGLenum condition, - const EGLint* attrib_list); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC)(EGLSyncNV sync); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLFENCENVPROC)(EGLSyncNV sync); -typedef EGLint(EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC)(EGLSyncNV sync, - EGLint flags, - EGLTimeNV timeout); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC)(EGLSyncNV sync, - EGLenum mode); -typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC)(EGLSyncNV sync, - EGLint attribute, - EGLint* value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV(EGLDisplay dpy, - EGLenum condition, - const EGLint* attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV(EGLSyncNV sync); -EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV(EGLSyncNV sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV(EGLSyncNV sync, - EGLint flags, - EGLTimeNV timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV(EGLSyncNV sync, EGLenum mode); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV(EGLSyncNV sync, - EGLint attribute, - EGLint* value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_NV_sync */ - -#ifndef EGL_NV_system_time -#define EGL_NV_system_time 1 -typedef khronos_utime_nanoseconds_t EGLuint64NV; -#ifdef KHRONOS_SUPPORT_INT64 -typedef EGLuint64NV(EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC)(void); -typedef EGLuint64NV(EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC)(void); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void); -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_NV_system_time */ - -#ifndef EGL_TIZEN_image_native_buffer -#define EGL_TIZEN_image_native_buffer 1 -#define EGL_NATIVE_BUFFER_TIZEN 0x32A0 -#endif /* EGL_TIZEN_image_native_buffer */ - -#ifndef EGL_TIZEN_image_native_surface -#define EGL_TIZEN_image_native_surface 1 -#define EGL_NATIVE_SURFACE_TIZEN 0x32A1 -#endif /* EGL_TIZEN_image_native_surface */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/glimp/include/EGL/eglplatform.h b/glimp/include/EGL/eglplatform.h deleted file mode 100644 index 5fc6f8024273..000000000000 --- a/glimp/include/EGL/eglplatform.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef __eglplatform_h_ -#define __eglplatform_h_ - -/* -** Copyright (c) 2007-2013 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Platform-specific types and definitions for egl.h - * $Revision: 30994 $ on $Date: 2015-04-30 13:36:48 -0700 (Thu, 30 Apr 2015) $ - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "EGL" component "Registry". - */ - -#include - -/* Macros used in EGL function prototype declarations. - * - * EGL functions should be prototyped as: - * - * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); - * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); - * - * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h - */ - -#ifndef EGLAPI -#define EGLAPI KHRONOS_APICALL -#endif - -#ifndef EGLAPIENTRY -#define EGLAPIENTRY KHRONOS_APIENTRY -#endif -#define EGLAPIENTRYP EGLAPIENTRY * - -/* The types NativeDisplayType, NativeWindowType, and NativePixmapType - * are aliases of window-system-dependent types, such as X Display * or - * Windows Device Context. They must be defined in platform-specific - * code below. The EGL-prefixed versions of Native*Type are the same - * types, renamed in EGL 1.3 so all types in the API start with "EGL". - * - * Khronos STRONGLY RECOMMENDS that you use the default definitions - * provided below, since these changes affect both binary and source - * portability of applications using EGL running on different EGL - * implementations. - */ - -#include GLIMP_EGLPLATFORM_INCLUDE - -/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ -typedef EGLNativeDisplayType NativeDisplayType; -typedef EGLNativePixmapType NativePixmapType; -typedef EGLNativeWindowType NativeWindowType; - -/* Define EGLint. This must be a signed integral type large enough to contain - * all legal attribute names and values passed into and out of EGL, whether - * their type is boolean, bitmask, enumerant (symbolic constant), integer, - * handle, or other. While in general a 32-bit integer will suffice, if - * handles are 64 bit types, then EGLint should be defined as a signed 64-bit - * integer type. - */ -typedef khronos_int32_t EGLint; - -#endif /* __eglplatform_h */ diff --git a/glimp/include/GLES2/gl2.h b/glimp/include/GLES2/gl2.h deleted file mode 100644 index a6444282ed89..000000000000 --- a/glimp/include/GLES2/gl2.h +++ /dev/null @@ -1,1145 +0,0 @@ -#ifndef __gl2_h_ -#define __gl2_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 31811 $ on $Date: 2015-08-10 00:01:11 -0700 (Mon, 10 Aug -*2015) $ -*/ - -#include - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY * -#endif - -/* Generated on date 20150809 */ - -/* 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 -typedef khronos_int8_t GLbyte; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef short GLshort; -typedef unsigned short 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); -#ifdef GL_GLEXT_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 glGenBuffersForVideoFrame(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/glimp/include/GLES2/gl2ext.h b/glimp/include/GLES2/gl2ext.h deleted file mode 100644 index 8ab97124957c..000000000000 --- a/glimp/include/GLES2/gl2ext.h +++ /dev/null @@ -1,5033 +0,0 @@ -#ifndef __gl2ext_h_ -#define __gl2ext_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 31902 $ on $Date: 2015-09-03 15:44:53 -0700 (Thu, 03 Sep -*2015) $ -*/ - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY * -#endif - -/* Generated on date 20150903 */ - -/* 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_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_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_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 PFNGLMULTIDRAWELEMENTSBASEVERTEXOESPROC)( - GLenum mode, - const GLsizei* count, - GLenum type, - const void* const* indices, - GLsizei primcount, - 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 -glMultiDrawElementsBaseVertexOES(GLenum mode, - const GLsizei* count, - GLenum type, - const void* const* indices, - GLsizei primcount, - 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_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_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 bufSize, - 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 bufSize, - 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_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_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_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_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_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); -#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); -#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); -typedef void(GL_APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC)( - GLenum mode, - const GLsizei* count, - GLenum type, - const void* const* indices, - GLsizei primcount, - const 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); -GL_APICALL void GL_APIENTRY -glMultiDrawElementsBaseVertexEXT(GLenum mode, - const GLsizei* count, - GLenum type, - const void* const* indices, - GLsizei primcount, - const 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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 -#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_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_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_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_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_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_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, - GLvoid* 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, - GLvoid* 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_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_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_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_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_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_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 bufSize, - GLint* params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetInternalformatSampleivNV(GLenum target, - GLenum internalformat, - GLsizei samples, - GLenum pname, - GLsizei bufSize, - GLint* params); -#endif -#endif /* GL_NV_internalformat_sample_query */ - -#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 -#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 bufSize, - GLsizei* length, - GLfloat* params); -#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 bufSize, - 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_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_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_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_shader_noperspective_interpolation -#define GL_NV_shader_noperspective_interpolation 1 -#endif /* GL_NV_shader_noperspective_interpolation */ - -#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_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_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_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 -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_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_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_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/glimp/include/GLES2/gl2platform.h b/glimp/include/GLES2/gl2platform.h deleted file mode 100644 index 259b3bbf4d86..000000000000 --- a/glimp/include/GLES2/gl2platform.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __gl2platform_h_ -#define __gl2platform_h_ - -/* $Revision: 23328 $ on $Date:: 2013-10-02 02:28:28 -0700 #$ */ - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "OpenGL-ES" component "Registry". - */ - -#include - -#ifndef GL_APICALL -#define GL_APICALL KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __gl2platform_h_ */ diff --git a/glimp/include/GLES3/gl3.h b/glimp/include/GLES3/gl3.h deleted file mode 100644 index 249a695bfc84..000000000000 --- a/glimp/include/GLES3/gl3.h +++ /dev/null @@ -1,2179 +0,0 @@ -#ifndef __gl3_h_ -#define __gl3_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 31811 $ on $Date: 2015-08-10 00:01:11 -0700 (Mon, 10 Aug -*2015) $ -*/ - -#include - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY * -#endif - -/* Generated on date 20150809 */ - -/* 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 -typedef khronos_int8_t GLbyte; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef short GLshort; -typedef unsigned short 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); -#ifdef GL_GLEXT_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 unsigned short 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); -#ifdef GL_GLEXT_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 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/glimp/include/GLES3/gl31.h b/glimp/include/GLES3/gl31.h deleted file mode 100644 index 52025b1107f4..000000000000 --- a/glimp/include/GLES3/gl31.h +++ /dev/null @@ -1,2887 +0,0 @@ -#ifndef __gl31_h_ -#define __gl31_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision$ on $Date$ -*/ - -#include - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY * -#endif - -/* Generated on date 20150809 */ - -/* 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 -typedef khronos_int8_t GLbyte; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef short GLshort; -typedef unsigned short 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); -#ifdef GL_GLEXT_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 unsigned short 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); -#ifdef GL_GLEXT_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); -#ifdef GL_GLEXT_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/glimp/include/GLES3/gl32.h b/glimp/include/GLES3/gl32.h deleted file mode 100644 index 8fdec0ab0526..000000000000 --- a/glimp/include/GLES3/gl32.h +++ /dev/null @@ -1,3451 +0,0 @@ -#ifndef __gl32_h_ -#define __gl32_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision$ on $Date$ -*/ - -#include - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY * -#endif - -/* Generated on date 20150809 */ - -/* 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 -typedef khronos_int8_t GLbyte; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef short GLshort; -typedef unsigned short 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); -#ifdef GL_GLEXT_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 unsigned short 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); -#ifdef GL_GLEXT_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); -#ifdef GL_GLEXT_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); -#ifdef GL_GLEXT_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/glimp/include/GLES3/gl3platform.h b/glimp/include/GLES3/gl3platform.h deleted file mode 100644 index 956514d86e01..000000000000 --- a/glimp/include/GLES3/gl3platform.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __gl3platform_h_ -#define __gl3platform_h_ - -/* $Revision: 23328 $ on $Date:: 2013-10-02 02:28:28 -0700 #$ */ - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "OpenGL-ES" component "Registry". - */ - -#include - -#ifndef GL_APICALL -#define GL_APICALL KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __gl3platform_h_ */ diff --git a/glimp/include/KHR/khrplatform.h b/glimp/include/KHR/khrplatform.h deleted file mode 100644 index 9f0487dca140..000000000000 --- a/glimp/include/KHR/khrplatform.h +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Khronos platform-specific types and definitions. - * - * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by sending them to the public Khronos Bugzilla - * (http://khronos.org/bugzilla) by filing a bug against product - * "Khronos (general)" component "Registry". - * - * A predefined template which fills in some of the bug fields can be - * reached using http://tinyurl.com/khrplatform-h-bugreport, but you - * must create a Bugzilla login first. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_APIENTRY - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -#include GLIMP_KHRPLATFORM_INCLUDE - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ diff --git a/glimp/polymorphic_downcast.h b/glimp/polymorphic_downcast.h deleted file mode 100644 index 56dae892b657..000000000000 --- a/glimp/polymorphic_downcast.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2014 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_POLYMORPHIC_DOWNCAST_H_ -#define GLIMP_POLYMORPHIC_DOWNCAST_H_ - -#include "starboard/common/log.h" - -namespace nb { - -// This function is designed to model the behavior of polymorphic_downcast from -// http://www.boost.org/doc/libs/1_56_0/libs/conversion/cast.htm - -template -Derived polymorphic_downcast(Base base) { -#if defined(COBALT_BUILD_TYPE_DEBUG) || defined(COBALT_BUILD_TYPE_DEVEL) - SB_DCHECK(dynamic_cast(base) == base); -#endif - return static_cast(base); -} - -} // namespace nb - -#endif // GLIMP_POLYMORPHIC_DOWNCAST_H_ diff --git a/glimp/rect.h b/glimp/rect.h deleted file mode 100644 index 9d2e47decbed..000000000000 --- a/glimp/rect.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_RECT_H_ -#define GLIMP_RECT_H_ - -namespace nb { - -// A simple Rect structure to simplify repetitive definitions of a rectangle -// in various code. -template -struct Rect { - Rect(T left, T top, T width, T height) - : left(left), top(top), width(width), height(height) {} - - void Set(T left_p, T top_p, T width_p, T height_p) { - left = left_p; - top = top_p; - width = width_p; - height = height_p; - } - - T left; - T top; - T width; - T height; -}; - -} // namespace nb - -#endif // GLIMP_RECT_H_ diff --git a/glimp/ref_counted.cc b/glimp/ref_counted.cc deleted file mode 100644 index 00b739e171b9..000000000000 --- a/glimp/ref_counted.cc +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2023 The Cobalt Authors. All Rights Reserved. -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. 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. - -#include "glimp/ref_counted.h" - -#include "starboard/common/log.h" - -namespace nb { - -namespace subtle { - -RefCountedBase::RefCountedBase() - : ref_count_(0) -#ifndef NDEBUG - , - in_dtor_(false) -#endif -{ -} - -RefCountedBase::~RefCountedBase() { -#ifndef NDEBUG - SB_DCHECK(in_dtor_) << "RefCounted object deleted without calling Release()"; -#endif -} - -void RefCountedBase::AddRef() const { -// TODO(maruel): Add back once it doesn't assert 500 times/sec. -// Current thread books the critical section "AddRelease" without release it. -// DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_); -#ifndef NDEBUG - SB_DCHECK(!in_dtor_); -#endif - ++ref_count_; -} - -bool RefCountedBase::Release() const { -// TODO(maruel): Add back once it doesn't assert 500 times/sec. -// Current thread books the critical section "AddRelease" without release it. -// DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_); -#ifndef NDEBUG - SB_DCHECK(!in_dtor_); -#endif - if (--ref_count_ == 0) { -#ifndef NDEBUG - in_dtor_ = true; -#endif - return true; - } - return false; -} - -bool RefCountedThreadSafeBase::HasOneRef() const { - return (SbAtomicAcquire_Load( - &const_cast(this)->ref_count_) == 1); -} - -RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(0) { -#ifndef NDEBUG - in_dtor_ = false; -#endif -} - -RefCountedThreadSafeBase::~RefCountedThreadSafeBase() { -#ifndef NDEBUG - SB_DCHECK(in_dtor_) << "RefCountedThreadSafe object deleted without " - "calling Release()"; -#endif -} - -void RefCountedThreadSafeBase::AddRef() const { -#ifndef NDEBUG - SB_DCHECK(!in_dtor_); -#endif - SbAtomicNoBarrier_Increment(&ref_count_, 1); -} - -bool RefCountedThreadSafeBase::Release() const { -#ifndef NDEBUG - SB_DCHECK(!in_dtor_); - SB_DCHECK(!(SbAtomicAcquire_Load(&ref_count_) == 0)); -#endif - if (SbAtomicBarrier_Increment(&ref_count_, -1) == 0) { -#ifndef NDEBUG - in_dtor_ = true; -#endif - return true; - } - return false; -} - -} // namespace subtle - -} // namespace nb diff --git a/glimp/ref_counted.h b/glimp/ref_counted.h deleted file mode 100644 index 52ff7678b818..000000000000 --- a/glimp/ref_counted.h +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright 2023 The Cobalt Authors. All Rights Reserved. -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. 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. - -#ifndef GLIMP_REF_COUNTED_H_ -#define GLIMP_REF_COUNTED_H_ - -#include - -#include "glimp/thread_collision_warner.h" -#include "starboard/atomic.h" -#include "starboard/common/log.h" - -namespace nb { - -namespace subtle { - -class RefCountedBase { - public: - bool HasOneRef() const { return ref_count_ == 1; } - - protected: - RefCountedBase(); - ~RefCountedBase(); - - void AddRef() const; - - // Returns true if the object should self-delete. - bool Release() const; - - private: - mutable int ref_count_; -#ifndef NDEBUG - mutable bool in_dtor_; -#endif - - DFAKE_MUTEX(add_release_); -}; - -class RefCountedThreadSafeBase { - public: - bool HasOneRef() const; - - protected: - RefCountedThreadSafeBase(); - ~RefCountedThreadSafeBase(); - - void AddRef() const; - - // Returns true if the object should self-delete. - bool Release() const; - - private: - mutable SbAtomic32 ref_count_; -#ifndef NDEBUG - mutable bool in_dtor_; -#endif -}; - -} // namespace subtle - -// -// A base class for reference counted classes. Otherwise, known as a cheap -// knock-off of WebKit's RefCounted class. To use this guy just extend your -// class from it like so: -// -// class MyFoo : public nb::RefCounted { -// ... -// private: -// friend class nb::RefCounted; -// ~MyFoo(); -// }; -// -// You should always make your destructor private, to avoid any code deleting -// the object accidentally while there are references to it. -template -class RefCounted : public subtle::RefCountedBase { - public: - RefCounted() {} - - void AddRef() const { subtle::RefCountedBase::AddRef(); } - - void Release() const { - if (subtle::RefCountedBase::Release()) { - delete static_cast(this); - } - } - - protected: - ~RefCounted() {} -}; - -// Forward declaration. -template -class RefCountedThreadSafe; - -// Default traits for RefCountedThreadSafe. Deletes the object when its ref -// count reaches 0. Overload to delete it on a different thread etc. -template -struct DefaultRefCountedThreadSafeTraits { - static void Destruct(const T* x) { - // Delete through RefCountedThreadSafe to make child classes only need to be - // friend with RefCountedThreadSafe instead of this struct, which is an - // implementation detail. - RefCountedThreadSafe::DeleteInternal( - x); - } -}; - -// -// A thread-safe variant of RefCounted -// -// class MyFoo : public nb::RefCountedThreadSafe { -// ... -// }; -// -// If you're using the default trait, then you should add compile time -// asserts that no one else is deleting your object. i.e. -// private: -// friend class nb::RefCountedThreadSafe; -// ~MyFoo(); -template > -class RefCountedThreadSafe : public subtle::RefCountedThreadSafeBase { - public: - RefCountedThreadSafe() {} - - void AddRef() const { subtle::RefCountedThreadSafeBase::AddRef(); } - - void Release() const { - if (subtle::RefCountedThreadSafeBase::Release()) { - Traits::Destruct(static_cast(this)); - } - } - - protected: - ~RefCountedThreadSafe() {} - - private: - friend struct DefaultRefCountedThreadSafeTraits; - static void DeleteInternal(const T* x) { delete x; } -}; - -// -// A thread-safe wrapper for some piece of data so we can place other -// things in scoped_refptrs<>. -// -template -class RefCountedData : public nb::RefCountedThreadSafe > { - public: - RefCountedData() : data() {} - RefCountedData(const T& in_value) // NOLINT(runtime/explicit) - : data(in_value) {} - - T data; - - private: - friend class nb::RefCountedThreadSafe >; - ~RefCountedData() {} -}; - -// -// A smart pointer class for reference counted objects. Use this class instead -// of calling AddRef and Release manually on a reference counted object to -// avoid common memory leaks caused by forgetting to Release an object -// reference. Sample usage: -// -// class MyFoo : public RefCounted { -// ... -// }; -// -// void some_function() { -// scoped_refptr foo = new MyFoo(); -// foo->Method(param); -// // |foo| is released when this function returns -// } -// -// void some_other_function() { -// scoped_refptr foo = new MyFoo(); -// ... -// foo = NULL; // explicitly releases |foo| -// ... -// if (foo) -// foo->Method(param); -// } -// -// The above examples show how scoped_refptr acts like a pointer to T. -// Given two scoped_refptr classes, it is also possible to exchange -// references between the two objects, like so: -// -// { -// scoped_refptr a = new MyFoo(); -// scoped_refptr b; -// -// b.swap(a); -// // now, |b| references the MyFoo object, and |a| references NULL. -// } -// -// To make both |a| and |b| in the above example reference the same MyFoo -// object, simply use the assignment operator: -// -// { -// scoped_refptr a = new MyFoo(); -// scoped_refptr b; -// -// b = a; -// // now, |a| and |b| each own a reference to the same MyFoo object. -// } -// -template -class scoped_refptr { - public: - typedef T element_type; - - scoped_refptr() : ptr_(NULL) {} - - scoped_refptr(T* p) : ptr_(p) { // NOLINT(runtime/explicit) - if (ptr_) - ptr_->AddRef(); - } - - scoped_refptr(const scoped_refptr& r) : ptr_(r.ptr_) { - if (ptr_) - ptr_->AddRef(); - } - - template - scoped_refptr(const scoped_refptr& r) : ptr_(r.get()) { - if (ptr_) - ptr_->AddRef(); - } - - ~scoped_refptr() { - if (ptr_) - ptr_->Release(); - } - - T* get() const { return ptr_; } - operator T*() const { return ptr_; } - T* operator->() const { - SB_DCHECK(ptr_ != NULL); - return ptr_; - } - - scoped_refptr& operator=(T* p) { - // AddRef first so that self assignment should work - if (p) - p->AddRef(); - T* old_ptr = ptr_; - ptr_ = p; - if (old_ptr) - old_ptr->Release(); - return *this; - } - - scoped_refptr& operator=(const scoped_refptr& r) { - return *this = r.ptr_; - } - - template - scoped_refptr& operator=(const scoped_refptr& r) { - return *this = r.get(); - } - - void swap(T** pp) { - T* p = ptr_; - ptr_ = *pp; - *pp = p; - } - - void swap(scoped_refptr& r) { swap(&r.ptr_); } - - protected: - T* ptr_; -}; - -// Handy utility for creating a scoped_refptr out of a T* explicitly without -// having to retype all the template arguments -template -scoped_refptr make_scoped_refptr(T* t) { - return scoped_refptr(t); -} - -} // namespace nb - -#endif // GLIMP_REF_COUNTED_H_ diff --git a/glimp/shaders/generate_glsl_shader_map.py b/glimp/shaders/generate_glsl_shader_map.py deleted file mode 100644 index a601e1dab088..000000000000 --- a/glimp/shaders/generate_glsl_shader_map.py +++ /dev/null @@ -1,327 +0,0 @@ -#!/usr/bin/python -# Copyright 2016 The Cobalt Authors. All Rights Reserved. -# -# 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. -"""Associates GLSL files with platform-specific shaders based on filename. - -This script scans all input files and detects whether they are GLSL files or -not, based on file extension (e.g. "*.glsl" files are classified as GLSL -files, everything else is not a GLSL file). After this, GLSL files that share -the same base filename with a non-GLSL file is then associated with it. - -At this point we have a mapping from GLSL files to platform-specific shader -file. From here, we hash the GLSL file contents to obtain a mapping from GLSL -hash to platform-specific shader file. Once in this form, the data is ready to -be saved. - -The GLSL hash to platform-specific shader data is saved as a C++ header file, -at which point it can be included by C++ code. The C++ code should call -GenerateGLSLShaderMap() to obtain a std::map object -representing the desired mapping. ShaderData objects provide a pointer to -the data as well as its size. -""" - -import os -import re -import sys - - -def GetBasename(filename): - """Returns the filename without the directory and without its extension. - - Args: - filename: A filename from which a basename is to be extracted. - - Returns: - A string derived from the filename except the directory and extension - are removed. - """ - return os.path.splitext(os.path.basename(filename))[0] - - -def GetHeaderDataDefinitionStringForFile(input_file): - """Returns a string containing C++ that represents all file data in file.""" - with open(input_file, 'rb') as f: - file_contents = f.read() - - def Chunks(contents, chunk_size): - """ Yield successive |chunk_size|-sized chunks from |contents|.""" - for i in range(0, len(contents), chunk_size): - yield contents[i:i + chunk_size] - - # Break up the data into chunk sizes such that the produced output lines - # representing the data in the .h file are less than 80 characters long. - length_of_output_byte_string = 6 - max_characters_per_line = 80 - chunk_size = int(max_characters_per_line / length_of_output_byte_string) - - # Convert each byte to ASCII hexadecimal form and output that to the C++ - # header file, line-by-line. - data_definition_string = '{\n' - for output_line_data in Chunks(file_contents, chunk_size): - data_definition_string += ( - ' '.join([f'0x{y:02x},' for y in output_line_data]) + '\n') - data_definition_string += '};\n\n' - return data_definition_string - - -def GetHeaderDataDefinitionString(files): - """Returns a string containing C++ that represents all file data in files.""" - - data_definition_string = '' - for path in files: - input_file_variable_name = GetBasename(path) - data_definition_string += f'const uint8_t {input_file_variable_name}[] =\n' - data_definition_string += GetHeaderDataDefinitionStringForFile(path) - - return data_definition_string - - -def GetGenerateMapFunctionString(hash_to_shader_map): - """Generate C++ code to populate a hash map from GLSL hash to shader data. - - Args: - hash_to_shader_map: - A dictionary where the keys are hashes and the values are - platform-specific shader filenames. - Returns: - A string of C++ code that defines a function to setup a hash map where the - keys are the GLSL hashes and the values are the platform-specific shader - data. - """ - - generate_map_function_string = ( - 'inline void GenerateGLSLShaderMap(GLSLShaderHashMap* out_map) {\n') - - for k, v in hash_to_shader_map.items(): - input_file_variable_name = GetBasename(v) - generate_map_function_string += ( - f' (*out_map)[{k}U] = ShaderData({input_file_variable_name}, ' - f'sizeof({input_file_variable_name}));\n') - - generate_map_function_string += '}' - return generate_map_function_string - - -def GetShaderNameFunctionString(hash_to_shader_map): - """Generate C++ code to retrieve the shader name from a GLSL hash. - - Args: - hash_to_shader_map: - A dictionary where the keys are hashes and the values are - platform-specific shader filenames. - Returns: - A string of C++ code that defines a function that returns a string with the - corresponding shader name for the GLSL hash value passed as a parameter. - """ - - get_shader_name_function_string = ( - 'inline const char *GetShaderName(uint32_t hash_value) {\n' - ' switch(hash_value) {\n') - - for k, v in hash_to_shader_map.items(): - input_file_variable_name = GetBasename(v) - get_shader_name_function_string += (f' case {k}U: return ' - f'\"{input_file_variable_name}\";\n') - - get_shader_name_function_string += ' }\n return NULL;\n}' - return get_shader_name_function_string - - -HEADER_FILE_TEMPLATE = """ -// Copyright 2016 Google Inc. All Rights Reserved. -// This file is generated (by glimp/shaders/generate_glsl_shader_map.py). -// Do not edit! - -#ifndef {include_guard} -#define {include_guard} - -#include "glimp/shaders/glsl_shader_map_helpers.h" - -namespace glimp {{ -namespace shaders {{ - -{data_definitions} -{generate_map_function} - -#if !defined(NDEBUG) -{shader_name_function} -#endif - -}} // namespace shaders -}} // namespace glimp - -#endif // {include_guard} -""" - - -def GenerateHeaderFileOutput(output_file_name, hash_to_shader_map): - """Generate the actual C++ header file code. - - Args: - output_file_name: The filename for the output C++ header file. - hash_to_shader_map: - A Python dictionary whose keys are hashes and whose values are filenames - for platform-specific shader files. - """ - - include_guard = 'GLIMP_SHADERS_GENERATED_GLSL_SHADER_MAP_H_' - with open(output_file_name, 'w', encoding='utf-8') as output_file: - output_file.write( - HEADER_FILE_TEMPLATE.format( - include_guard=include_guard, - data_definitions=GetHeaderDataDefinitionString( - hash_to_shader_map.values()), - generate_map_function=GetGenerateMapFunctionString( - hash_to_shader_map), - shader_name_function=GetShaderNameFunctionString( - hash_to_shader_map))) - - -def AssociateGLSLFilesWithPlatformFiles(all_shaders): - """Returns a dictionary mapping GLSL to platform shaders. - - all_shaders is an unorganized mixed list of both keys and values. - This function reads it, identifies which items are GLSL files and which - are platform shader files, and then associates GLSL files to platform shader - files that share the same basename. - - Args: - all_shaders: A list containing a mixture of GLSL and platform - shader filenames. - Returns: - A dictionary mapping GLSL shader filenames to platform-specific shader - filenames. - """ - - def IsGLSL(filename): - return os.path.splitext(filename)[1].upper() == '.GLSL' - - # First iterate through our list of files and determine which ones are keys. - basename_to_glsl_file = {} - for item in all_shaders: - if IsGLSL(item): - basename = GetBasename(item) - if basename in basename_to_glsl_file: - raise RuntimeError('Multiple GLSL files match the same basename (' + - basename + ')') - basename_to_glsl_file[basename] = item - - # Now iterate through again linking keys to values to create the map that we - # will return. - mapped_files = {} - for item in all_shaders: - if not IsGLSL(item): - basename = GetBasename(item) - if not basename in basename_to_glsl_file: - raise RuntimeError('Platform-specific file ' + item + - ' has no GLSL match.') - glsl_file = basename_to_glsl_file[basename] - if glsl_file in mapped_files: - raise RuntimeError( - 'Multiple platform-specific files match the same GLSL ' + - 'file with basename ' + basename) - mapped_files[glsl_file] = item - - return mapped_files - - -def HashGLSLShaderFile(glsl_filename): - """Opens the given GLSL file and returns a hash based on its contents. - - The contents of the specified file are read, and a hash is computed based on - them. This hash is computed in the same way that glimp's C++ code in - hash_glsl_source.cc computes hashes so that hashes produced by this script - can be later matched at runtime to a GLSL source. - - Note that all space, newline and tab characters are ignored when computing - the hash. - - The hashing source is taken from the "one_at_a_time" hash function, by Bob - Jenkins, in the public domain at http://burtleburtle.net/bob/hash/doobs.html. - """ - with open(glsl_filename, 'r', encoding='utf-8') as glsl_file: - glsl_contents = glsl_file.read() - - def AddUint32(a, b): - return (a + b) & 0xffffffff - - def XorUint32(a, b): - return (a ^ b) & 0xffffffff - - hash_value = 0 - - # Introduce a generator function for returning only the hashable characters. - def GetHashableCharacters(hash_string): - str_without_comments = re.sub(r'//.*\n', '', hash_string) - str_without_whitespace = re.sub(r'[ \n\t]', '', str_without_comments) - str_without_empty_braces = str_without_whitespace.replace('{}', '') - - for c in str_without_empty_braces: - yield c - - for c in GetHashableCharacters(glsl_contents): - hash_value = AddUint32(hash_value, ord(c)) - hash_value = AddUint32(hash_value, hash_value << 10) - hash_value = XorUint32(hash_value, hash_value >> 6) - hash_value = AddUint32(hash_value, hash_value << 3) - hash_value = XorUint32(hash_value, hash_value >> 11) - hash_value = AddUint32(hash_value, hash_value << 15) - return hash_value - - -def CreateHashToShaderMap(glsl_to_shader_map): - """Calculates hashes for each GLSL filename and replaces the keys with hashes. - """ - hash_to_glsl_map = {} # Used for reporting hash map collisions. - hash_shader_map = {} - for k, v in glsl_to_shader_map.items(): - hashed_glsl = HashGLSLShaderFile(k) - if hashed_glsl in hash_shader_map: - raise RuntimeError('Hash collision between GLSL files ' + k + ' and ' + - hash_to_glsl_map[hashed_glsl] + '.') - hash_to_glsl_map[hashed_glsl] = k - hash_shader_map[hashed_glsl] = v - return hash_shader_map - - -def GetAllShaderFiles(input_files_filename, input_files_dir): - """Returns the list of all GLSL/platform shader files. - - Loads each line of |input_files_filename| into a list and then prepends entry - with |input_files_dir|. - """ - files = [] - with open(input_files_filename, encoding='utf-8') as input_files_file: - files = [x.strip() for x in input_files_file.readlines()] - - for filename in files: - # We filter out files that already have a full path (the case in GN). - if '/' in filename: - yield filename - else: - yield os.path.join(input_files_dir, filename) - - -def main(output_path, input_files_filename, input_files_dir): - all_shaders = list(GetAllShaderFiles(input_files_filename, input_files_dir)) - - glsl_to_shader_map = AssociateGLSLFilesWithPlatformFiles(all_shaders) - - hash_to_shader_map = CreateHashToShaderMap(glsl_to_shader_map) - - GenerateHeaderFileOutput(output_path, hash_to_shader_map) - - -if __name__ == '__main__': - main(sys.argv[1], sys.argv[2], sys.argv[3]) diff --git a/glimp/shaders/glsl_shader_map_helpers.h b/glimp/shaders/glsl_shader_map_helpers.h deleted file mode 100644 index 0776d4ae57ca..000000000000 --- a/glimp/shaders/glsl_shader_map_helpers.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_SHADERS_GLSL_SHADER_MAP_HELPERS_H_ -#define GLIMP_SHADERS_GLSL_SHADER_MAP_HELPERS_H_ - -#include - -#include "starboard/types.h" - -namespace glimp { -namespace shaders { - -struct ShaderData { - ShaderData() : data(NULL), size(0) {} - ShaderData(const uint8_t* data, size_t size) : data(data), size(size) {} - - const uint8_t* data; - size_t size; -}; - -typedef std::map GLSLShaderHashMap; - -} // namespace shaders -} // namespace glimp - -#endif // GLIMP_SHADERS_GLSL_SHADER_MAP_HELPERS_H_ diff --git a/glimp/shaders/hash_glsl_source.cc b/glimp/shaders/hash_glsl_source.cc deleted file mode 100644 index df1997d1f0b6..000000000000 --- a/glimp/shaders/hash_glsl_source.cc +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/shaders/hash_glsl_source.h" - -namespace glimp { -namespace shaders { - -namespace { -// Takes the current hash and combines it with a new character to produce a -// new hash. -uint32_t UpdateHash(uint32_t hash, char update_char) { - hash += update_char; - hash += (hash << 10); - hash ^= (hash >> 6); - return hash; -} - -// Applies some additional calculations to the hash after all characters -// have been accumulated. -uint32_t FinalizeHash(uint32_t hash) { - hash += (hash << 3); - hash ^= (hash >> 11); - hash += (hash << 15); - return hash; -} - -const char* ScanUntilNonWhitespace(const char* source) { - uint32_t i = 0; - for (; source[i] != '\0'; ++i) { - if (source[i] == ' ' || source[i] == '\t' || source[i] == '\n') { - continue; - } - - if (source[i] == '/' && source[i + 1] == '/') { - // If we see a comment, leave it out of the hash. - while (source[i] != '\n' && source[i] != '\0') { - ++i; - } - if (source[i] == '\0') { - break; - } else { - continue; - } - } - break; - } - - return &source[i]; -} - -const char* ScanUntilHashableCharacter(const char* source) { - while (true) { - const char* next_char = ScanUntilNonWhitespace(source); - - // If we find empty scopes (e.g: - // - // { - // // Stage 0: Texture - // } - // - // Skip past them without hashing those characters. - if (*next_char == '{') { - const char* next_next_char = ScanUntilNonWhitespace(next_char + 1); - if (*next_next_char == '}') { - source = next_next_char + 1; - continue; - } - } - return next_char; - } -} -} // namespace - -uint32_t HashGLSLSource(const char* source) { - uint32_t hash = 0; - const char* cur_char = source; - while (true) { - cur_char = ScanUntilHashableCharacter(cur_char); - if (*cur_char == '\0') { - break; - } - - hash = UpdateHash(hash, *cur_char); - ++cur_char; - } - return FinalizeHash(hash); -} - -} // namespace shaders -} // namespace glimp diff --git a/glimp/shaders/hash_glsl_source.h b/glimp/shaders/hash_glsl_source.h deleted file mode 100644 index 748077ec8d18..000000000000 --- a/glimp/shaders/hash_glsl_source.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_SHADERS_HASH_GLSL_SOURCE_H_ -#define GLIMP_SHADERS_HASH_GLSL_SOURCE_H_ - -#include - -namespace glimp { -namespace shaders { - -// This function takes a GLSL source and computes a hash value to represent it. -// This hash function is the exact same the one implemented in Python in -// generate_glsl_shader_map.py (the function HashGLSLShaderFile()) so that -// hashes by that script at build time can be linked up at runtime with this -// function. -// -// Note, all space, newline and tab characters are ignored when computing the -// hash. -// -// The hashing source is taken from the "one_at_a_time" hash function, by Bob -// Jenkins, in the public domain at http://burtleburtle.net/bob/hash/doobs.html. -uint32_t HashGLSLSource(const char* source); - -} // namespace shaders -} // namespace glimp - -#endif // GLIMP_SHADERS_HASH_GLSL_SOURCE_H_ diff --git a/glimp/stub/egl/display_impl.cc b/glimp/stub/egl/display_impl.cc deleted file mode 100644 index 9e8985a304d9..000000000000 --- a/glimp/stub/egl/display_impl.cc +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/stub/egl/display_impl.h" - -#include -#include "glimp/stub/egl/pbuffer_surface_impl.h" -#include "glimp/stub/egl/window_surface_impl.h" -#include "glimp/stub/gles/context_impl.h" -#include "starboard/common/log.h" -#include "starboard/common/once.h" -#include "starboard/types.h" - -namespace glimp { -namespace egl { - -DisplayImplStub::DisplayImplStub() { - InitializeSupportedConfigs(); -} - -DisplayImplStub::~DisplayImplStub() { - for (ConfigSet::iterator iter = supported_configs_.begin(); - iter != supported_configs_.end(); ++iter) { - delete *iter; - } -} - -bool DisplayImpl::IsValidNativeDisplayType( - EGLNativeDisplayType native_display) { - return native_display == EGL_DEFAULT_DISPLAY; -} - -std::unique_ptr DisplayImpl::Create( - EGLNativeDisplayType native_display) { - SB_CHECK(IsValidNativeDisplayType(native_display)); - return std::unique_ptr(new DisplayImplStub()); -} - -DisplayImpl::VersionInfo DisplayImplStub::GetVersionInfo() { - DisplayImpl::VersionInfo version_info; - version_info.major = 1; - version_info.minor = 5; - return version_info; -} - -void DisplayImplStub::InitializeSupportedConfigs() { - Config* config = new Config(); - (*config)[EGL_RED_SIZE] = 8; - (*config)[EGL_GREEN_SIZE] = 8; - (*config)[EGL_BLUE_SIZE] = 8; - (*config)[EGL_ALPHA_SIZE] = 8; - (*config)[EGL_BUFFER_SIZE] = 32; - (*config)[EGL_LUMINANCE_SIZE] = 0; - (*config)[EGL_STENCIL_SIZE] = 0; - (*config)[EGL_COLOR_BUFFER_TYPE] = EGL_RGB_BUFFER; - (*config)[EGL_CONFORMANT] = EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT; - (*config)[EGL_RENDERABLE_TYPE] = EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT; - (*config)[EGL_SURFACE_TYPE] = EGL_WINDOW_BIT | EGL_PBUFFER_BIT; - (*config)[EGL_BIND_TO_TEXTURE_RGBA] = EGL_TRUE; - - supported_configs_.insert(config); -} - -std::unique_ptr DisplayImplStub::CreateContext( - const Config* config, - int gles_version) { - if (gles_version == 2 || gles_version == 3) { - return std::unique_ptr(new gles::ContextImplStub()); - } else { - return std::unique_ptr(); - } -} - -} // namespace egl -} // namespace glimp diff --git a/glimp/stub/egl/display_impl.h b/glimp/stub/egl/display_impl.h deleted file mode 100644 index 497e97f7b5a7..000000000000 --- a/glimp/stub/egl/display_impl.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_STUB_EGL_DISPLAY_IMPL_H_ -#define GLIMP_STUB_EGL_DISPLAY_IMPL_H_ - -#include -#include - -#include -#include "glimp/egl/config.h" -#include "glimp/egl/display_impl.h" - -namespace glimp { -namespace egl { - -class DisplayImplStub : public DisplayImpl { - public: - DisplayImplStub(); - ~DisplayImplStub(); - - DisplayImpl::VersionInfo GetVersionInfo() override; - - const ConfigSet& GetSupportedConfigs() const override { - return supported_configs_; - } - - std::unique_ptr CreateWindowSurface( - const Config* config, - EGLNativeWindowType win, - const AttribMap& attributes) override; - - std::unique_ptr CreatePbufferSurface( - const Config* config, - const AttribMap& attributes) override; - - std::unique_ptr CreateContext(const Config* config, - int gles_version) override; - - bool SetSwapInterval(int interval) override { return true; } - - private: - void InitializeSupportedConfigs(); - - ConfigSet supported_configs_; -}; - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_STUB_EGL_DISPLAY_IMPL_H_ diff --git a/glimp/stub/egl/get_proc_address_impl.cc b/glimp/stub/egl/get_proc_address_impl.cc deleted file mode 100644 index 7a76869940b3..000000000000 --- a/glimp/stub/egl/get_proc_address_impl.cc +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/egl/get_proc_address_impl.h" - -#include "glimp/egl/display_registry.h" -#include "glimp/egl/scoped_egl_lock.h" -#include "glimp/polymorphic_downcast.h" -#include "glimp/stub/egl/display_impl.h" -#include "starboard/common/string.h" - -namespace glimp { -namespace egl { - -MustCastToProperFunctionPointerType GetProcAddressImpl(const char* procname) { - return NULL; -} - -} // namespace egl -} // namespace glimp diff --git a/glimp/stub/egl/pbuffer_surface_impl.cc b/glimp/stub/egl/pbuffer_surface_impl.cc deleted file mode 100644 index 348337282681..000000000000 --- a/glimp/stub/egl/pbuffer_surface_impl.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/stub/egl/pbuffer_surface_impl.h" - -#include - -#include "starboard/common/pointer_arithmetic.h" - -namespace glimp { -namespace egl { - -PbufferSurfaceImplStub::PbufferSurfaceImplStub(int width, int height) - : width_(width), height_(height) {} - -PbufferSurfaceImplStub::~PbufferSurfaceImplStub() {} - -} // namespace egl -} // namespace glimp diff --git a/glimp/stub/egl/pbuffer_surface_impl.h b/glimp/stub/egl/pbuffer_surface_impl.h deleted file mode 100644 index 0932668def01..000000000000 --- a/glimp/stub/egl/pbuffer_surface_impl.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_STUB_EGL_PBUFFER_SURFACE_IMPL_H_ -#define GLIMP_STUB_EGL_PBUFFER_SURFACE_IMPL_H_ - -#include - -#include "glimp/ref_counted.h" -#include "glimp/stub/egl/surface_impl.h" - -namespace glimp { -namespace egl { - -class PbufferSurfaceImplStub : public SurfaceImplStub { - public: - PbufferSurfaceImplStub(int width, int height); - virtual ~PbufferSurfaceImplStub(); - - int GetWidth() const override { return width_; } - int GetHeight() const override { return height_; } - - private: - int width_; - int height_; -}; - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_STUB_EGL_PBUFFER_SURFACE_IMPL_H_ diff --git a/glimp/stub/egl/surface_impl.cc b/glimp/stub/egl/surface_impl.cc deleted file mode 100644 index d05744c1e89e..000000000000 --- a/glimp/stub/egl/surface_impl.cc +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/stub/egl/surface_impl.h" - -namespace glimp { -namespace egl {} // namespace egl -} // namespace glimp diff --git a/glimp/stub/egl/surface_impl.h b/glimp/stub/egl/surface_impl.h deleted file mode 100644 index 7b4210462fa3..000000000000 --- a/glimp/stub/egl/surface_impl.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_STUB_EGL_SURFACE_IMPL_H_ -#define GLIMP_STUB_EGL_SURFACE_IMPL_H_ - -#include "glimp/egl/surface_impl.h" - -namespace glimp { -namespace egl { - -class SurfaceImplStub : public SurfaceImpl { - public: - bool IsWindowSurface() const final { return false; } -}; - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_STUB_EGL_SURFACE_IMPL_H_ diff --git a/glimp/stub/egl/window_surface_impl.cc b/glimp/stub/egl/window_surface_impl.cc deleted file mode 100644 index 3d7d8e3239c9..000000000000 --- a/glimp/stub/egl/window_surface_impl.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/stub/egl/window_surface_impl.h" - -#include "starboard/common/log.h" - -namespace glimp { -namespace egl { - -WindowSurfaceImplStub::WindowSurfaceImplStub() { - width_ = 0; - height_ = 0; -} - -WindowSurfaceImplStub::~WindowSurfaceImplStub() {} - -} // namespace egl -} // namespace glimp diff --git a/glimp/stub/egl/window_surface_impl.h b/glimp/stub/egl/window_surface_impl.h deleted file mode 100644 index 8b910a623a50..000000000000 --- a/glimp/stub/egl/window_surface_impl.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_STUB_EGL_WINDOW_SURFACE_IMPL_H_ -#define GLIMP_STUB_EGL_WINDOW_SURFACE_IMPL_H_ - -#include "glimp/stub/egl/surface_impl.h" -#include "starboard/configuration.h" - -namespace glimp { -namespace egl { - -class WindowSurfaceImplStub : public SurfaceImplStub { - public: - WindowSurfaceImplStub(); - virtual ~WindowSurfaceImplStub(); - - int GetWidth() const override { return width_; } - int GetHeight() const override { return height_; } - - private: - int width_; - int height_; -}; - -} // namespace egl -} // namespace glimp - -#endif // GLIMP_STUB_EGL_WINDOW_SURFACE_IMPL_H_ diff --git a/glimp/stub/gles/buffer_impl.cc b/glimp/stub/gles/buffer_impl.cc deleted file mode 100644 index 6f3f3b0e6124..000000000000 --- a/glimp/stub/gles/buffer_impl.cc +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/stub/gles/buffer_impl.h" - -#include "starboard/memory.h" - -namespace glimp { -namespace gles { - -BufferImplStub::BufferImplStub() {} - -bool BufferImplStub::Allocate(Usage usage, khronos_usize_t size) { - return false; -} - -bool BufferImplStub::SetData(khronos_intptr_t offset, - khronos_usize_t size, - const void* data) { - SB_DCHECK(data); - return false; -} - -void* BufferImplStub::Map() { - return NULL; -} - -bool BufferImplStub::Unmap() { - return true; -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/stub/gles/buffer_impl.h b/glimp/stub/gles/buffer_impl.h deleted file mode 100644 index 17e0c6396c77..000000000000 --- a/glimp/stub/gles/buffer_impl.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_STUB_GLES_BUFFER_IMPL_H_ -#define GLIMP_STUB_GLES_BUFFER_IMPL_H_ - -#include "glimp/gles/buffer_impl.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -class BufferImplStub : public BufferImpl { - public: - BufferImplStub(); - ~BufferImplStub() override {} - - bool Allocate(Usage usage, size_t size) override; - bool SetData(intptr_t offset, size_t size, const void* data) override; - - void* Map() override; - bool Unmap() override; - - private: -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_STUB_GLES_BUFFER_IMPL_H_ diff --git a/glimp/stub/gles/context_impl.cc b/glimp/stub/gles/context_impl.cc deleted file mode 100644 index dc882cafea8c..000000000000 --- a/glimp/stub/gles/context_impl.cc +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/stub/gles/context_impl.h" - -#include -#include - -#include "glimp/polymorphic_downcast.h" -#include "glimp/rect.h" -#include "glimp/stub/egl/surface_impl.h" -#include "glimp/stub/gles/buffer_impl.h" -#include "glimp/stub/gles/program_impl.h" -#include "glimp/stub/gles/shader_impl.h" -#include "glimp/stub/gles/texture_impl.h" -#include "glimp/tracing/tracing.h" - -namespace glimp { -namespace gles { - -ContextImplStub::ContextImplStub() {} - -ContextImpl::ExtensionList ContextImplStub::GetExtensions() const { - ContextImpl::ExtensionList extensions; - - // We are able to accept RGBA8 textures as framebuffer attachments (i.e. - // as render targets). - extensions.push_back("GL_OES_rgb8_rgba8"); - - // This is required in order to render distance field fonts. - extensions.push_back("GL_OES_standard_derivatives"); - - return extensions; -} - -int ContextImplStub::GetMaxVertexAttribs() const { - return 16; -} - -int ContextImplStub::GetMaxFragmentTextureUnits() const { - return 16; -} - -int ContextImplStub::GetMaxCombinedTextureImageUnits() const { - return 0; -} - -int ContextImplStub::GetMaxTextureSize() const { - return 4096; -} - -int ContextImplStub::GetMaxRenderbufferSize() const { - return 4096; -} - -int ContextImplStub::GetMaxFragmentUniformVectors() const { - // GL ES requires that it is at least 16, so we will return that. - return ProgramImplStub::kMaxUniformsPerShader; -} - -std::unique_ptr ContextImplStub::CreateProgram() { - return std::unique_ptr(new ProgramImplStub()); -} - -std::unique_ptr ContextImplStub::CreateVertexShader() { - return std::unique_ptr( - new ShaderImplStub(ShaderImplStub::kVertex)); -} - -std::unique_ptr ContextImplStub::CreateFragmentShader() { - return std::unique_ptr( - new ShaderImplStub(ShaderImplStub::kFragment)); -} - -std::unique_ptr ContextImplStub::CreateBuffer() { - return std::unique_ptr(new BufferImplStub()); -} - -std::unique_ptr ContextImplStub::CreateTexture() { - return std::unique_ptr(new TextureImplStub()); -} - -void ContextImplStub::Flush() { - // Do nothing, we will flush when we swap buffers. -} - -void ContextImplStub::Finish() {} - -void ContextImplStub::Clear(bool clear_color, - bool clear_depth, - bool clear_stencil, - const DrawState& draw_state, - DrawStateDirtyFlags* dirty_flags) {} - -void ContextImplStub::DrawArrays(DrawMode mode, - int first_vertex, - int num_vertices, - const DrawState& draw_state, - DrawStateDirtyFlags* dirty_flags) {} - -void ContextImplStub::DrawElements(DrawMode mode, - int num_vertices, - IndexDataType index_data_type, - intptr_t index_offset_in_bytes, - const DrawState& draw_state, - DrawStateDirtyFlags* dirty_flags) {} - -void ContextImplStub::SwapBuffers(egl::Surface* surface) {} - -} // namespace gles -} // namespace glimp diff --git a/glimp/stub/gles/context_impl.h b/glimp/stub/gles/context_impl.h deleted file mode 100644 index 6ed9626580b5..000000000000 --- a/glimp/stub/gles/context_impl.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_STUB_GLES_CONTEXT_IMPL_H_ -#define GLIMP_STUB_GLES_CONTEXT_IMPL_H_ - -#include -#include "glimp/egl/surface.h" -#include "glimp/gles/context_impl.h" -#include "glimp/gles/draw_state.h" -#include "glimp/gles/index_data_type.h" -#include "glimp/shaders/glsl_shader_map_helpers.h" - -namespace glimp { -namespace gles { - -class ContextImplStub : public ContextImpl { - public: - ContextImplStub(); - virtual ~ContextImplStub() {} - - ContextImpl::ExtensionList GetExtensions() const override; - int GetMaxVertexAttribs() const override; - int GetMaxFragmentTextureUnits() const override; - int GetMaxCombinedTextureImageUnits() const override; - int GetMaxTextureSize() const override; - int GetMaxRenderbufferSize() const override; - int GetMaxFragmentUniformVectors() const override; - int GetMaxVertexTextureImageUnits() const override { return 0; } - - std::unique_ptr CreateProgram() override; - - std::unique_ptr CreateVertexShader() override; - std::unique_ptr CreateFragmentShader() override; - - std::unique_ptr CreateBuffer() override; - - std::unique_ptr CreateTexture() override; - - void Flush() override; - void Finish() override; - - void Clear(bool clear_color, - bool clear_depth, - bool clear_stencil, - const DrawState& draw_state, - DrawStateDirtyFlags* dirty_flags) override; - - void DrawArrays(DrawMode mode, - int first_vertex, - int num_vertices, - const DrawState& draw_state, - DrawStateDirtyFlags* dirty_flags) override; - - void DrawElements(DrawMode mode, - int num_vertices, - IndexDataType index_data_type, - intptr_t index_offset_in_bytes, - const DrawState& draw_state, - DrawStateDirtyFlags* dirty_flags) override; - - void SwapBuffers(egl::Surface* surface) override; - - private: -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_STUB_GLES_CONTEXT_IMPL_H_ diff --git a/glimp/stub/gles/program_impl.cc b/glimp/stub/gles/program_impl.cc deleted file mode 100644 index ae6afe87003e..000000000000 --- a/glimp/stub/gles/program_impl.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/stub/gles/program_impl.h" - -#include "glimp/polymorphic_downcast.h" -#include "glimp/stub/gles/shader_impl.h" -#include "starboard/common/log.h" - -namespace glimp { -namespace gles { - -ProgramImplStub::ProgramImplStub() - : linked_vertex_shader_(NULL), linked_fragment_shader_(NULL) {} - -ProgramImpl::LinkResults ProgramImplStub::Link( - const nb::scoped_refptr& vertex_shader, - const nb::scoped_refptr& fragment_shader) { - linked_vertex_shader_ = - nb::polymorphic_downcast(vertex_shader->impl()); - linked_fragment_shader_ = - nb::polymorphic_downcast(fragment_shader->impl()); - - bound_attributes_.clear(); - - return ProgramImpl::LinkResults(true); -} - -bool ProgramImplStub::BindAttribLocation(unsigned int index, const char* name) { - SB_DCHECK(linked_vertex_shader_); - return false; -} - -int ProgramImplStub::GetUniformLocation(const char* name) { - return -1; -} - -int ProgramImplStub::GetResourceForBoundAttrib(unsigned int index) const { - std::map::const_iterator found = - bound_attributes_.find(index); - if (found == bound_attributes_.end()) { - return -1; - } - - return found->second; -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/stub/gles/program_impl.h b/glimp/stub/gles/program_impl.h deleted file mode 100644 index 58257662111d..000000000000 --- a/glimp/stub/gles/program_impl.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_STUB_GLES_PROGRAM_IMPL_H_ -#define GLIMP_STUB_GLES_PROGRAM_IMPL_H_ - -#include - -#include "glimp/gles/program_impl.h" -#include "glimp/gles/shader.h" -#include "glimp/gles/uniform_info.h" -#include "glimp/ref_counted.h" -#include "glimp/stub/gles/shader_impl.h" - -namespace glimp { -namespace gles { - -class ProgramImplStub : public ProgramImpl { - public: - static const int kMaxUniformsPerShader = 16; - - ProgramImplStub(); - ~ProgramImplStub() override {} - - ProgramImpl::LinkResults Link( - const nb::scoped_refptr& vertex_shader, - const nb::scoped_refptr& fragment_shader) override; - - bool BindAttribLocation(unsigned int index, const char* name) override; - - int GetUniformLocation(const char* name) override; - - // Returns the location of the shader attribute that was previously bound - // to |index| in a call to BindAttribLocation(). - int GetResourceForBoundAttrib(unsigned int index) const; - - ShaderImplStub* linked_vertex_shader() const { return linked_vertex_shader_; } - - ShaderImplStub* linked_fragment_shader() const { - return linked_fragment_shader_; - } - - private: - ShaderImplStub* linked_vertex_shader_; - ShaderImplStub* linked_fragment_shader_; - - std::map bound_attributes_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_STUB_GLES_PROGRAM_IMPL_H_ diff --git a/glimp/stub/gles/shader_impl.cc b/glimp/stub/gles/shader_impl.cc deleted file mode 100644 index 12d5a5e3c9aa..000000000000 --- a/glimp/stub/gles/shader_impl.cc +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/stub/gles/shader_impl.h" - -#include "glimp/shaders/hash_glsl_source.h" - -namespace glimp { -namespace gles { - -ShaderImplStub::ShaderImplStub(Type type) : type_(type) {} - -ShaderImpl::CompileResults ShaderImplStub::Compile(const std::string& source) { - return ShaderImpl::CompileResults(true); -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/stub/gles/shader_impl.h b/glimp/stub/gles/shader_impl.h deleted file mode 100644 index 862aa2eb039b..000000000000 --- a/glimp/stub/gles/shader_impl.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_STUB_GLES_SHADER_IMPL_H_ -#define GLIMP_STUB_GLES_SHADER_IMPL_H_ - -#include - -#include "glimp/gles/shader_impl.h" -#include "glimp/gles/uniform_info.h" -#include "glimp/ref_counted.h" -#include "glimp/shaders/glsl_shader_map_helpers.h" -#include "starboard/common/log.h" - -namespace glimp { -namespace gles { - -class ShaderImplStub : public ShaderImpl { - public: - enum Type { - kVertex, - kFragment, - }; - - explicit ShaderImplStub(Type type); - ~ShaderImplStub() override {} - - ShaderImpl::CompileResults Compile(const std::string& source) override; - - private: - Type type_; -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_STUB_GLES_SHADER_IMPL_H_ diff --git a/glimp/stub/gles/texture_impl.cc b/glimp/stub/gles/texture_impl.cc deleted file mode 100644 index b7ed24a68ee0..000000000000 --- a/glimp/stub/gles/texture_impl.cc +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include "glimp/stub/gles/texture_impl.h" - -#include - -#include "glimp/gles/convert_pixel_data.h" -#include "glimp/polymorphic_downcast.h" -#include "glimp/stub/egl/pbuffer_surface_impl.h" -#include "glimp/stub/gles/buffer_impl.h" -#include "starboard/memory.h" - -namespace glimp { -namespace gles { - -TextureImplStub::TextureImplStub() {} - -void TextureImplStub::Initialize(int level, - PixelFormat pixel_format, - int width, - int height) { - SB_DCHECK(level == 0); -} - -bool TextureImplStub::UpdateData(int level, - const nb::Rect& window, - int pitch_in_bytes, - const void* pixels) { - return false; -} - -void TextureImplStub::UpdateDataFromBuffer( - int level, - const nb::Rect& window, - int pitch_in_bytes, - const nb::scoped_refptr& pixel_unpack_buffer, - uintptr_t buffer_offset) {} - -void TextureImplStub::BindToEGLSurface(egl::Surface* surface) {} - -void TextureImplStub::ReadPixelsAsRGBA8(const nb::Rect& window, - int pitch_in_bytes, - void* pixels) {} - -bool TextureImplStub::CanBeAttachedToFramebuffer() const { - return false; -} - -} // namespace gles -} // namespace glimp diff --git a/glimp/stub/gles/texture_impl.h b/glimp/stub/gles/texture_impl.h deleted file mode 100644 index 30a1fe955dae..000000000000 --- a/glimp/stub/gles/texture_impl.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2023 The Cobalt Authors. All Rights Reserved. - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_STUB_GLES_TEXTURE_IMPL_H_ -#define GLIMP_STUB_GLES_TEXTURE_IMPL_H_ - -#include - -#include "glimp/gles/buffer.h" -#include "glimp/gles/pixel_format.h" -#include "glimp/gles/texture_impl.h" -#include "glimp/rect.h" -#include "glimp/ref_counted.h" - -namespace glimp { -namespace gles { - -class TextureImplStub : public TextureImpl { - public: - TextureImplStub(); - ~TextureImplStub() override {} - - void Initialize(int level, - PixelFormat pixel_format, - int width, - int height) override; - - bool UpdateData(int level, - const nb::Rect& window, - int pitch_in_bytes, - const void* pixels) override; - - void UpdateDataFromBuffer( - int level, - const nb::Rect& window, - int pitch_in_bytes, - const nb::scoped_refptr& pixel_unpack_buffer, - uintptr_t buffer_offset) override; - - void BindToEGLSurface(egl::Surface* surface) override; - - void ReadPixelsAsRGBA8(const nb::Rect& window, - int pitch_in_bytes, - void* pixels) override; - - bool CanBeAttachedToFramebuffer() const override; - - private: -}; - -} // namespace gles -} // namespace glimp - -#endif // GLIMP_STUB_GLES_TEXTURE_IMPL_H_ diff --git a/glimp/thread_collision_warner.cc b/glimp/thread_collision_warner.cc deleted file mode 100644 index 31e62da5ff17..000000000000 --- a/glimp/thread_collision_warner.cc +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2023 The Cobalt Authors. All Rights Reserved. -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. 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. - -#include "glimp/thread_collision_warner.h" - -#include "starboard/atomic.h" -#include "starboard/common/log.h" -#include "starboard/thread.h" -#include "starboard/types.h" - -namespace nb { - -void DCheckAsserter::warn() { - SB_NOTREACHED() << "Thread Collision"; -} - -static SbAtomic32 CurrentThread() { - const SbThreadId current_thread_id = SbThreadGetId(); - // We need to get the thread id into an atomic data type. This might be a - // truncating conversion, but any loss-of-information just increases the - // chance of a false negative, not a false positive. - const SbAtomic32 atomic_thread_id = - static_cast(current_thread_id); - return atomic_thread_id; -} - -void ThreadCollisionWarner::EnterSelf() { - // If the active thread is 0 then I'll write the current thread ID - // if two or more threads arrive here only one will succeed to - // write on valid_thread_id_ the current thread ID. - SbAtomic32 current_thread_id = CurrentThread(); - - int previous_value = - SbAtomicNoBarrier_CompareAndSwap(&valid_thread_id_, 0, current_thread_id); - if (previous_value != 0 && previous_value != current_thread_id) { - // gotcha! a thread is trying to use the same class and that is - // not current thread. - asserter_->warn(); - } - - SbAtomicNoBarrier_Increment(&counter_, 1); -} - -void ThreadCollisionWarner::Enter() { - SbAtomic32 current_thread_id = CurrentThread(); - - if (SbAtomicNoBarrier_CompareAndSwap(&valid_thread_id_, 0, - current_thread_id) != 0) { - // gotcha! another thread is trying to use the same class. - asserter_->warn(); - } - - SbAtomicNoBarrier_Increment(&counter_, 1); -} - -void ThreadCollisionWarner::Leave() { - if (SbAtomicBarrier_Increment(&counter_, -1) == 0) { - SbAtomicNoBarrier_Store(&valid_thread_id_, 0); - } -} - -} // namespace nb diff --git a/glimp/thread_collision_warner.h b/glimp/thread_collision_warner.h deleted file mode 100644 index ca30a047a27a..000000000000 --- a/glimp/thread_collision_warner.h +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright 2023 The Cobalt Authors. All Rights Reserved. -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. 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. - -#ifndef GLIMP_THREAD_COLLISION_WARNER_H_ -#define GLIMP_THREAD_COLLISION_WARNER_H_ - -#include "starboard/atomic.h" - -// A helper class alongside macros to be used to verify assumptions about thread -// safety of a class. -// -// Example: Queue implementation non thread-safe but still usable if clients -// are synchronized somehow. -// -// In this case the macro DFAKE_SCOPED_LOCK has to be -// used, it checks that if a thread is inside the push/pop then -// no one else is still inside the pop/push -// -// class NonThreadSafeQueue { -// public: -// ... -// void push(int) { DFAKE_SCOPED_LOCK(push_pop_); ... } -// int pop() { DFAKE_SCOPED_LOCK(push_pop_); ... } -// ... -// private: -// DFAKE_MUTEX(push_pop_); -// }; -// -// -// Example: Queue implementation non thread-safe but still usable if clients -// are synchronized somehow, it calls a method to "protect" from -// a "protected" method -// -// In this case the macro DFAKE_SCOPED_RECURSIVE_LOCK -// has to be used, it checks that if a thread is inside the push/pop -// then no one else is still inside the pop/push -// -// class NonThreadSafeQueue { -// public: -// void push(int) { -// DFAKE_SCOPED_LOCK(push_pop_); -// ... -// } -// int pop() { -// DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_); -// bar(); -// ... -// } -// void bar() { DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_); ... } -// ... -// private: -// DFAKE_MUTEX(push_pop_); -// }; -// -// -// Example: Queue implementation not usable even if clients are synchronized, -// so only one thread in the class life cycle can use the two members -// push/pop. -// -// In this case the macro DFAKE_SCOPED_LOCK_THREAD_LOCKED pins the -// specified -// critical section the first time a thread enters push or pop, from -// that time on only that thread is allowed to execute push or pop. -// -// class NonThreadSafeQueue { -// public: -// ... -// void push(int) { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... } -// int pop() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... } -// ... -// private: -// DFAKE_MUTEX(push_pop_); -// }; -// -// -// Example: Class that has to be constructed/destroyed on same thread, it has -// a "shareable" method (with external synchronization) and a not -// shareable method (even with external synchronization). -// -// In this case 3 Critical sections have to be defined -// -// class ExoticClass { -// public: -// ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... } -// ~ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... } -// -// void Shareable() { DFAKE_SCOPED_LOCK(shareable_section_); ... } -// void NotShareable() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... } -// ... -// private: -// DFAKE_MUTEX(ctor_dtor_); -// DFAKE_MUTEX(shareable_section_); -// }; - -#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) - -// Defines a class member that acts like a mutex. It is used only as a -// verification tool. -#define DFAKE_MUTEX(obj) mutable nb::ThreadCollisionWarner obj -// Asserts the call is never called simultaneously in two threads. Used at -// member function scope. -#define DFAKE_SCOPED_LOCK(obj) \ - nb::ThreadCollisionWarner::ScopedCheck s_check_##obj(&obj) -// Asserts the call is never called simultaneously in two threads. Used at -// member function scope. Same as DFAKE_SCOPED_LOCK but allows recursive locks. -#define DFAKE_SCOPED_RECURSIVE_LOCK(obj) \ - nb::ThreadCollisionWarner::ScopedRecursiveCheck sr_check_##obj(&obj) -// Asserts the code is always executed in the same thread. -#define DFAKE_SCOPED_LOCK_THREAD_LOCKED(obj) \ - nb::ThreadCollisionWarner::Check check_##obj(&obj) - -#else - -#define DFAKE_MUTEX(obj) typedef void InternalFakeMutexType##obj -#define DFAKE_SCOPED_LOCK(obj) ((void)0) -#define DFAKE_SCOPED_RECURSIVE_LOCK(obj) ((void)0) -#define DFAKE_SCOPED_LOCK_THREAD_LOCKED(obj) ((void)0) - -#endif - -namespace nb { - -// The class ThreadCollisionWarner uses an Asserter to notify the collision -// AsserterBase is the interfaces and DCheckAsserter is the default asserter -// used. During the unit tests is used another class that doesn't "DCHECK" -// in case of collision (check thread_collision_warner_unittests.cc) -struct AsserterBase { - virtual ~AsserterBase() {} - virtual void warn() = 0; -}; - -struct DCheckAsserter : public AsserterBase { - virtual ~DCheckAsserter() {} - virtual void warn(); -}; - -class ThreadCollisionWarner { - public: - // The parameter asserter is there only for test purpose - explicit ThreadCollisionWarner(AsserterBase* asserter = new DCheckAsserter()) - : valid_thread_id_(0), counter_(0), asserter_(asserter) {} - - ~ThreadCollisionWarner() { delete asserter_; } - - // This class is meant to be used through the macro - // DFAKE_SCOPED_LOCK_THREAD_LOCKED - // it doesn't leave the critical section, as opposed to ScopedCheck, - // because the critical section being pinned is allowed to be used only - // from one thread - class Check { - public: - explicit Check(ThreadCollisionWarner* warner) : warner_(warner) { - warner_->EnterSelf(); - } - - ~Check() {} - - private: - ThreadCollisionWarner* warner_; - }; - - // This class is meant to be used through the macro - // DFAKE_SCOPED_LOCK - class ScopedCheck { - public: - explicit ScopedCheck(ThreadCollisionWarner* warner) : warner_(warner) { - warner_->Enter(); - } - - ~ScopedCheck() { warner_->Leave(); } - - private: - ThreadCollisionWarner* warner_; - }; - - // This class is meant to be used through the macro - // DFAKE_SCOPED_RECURSIVE_LOCK - class ScopedRecursiveCheck { - public: - explicit ScopedRecursiveCheck(ThreadCollisionWarner* warner) - : warner_(warner) { - warner_->EnterSelf(); - } - - ~ScopedRecursiveCheck() { warner_->Leave(); } - - private: - ThreadCollisionWarner* warner_; - }; - - private: - // This method stores the current thread identifier and does a DCHECK - // if a another thread has already done it, it is safe if same thread - // calls this multiple time (recursion allowed). - void EnterSelf(); - - // Same as EnterSelf but recursion is not allowed. - void Enter(); - - // Removes the thread_id stored in order to allow other threads to - // call EnterSelf or Enter. - void Leave(); - - // This stores the thread id that is inside the critical section, if the - // value is 0 then no thread is inside. - volatile SbAtomic32 valid_thread_id_; - - // Counter to trace how many time a critical section was "pinned" - // (when allowed) in order to unpin it when counter_ reaches 0. - volatile SbAtomic32 counter_; - - // Here only for class unit tests purpose, during the test I need to not - // DCHECK but notify the collision with something else. - AsserterBase* asserter_; -}; - -} // namespace nb - -#endif // GLIMP_THREAD_COLLISION_WARNER_H_ diff --git a/glimp/tracing/BUILD.gn b/glimp/tracing/BUILD.gn deleted file mode 100644 index d9605c1bef96..000000000000 --- a/glimp/tracing/BUILD.gn +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2021 The Cobalt Authors. All Rights Reserved. -# -# 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. - -static_library("tracing") { - sources = [ - "tracing.cc", - "tracing.h", - ] - configs += [ "//glimp:glimp_config" ] -} diff --git a/glimp/tracing/tracing.cc b/glimp/tracing/tracing.cc deleted file mode 100644 index ddf30316bcdc..000000000000 --- a/glimp/tracing/tracing.cc +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#include - -#include "glimp/tracing/tracing.h" - -#if defined(ENABLE_GLIMP_TRACING) - -namespace glimp { - -namespace { -TraceEventImpl* g_trace_event_implementation = NULL; -} // namespace - -ScopedTraceEvent::ScopedTraceEvent(const char* name) : name_(name) { - if (g_trace_event_implementation) { - g_trace_event_implementation->BeginTrace(name_); - } -} - -ScopedTraceEvent::~ScopedTraceEvent() { - if (g_trace_event_implementation) { - g_trace_event_implementation->EndTrace(name_); - } -} - -void SetTraceEventImplementation(TraceEventImpl* impl) { - g_trace_event_implementation = impl; -} - -} // namespace glimp - -#endif // #if defined(ENABLE_GLIMP_TRACING) diff --git a/glimp/tracing/tracing.h b/glimp/tracing/tracing.h deleted file mode 100644 index 8471f40cc044..000000000000 --- a/glimp/tracing/tracing.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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. - */ - -#ifndef GLIMP_TRACING_TRACING_H_ -#define GLIMP_TRACING_TRACING_H_ - -#if !defined(ENABLE_GLIMP_TRACING) - -#define GLIMP_TRACE_EVENT0(event) - -#else // !defined(ENABLE_GLIMP_TRACING) - -#define GLIMP_TRACE_EVENT0(event) \ - glimp::ScopedTraceEvent profileScope##__LINE__(event) - -namespace glimp { - -class ScopedTraceEvent { - public: - explicit ScopedTraceEvent(const char* name); - ~ScopedTraceEvent(); - - private: - const char* name_; -}; - -// Clients should implement TraceEventImpl so that the desired activities occur -// when we start and end a trace. For example, this might get hooked up to -// TRACE_EVENT_BEGIN0() and TRACE_EVENT_END0() if Chromium's base trace_event -// system is available. Then, SetTraceEventImplementation() should be called -// by the client to make install the client's TraceEventImpl. -class TraceEventImpl { - public: - virtual void BeginTrace(const char* name) = 0; - virtual void EndTrace(const char* name) = 0; -}; - -void SetTraceEventImplementation(TraceEventImpl* impl); - -} // namespace glimp - -#endif // !defined(ENABLE_GLIMP_TRACING) - -#endif // GLIMP_TRACING_TRACING_H_ diff --git a/starboard/egl_and_gles/BUILD.gn b/starboard/egl_and_gles/BUILD.gn index 78f817ed7a2f..8256b0b28849 100644 --- a/starboard/egl_and_gles/BUILD.gn +++ b/starboard/egl_and_gles/BUILD.gn @@ -38,7 +38,7 @@ config("egl_and_gles_glimp_public_config") { if (gl_type == "glimp") { group("egl_and_gles_glimp") { public_configs = [ ":egl_and_gles_glimp_public_config" ] - public_deps = [ "//glimp" ] + public_deps = [ "//internal/starboard/shared/glimp" ] } }